From 7c42b20d1d9491bc61bfc3a8654f286f87d4b825 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Thu, 19 Oct 2023 15:51:22 +0000 Subject: [PATCH] Update generated files with build 127164 --- .../generated/admin/admin_request_builder.py | 28 +- .../admin/edge/edge_request_builder.py | 24 +- .../internet_explorer_mode_request_builder.py | 24 +- .../site_lists/count/count_request_builder.py | 10 +- .../browser_site_list_item_request_builder.py | 38 +- .../item/publish/publish_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...wser_shared_cookie_item_request_builder.py | 38 +- .../shared_cookies_request_builder.py | 28 +- .../item/sites/count/count_request_builder.py | 10 +- .../item/browser_site_item_request_builder.py | 38 +- .../item/sites/sites_request_builder.py | 28 +- .../site_lists/site_lists_request_builder.py | 28 +- .../admin/people/people_request_builder.py | 180 +++++++++ .../count/count_request_builder.py | 113 ++++++ ...file_card_property_item_request_builder.py | 214 +++++++++++ ...profile_card_properties_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 10 +- .../health_overviews_request_builder.py | 24 +- .../issues/count/count_request_builder.py | 10 +- .../item/issues/issues_request_builder.py | 18 +- .../incident_report_request_builder.py | 6 +- ...rvice_health_issue_item_request_builder.py | 24 +- .../service_health_item_request_builder.py | 30 +- .../issues/count/count_request_builder.py | 10 +- .../issues/issues_request_builder.py | 24 +- .../incident_report_request_builder.py | 6 +- ...rvice_health_issue_item_request_builder.py | 30 +- .../archive/archive_post_response.py} | 8 +- .../archive/archive_request_builder.py | 22 +- .../messages/count/count_request_builder.py | 10 +- .../favorite_post_response.py} | 8 +- .../favorite/favorite_request_builder.py | 22 +- .../attachments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- ...ncement_attachment_item_request_builder.py | 30 +- .../attachments_archive_request_builder.py | 12 +- ...ice_update_message_item_request_builder.py | 30 +- .../mark_read_post_response.py} | 8 +- .../mark_read/mark_read_request_builder.py | 22 +- .../mark_unread/mark_unread_post_response.py | 49 +++ .../mark_unread_request_builder.py | 22 +- .../messages/messages_request_builder.py | 24 +- .../unarchive/unarchive_post_response.py | 49 +++ .../unarchive/unarchive_request_builder.py | 22 +- .../unfavorite/unfavorite_post_response.py | 49 +++ .../unfavorite/unfavorite_request_builder.py | 22 +- .../unfavorite/unfavorite_response.py | 49 --- .../service_announcement_request_builder.py | 24 +- .../settings/settings_request_builder.py | 34 +- .../sharepoint/sharepoint_request_builder.py | 24 +- .../agreement_acceptances_request_builder.py | 18 +- ...reement_acceptance_item_request_builder.py | 24 +- .../agreements/agreements_request_builder.py | 18 +- .../acceptances_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...reement_acceptance_item_request_builder.py | 24 +- .../item/agreement_item_request_builder.py | 24 +- .../item/file/file_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ..._file_localization_item_request_builder.py | 24 +- .../versions/count/count_request_builder.py | 10 +- ...ement_file_version_item_request_builder.py | 30 +- .../item/versions/versions_request_builder.py | 24 +- .../localizations_request_builder.py | 24 +- .../item/files/count/count_request_builder.py | 10 +- .../item/files/files_request_builder.py | 22 +- ..._file_localization_item_request_builder.py | 24 +- .../versions/count/count_request_builder.py | 10 +- ...ement_file_version_item_request_builder.py | 30 +- .../item/versions/versions_request_builder.py | 24 +- .../app_catalogs_request_builder.py | 18 +- .../teams_apps/count/count_request_builder.py | 10 +- .../app_definitions_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- .../item/bot/bot_request_builder.py | 30 +- ...ams_app_definition_item_request_builder.py | 28 +- .../item/teams_app_item_request_builder.py | 28 +- .../teams_apps/teams_apps_request_builder.py | 28 +- .../application_templates_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...plication_template_item_request_builder.py | 16 +- .../instantiate_request_builder.py | 12 +- .../applications_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...ble_extension_properties_post_response.py} | 8 +- ...le_extension_properties_request_builder.py | 22 +- .../get_by_ids/get_by_ids_post_response.py} | 8 +- .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../item/add_key/add_key_request_builder.py | 12 +- .../add_password_request_builder.py | 12 +- ...app_management_policies_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 20 +- .../item/application_item_request_builder.py | 38 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_objects_post_response.py} | 8 +- .../check_member_objects_request_builder.py | 18 +- .../created_on_behalf_of_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../extension_properties_request_builder.py | 28 +- ...extension_property_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- ...ed_identity_credentials_request_builder.py | 28 +- ...dentity_credential_item_request_builder.py | 38 +- .../get_member_groups_post_response.py} | 8 +- .../get_member_groups_request_builder.py | 22 +- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...ealm_discovery_policies_request_builder.py | 10 +- ...m_discovery_policy_item_request_builder.py | 10 +- .../item/logo/logo_request_builder.py | 12 +- .../owners/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../owners/item/ref/ref_request_builder.py | 14 +- .../item/owners/owners_request_builder.py | 10 +- .../item/owners/ref/ref_request_builder.py | 20 +- .../remove_key/remove_key_request_builder.py | 10 +- .../remove_password_request_builder.py | 10 +- .../item/restore/restore_request_builder.py | 12 +- .../set_verified_publisher_request_builder.py | 10 +- .../acquire_access_token_request_builder.py | 10 +- .../jobs/count/count_request_builder.py | 10 +- .../jobs/item/pause/pause_request_builder.py | 10 +- .../provision_on_demand_request_builder.py | 12 +- .../item/restart/restart_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../directories_request_builder.py | 18 +- ...rectory_definition_item_request_builder.py | 24 +- .../item/discover/discover_request_builder.py | 12 +- .../filter_operators_get_response.py} | 8 +- .../filter_operators_request_builder.py | 20 +- .../functions/functions_get_response.py} | 8 +- .../functions/functions_request_builder.py | 20 +- .../parse_expression_request_builder.py | 12 +- .../item/schema/schema_request_builder.py | 30 +- .../jobs/item/start/start_request_builder.py | 10 +- ...ynchronization_job_item_request_builder.py | 34 +- .../validate_credentials_request_builder.py | 10 +- .../jobs/jobs_request_builder.py | 28 +- .../validate_credentials_request_builder.py | 6 +- .../secrets/count/count_request_builder.py | 10 +- .../secrets/secrets_request_builder.py | 8 +- .../synchronization_request_builder.py | 30 +- .../templates/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../directories_request_builder.py | 18 +- ...rectory_definition_item_request_builder.py | 24 +- .../item/discover/discover_request_builder.py | 12 +- .../filter_operators_get_response.py} | 8 +- .../filter_operators_request_builder.py | 20 +- .../functions/functions_get_response.py} | 8 +- .../functions/functions_request_builder.py | 20 +- .../parse_expression_request_builder.py | 12 +- .../item/schema/schema_request_builder.py | 24 +- ...onization_template_item_request_builder.py | 34 +- .../templates/templates_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- ...token_issuance_policies_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- ...token_lifetime_policies_request_builder.py | 16 +- ...nset_verified_publisher_request_builder.py | 10 +- .../validate_properties_request_builder.py | 10 +- ...pplications_with_app_id_request_builder.py | 40 +- .../audit_logs/audit_logs_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../directory_audits_request_builder.py | 24 +- .../directory_audit_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...ing_object_summary_item_request_builder.py | 24 +- .../provisioning_request_builder.py | 24 +- .../sign_ins/count/count_request_builder.py | 10 +- .../item/sign_in_item_request_builder.py | 30 +- .../sign_ins/sign_ins_request_builder.py | 24 +- ...n_method_configurations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...thod_configuration_item_request_builder.py | 24 +- ...n_method_configurations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...thod_configuration_item_request_builder.py | 24 +- ...tication_methods_policy_request_builder.py | 18 +- .../generated/base_graph_service_client.py | 62 ++-- ...ased_auth_configuration_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...auth_configuration_item_request_builder.py | 24 +- .../generated/chats/chats_request_builder.py | 28 +- .../chats/count/count_request_builder.py | 10 +- .../get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../chats/item/chat_item_request_builder.py | 34 +- .../hide_for_user_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../installed_apps_request_builder.py | 28 +- .../teams_app/teams_app_request_builder.py | 10 +- .../teams_app_definition_request_builder.py | 10 +- ...s_app_installation_item_request_builder.py | 34 +- .../item/upgrade/upgrade_request_builder.py | 10 +- .../last_message_preview_request_builder.py | 24 +- ...mark_chat_read_for_user_request_builder.py | 10 +- ...rk_chat_unread_for_user_request_builder.py | 10 +- .../item/members/add/add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 34 +- .../item/members/members_request_builder.py | 28 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- .../item/replies/delta/delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../check_member_groups_post_request_body.py | 49 --- .../check_member_groups_request_builder.py | 95 ----- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_request_body.py | 49 --- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_request_body.py | 49 --- .../get_member_groups_request_builder.py | 95 ----- .../get_member_objects_post_request_body.py | 49 --- .../get_member_objects_request_builder.py | 95 ----- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 74 +--- .../permission_grants_request_builder.py | 64 +--- .../validate_properties_request_builder.py | 91 ----- .../count/count_request_builder.py | 10 +- .../item/message/message_request_builder.py | 10 +- ..._chat_message_info_item_request_builder.py | 28 +- .../pinned_messages_request_builder.py | 28 +- ...d_activity_notification_request_builder.py | 10 +- .../item/tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../chats/item/tabs/tabs_request_builder.py | 28 +- .../unhide_for_user_request_builder.py | 10 +- .../call_records_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/call_record_item_request_builder.py | 30 +- .../sessions/count/count_request_builder.py | 10 +- .../segments/count/count_request_builder.py | 10 +- .../item/segment_item_request_builder.py | 24 +- .../item/segments/segments_request_builder.py | 18 +- .../item/session_item_request_builder.py | 24 +- .../item/sessions/sessions_request_builder.py | 24 +- ...te_time_with_to_date_time_get_response.py} | 8 +- ..._time_with_to_date_time_request_builder.py | 23 +- ...te_time_with_to_date_time_get_response.py} | 8 +- ..._time_with_to_date_time_request_builder.py | 23 +- .../calls/calls_request_builder.py | 28 +- .../calls/count/count_request_builder.py | 10 +- .../add_large_gallery_view_request_builder.py | 12 +- .../item/answer/answer_request_builder.py | 10 +- .../audio_routing_groups_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...udio_routing_group_item_request_builder.py | 38 +- .../calls/item/call_item_request_builder.py | 34 +- ...cancel_media_processing_request_builder.py | 12 +- ...nge_screen_sharing_role_request_builder.py | 10 +- ...ontent_sharing_sessions_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...nt_sharing_session_item_request_builder.py | 30 +- .../keep_alive/keep_alive_request_builder.py | 10 +- .../calls/item/mute/mute_request_builder.py | 12 +- .../operations/count/count_request_builder.py | 10 +- .../comms_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../invite/invite_request_builder.py | 12 +- .../item/mute/mute_request_builder.py | 12 +- .../item/participant_item_request_builder.py | 34 +- .../start_hold_music_request_builder.py | 12 +- .../stop_hold_music_request_builder.py | 12 +- .../participants_request_builder.py | 24 +- .../play_prompt_request_builder.py | 12 +- .../record_response_request_builder.py | 12 +- .../item/redirect/redirect_request_builder.py | 10 +- .../item/reject/reject_request_builder.py | 10 +- .../subscribe_to_tone_request_builder.py | 12 +- .../item/transfer/transfer_request_builder.py | 10 +- .../item/unmute/unmute_request_builder.py | 12 +- ...update_recording_status_request_builder.py | 12 +- ...nference_device_quality_request_builder.py | 10 +- .../communications_request_builder.py | 20 +- ...get_presences_by_user_id_post_response.py} | 8 +- ...et_presences_by_user_id_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- .../create_or_get_request_builder.py | 14 +- .../attendance_reports_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../attendance_records_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../attendance_record_item_request_builder.py | 24 +- ..._attendance_report_item_request_builder.py | 30 +- .../attendee_report_request_builder.py | 20 +- ..._appointment_join_web_url_get_response.py} | 8 +- ...ppointment_join_web_url_request_builder.py | 18 +- .../online_meeting_item_request_builder.py | 36 +- .../count/count_request_builder.py | 113 ++++++ .../call_transcript_item_request_builder.py | 235 ++++++++++++ .../item/content/content_request_builder.py | 138 +++++++ .../metadata_content_request_builder.py | 134 +++++++ .../transcripts_request_builder.py | 227 ++++++++++++ .../online_meetings_request_builder.py | 26 +- .../presences/count/count_request_builder.py | 10 +- .../clear_presence_request_builder.py | 10 +- ...user_preferred_presence_request_builder.py | 10 +- .../item/presence_item_request_builder.py | 30 +- .../set_presence_request_builder.py | 10 +- .../set_status_message_request_builder.py | 11 +- ...user_preferred_presence_request_builder.py | 10 +- .../presences/presences_request_builder.py | 24 +- .../compliance/compliance_request_builder.py | 18 +- .../connections_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...xternal_connection_item_request_builder.py | 24 +- .../groups/count/count_request_builder.py | 10 +- .../item/groups/groups_request_builder.py | 28 +- .../external_group_item_request_builder.py | 38 +- .../members/count/count_request_builder.py | 10 +- .../item/identity_item_request_builder.py | 30 +- .../item/members/members_request_builder.py | 22 +- .../item/items/count/count_request_builder.py | 10 +- .../activities/activities_request_builder.py | 18 +- .../activities/count/count_request_builder.py | 10 +- .../external_activity_item_request_builder.py | 24 +- .../performed_by_request_builder.py | 10 +- .../external_item_item_request_builder.py | 34 +- ...nse.py => add_activities_post_response.py} | 8 +- ...nnectors_add_activities_request_builder.py | 18 +- .../item/items/items_request_builder.py | 24 +- .../operations/count/count_request_builder.py | 10 +- ...nnection_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../item/schema/schema_request_builder.py | 71 +--- .../contacts/contacts_request_builder.py | 26 +- .../contacts/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../contacts/delta/delta_request_builder.py | 20 +- ...ble_extension_properties_post_response.py} | 8 +- ...le_extension_properties_request_builder.py | 22 +- ...esponse.py => get_by_ids_post_response.py} | 8 +- .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py} | 8 +- .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../count/count_request_builder.py | 10 +- .../direct_reports_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../graph_user/graph_user_request_builder.py | 10 +- .../get_member_groups_post_response.py} | 8 +- .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../item/manager/manager_request_builder.py | 16 +- .../member_of/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../member_of/member_of_request_builder.py | 10 +- .../item/org_contact_item_request_builder.py | 42 ++- .../item/restore/restore_request_builder.py | 12 +- ...ry_service_provisioning_request_builder.py | 6 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../transitive_member_of_request_builder.py | 10 +- .../validate_properties_request_builder.py | 10 +- .../contracts/contracts_request_builder.py | 24 +- .../contracts/count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../contracts/delta/delta_request_builder.py | 20 +- ...ble_extension_properties_post_response.py} | 8 +- ...le_extension_properties_request_builder.py | 22 +- .../get_by_ids/get_by_ids_post_response.py} | 8 +- .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../item/contract_item_request_builder.py | 30 +- .../get_member_groups_post_response.py} | 8 +- .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../item/restore/restore_request_builder.py | 12 +- .../validate_properties_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../data_policy_operations_request_builder.py | 24 +- ...a_policy_operation_item_request_builder.py | 30 +- ...managed_app_protections_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ged_app_protection_item_request_builder.py | 24 +- .../item/apps/apps_request_builder.py | 18 +- .../item/apps/count/count_request_builder.py | 10 +- ...managed_mobile_app_item_request_builder.py | 24 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 24 +- .../deployment_summary_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...managed_app_protections_request_builder.py | 18 +- .../item/apps/apps_request_builder.py | 18 +- .../item/apps/count/count_request_builder.py | 10 +- ...managed_mobile_app_item_request_builder.py | 24 +- ...ged_app_protection_item_request_builder.py | 24 +- .../deployment_summary_request_builder.py | 24 +- .../device_app_management_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...managed_app_protections_request_builder.py | 18 +- .../item/apps/apps_request_builder.py | 18 +- .../item/apps/count/count_request_builder.py | 10 +- ...managed_mobile_app_item_request_builder.py | 24 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 24 +- .../deployment_summary_request_builder.py | 24 +- ...ged_app_protection_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...managed_app_policy_item_request_builder.py | 32 +- .../target_apps_request_builder.py | 8 +- .../managed_app_policies_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...h_flagged_app_registration_get_response.py | 54 +++ ...lagged_app_registration_request_builder.py | 20 +- .../applied_policies_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...managed_app_policy_item_request_builder.py | 24 +- .../target_apps_request_builder.py | 8 +- .../count/count_request_builder.py | 10 +- .../intended_policies_request_builder.py | 18 +- ...managed_app_policy_item_request_builder.py | 24 +- .../target_apps_request_builder.py | 8 +- ...d_app_registration_item_request_builder.py | 24 +- .../operations/count/count_request_builder.py | 10 +- ...aged_app_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- ...naged_app_registrations_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- ...managed_app_status_item_request_builder.py | 24 +- .../managed_app_statuses_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../item/assign/assign_request_builder.py | 6 +- .../assignments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ..._e_book_assignment_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../device_states_request_builder.py | 18 +- ...vice_install_state_item_request_builder.py | 24 +- .../install_summary_request_builder.py | 24 +- .../managed_e_book_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../device_states_request_builder.py | 18 +- ...vice_install_state_item_request_builder.py | 24 +- ...tall_state_summary_item_request_builder.py | 24 +- .../user_state_summary_request_builder.py | 18 +- .../managed_e_books_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...exempt_app_locker_files_request_builder.py | 18 +- ...on_app_locker_file_item_request_builder.py | 24 +- ..._protection_policy_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...on_app_locker_file_item_request_builder.py | 24 +- ...tected_app_locker_files_request_builder.py | 18 +- ...ion_protection_policies_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...obile_app_category_item_request_builder.py | 24 +- .../mobile_app_categories_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/assign/assign_request_builder.py | 6 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...uration_assignment_item_request_builder.py | 24 +- .../device_status_summary_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../device_statuses_request_builder.py | 18 +- ...tion_device_status_item_request_builder.py | 24 +- ..._app_configuration_item_request_builder.py | 58 +-- .../user_status_summary_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ration_user_status_item_request_builder.py | 24 +- .../user_statuses_request_builder.py | 18 +- ...bile_app_configurations_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_android_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_android_store_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_ios_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_ios_store_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_ios_vpp_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_mac_o_s_dmg_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_mac_o_s_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...managed_android_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...h_managed_i_o_s_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ..._managed_mobile_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ..._store_for_business_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_win32_lob_app_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_windows_app_x_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ph_windows_mobile_m_s_i_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...windows_universal_app_x_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_windows_web_app_request_builder.py | 10 +- .../item/assign/assign_request_builder.py | 6 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ile_app_assignment_item_request_builder.py | 24 +- .../categories/categories_request_builder.py | 10 +- .../categories/count/count_request_builder.py | 10 +- ...obile_app_category_item_request_builder.py | 10 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py} | 23 +- .../item/commit/commit_request_builder.py} | 44 +-- ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py} | 43 +-- ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ .../graph_android_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ ...graph_android_store_app_request_builder.py | 30 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py} | 44 +-- ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py} | 43 +-- ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ .../graph_ios_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../graph_ios_store_app_request_builder.py | 30 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../graph_ios_vpp_app_request_builder.py | 30 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py} | 44 +-- ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py} | 43 +-- ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ .../graph_mac_o_s_dmg_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py} | 44 +-- ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ .../graph_mac_o_s_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ ...managed_android_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ ...h_managed_i_o_s_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ ..._managed_mobile_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ ..._store_for_business_app_request_builder.py | 30 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ .../graph_win32_lob_app_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ .../graph_windows_app_x_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ ...ph_windows_mobile_m_s_i_request_builder.py | 40 +- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ ...ommitted_contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../content_versions_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../contained_apps_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...bile_contained_app_item_request_builder.py | 214 +++++++++++ .../item/files/count/count_request_builder.py | 113 ++++++ .../item/files/files_request_builder.py | 226 ++++++++++++ .../item/commit/commit_post_request_body.py | 56 +++ .../item/commit/commit_request_builder.py | 90 +++++ ...e_app_content_file_item_request_builder.py | 234 ++++++++++++ .../renew_upload_request_builder.py | 82 +++++ ...mobile_app_content_item_request_builder.py | 234 ++++++++++++ ...windows_universal_app_x_request_builder.py | 50 ++- .../assignments_request_builder.py | 228 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ile_app_assignment_item_request_builder.py | 217 +++++++++++ .../categories/categories_request_builder.py | 171 +++++++++ .../categories/count/count_request_builder.py | 113 ++++++ ...obile_app_category_item_request_builder.py | 116 ++++++ .../graph_windows_web_app_request_builder.py | 30 +- .../item/mobile_app_item_request_builder.py | 44 +-- .../mobile_apps_request_builder.py | 32 +- ...store_for_business_apps_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- .../item/apps/apps_request_builder.py | 18 +- .../item/apps/count/count_request_builder.py | 10 +- ...managed_mobile_app_item_request_builder.py | 24 +- .../item/assign/assign_request_builder.py | 6 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 24 +- .../deployment_summary_request_builder.py | 24 +- .../target_apps_request_builder.py | 6 +- ..._app_configuration_item_request_builder.py | 24 +- ...aged_app_configurations_request_builder.py | 18 +- .../vpp_tokens/count/count_request_builder.py | 10 +- .../sync_licenses_request_builder.py | 8 +- .../item/vpp_token_item_request_builder.py | 24 +- .../vpp_tokens/vpp_tokens_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...exempt_app_locker_files_request_builder.py | 18 +- ...on_app_locker_file_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...on_app_locker_file_item_request_builder.py | 24 +- ...tected_app_locker_files_request_builder.py | 18 +- ..._protection_policy_item_request_builder.py | 24 +- ...ion_protection_policies_request_builder.py | 18 +- ...otification_certificate_request_builder.py | 24 +- ...rtificate_signing_request_get_response.py} | 8 +- ...ificate_signing_request_request_builder.py | 18 +- .../audit_events_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ivity_types_with_category_get_response.py} | 8 +- ...ity_types_with_category_request_builder.py | 22 +- ...t_activity_types_with_category_response.py | 54 --- .../get_audit_categories_get_response.py | 54 +++ .../get_audit_categories_request_builder.py | 20 +- .../get_audit_categories_response.py | 54 --- .../item/audit_event_item_request_builder.py | 24 +- ...nce_management_partners_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...management_partner_item_request_builder.py | 24 +- ...itional_access_settings_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../detected_apps_request_builder.py | 18 +- .../item/detected_app_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../managed_device_item_request_builder.py | 10 +- .../managed_devices_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../device_categories_request_builder.py | 18 +- .../device_category_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ice_compliance_policies_request_builder.py | 32 +- ...gn_response.py => assign_post_response.py} | 8 +- .../item/assign/assign_request_builder.py | 18 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 24 +- ..._compliance_policy_item_request_builder.py | 72 ++-- .../count/count_request_builder.py | 10 +- ...setting_state_summaries_request_builder.py | 18 +- ...ate_device_summary_item_request_builder.py | 24 +- .../device_status_overview_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../device_statuses_request_builder.py | 18 +- ...ance_device_status_item_request_builder.py | 24 +- ...edule_actions_for_rules_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- ...ed_action_for_rule_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...liance_action_item_item_request_builder.py | 24 +- ...d_action_configurations_request_builder.py | 18 +- ...eduled_actions_for_rule_request_builder.py | 18 +- .../user_status_overview_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...liance_user_status_item_request_builder.py | 24 +- .../user_statuses_request_builder.py | 18 +- ...cy_device_state_summary_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...setting_state_summaries_request_builder.py | 18 +- ...ting_state_summary_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...mpliance_setting_states_request_builder.py | 18 +- ...ance_setting_state_item_request_builder.py | 24 +- ..._device_state_summaries_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../device_configurations_request_builder.py | 32 +- ...gn_response.py => assign_post_response.py} | 8 +- .../item/assign/assign_request_builder.py | 18 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...uration_assignment_item_request_builder.py | 24 +- ...vice_configuration_item_request_builder.py | 70 ++-- .../count/count_request_builder.py | 10 +- ...setting_state_summaries_request_builder.py | 18 +- ...ate_device_summary_item_request_builder.py | 24 +- .../device_status_overview_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../device_statuses_request_builder.py | 18 +- ...tion_device_status_item_request_builder.py | 24 +- ...secret_reference_value_id_get_response.py} | 8 +- ...cret_reference_value_id_request_builder.py | 20 +- .../user_status_overview_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ration_user_status_item_request_builder.py | 24 +- .../user_statuses_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...rollment_configurations_request_builder.py | 24 +- .../item/assign/assign_request_builder.py | 6 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...uration_assignment_item_request_builder.py | 24 +- ...ment_configuration_item_request_builder.py | 44 +-- .../set_priority_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- ...ice_management_partners_request_builder.py | 18 +- ...management_partner_item_request_builder.py | 24 +- .../terminate/terminate_request_builder.py | 6 +- .../device_management_request_builder.py | 44 +-- .../count/count_request_builder.py | 10 +- .../exchange_connectors_request_builder.py | 18 +- ...exchange_connector_item_request_builder.py | 24 +- .../item/sync/sync_request_builder.py | 6 +- ...ve_permissions_with_scope_get_response.py} | 8 +- ..._permissions_with_scope_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...rt_response.py => import_post_response.py} | 8 +- .../import_/import_request_builder.py | 18 +- ...pilot_device_identities_request_builder.py | 18 +- ...ot_device_identity_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../ios_update_statuses_request_builder.py | 18 +- ...date_device_status_item_request_builder.py | 24 +- ...managed_device_overview_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../bypass_activation_lock_request_builder.py | 6 +- .../clean_windows_device_request_builder.py | 6 +- ...rom_shared_apple_device_request_builder.py | 6 +- .../device_category_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ompliance_policy_states_request_builder.py | 18 +- ...iance_policy_state_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ce_configuration_states_request_builder.py | 18 +- ...onfiguration_state_item_request_builder.py | 24 +- .../disable_lost_mode_request_builder.py | 6 +- .../locate_device_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- .../create_download_url_post_response.py} | 8 +- .../create_download_url_request_builder.py | 18 +- ...ollection_response_item_request_builder.py | 24 +- ...log_collection_requests_request_builder.py | 18 +- ...pple_device_active_user_request_builder.py | 6 +- .../managed_device_item_request_builder.py | 26 +- .../reboot_now/reboot_now_request_builder.py | 6 +- .../recover_passcode_request_builder.py | 6 +- .../remote_lock_request_builder.py | 6 +- ...quest_remote_assistance_request_builder.py | 6 +- .../reset_passcode_request_builder.py | 6 +- .../item/retire/retire_request_builder.py | 6 +- .../shut_down/shut_down_request_builder.py | 6 +- .../sync_device_request_builder.py | 6 +- ..._windows_device_account_request_builder.py | 6 +- .../item/users/users_request_builder.py | 10 +- .../windows_defender_scan_request_builder.py | 6 +- ...ender_update_signatures_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- .../detected_malware_state_request_builder.py | 18 +- ...vice_malware_state_item_request_builder.py | 24 +- ...indows_protection_state_request_builder.py | 24 +- .../item/wipe/wipe_request_builder.py | 6 +- .../managed_devices_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...log_collection_requests_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...collection_request_item_request_builder.py | 24 +- .../create_download_url_request_builder.py | 8 +- ...ubleshooting_event_item_request_builder.py | 24 +- ..._troubleshooting_events_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._defense_connector_item_request_builder.py | 24 +- ...reat_defense_connectors_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...tification_message_item_request_builder.py | 24 +- ...d_notification_messages_request_builder.py | 18 +- ...n_message_template_item_request_builder.py | 24 +- .../send_test_message_request_builder.py | 6 +- ...ation_message_templates_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../begin_onboarding_request_builder.py | 6 +- .../disconnect/disconnect_request_builder.py | 6 +- ...assistance_partner_item_request_builder.py | 24 +- ...ote_assistance_partners_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../export_jobs_request_builder.py | 18 +- ...agement_export_job_item_request_builder.py | 24 +- .../get_cached_report_request_builder.py | 6 +- ...y_non_compliance_report_request_builder.py | 6 +- ...mpliance_summary_report_request_builder.py | 6 +- ...g_non_compliance_report_request_builder.py | 6 +- ...y_non_compliance_report_request_builder.py | 6 +- ...mpliance_summary_report_request_builder.py | 6 +- ...g_non_compliance_report_request_builder.py | 6 +- ...g_contributing_profiles_request_builder.py | 6 +- ..._intent_settings_report_request_builder.py | 6 +- ...e_non_compliance_report_request_builder.py | 6 +- ...ompliance_policy_report_request_builder.py | 6 +- .../get_historical_report_request_builder.py | 6 +- ...ces_and_settings_report_request_builder.py | 6 +- ...non_compliance_metadata_request_builder.py | 6 +- ...y_non_compliance_report_request_builder.py | 6 +- ...mpliance_summary_report_request_builder.py | 6 +- .../get_report_filters_request_builder.py | 6 +- ...g_non_compliance_report_request_builder.py | 6 +- .../reports/reports_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- ...resource_operation_item_request_builder.py | 24 +- .../resource_operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...nt_role_assignment_item_request_builder.py | 24 +- .../role_definition_request_builder.py | 10 +- .../role_assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../role_assignment_item_request_builder.py | 24 +- .../role_definition_request_builder.py | 10 +- .../role_assignments_request_builder.py | 18 +- .../role_definition_item_request_builder.py | 30 +- .../role_definitions_request_builder.py | 18 +- ...e_update_status_summary_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...management_partner_item_request_builder.py | 24 +- ...nse_management_partners_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../acceptance_statuses_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../terms_and_conditions_request_builder.py | 10 +- ..._acceptance_status_item_request_builder.py | 24 +- .../assignments_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ditions_assignment_item_request_builder.py | 24 +- ...rms_and_conditions_item_request_builder.py | 24 +- .../terms_and_conditions_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ubleshooting_event_item_request_builder.py | 24 +- .../troubleshooting_events_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...cation_performance_item_request_builder.py | 24 +- ...application_performance_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...pp_version_details_item_request_builder.py | 24 +- ..._by_app_version_details_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._version_device_id_item_request_builder.py | 24 +- ...y_app_version_device_id_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...nce_by_o_s_version_item_request_builder.py | 24 +- ...formance_by_o_s_version_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._model_performance_item_request_builder.py | 24 +- ...evice_model_performance_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...device_performance_item_request_builder.py | 24 +- ...alth_device_performance_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...erformance_details_item_request_builder.py | 24 +- ...ice_performance_details_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ersion_performance_item_request_builder.py | 24 +- ...o_s_version_performance_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...e_analytics_metric_item_request_builder.py | 24 +- .../metric_values_request_builder.py | 18 +- ...ics_app_health_overview_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../app_health_metrics_request_builder.py | 10 +- .../battery_health_metrics_request_builder.py | 10 +- .../best_practices_metrics_request_builder.py | 10 +- ...oot_performance_metrics_request_builder.py | 10 +- ...eboot_analytics_metrics_request_builder.py | 10 +- ...rce_performance_metrics_request_builder.py | 10 +- ...analytics_baseline_item_request_builder.py | 24 +- ...k_from_anywhere_metrics_request_builder.py | 10 +- ...nce_analytics_baselines_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...e_analytics_metric_item_request_builder.py | 24 +- .../metric_values_request_builder.py | 18 +- ...analytics_category_item_request_builder.py | 24 +- ...ce_analytics_categories_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...device_performance_item_request_builder.py | 24 +- ...devices_with_summarize_by_get_response.py} | 8 +- ...vices_with_summarize_by_request_builder.py | 22 +- ...tics_device_performance_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...tics_device_scores_item_request_builder.py | 24 +- ...analytics_device_scores_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ce_startup_history_item_request_builder.py | 24 +- ..._device_startup_history_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...rocess_performance_item_request_builder.py | 24 +- ...tup_process_performance_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ce_startup_process_item_request_builder.py | 24 +- ...evice_startup_processes_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ics_metric_history_item_request_builder.py | 24 +- ...nalytics_metric_history_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ytics_model_scores_item_request_builder.py | 24 +- ..._analytics_model_scores_request_builder.py | 18 +- ...ence_analytics_overview_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...tics_score_history_item_request_builder.py | 24 +- ...analytics_score_history_request_builder.py | 18 +- ...k_from_anywhere_devices_request_builder.py | 8 +- ...rdware_readiness_metric_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...om_anywhere_device_item_request_builder.py | 24 +- .../metric_devices_request_builder.py | 18 +- ...om_anywhere_metric_item_request_builder.py | 24 +- ...k_from_anywhere_metrics_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ..._model_performance_item_request_builder.py | 24 +- ...where_model_performance_request_builder.py | 18 +- ...iscovery_with_domain_name_get_response.py} | 8 +- ...covery_with_domain_name_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- .../assign_user_to_device_request_builder.py | 6 +- ...assign_user_from_device_request_builder.py | 6 +- ...pdate_device_properties_request_builder.py | 6 +- ...ot_device_identity_item_request_builder.py | 24 +- ...pilot_device_identities_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...p_learning_summary_item_request_builder.py | 24 +- ..._app_learning_summaries_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...k_learning_summary_item_request_builder.py | 24 +- ...work_learning_summaries_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../device_malware_states_request_builder.py | 18 +- ...for_windows_device_item_request_builder.py | 24 +- ...alware_information_item_request_builder.py | 24 +- ...ows_malware_information_request_builder.py | 18 +- .../devices/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../devices/delta/delta_request_builder.py | 20 +- .../devices/devices_request_builder.py | 28 +- ...ble_extension_properties_post_response.py} | 8 +- ...le_extension_properties_request_builder.py | 22 +- ...esponse.py => get_by_ids_post_response.py} | 8 +- .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../item/device_item_request_builder.py | 38 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../get_member_groups_post_response.py} | 8 +- .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../member_of/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../member_of/member_of_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 20 +- .../registered_owners_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 20 +- .../registered_users_request_builder.py | 10 +- .../item/restore/restore_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../transitive_member_of_request_builder.py | 10 +- .../validate_properties_request_builder.py | 10 +- .../devices_with_device_id_request_builder.py | 40 +- .../administrative_units_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...dministrative_unit_item_request_builder.py | 38 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../members/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../members/item/ref/ref_request_builder.py | 14 +- .../item/members/members_request_builder.py | 18 +- .../item/members/ref/ref_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...ed_role_membership_item_request_builder.py | 34 +- .../scoped_role_members_request_builder.py | 28 +- .../attribute_sets_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../attribute_set_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- ...y_attribute_definitions_request_builder.py | 28 +- .../allowed_values_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../allowed_value_item_request_builder.py | 34 +- ...tribute_definition_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../deleted_items_request_builder.py | 77 +--- .../deleted_items/delta/delta_response.py | 57 --- ...ble_extension_properties_post_response.py} | 8 +- ...le_extension_properties_request_builder.py | 22 +- ...esponse.py => get_by_ids_post_response.py} | 8 +- .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../check_member_groups_post_response.py} | 8 +- .../check_member_groups_request_builder.py | 22 +- ... => check_member_objects_post_response.py} | 8 +- .../check_member_objects_request_builder.py | 18 +- .../directory_object_item_request_builder.py | 76 +--- .../get_member_groups_post_response.py} | 8 +- .../get_member_groups_request_builder.py | 22 +- .../get_member_objects_post_response.py} | 8 +- .../get_member_objects_request_builder.py | 22 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../item/restore/restore_request_builder.py | 12 +- .../validate_properties_request_builder.py | 10 +- .../directory/directory_request_builder.py | 18 +- .../available_provider_types_get_response.py | 54 +++ ...vailable_provider_types_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- ...deration_configurations_request_builder.py | 18 +- ...tity_provider_base_item_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ry_synchronization_item_request_builder.py | 36 +- ...remises_synchronization_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- .../directory_objects_request_builder.py | 18 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../directory_object_item_request_builder.py | 34 +- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../item/restore/restore_request_builder.py | 12 +- .../validate_properties_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...irectory_role_templates_request_builder.py | 24 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- ...tory_role_template_item_request_builder.py | 30 +- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../item/restore/restore_request_builder.py | 12 +- .../validate_properties_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- .../directory_roles_request_builder.py | 28 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../directory_role_item_request_builder.py | 30 +- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../members/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../members/item/ref/ref_request_builder.py | 14 +- .../item/members/members_request_builder.py | 10 +- .../item/members/ref/ref_request_builder.py | 20 +- .../item/restore/restore_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ed_role_membership_item_request_builder.py | 24 +- .../scoped_members_request_builder.py | 24 +- .../validate_properties_request_builder.py | 10 +- ...s_with_role_template_id_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../domain_dns_records_request_builder.py | 18 +- .../domain_dns_record_item_request_builder.py | 24 +- .../domains/count/count_request_builder.py | 10 +- .../domains/domains_request_builder.py | 28 +- .../item/domain_item_request_builder.py | 38 +- .../count/count_request_builder.py | 10 +- .../domain_name_references_request_builder.py | 16 +- .../directory_object_item_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ederation_configuration_request_builder.py | 28 +- ..._domain_federation_item_request_builder.py | 38 +- .../force_delete_request_builder.py | 10 +- .../item/promote/promote_post_response.py} | 8 +- .../item/promote/promote_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- .../domain_dns_record_item_request_builder.py | 24 +- ...e_configuration_records_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../domain_dns_record_item_request_builder.py | 24 +- ...erification_dns_records_request_builder.py | 24 +- .../item/verify/verify_request_builder.py | 12 +- .../drives/drives_request_builder.py | 18 +- .../item/bundles/bundles_request_builder.py | 18 +- .../bundles/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- .../item/drive_item_item_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../drives/item/drive_item_request_builder.py | 24 +- .../following/count/count_request_builder.py | 10 +- .../following/following_request_builder.py | 16 +- .../item/content/content_request_builder.py | 14 +- .../item/drive_item_item_request_builder.py | 10 +- .../item/items/count/count_request_builder.py | 10 +- .../all_time/all_time_request_builder.py | 16 +- .../analytics/analytics_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../activities/activities_request_builder.py | 18 +- .../activities/count/count_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item_activity_item_request_builder.py | 24 +- ...item_activity_stat_item_request_builder.py | 24 +- .../item_activity_stats_request_builder.py | 18 +- .../last_seven_days_request_builder.py | 10 +- ...ssign_sensitivity_label_request_builder.py | 6 +- .../item/checkin/checkin_request_builder.py | 10 +- .../item/checkout/checkout_request_builder.py | 10 +- .../item/children/children_request_builder.py | 24 +- .../children/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- .../item/drive_item_item_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- .../items/item/copy/copy_request_builder.py | 12 +- .../create_link_request_builder.py | 12 +- .../create_upload_session_request_builder.py | 8 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ ...elta_response.py => delta_get_response.py} | 8 +- .../items/item/delta/delta_request_builder.py | 20 +- ...se.py => delta_with_token_get_response.py} | 8 +- .../delta_with_token_request_builder.py | 22 +- .../item/drive_item_item_request_builder.py | 50 +-- ...ract_sensitivity_labels_request_builder.py | 8 +- .../item/follow/follow_request_builder.py | 12 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- .../item/invite/invite_post_response.py} | 8 +- .../item/invite/invite_request_builder.py | 22 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../list_item/list_item_request_builder.py | 10 +- .../permanent_delete_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- ...ant_response.py => grant_post_response.py} | 8 +- .../item/grant/grant_request_builder.py | 22 +- .../item/permission_item_request_builder.py | 38 +- .../permissions_request_builder.py | 24 +- .../item/preview/preview_request_builder.py | 8 +- .../item/restore/restore_request_builder.py | 12 +- ...ponse.py => search_with_q_get_response.py} | 8 +- .../search_with_q_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- .../reauthorize_request_builder.py | 10 +- .../item/subscription_item_request_builder.py | 24 +- .../subscriptions_request_builder.py | 18 +- .../thumbnails/count/count_request_builder.py | 10 +- .../thumbnail_set_item_request_builder.py | 24 +- .../thumbnails/thumbnails_request_builder.py | 24 +- .../item/unfollow/unfollow_request_builder.py | 10 +- .../validate_permission_request_builder.py | 6 +- .../versions/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- ...drive_item_version_item_request_builder.py | 30 +- .../restore_version_request_builder.py | 10 +- .../item/versions/versions_request_builder.py | 24 +- .../application_request_builder.py | 30 +- .../calculate/calculate_request_builder.py | 10 +- .../close_session_request_builder.py | 10 +- .../comments/comments_request_builder.py | 18 +- .../comments/count/count_request_builder.py | 10 +- .../replies/count/count_request_builder.py | 10 +- ...book_comment_reply_item_request_builder.py | 30 +- .../item/replies/replies_request_builder.py | 24 +- .../workbook_comment_item_request_builder.py | 24 +- .../create_session_request_builder.py | 12 +- .../functions/abs/abs_request_builder.py | 8 +- .../accr_int/accr_int_request_builder.py | 8 +- .../accr_int_m/accr_int_m_request_builder.py | 8 +- .../functions/acos/acos_request_builder.py | 8 +- .../functions/acosh/acosh_request_builder.py | 8 +- .../functions/acot/acot_request_builder.py | 8 +- .../functions/acoth/acoth_request_builder.py | 8 +- .../amor_degrc/amor_degrc_request_builder.py | 8 +- .../amor_linc/amor_linc_request_builder.py | 8 +- .../functions/and_/and_request_builder.py | 8 +- .../arabic/arabic_request_builder.py | 8 +- .../functions/areas/areas_request_builder.py | 8 +- .../functions/asc/asc_request_builder.py | 8 +- .../functions/asin/asin_request_builder.py | 8 +- .../functions/asinh/asinh_request_builder.py | 8 +- .../functions/atan/atan_request_builder.py | 8 +- .../functions/atan2/atan2_request_builder.py | 8 +- .../functions/atanh/atanh_request_builder.py | 8 +- .../ave_dev/ave_dev_request_builder.py | 8 +- .../average/average_request_builder.py | 8 +- .../average_a/average_a_request_builder.py | 8 +- .../average_if/average_if_request_builder.py | 8 +- .../average_ifs_request_builder.py | 8 +- .../baht_text/baht_text_request_builder.py | 8 +- .../functions/base/base_request_builder_.py | 8 +- .../bessel_i/bessel_i_request_builder.py | 8 +- .../bessel_j/bessel_j_request_builder.py | 8 +- .../bessel_k/bessel_k_request_builder.py | 8 +- .../bessel_y/bessel_y_request_builder.py | 8 +- .../beta_dist/beta_dist_request_builder.py | 8 +- .../beta_inv/beta_inv_request_builder.py | 8 +- .../bin2_dec/bin2_dec_request_builder.py | 8 +- .../bin2_hex/bin2_hex_request_builder.py | 8 +- .../bin2_oct/bin2_oct_request_builder.py | 8 +- .../binom_dist/binom_dist_request_builder.py | 8 +- .../binom_dist_range_request_builder.py | 8 +- .../binom_inv/binom_inv_request_builder.py | 8 +- .../bitand/bitand_request_builder.py | 8 +- .../bitlshift/bitlshift_request_builder.py | 8 +- .../functions/bitor/bitor_request_builder.py | 8 +- .../bitrshift/bitrshift_request_builder.py | 8 +- .../bitxor/bitxor_request_builder.py | 8 +- .../ceiling_math_request_builder.py | 8 +- .../ceiling_precise_request_builder.py | 8 +- .../functions/char/char_request_builder.py | 8 +- .../chi_sq_dist_request_builder.py | 8 +- .../chi_sq_dist_r_t_request_builder.py | 8 +- .../chi_sq_inv/chi_sq_inv_request_builder.py | 8 +- .../chi_sq_inv_r_t_request_builder.py | 8 +- .../choose/choose_request_builder.py | 8 +- .../functions/clean/clean_request_builder.py | 8 +- .../functions/code/code_request_builder.py | 8 +- .../columns/columns_request_builder.py | 8 +- .../combin/combin_request_builder.py | 8 +- .../combina/combina_request_builder.py | 8 +- .../complex/complex_request_builder.py | 8 +- .../concatenate_request_builder.py | 8 +- .../confidence_norm_request_builder.py | 8 +- .../confidence_t_request_builder.py | 8 +- .../convert/convert_request_builder.py | 8 +- .../functions/cos/cos_request_builder.py | 8 +- .../functions/cosh/cosh_request_builder.py | 8 +- .../functions/cot/cot_request_builder.py | 8 +- .../functions/coth/coth_request_builder.py | 8 +- .../functions/count/count_request_builder.py | 8 +- .../count_a/count_a_request_builder.py | 8 +- .../count_blank_request_builder.py | 8 +- .../count_if/count_if_request_builder.py | 8 +- .../count_ifs/count_ifs_request_builder.py | 8 +- .../coup_day_bs_request_builder.py | 8 +- .../coup_days/coup_days_request_builder.py | 8 +- .../coup_days_nc_request_builder.py | 8 +- .../coup_ncd/coup_ncd_request_builder.py | 8 +- .../coup_num/coup_num_request_builder.py | 8 +- .../coup_pcd/coup_pcd_request_builder.py | 8 +- .../functions/csc/csc_request_builder.py | 8 +- .../functions/csch/csch_request_builder.py | 8 +- .../cum_i_pmt/cum_i_pmt_request_builder.py | 8 +- .../cum_princ/cum_princ_request_builder.py | 8 +- .../functions/date/date_request_builder.py | 8 +- .../datevalue/datevalue_request_builder.py | 8 +- .../daverage/daverage_request_builder.py | 8 +- .../functions/day/day_request_builder.py | 8 +- .../functions/days/days_request_builder.py | 8 +- .../days360/days360_request_builder.py | 8 +- .../functions/db/db_request_builder.py | 8 +- .../functions/dbcs/dbcs_request_builder.py | 8 +- .../dcount/dcount_request_builder.py | 8 +- .../dcount_a/dcount_a_request_builder.py | 8 +- .../functions/ddb/ddb_request_builder.py | 8 +- .../dec2_bin/dec2_bin_request_builder.py | 8 +- .../dec2_hex/dec2_hex_request_builder.py | 8 +- .../dec2_oct/dec2_oct_request_builder.py | 8 +- .../decimal/decimal_request_builder.py | 8 +- .../degrees/degrees_request_builder.py | 8 +- .../functions/delta/delta_request_builder.py | 8 +- .../dev_sq/dev_sq_request_builder.py | 8 +- .../functions/dget/dget_request_builder.py | 8 +- .../functions/disc/disc_request_builder.py | 8 +- .../functions/dmax/dmax_request_builder.py | 8 +- .../functions/dmin/dmin_request_builder.py | 8 +- .../dollar/dollar_request_builder.py | 8 +- .../dollar_de/dollar_de_request_builder.py | 8 +- .../dollar_fr/dollar_fr_request_builder.py | 8 +- .../dproduct/dproduct_request_builder.py | 8 +- .../dst_dev/dst_dev_request_builder.py | 8 +- .../dst_dev_p/dst_dev_p_request_builder.py | 8 +- .../functions/dsum/dsum_request_builder.py | 8 +- .../duration/duration_request_builder.py | 8 +- .../functions/dvar/dvar_request_builder.py | 8 +- .../dvar_p/dvar_p_request_builder.py | 8 +- .../ecma_ceiling_request_builder.py | 8 +- .../functions/edate/edate_request_builder.py | 8 +- .../effect/effect_request_builder.py | 8 +- .../eo_month/eo_month_request_builder.py | 8 +- .../functions/erf/erf_request_builder.py | 8 +- .../functions/erf_c/erf_c_request_builder.py | 8 +- .../erf_c_precise_request_builder.py | 8 +- .../erf_precise_request_builder.py | 8 +- .../error_type/error_type_request_builder.py | 8 +- .../functions/even/even_request_builder.py | 8 +- .../functions/exact/exact_request_builder.py | 8 +- .../functions/exp/exp_request_builder.py | 8 +- .../expon_dist/expon_dist_request_builder.py | 8 +- .../f_dist/f_dist_request_builder.py | 8 +- .../f_dist_r_t/f_dist_r_t_request_builder.py | 8 +- .../functions/f_inv/f_inv_request_builder.py | 8 +- .../f_inv_r_t/f_inv_r_t_request_builder.py | 8 +- .../functions/fact/fact_request_builder.py | 8 +- .../fact_double_request_builder.py | 8 +- .../functions/false_/false_request_builder.py | 8 +- .../functions/find/find_request_builder.py | 8 +- .../find_b/find_b_request_builder.py | 8 +- .../fisher/fisher_request_builder.py | 8 +- .../fisher_inv/fisher_inv_request_builder.py | 8 +- .../functions/fixed/fixed_request_builder.py | 8 +- .../floor_math/floor_math_request_builder.py | 8 +- .../floor_precise_request_builder.py | 8 +- .../functions/functions_request_builder.py | 284 +++++++-------- .../functions/fv/fv_request_builder.py | 8 +- .../fvschedule/fvschedule_request_builder.py | 8 +- .../functions/gamma/gamma_request_builder.py | 8 +- .../gamma_dist/gamma_dist_request_builder.py | 8 +- .../gamma_inv/gamma_inv_request_builder.py | 8 +- .../gamma_ln/gamma_ln_request_builder.py | 8 +- .../gamma_ln_precise_request_builder.py | 8 +- .../functions/gauss/gauss_request_builder.py | 8 +- .../functions/gcd/gcd_request_builder.py | 8 +- .../ge_step/ge_step_request_builder.py | 8 +- .../geo_mean/geo_mean_request_builder.py | 8 +- .../har_mean/har_mean_request_builder.py | 8 +- .../hex2_bin/hex2_bin_request_builder.py | 8 +- .../hex2_dec/hex2_dec_request_builder.py | 8 +- .../hex2_oct/hex2_oct_request_builder.py | 8 +- .../hlookup/hlookup_request_builder.py | 8 +- .../functions/hour/hour_request_builder.py | 8 +- .../hyp_geom_dist_request_builder.py | 8 +- .../hyperlink/hyperlink_request_builder.py | 8 +- .../functions/if_/if_request_builder.py | 8 +- .../im_abs/im_abs_request_builder.py | 8 +- .../im_argument_request_builder.py | 8 +- .../im_conjugate_request_builder.py | 8 +- .../im_cos/im_cos_request_builder.py | 8 +- .../im_cosh/im_cosh_request_builder.py | 8 +- .../im_cot/im_cot_request_builder.py | 8 +- .../im_csc/im_csc_request_builder.py | 8 +- .../im_csch/im_csch_request_builder.py | 8 +- .../im_div/im_div_request_builder.py | 8 +- .../im_exp/im_exp_request_builder.py | 8 +- .../functions/im_ln/im_ln_request_builder.py | 8 +- .../im_log10/im_log10_request_builder.py | 8 +- .../im_log2/im_log2_request_builder.py | 8 +- .../im_power/im_power_request_builder.py | 8 +- .../im_product/im_product_request_builder.py | 8 +- .../im_real/im_real_request_builder.py | 8 +- .../im_sec/im_sec_request_builder.py | 8 +- .../im_sech/im_sech_request_builder.py | 8 +- .../im_sin/im_sin_request_builder.py | 8 +- .../im_sinh/im_sinh_request_builder.py | 8 +- .../im_sqrt/im_sqrt_request_builder.py | 8 +- .../im_sub/im_sub_request_builder.py | 8 +- .../im_sum/im_sum_request_builder.py | 8 +- .../im_tan/im_tan_request_builder.py | 8 +- .../imaginary/imaginary_request_builder.py | 8 +- .../functions/int/int_request_builder.py | 8 +- .../int_rate/int_rate_request_builder.py | 8 +- .../functions/ipmt/ipmt_request_builder.py | 8 +- .../functions/irr/irr_request_builder.py | 8 +- .../is_err/is_err_request_builder.py | 8 +- .../is_error/is_error_request_builder.py | 8 +- .../is_even/is_even_request_builder.py | 8 +- .../is_formula/is_formula_request_builder.py | 8 +- .../is_logical/is_logical_request_builder.py | 8 +- .../is_n_a/is_n_a_request_builder.py | 8 +- .../is_non_text_request_builder.py | 8 +- .../is_number/is_number_request_builder.py | 8 +- .../is_odd/is_odd_request_builder.py | 8 +- .../is_text/is_text_request_builder.py | 8 +- .../iso_ceiling_request_builder.py | 8 +- .../iso_week_num_request_builder.py | 8 +- .../functions/ispmt/ispmt_request_builder.py | 8 +- .../functions/isref/isref_request_builder.py | 8 +- .../functions/kurt/kurt_request_builder.py | 8 +- .../functions/large/large_request_builder.py | 8 +- .../functions/lcm/lcm_request_builder.py | 8 +- .../functions/left/left_request_builder.py | 8 +- .../functions/leftb/leftb_request_builder.py | 8 +- .../functions/len/len_request_builder.py | 8 +- .../functions/lenb/lenb_request_builder.py | 8 +- .../functions/ln/ln_request_builder.py | 8 +- .../functions/log/log_request_builder.py | 8 +- .../functions/log10/log10_request_builder.py | 8 +- .../log_norm_dist_request_builder.py | 8 +- .../log_norm_inv_request_builder.py | 8 +- .../lookup/lookup_request_builder.py | 8 +- .../functions/lower/lower_request_builder.py | 8 +- .../functions/match/match_request_builder.py | 8 +- .../functions/max/max_request_builder.py | 8 +- .../functions/max_a/max_a_request_builder.py | 8 +- .../mduration/mduration_request_builder.py | 8 +- .../median/median_request_builder.py | 8 +- .../functions/mid/mid_request_builder.py | 8 +- .../functions/midb/midb_request_builder.py | 8 +- .../functions/min/min_request_builder.py | 8 +- .../functions/min_a/min_a_request_builder.py | 8 +- .../minute/minute_request_builder.py | 8 +- .../functions/mirr/mirr_request_builder.py | 8 +- .../functions/mod/mod_request_builder.py | 8 +- .../functions/month/month_request_builder.py | 8 +- .../mround/mround_request_builder.py | 8 +- .../multi_nomial_request_builder.py | 8 +- .../workbook/functions/n/n_request_builder.py | 8 +- .../functions/na/na_request_builder.py | 8 +- .../neg_binom_dist_request_builder.py | 8 +- .../network_days_request_builder.py | 8 +- .../network_days_intl_request_builder.py | 8 +- .../nominal/nominal_request_builder.py | 8 +- .../norm_dist/norm_dist_request_builder.py | 8 +- .../norm_inv/norm_inv_request_builder.py | 8 +- .../norm_s_dist_request_builder.py | 8 +- .../norm_s_inv/norm_s_inv_request_builder.py | 8 +- .../functions/not_/not_request_builder.py | 8 +- .../functions/now/now_request_builder.py | 8 +- .../functions/nper/nper_request_builder.py | 8 +- .../functions/npv/npv_request_builder.py | 8 +- .../number_value_request_builder.py | 8 +- .../oct2_bin/oct2_bin_request_builder.py | 8 +- .../oct2_dec/oct2_dec_request_builder.py | 8 +- .../oct2_hex/oct2_hex_request_builder.py | 8 +- .../functions/odd/odd_request_builder.py | 8 +- .../odd_f_price_request_builder.py | 8 +- .../odd_f_yield_request_builder.py | 8 +- .../odd_l_price_request_builder.py | 8 +- .../odd_l_yield_request_builder.py | 8 +- .../functions/or_/or_request_builder.py | 8 +- .../pduration/pduration_request_builder.py | 8 +- .../percent_rank_exc_request_builder.py | 8 +- .../percent_rank_inc_request_builder.py | 8 +- .../percentile_exc_request_builder.py | 8 +- .../percentile_inc_request_builder.py | 8 +- .../permut/permut_request_builder.py | 8 +- .../permutationa_request_builder.py | 8 +- .../functions/phi/phi_request_builder.py | 8 +- .../functions/pi/pi_request_builder.py | 8 +- .../functions/pmt/pmt_request_builder.py | 8 +- .../poisson_dist_request_builder.py | 8 +- .../functions/power/power_request_builder.py | 8 +- .../functions/ppmt/ppmt_request_builder.py | 8 +- .../functions/price/price_request_builder.py | 8 +- .../price_disc/price_disc_request_builder.py | 8 +- .../price_mat/price_mat_request_builder.py | 8 +- .../product/product_request_builder.py | 8 +- .../proper/proper_request_builder.py | 8 +- .../functions/pv/pv_request_builder.py | 8 +- .../quartile_exc_request_builder.py | 8 +- .../quartile_inc_request_builder.py | 8 +- .../quotient/quotient_request_builder.py | 8 +- .../radians/radians_request_builder.py | 8 +- .../functions/rand/rand_request_builder.py | 8 +- .../rand_between_request_builder.py | 8 +- .../rank_avg/rank_avg_request_builder.py | 8 +- .../rank_eq/rank_eq_request_builder.py | 8 +- .../functions/rate/rate_request_builder.py | 8 +- .../received/received_request_builder.py | 8 +- .../replace/replace_request_builder.py | 8 +- .../replace_b/replace_b_request_builder.py | 8 +- .../functions/rept/rept_request_builder.py | 8 +- .../functions/right/right_request_builder.py | 8 +- .../rightb/rightb_request_builder.py | 8 +- .../functions/roman/roman_request_builder.py | 8 +- .../functions/round/round_request_builder.py | 8 +- .../round_down/round_down_request_builder.py | 8 +- .../round_up/round_up_request_builder.py | 8 +- .../functions/rows/rows_request_builder.py | 8 +- .../functions/rri/rri_request_builder.py | 8 +- .../functions/sec/sec_request_builder.py | 8 +- .../functions/sech/sech_request_builder.py | 8 +- .../second/second_request_builder.py | 8 +- .../series_sum/series_sum_request_builder.py | 8 +- .../functions/sheet/sheet_request_builder.py | 8 +- .../sheets/sheets_request_builder.py | 8 +- .../functions/sign/sign_request_builder.py | 8 +- .../functions/sin/sin_request_builder.py | 8 +- .../functions/sinh/sinh_request_builder.py | 8 +- .../functions/skew/skew_request_builder.py | 8 +- .../skew_p/skew_p_request_builder.py | 8 +- .../functions/sln/sln_request_builder.py | 8 +- .../functions/small/small_request_builder.py | 8 +- .../functions/sqrt/sqrt_request_builder.py | 8 +- .../sqrt_pi/sqrt_pi_request_builder.py | 8 +- .../st_dev_a/st_dev_a_request_builder.py | 8 +- .../st_dev_p/st_dev_p_request_builder.py | 8 +- .../st_dev_p_a/st_dev_p_a_request_builder.py | 8 +- .../st_dev_s/st_dev_s_request_builder.py | 8 +- .../standardize_request_builder.py | 8 +- .../substitute/substitute_request_builder.py | 8 +- .../subtotal/subtotal_request_builder.py | 8 +- .../functions/sum/sum_request_builder.py | 8 +- .../sum_if/sum_if_request_builder.py | 8 +- .../sum_ifs/sum_ifs_request_builder.py | 8 +- .../sum_sq/sum_sq_request_builder.py | 8 +- .../functions/syd/syd_request_builder.py | 8 +- .../workbook/functions/t/t_request_builder.py | 8 +- .../t_dist/t_dist_request_builder.py | 8 +- .../t_dist_2_t/t_dist_2_t_request_builder.py | 8 +- .../t_dist_r_t/t_dist_r_t_request_builder.py | 8 +- .../functions/t_inv/t_inv_request_builder.py | 8 +- .../t_inv_2_t/t_inv_2_t_request_builder.py | 8 +- .../functions/tan/tan_request_builder.py | 8 +- .../functions/tanh/tanh_request_builder.py | 8 +- .../tbill_eq/tbill_eq_request_builder.py | 8 +- .../tbill_price_request_builder.py | 8 +- .../tbill_yield_request_builder.py | 8 +- .../functions/text/text_request_builder.py | 8 +- .../functions/time/time_request_builder.py | 8 +- .../timevalue/timevalue_request_builder.py | 8 +- .../functions/today/today_request_builder.py | 8 +- .../functions/trim/trim_request_builder.py | 8 +- .../trim_mean/trim_mean_request_builder.py | 8 +- .../functions/true_/true_request_builder.py | 8 +- .../functions/trunc/trunc_request_builder.py | 8 +- .../functions/type/type_request_builder.py | 8 +- .../unichar/unichar_request_builder.py | 8 +- .../unicode/unicode_request_builder.py | 8 +- .../functions/upper/upper_request_builder.py | 8 +- .../usdollar/usdollar_request_builder.py | 8 +- .../functions/value/value_request_builder.py | 8 +- .../functions/var_a/var_a_request_builder.py | 8 +- .../functions/var_p/var_p_request_builder.py | 8 +- .../var_p_a/var_p_a_request_builder.py | 8 +- .../functions/var_s/var_s_request_builder.py | 8 +- .../functions/vdb/vdb_request_builder.py | 8 +- .../vlookup/vlookup_request_builder.py | 8 +- .../week_num/week_num_request_builder.py | 8 +- .../weekday/weekday_request_builder.py | 8 +- .../weibull_dist_request_builder.py | 8 +- .../work_day/work_day_request_builder.py | 8 +- .../work_day_intl_request_builder.py | 8 +- .../functions/xirr/xirr_request_builder.py | 8 +- .../functions/xnpv/xnpv_request_builder.py | 8 +- .../functions/xor/xor_request_builder.py | 8 +- .../functions/year/year_request_builder.py | 8 +- .../year_frac/year_frac_request_builder.py | 8 +- .../functions/yield_/yield_request_builder.py | 8 +- .../yield_disc/yield_disc_request_builder.py | 8 +- .../yield_mat/yield_mat_request_builder.py | 8 +- .../z_test/z_test_request_builder.py | 8 +- .../workbook/names/add/add_request_builder.py | 12 +- .../add_formula_local_request_builder.py | 12 +- .../names/count/count_request_builder.py | 10 +- .../names/item/range/range_request_builder.py | 14 +- ...orkbook_named_item_item_request_builder.py | 34 +- .../worksheet/worksheet_request_builder.py | 10 +- .../workbook/names/names_request_builder.py | 24 +- .../operations/count/count_request_builder.py | 10 +- ...workbook_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../refresh_session_request_builder.py | 10 +- ..._info_resource_with_key_request_builder.py | 10 +- ...eration_result_with_key_request_builder.py | 10 +- .../tables/add/add_request_builder.py | 13 +- ...ount_response.py => count_get_response.py} | 8 +- .../tables/count/count_request_builder.py | 18 +- .../clear_filters_request_builder.py | 10 +- .../item/columns/add/add_request_builder.py | 12 +- .../item/columns/columns_request_builder.py | 30 +- .../count/count_get_response.py} | 8 +- .../columns/count/count_request_builder.py | 18 +- .../data_body_range_request_builder.py | 12 +- .../filter/apply/apply_request_builder.py | 10 +- ...ply_bottom_items_filter_request_builder.py | 6 +- ...y_bottom_percent_filter_request_builder.py | 6 +- ...apply_cell_color_filter_request_builder.py | 6 +- .../apply_custom_filter_request_builder.py | 6 +- .../apply_dynamic_filter_request_builder.py | 6 +- ...apply_font_color_filter_request_builder.py | 6 +- .../apply_icon_filter_request_builder.py | 6 +- .../apply_top_items_filter_request_builder.py | 6 +- ...pply_top_percent_filter_request_builder.py | 6 +- .../apply_values_filter_request_builder.py | 6 +- .../filter/clear/clear_request_builder.py | 10 +- .../item/filter/filter_request_builder.py | 24 +- .../header_row_range_request_builder.py | 12 +- .../item/range/range_request_builder.py | 12 +- .../total_row_range_request_builder.py | 12 +- ...kbook_table_column_item_request_builder.py | 38 +- .../item_at_with_index_request_builder.py | 11 +- .../convert_to_range_request_builder.py | 12 +- .../data_body_range_request_builder.py | 12 +- .../header_row_range_request_builder.py | 12 +- .../item/range/range_request_builder.py | 12 +- .../reapply_filters_request_builder.py | 10 +- .../item/rows/add/add_request_builder.py | 12 +- .../item/rows/count/count_get_response.py} | 8 +- .../item/rows/count/count_request_builder.py | 18 +- .../rows/item/range/range_request_builder.py | 8 +- ...workbook_table_row_item_request_builder.py | 38 +- .../item_at_with_index_request_builder.py | 11 +- .../tables/item/rows/rows_request_builder.py | 30 +- .../item/sort/apply/apply_request_builder.py | 10 +- .../item/sort/clear/clear_request_builder.py | 10 +- .../sort/reapply/reapply_request_builder.py | 10 +- .../tables/item/sort/sort_request_builder.py | 30 +- .../total_row_range_request_builder.py | 12 +- .../workbook_table_item_request_builder.py | 38 +- .../worksheet/worksheet_request_builder.py | 10 +- .../item_at_with_index_request_builder.py | 10 +- .../workbook/tables/tables_request_builder.py | 24 +- .../item/workbook/workbook_request_builder.py | 26 +- .../worksheets/add/add_request_builder.py | 12 +- .../worksheets/count/count_request_builder.py | 10 +- ...ll_with_row_with_column_request_builder.py | 11 +- .../item/charts/add/add_request_builder.py | 12 +- .../item/charts/charts_request_builder.py | 30 +- .../item/charts/count/count_get_response.py} | 8 +- .../charts/count/count_request_builder.py | 18 +- .../charts/item/axes/axes_request_builder.py | 24 +- .../category_axis_request_builder.py | 24 +- .../format/font/font_request_builder.py | 34 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 34 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 24 +- .../major_gridlines_request_builder.py | 24 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 24 +- .../minor_gridlines_request_builder.py | 34 +- .../title/format/font/font_request_builder.py | 24 +- .../title/format/format_request_builder.py | 24 +- .../title/title_request_builder.py | 34 +- .../format/font/font_request_builder.py | 34 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 34 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 24 +- .../major_gridlines_request_builder.py | 24 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 24 +- .../minor_gridlines_request_builder.py | 34 +- .../series_axis_request_builder.py | 24 +- .../title/format/font/font_request_builder.py | 24 +- .../title/format/format_request_builder.py | 24 +- .../title/title_request_builder.py | 34 +- .../format/font/font_request_builder.py | 34 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 34 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 24 +- .../major_gridlines_request_builder.py | 24 +- .../format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../format/line/line_request_builder.py | 24 +- .../minor_gridlines_request_builder.py | 34 +- .../title/format/font/font_request_builder.py | 24 +- .../title/format/format_request_builder.py | 24 +- .../value_axis/title/title_request_builder.py | 34 +- .../value_axis/value_axis_request_builder.py | 34 +- .../data_labels_request_builder.py | 34 +- .../fill/clear/clear_request_builder.py | 10 +- .../format/fill/fill_request_builder.py | 24 +- .../set_solid_color_request_builder.py | 10 +- .../format/font/font_request_builder.py | 24 +- .../format/format_request_builder.py | 24 +- .../fill/clear/clear_request_builder.py | 10 +- .../item/format/fill/fill_request_builder.py | 24 +- .../set_solid_color_request_builder.py | 10 +- .../item/format/font/font_request_builder.py | 24 +- .../item/format/format_request_builder.py | 24 +- ...mage_response.py => image_get_response.py} | 8 +- .../item/image/image_request_builder.py | 18 +- .../image_with_width_get_response.py} | 8 +- .../image_with_width_request_builder.py | 20 +- ...ge_with_width_with_height_get_response.py} | 8 +- ..._with_width_with_height_request_builder.py | 21 +- ...h_height_with_fitting_mode_get_response.py | 49 +++ ...eight_with_fitting_mode_request_builder.py | 22 +- .../fill/clear/clear_request_builder.py | 10 +- .../format/fill/fill_request_builder.py | 24 +- .../set_solid_color_request_builder.py | 10 +- .../format/font/font_request_builder.py | 24 +- .../legend/format/format_request_builder.py | 24 +- .../item/legend/legend_request_builder.py | 34 +- .../item/series/count/count_get_response.py | 49 +++ .../series/count/count_request_builder.py | 18 +- .../item/series/count/count_response.py | 49 --- .../fill/clear/clear_request_builder.py | 10 +- .../item/format/fill/fill_request_builder.py | 30 +- .../set_solid_color_request_builder.py | 10 +- .../item/format/format_request_builder.py | 24 +- .../line/clear/clear_request_builder.py | 10 +- .../item/format/line/line_request_builder.py | 24 +- .../item/points/count/count_get_response.py | 49 +++ .../points/count/count_request_builder.py | 18 +- .../item/points/count/count_response.py | 49 --- .../fill/clear/clear_request_builder.py | 10 +- .../item/format/fill/fill_request_builder.py | 30 +- .../set_solid_color_request_builder.py | 10 +- .../item/format/format_request_builder.py | 24 +- ...rkbook_chart_point_item_request_builder.py | 30 +- .../item_at_with_index_request_builder.py | 11 +- .../item/points/points_request_builder.py | 28 +- ...kbook_chart_series_item_request_builder.py | 34 +- .../item_at_with_index_request_builder.py | 11 +- .../item/series/series_request_builder.py | 28 +- .../item/set_data/set_data_request_builder.py | 10 +- .../set_position_request_builder.py | 10 +- .../fill/clear/clear_request_builder.py | 10 +- .../title/format/fill/fill_request_builder.py | 24 +- .../set_solid_color_request_builder.py | 10 +- .../title/format/font/font_request_builder.py | 24 +- .../title/format/format_request_builder.py | 24 +- .../item/title/title_request_builder.py | 34 +- .../workbook_chart_item_request_builder.py | 38 +- .../worksheet/worksheet_request_builder.py | 10 +- .../item_at_with_index_request_builder.py | 11 +- .../item_with_name_request_builder.py | 10 +- .../item/names/add/add_request_builder.py | 12 +- .../add_formula_local_request_builder.py | 12 +- .../item/names/count/count_request_builder.py | 10 +- .../names/item/range/range_request_builder.py | 14 +- ...orkbook_named_item_item_request_builder.py | 24 +- .../worksheet/worksheet_request_builder.py | 10 +- .../item/names/names_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/refresh/refresh_request_builder.py | 10 +- ...rkbook_pivot_table_item_request_builder.py | 30 +- .../worksheet/worksheet_request_builder.py | 10 +- .../pivot_tables_request_builder.py | 24 +- .../refresh_all_request_builder.py | 10 +- .../protect/protect_request_builder.py | 10 +- .../protection/protection_request_builder.py | 30 +- .../unprotect/unprotect_request_builder.py | 10 +- .../item/range/range_request_builder.py | 8 +- .../range_with_address_request_builder.py | 10 +- .../item/tables/add/add_request_builder.py | 13 +- .../item/tables/count/count_get_response.py | 49 +++ .../tables/count/count_request_builder.py | 18 +- .../item/tables/count/count_response.py | 49 --- .../clear_filters_request_builder.py | 10 +- .../item/columns/add/add_request_builder.py | 12 +- .../item/columns/columns_request_builder.py | 30 +- .../item/columns/count/count_get_response.py | 49 +++ .../columns/count/count_request_builder.py | 18 +- .../item/columns/count/count_response.py | 49 --- .../data_body_range_request_builder.py | 12 +- .../filter/apply/apply_request_builder.py | 10 +- ...ply_bottom_items_filter_request_builder.py | 6 +- ...y_bottom_percent_filter_request_builder.py | 6 +- ...apply_cell_color_filter_request_builder.py | 6 +- .../apply_custom_filter_request_builder.py | 6 +- .../apply_dynamic_filter_request_builder.py | 6 +- ...apply_font_color_filter_request_builder.py | 6 +- .../apply_icon_filter_request_builder.py | 6 +- .../apply_top_items_filter_request_builder.py | 6 +- ...pply_top_percent_filter_request_builder.py | 6 +- .../apply_values_filter_request_builder.py | 6 +- .../filter/clear/clear_request_builder.py | 10 +- .../item/filter/filter_request_builder.py | 24 +- .../header_row_range_request_builder.py | 12 +- .../item/range/range_request_builder.py | 12 +- .../total_row_range_request_builder.py | 12 +- ...kbook_table_column_item_request_builder.py | 38 +- .../item_at_with_index_request_builder.py | 11 +- .../convert_to_range_request_builder.py | 12 +- .../data_body_range_request_builder.py | 12 +- .../header_row_range_request_builder.py | 12 +- .../item/range/range_request_builder.py | 12 +- .../reapply_filters_request_builder.py | 10 +- .../item/rows/add/add_request_builder.py | 12 +- .../item/rows/count/count_get_response.py | 49 +++ .../item/rows/count/count_request_builder.py | 18 +- .../tables/item/rows/count/count_response.py | 49 --- .../rows/item/range/range_request_builder.py | 8 +- ...workbook_table_row_item_request_builder.py | 38 +- .../item_at_with_index_request_builder.py | 11 +- .../tables/item/rows/rows_request_builder.py | 30 +- .../item/sort/apply/apply_request_builder.py | 10 +- .../item/sort/clear/clear_request_builder.py | 10 +- .../sort/reapply/reapply_request_builder.py | 10 +- .../tables/item/sort/sort_request_builder.py | 30 +- .../total_row_range_request_builder.py | 12 +- .../workbook_table_item_request_builder.py | 24 +- .../worksheet/worksheet_request_builder.py | 10 +- .../item_at_with_index_request_builder.py | 10 +- .../item/tables/tables_request_builder.py | 24 +- .../used_range/used_range_request_builder.py | 8 +- ..._range_with_values_only_request_builder.py | 10 +- ...workbook_worksheet_item_request_builder.py | 38 +- .../worksheets/worksheets_request_builder.py | 26 +- .../item/items/items_request_builder.py | 18 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../list_/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 24 +- .../source_column_request_builder.py | 10 +- .../add_copy/add_copy_request_builder.py | 12 +- ...y_from_content_type_hub_request_builder.py | 12 +- .../content_types_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...patible_hub_content_types_get_response.py} | 8 +- ...tible_hub_content_types_request_builder.py | 20 +- ...ssociate_with_hub_sites_request_builder.py | 10 +- .../item/base/base_request_builder_.py | 10 +- .../base_types/base_types_request_builder.py | 10 +- .../base_types/count/count_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 10 +- .../column_links_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/column_link_item_request_builder.py | 24 +- .../column_positions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 38 +- .../source_column_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 26 +- ...efault_content_location_request_builder.py | 10 +- .../is_published/is_published_get_response.py | 49 +++ .../is_published_request_builder.py | 18 +- .../item/publish/publish_request_builder.py | 10 +- .../unpublish/unpublish_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/list_/drive/drive_request_builder.py | 16 +- .../items/count/count_request_builder.py | 10 +- .../analytics/analytics_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../document_set_versions_request_builder.py | 28 +- ...cument_set_version_item_request_builder.py | 34 +- .../item/fields/fields_request_builder.py | 24 +- .../item/restore/restore_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 28 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/list_item_item_request_builder.py | 34 +- .../versions/count/count_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 24 +- .../list_item_version_item_request_builder.py | 30 +- .../restore_version_request_builder.py | 10 +- .../item/versions/versions_request_builder.py | 24 +- .../item/list_/items/items_request_builder.py | 28 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../drives/item/list_/list_request_builder.py | 24 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../reauthorize_request_builder.py | 10 +- .../item/subscription_item_request_builder.py | 24 +- .../subscriptions_request_builder.py | 18 +- ...ent_response.py => recent_get_response.py} | 8 +- .../item/recent/recent_request_builder.py | 20 +- .../root/content/content_request_builder.py | 14 +- .../drives/item/root/root_request_builder.py | 16 +- ...ponse.py => search_with_q_get_response.py} | 8 +- .../search_with_q_request_builder.py | 22 +- ...onse.py => shared_with_me_get_response.py} | 8 +- .../shared_with_me_request_builder.py | 20 +- .../special/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- .../item/drive_item_item_request_builder.py | 16 +- .../item/special/special_request_builder.py | 16 +- .../classes/classes_request_builder.py | 28 +- .../classes/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../classes/delta/delta_request_builder.py | 20 +- .../assignment_categories_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...education_category_item_request_builder.py | 34 +- .../assignment_defaults_request_builder.py | 34 +- .../assignment_settings_request_builder.py | 28 +- .../assignments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../assignments/delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- .../categories/categories_request_builder.py | 28 +- .../categories/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../categories/delta/delta_request_builder.py | 20 +- .../item/ref/ref_request_builder.py | 14 +- .../categories/ref/ref_request_builder.py | 26 +- ...ucation_assignment_item_request_builder.py | 38 +- .../item/publish/publish_request_builder.py | 12 +- .../resources/count/count_request_builder.py | 10 +- ...ssignment_resource_item_request_builder.py | 34 +- .../resources/resources_request_builder.py | 28 +- .../item/rubric/ref/ref_request_builder.py | 32 +- .../item/rubric/rubric_request_builder.py | 38 +- ...edback_resources_folder_request_builder.py | 12 +- ...set_up_resources_folder_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ucation_submission_item_request_builder.py | 30 +- .../outcomes/count/count_request_builder.py | 10 +- .../education_outcome_item_request_builder.py | 32 +- .../item/outcomes/outcomes_request_builder.py | 28 +- .../item/reassign/reassign_request_builder.py | 12 +- .../resources/count/count_request_builder.py | 10 +- ...ubmission_resource_item_request_builder.py | 34 +- .../resources/resources_request_builder.py | 28 +- .../item/return_/return_request_builder.py | 12 +- ...set_up_resources_folder_request_builder.py | 12 +- .../item/submit/submit_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ubmission_resource_item_request_builder.py | 30 +- .../submitted_resources_request_builder.py | 24 +- .../item/unsubmit/unsubmit_request_builder.py | 12 +- .../submissions_request_builder.py | 24 +- .../education_class_item_request_builder.py | 56 +-- .../item/group/group_request_builder.py | 20 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../members/count/count_request_builder.py | 10 +- .../members/item/ref/ref_request_builder.py | 14 +- .../item/members/members_request_builder.py | 16 +- .../item/members/ref/ref_request_builder.py | 26 +- .../schools/count/count_request_builder.py | 10 +- .../education_school_item_request_builder.py | 10 +- .../item/schools/schools_request_builder.py | 16 +- .../teachers/count/count_request_builder.py | 10 +- .../teachers/item/ref/ref_request_builder.py | 14 +- .../item/teachers/ref/ref_request_builder.py | 26 +- .../item/teachers/teachers_request_builder.py | 16 +- .../education/education_request_builder.py | 18 +- .../assignments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- .../categories/categories_request_builder.py | 28 +- .../categories/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../categories/delta/delta_request_builder.py | 20 +- .../item/ref/ref_request_builder.py | 14 +- .../categories/ref/ref_request_builder.py | 26 +- ...ucation_assignment_item_request_builder.py | 24 +- .../item/publish/publish_request_builder.py | 12 +- .../resources/count/count_request_builder.py | 10 +- ...ssignment_resource_item_request_builder.py | 34 +- .../resources/resources_request_builder.py | 28 +- .../item/rubric/ref/ref_request_builder.py | 32 +- .../item/rubric/rubric_request_builder.py | 38 +- ...edback_resources_folder_request_builder.py | 12 +- ...set_up_resources_folder_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ucation_submission_item_request_builder.py | 30 +- .../outcomes/count/count_request_builder.py | 10 +- .../education_outcome_item_request_builder.py | 32 +- .../item/outcomes/outcomes_request_builder.py | 28 +- .../item/reassign/reassign_request_builder.py | 12 +- .../resources/count/count_request_builder.py | 10 +- ...ubmission_resource_item_request_builder.py | 34 +- .../resources/resources_request_builder.py | 28 +- .../item/return_/return_request_builder.py | 12 +- ...set_up_resources_folder_request_builder.py | 12 +- .../item/submit/submit_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ubmission_resource_item_request_builder.py | 30 +- .../submitted_resources_request_builder.py | 24 +- .../item/unsubmit/unsubmit_request_builder.py | 12 +- .../submissions_request_builder.py | 24 +- .../me/classes/classes_request_builder.py | 16 +- .../me/classes/count/count_request_builder.py | 10 +- .../education_class_item_request_builder.py | 10 +- .../education/me/me_request_builder.py | 24 +- .../me/rubrics/count/count_request_builder.py | 10 +- .../education_rubric_item_request_builder.py | 38 +- .../me/rubrics/rubrics_request_builder.py | 28 +- .../me/schools/count/count_request_builder.py | 10 +- .../education_school_item_request_builder.py | 10 +- .../me/schools/schools_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../education_class_item_request_builder.py | 10 +- .../taught_classes_request_builder.py | 16 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ce_provisioning_errors_request_builder.py} | 63 ++-- .../education/me/user/user_request_builder.py | 26 +- .../schools/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../schools/delta/delta_request_builder.py | 20 +- .../administrative_unit_request_builder.py | 24 +- .../item/classes/classes_request_builder.py | 16 +- .../classes/count/count_request_builder.py | 10 +- .../classes/item/ref/ref_request_builder.py | 14 +- .../item/classes/ref/ref_request_builder.py | 26 +- .../education_school_item_request_builder.py | 38 +- .../item/users/count/count_request_builder.py | 10 +- .../users/item/ref/ref_request_builder.py | 14 +- .../item/users/ref/ref_request_builder.py | 26 +- .../item/users/users_request_builder.py | 16 +- .../schools/schools_request_builder.py | 28 +- .../users/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../users/delta/delta_request_builder.py | 20 +- .../assignments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../assignments/delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- .../categories/categories_request_builder.py | 28 +- .../categories/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../categories/delta/delta_request_builder.py | 20 +- .../item/ref/ref_request_builder.py | 14 +- .../categories/ref/ref_request_builder.py | 26 +- ...ucation_assignment_item_request_builder.py | 24 +- .../item/publish/publish_request_builder.py | 12 +- .../resources/count/count_request_builder.py | 10 +- ...ssignment_resource_item_request_builder.py | 34 +- .../resources/resources_request_builder.py | 28 +- .../item/rubric/ref/ref_request_builder.py | 32 +- .../item/rubric/rubric_request_builder.py | 38 +- ...edback_resources_folder_request_builder.py | 12 +- ...set_up_resources_folder_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ucation_submission_item_request_builder.py | 30 +- .../outcomes/count/count_request_builder.py | 10 +- .../education_outcome_item_request_builder.py | 32 +- .../item/outcomes/outcomes_request_builder.py | 28 +- .../item/reassign/reassign_request_builder.py | 12 +- .../resources/count/count_request_builder.py | 10 +- ...ubmission_resource_item_request_builder.py | 34 +- .../resources/resources_request_builder.py | 28 +- .../item/return_/return_request_builder.py | 12 +- ...set_up_resources_folder_request_builder.py | 12 +- .../item/submit/submit_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...ubmission_resource_item_request_builder.py | 30 +- .../submitted_resources_request_builder.py | 24 +- .../item/unsubmit/unsubmit_request_builder.py | 12 +- .../submissions_request_builder.py | 24 +- .../item/classes/classes_request_builder.py | 16 +- .../classes/count/count_request_builder.py | 10 +- .../education_class_item_request_builder.py | 10 +- .../education_user_item_request_builder.py | 38 +- .../rubrics/count/count_request_builder.py | 10 +- .../education_rubric_item_request_builder.py | 38 +- .../item/rubrics/rubrics_request_builder.py | 28 +- .../schools/count/count_request_builder.py | 10 +- .../education_school_item_request_builder.py | 10 +- .../item/schools/schools_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../education_class_item_request_builder.py | 10 +- .../taught_classes_request_builder.py | 16 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../users/item/user/user_request_builder.py | 26 +- .../education/users/users_request_builder.py | 28 +- .../employee_experience_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ng_course_activity_item_request_builder.py | 30 +- ...rning_course_activities_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../learning_content_item_request_builder.py | 30 +- .../learning_contents_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ng_course_activity_item_request_builder.py | 32 +- ...rning_course_activities_request_builder.py | 22 +- .../learning_provider_item_request_builder.py | 34 +- .../learning_providers_request_builder.py | 28 +- .../connections_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...xternal_connection_item_request_builder.py | 38 +- .../groups/count/count_request_builder.py | 10 +- .../item/groups/groups_request_builder.py | 28 +- .../external_group_item_request_builder.py | 38 +- .../members/count/count_request_builder.py | 10 +- .../item/identity_item_request_builder.py | 30 +- .../item/members/members_request_builder.py | 22 +- .../item/items/count/count_request_builder.py | 10 +- .../activities/activities_request_builder.py | 18 +- .../activities/count/count_request_builder.py | 10 +- .../external_activity_item_request_builder.py | 24 +- .../performed_by_request_builder.py | 10 +- .../external_item_item_request_builder.py | 34 +- ...nse.py => add_activities_post_response.py} | 8 +- ...nnectors_add_activities_request_builder.py | 18 +- .../item/items/items_request_builder.py | 24 +- .../operations/count/count_request_builder.py | 10 +- ...nnection_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../item/schema/schema_request_builder.py | 71 +--- .../external/external_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../filter_operators_request_builder.py | 18 +- ...er_operator_schema_item_request_builder.py | 24 +- .../functions/count/count_request_builder.py | 10 +- .../functions/functions_request_builder.py | 18 +- ...ng_function_schema_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...roup_lifecycle_policies_request_builder.py | 28 +- .../add_group/add_group_post_response.py} | 8 +- .../add_group/add_group_request_builder.py | 22 +- .../item/add_group/add_group_response.py | 49 --- ...p_lifecycle_policy_item_request_builder.py | 38 +- .../remove_group_post_response.py | 49 +++ .../remove_group_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- ...group_setting_templates_request_builder.py | 24 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- ...p_setting_template_item_request_builder.py | 30 +- .../item/restore/restore_request_builder.py | 12 +- .../validate_properties_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../group_settings_request_builder.py | 28 +- .../group_setting_item_request_builder.py | 38 +- .../groups/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../groups/delta/delta_request_builder.py | 20 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../groups/get_by_ids/get_by_ids_response.py | 57 --- .../groups/groups_request_builder.py | 28 +- .../accepted_senders_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 8 +- .../ref/ref_request_builder.py | 26 +- .../add_favorite_request_builder.py | 10 +- .../app_role_assignments_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...pp_role_assignment_item_request_builder.py | 28 +- .../assign_license_request_builder.py | 12 +- ...r_sharing_roles_with_user_get_response.py} | 8 +- ...sharing_roles_with_user_request_builder.py | 22 +- .../calendar_permissions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...alendar_permission_item_request_builder.py | 38 +- .../item/calendar/calendar_request_builder.py | 10 +- .../calendar_view_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- .../instances/delta/delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../events/count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../events/delta/delta_request_builder.py | 26 +- .../calendar/events/events_request_builder.py | 28 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../events/item/event_item_request_builder.py | 28 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- .../instances/delta/delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- ...ponse.py => get_schedule_post_response.py} | 8 +- .../get_schedule_request_builder.py | 22 +- .../calendar_view_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- .../instances/delta/delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- ...nted_permissions_for_app_post_response.py} | 8 +- ...ted_permissions_for_app_request_builder.py | 18 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../conversations_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../item/conversation_item_request_builder.py | 26 +- .../threads/count/count_request_builder.py | 10 +- ...onversation_thread_item_request_builder.py | 24 +- .../item/posts/count/count_request_builder.py | 10 +- .../attachments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 16 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 24 +- .../item/extension_item_request_builder.py | 34 +- .../item/forward/forward_request_builder.py | 10 +- .../attachments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 16 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 24 +- .../item/extension_item_request_builder.py | 34 +- .../forward/forward_request_builder.py | 10 +- .../in_reply_to_request_builder.py | 10 +- .../reply/reply_request_builder.py | 10 +- .../posts/item/post_item_request_builder.py | 10 +- .../posts/item/reply/reply_request_builder.py | 10 +- .../item/posts/posts_request_builder.py | 16 +- .../item/reply/reply_request_builder.py | 10 +- .../item/threads/threads_request_builder.py | 28 +- .../created_on_behalf_of_request_builder.py | 10 +- .../item/drive/drive_request_builder.py | 10 +- .../drives/count/count_request_builder.py | 10 +- .../item/drives/drives_request_builder.py | 10 +- .../drives/item/drive_item_request_builder.py | 10 +- .../events/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../events/delta/delta_request_builder.py | 26 +- .../item/events/events_request_builder.py | 28 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../events/item/event_item_request_builder.py | 34 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- .../instances/delta/delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../groups/item/group_item_request_builder.py | 52 +-- .../count/count_request_builder.py | 10 +- ...roup_lifecycle_policies_request_builder.py | 24 +- .../add_group/add_group_post_response.py} | 8 +- .../add_group/add_group_request_builder.py | 22 +- .../item/add_group/add_group_response.py | 49 --- ...p_lifecycle_policy_item_request_builder.py | 24 +- .../remove_group_post_response.py | 49 +++ .../remove_group_request_builder.py | 22 +- .../remove_group/remove_group_response.py | 49 --- .../member_of/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../member_of/member_of_request_builder.py | 10 +- .../members/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../members/item/ref/ref_request_builder.py | 14 +- .../item/members/members_request_builder.py | 10 +- .../item/members/ref/ref_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- ...ers_with_license_errors_request_builder.py | 10 +- .../notebooks/count/count_request_builder.py | 10 +- ...t_notebook_from_web_url_request_builder.py | 12 +- ...nclude_personal_notebooks_get_response.py} | 8 +- ...lude_personal_notebooks_request_builder.py | 22 +- .../copy_notebook_request_builder.py | 14 +- .../item/notebook_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 28 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../notebooks/notebooks_request_builder.py | 28 +- .../item/onenote/onenote_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- .../onenote_operation_item_request_builder.py | 32 +- .../operations/operations_request_builder.py | 26 +- .../pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 36 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../onenote/pages/pages_request_builder.py | 30 +- .../resources/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../onenote_resource_item_request_builder.py | 32 +- .../resources/resources_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 24 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 32 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../sections/sections_request_builder.py | 26 +- .../owners/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../owners/item/ref/ref_request_builder.py | 14 +- .../item/owners/owners_request_builder.py | 10 +- .../item/owners/ref/ref_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- .../permission_grants/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_request_body.py | 49 --- .../check_member_groups_request_builder.py | 95 ----- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_request_body.py | 49 --- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_request_body.py | 49 --- .../get_member_groups_request_builder.py | 95 ----- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_request_body.py | 49 --- .../get_member_objects_request_builder.py | 95 ----- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 74 +--- .../permission_grants_request_builder.py | 64 +--- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- .../item/photo/photo_request_builder.py | 24 +- .../photo/value/content_request_builder.py | 12 +- .../photos/count/count_request_builder.py | 10 +- .../profile_photo_item_request_builder.py | 10 +- .../item/value/content_request_builder.py | 12 +- .../item/photos/photos_request_builder.py | 16 +- .../item/planner/planner_request_builder.py | 24 +- .../plans/count/count_request_builder.py | 10 +- .../item/buckets/buckets_request_builder.py | 24 +- .../buckets/count/count_request_builder.py | 10 +- .../planner_bucket_item_request_builder.py | 24 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../item/tasks/tasks_request_builder.py | 24 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_plan_item_request_builder.py | 24 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../plans/item/tasks/tasks_request_builder.py | 24 +- .../planner/plans/plans_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 8 +- .../ref/ref_request_builder.py | 26 +- .../rejected_senders_request_builder.py | 16 +- .../remove_favorite_request_builder.py | 10 +- .../item/renew/renew_request_builder.py | 10 +- .../reset_unseen_count_request_builder.py | 10 +- .../item/restore/restore_request_builder.py | 12 +- ...ry_service_provisioning_request_builder.py | 6 +- .../count/count_request_builder.py | 108 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../settings/count/count_request_builder.py | 10 +- .../group_setting_item_request_builder.py | 34 +- .../item/settings/settings_request_builder.py | 28 +- .../{add_response.py => add_post_response.py} | 8 +- .../item/sites/add/add_request_builder.py | 18 +- .../item/sites/count/count_request_builder.py | 10 +- ...ponse.py => get_all_sites_get_response.py} | 8 +- .../get_all_sites_request_builder.py | 20 +- .../all_time/all_time_request_builder.py | 16 +- .../analytics/analytics_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../activities/activities_request_builder.py | 18 +- .../activities/count/count_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item_activity_item_request_builder.py | 24 +- ...item_activity_stat_item_request_builder.py | 24 +- .../item_activity_stats_request_builder.py | 18 +- .../last_seven_days_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 24 +- .../source_column_request_builder.py | 10 +- .../add_copy/add_copy_request_builder.py | 12 +- ...y_from_content_type_hub_request_builder.py | 12 +- .../content_types_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...patible_hub_content_types_get_response.py} | 8 +- ...tible_hub_content_types_request_builder.py | 20 +- ...ssociate_with_hub_sites_request_builder.py | 10 +- .../item/base/base_request_builder_.py | 10 +- .../base_types/base_types_request_builder.py | 10 +- .../base_types/count/count_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 10 +- .../column_links_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/column_link_item_request_builder.py | 24 +- .../column_positions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 38 +- .../source_column_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 40 +- ...efault_content_location_request_builder.py | 10 +- .../is_published/is_published_get_response.py | 49 +++ .../is_published_request_builder.py | 18 +- .../is_published/is_published_response.py | 49 --- .../item/publish/publish_request_builder.py | 10 +- .../unpublish/unpublish_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../sites/item/drive/drive_request_builder.py | 10 +- .../drives/count/count_request_builder.py | 10 +- .../item/drives/drives_request_builder.py | 10 +- .../drives/item/drive_item_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../external_columns_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- ...pes_for_list_with_list_id_get_response.py} | 8 +- ...s_for_list_with_list_id_request_builder.py | 22 +- .../get_by_path_with_path_request_builder.py | 10 +- .../item/items/count/count_request_builder.py | 10 +- .../item/base_item_item_request_builder.py | 10 +- .../sites/item/items/items_request_builder.py | 10 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/lists/count/count_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 24 +- .../source_column_request_builder.py | 10 +- .../add_copy/add_copy_request_builder.py | 12 +- ...y_from_content_type_hub_request_builder.py | 12 +- .../content_types_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...patible_hub_content_types_get_response.py} | 8 +- ...tible_hub_content_types_request_builder.py | 20 +- ...ssociate_with_hub_sites_request_builder.py | 10 +- .../item/base/base_request_builder_.py | 10 +- .../base_types/base_types_request_builder.py | 10 +- .../base_types/count/count_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 10 +- .../column_links_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/column_link_item_request_builder.py | 24 +- .../column_positions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 38 +- .../source_column_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 26 +- ...efault_content_location_request_builder.py | 10 +- .../is_published/is_published_get_response.py | 49 +++ .../is_published_request_builder.py | 18 +- .../is_published/is_published_response.py | 49 --- .../item/publish/publish_request_builder.py | 10 +- .../unpublish/unpublish_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../lists/item/drive/drive_request_builder.py | 16 +- .../analytics/analytics_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../document_set_versions_request_builder.py | 28 +- ...cument_set_version_item_request_builder.py | 34 +- .../item/fields/fields_request_builder.py | 24 +- .../item/restore/restore_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 28 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/list_item_item_request_builder.py | 34 +- .../versions/count/count_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 24 +- .../list_item_version_item_request_builder.py | 30 +- .../restore_version_request_builder.py | 10 +- .../item/versions/versions_request_builder.py | 24 +- .../lists/item/items/items_request_builder.py | 28 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../lists/item/list_item_request_builder.py | 30 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../reauthorize_request_builder.py | 10 +- .../item/subscription_item_request_builder.py | 24 +- .../subscriptions_request_builder.py | 18 +- .../sites/item/lists/lists_request_builder.py | 30 +- .../notebooks/count/count_request_builder.py | 10 +- ...t_notebook_from_web_url_request_builder.py | 12 +- ...nclude_personal_notebooks_get_response.py} | 8 +- ...lude_personal_notebooks_request_builder.py | 22 +- .../copy_notebook_request_builder.py | 14 +- .../item/notebook_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 28 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../notebooks/notebooks_request_builder.py | 28 +- .../item/onenote/onenote_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- .../onenote_operation_item_request_builder.py | 32 +- .../operations/operations_request_builder.py | 26 +- .../pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 36 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../onenote/pages/pages_request_builder.py | 30 +- .../resources/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../onenote_resource_item_request_builder.py | 32 +- .../resources/resources_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 24 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 32 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../sections/sections_request_builder.py | 26 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ant_response.py => grant_post_response.py} | 8 +- .../item/grant/grant_request_builder.py | 22 +- .../item/permission_item_request_builder.py | 38 +- .../permissions_request_builder.py | 28 +- .../sites/item/site_item_request_builder.py | 18 +- .../item/sites/count/count_request_builder.py | 10 +- .../sites/item/site_item_request_builder.py | 10 +- .../sites/item/sites/sites_request_builder.py | 16 +- .../groups/count/count_request_builder.py | 10 +- .../groups/groups_request_builder.py | 28 +- .../groups/item/group_item_request_builder.py | 34 +- .../item/sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../groups/item/sets/sets_request_builder.py | 24 +- .../sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../parent_group/sets/sets_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 38 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../term_store/sets/sets_request_builder.py | 28 +- .../term_store/term_store_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../groups/count/count_request_builder.py | 10 +- .../item/groups/groups_request_builder.py | 28 +- .../groups/item/group_item_request_builder.py | 34 +- .../item/sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../groups/item/sets/sets_request_builder.py | 24 +- .../item/sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../parent_group/sets/sets_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 38 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../item/sets/sets_request_builder.py | 28 +- .../item/store_item_request_builder.py | 24 +- .../term_stores_request_builder.py | 18 +- ...ve_response.py => remove_post_response.py} | 8 +- .../sites/remove/remove_request_builder.py | 18 +- .../item/sites/sites_request_builder.py | 10 +- .../subscribe_by_mail_request_builder.py | 10 +- .../all_channels_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/channel_item_request_builder.py | 10 +- .../team/archive/archive_request_builder.py | 10 +- .../team/channels/channels_request_builder.py | 28 +- .../channels/count/count_request_builder.py | 10 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../item/channel_item_request_builder.py | 38 +- .../complete_migration_request_builder.py | 10 +- ..._name_user_principal_name_get_response.py} | 8 +- ...ame_user_principal_name_request_builder.py | 20 +- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../{add_response.py => add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../item/members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../item/tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../item/tabs/tabs_request_builder.py | 28 +- .../item/team/clone/clone_request_builder.py | 10 +- .../complete_migration_request_builder.py | 10 +- .../item/team/group/group_request_builder.py | 20 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../incoming_channels_request_builder.py | 16 +- .../item/channel_item_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../installed_apps_request_builder.py | 28 +- .../teams_app/teams_app_request_builder.py | 10 +- .../teams_app_definition_request_builder.py | 10 +- ...s_app_installation_item_request_builder.py | 34 +- .../item/upgrade/upgrade_request_builder.py | 10 +- .../team/members/add/add_post_response.py} | 8 +- .../team/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 38 +- .../team/members/members_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- ...ms_async_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../permission_grants/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../check_member_groups_post_request_body.py | 49 --- .../check_member_groups_request_builder.py | 95 ----- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_request_body.py | 49 --- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_request_body.py | 49 --- .../get_member_groups_request_builder.py | 95 ----- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_request_body.py | 49 --- .../get_member_objects_request_builder.py | 95 ----- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 74 +--- .../permission_grants_request_builder.py | 64 +--- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- .../item/team/photo/photo_request_builder.py | 24 +- .../photo/value/content_request_builder.py | 12 +- .../complete_migration_request_builder.py | 10 +- ..._name_user_principal_name_get_response.py} | 8 +- ...ame_user_principal_name_request_builder.py | 20 +- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../members/add/add_post_response.py} | 8 +- .../members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- .../messages/delta/delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../messages/messages_request_builder.py | 30 +- .../primary_channel_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../tabs/tabs_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ffer_shift_request_item_request_builder.py | 32 +- .../offer_shift_requests_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...ift_change_request_item_request_builder.py | 32 +- ...n_shift_change_requests_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../item/open_shift_item_request_builder.py | 36 +- .../open_shifts_request_builder.py | 30 +- .../team/schedule/schedule_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../scheduling_group_item_request_builder.py | 34 +- .../scheduling_groups_request_builder.py | 28 +- .../schedule/share/share_request_builder.py | 10 +- .../shifts/count/count_request_builder.py | 10 +- .../shifts/item/shift_item_request_builder.py | 34 +- .../schedule/shifts/shifts_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...fts_change_request_item_request_builder.py | 30 +- ..._shifts_change_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../time_off_reason_item_request_builder.py | 34 +- .../time_off_reasons_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../time_off_request_item_request_builder.py | 34 +- .../time_off_requests_request_builder.py | 24 +- .../times_off/count/count_request_builder.py | 10 +- .../item/time_off_item_request_builder.py | 34 +- .../times_off/times_off_request_builder.py | 28 +- ...d_activity_notification_request_builder.py | 10 +- .../team/tags/count/count_request_builder.py | 10 +- .../members/count/count_request_builder.py | 10 +- ...eamwork_tag_member_item_request_builder.py | 34 +- .../item/members/members_request_builder.py | 28 +- .../item/teamwork_tag_item_request_builder.py | 38 +- .../item/team/tags/tags_request_builder.py | 28 +- .../groups/item/team/team_request_builder.py | 24 +- .../team/template/template_request_builder.py | 10 +- .../unarchive/unarchive_request_builder.py | 10 +- .../threads/count/count_request_builder.py | 10 +- ...onversation_thread_item_request_builder.py | 40 +- .../item/posts/count/count_request_builder.py | 10 +- .../attachments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 16 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 24 +- .../item/extension_item_request_builder.py | 34 +- .../item/forward/forward_request_builder.py | 10 +- .../attachments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 16 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 24 +- .../item/extension_item_request_builder.py | 34 +- .../forward/forward_request_builder.py | 10 +- .../in_reply_to_request_builder.py | 10 +- .../reply/reply_request_builder.py | 10 +- .../posts/item/post_item_request_builder.py | 10 +- .../posts/item/reply/reply_request_builder.py | 10 +- .../item/posts/posts_request_builder.py | 16 +- .../item/reply/reply_request_builder.py | 10 +- .../item/threads/threads_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../transitive_member_of_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../transitive_members_request_builder.py | 10 +- .../unsubscribe_by_mail_request_builder.py | 10 +- .../validate_properties_request_builder.py | 10 +- .../validate_properties_request_builder.py | 10 +- .../api_connectors_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...tity_api_connector_item_request_builder.py | 38 +- ...load_client_certificate_request_builder.py | 12 +- .../b2x_user_flows_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...connector_configuration_request_builder.py | 10 +- ...st_attribute_collection_request_builder.py | 24 +- .../ref/ref_request_builder.py | 20 +- ...load_client_certificate_request_builder.py | 12 +- .../post_federation_signup_request_builder.py | 24 +- .../ref/ref_request_builder.py | 20 +- ...load_client_certificate_request_builder.py | 12 +- ...identity_user_flow_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../identity_providers_request_builder.py | 16 +- .../identity_provider_item_request_builder.py | 16 +- .../languages/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../default_pages_request_builder.py | 24 +- ...flow_language_page_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- ...flow_language_page_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../overrides_pages_request_builder.py | 24 +- ...uage_configuration_item_request_builder.py | 30 +- .../languages/languages_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../get_order/get_order_request_builder.py | 8 +- ...tribute_assignment_item_request_builder.py | 38 +- .../user_attribute_request_builder.py | 10 +- .../set_order/set_order_request_builder.py | 10 +- ...r_attribute_assignments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 8 +- .../ref/ref_request_builder.py | 16 +- ...flow_identity_providers_request_builder.py | 10 +- ...ontext_class_references_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...xt_class_reference_item_request_builder.py | 38 +- ...entication_method_modes_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...method_mode_detail_item_request_builder.py | 24 +- ...authentication_strength_request_builder.py | 24 +- .../policies/count/count_request_builder.py | 10 +- ...on_strength_policy_item_request_builder.py | 24 +- ...bination_configurations_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...tion_configuration_item_request_builder.py | 38 +- ...te_allowed_combinations_request_builder.py | 12 +- .../item/usage/usage_request_builder.py | 8 +- .../policies/policies_request_builder.py | 18 +- .../conditional_access_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../named_location_item_request_builder.py | 42 +-- .../named_locations_request_builder.py | 28 +- .../policies/count/count_request_builder.py | 10 +- ...onal_access_policy_item_request_builder.py | 38 +- .../policies/policies_request_builder.py | 28 +- .../templates/count/count_request_builder.py | 10 +- ...al_access_template_item_request_builder.py | 16 +- .../templates/templates_request_builder.py | 16 +- .../available_provider_types_get_response.py | 54 +++ ...vailable_provider_types_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- .../identity_providers_request_builder.py | 28 +- ...tity_provider_base_item_request_builder.py | 38 +- .../identity/identity_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ser_flow_attribute_item_request_builder.py | 38 +- .../user_flow_attributes_request_builder.py | 28 +- .../access_reviews_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../definitions_request_builder.py | 28 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- ...chedule_definition_item_request_builder.py | 34 +- .../instances/count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../instances/instances_request_builder.py | 24 +- .../accept_recommendations_request_builder.py | 10 +- ...ss_review_instance_item_request_builder.py | 30 +- .../apply_decisions_request_builder.py | 10 +- .../batch_record_decisions_request_builder.py | 10 +- .../contacted_reviewers_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ss_review_reviewer_item_request_builder.py | 24 +- .../decisions/count/count_request_builder.py | 10 +- .../decisions/decisions_request_builder.py | 24 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- ...ance_decision_item_item_request_builder.py | 30 +- .../insights/count/count_request_builder.py | 10 +- .../item/insights/insights_request_builder.py | 18 +- ...governance_insight_item_request_builder.py | 24 +- .../reset_decisions_request_builder.py | 10 +- .../send_reminder_request_builder.py | 10 +- .../stages/count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- ...ccess_review_stage_item_request_builder.py | 34 +- .../decisions/count/count_request_builder.py | 10 +- .../decisions/decisions_request_builder.py | 24 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- ...ance_decision_item_item_request_builder.py | 34 +- .../insights/count/count_request_builder.py | 10 +- .../item/insights/insights_request_builder.py | 18 +- ...governance_insight_item_request_builder.py | 24 +- .../stages/item/stop/stop_request_builder.py | 10 +- .../item/stages/stages_request_builder.py | 24 +- .../item/stop/stop_request_builder.py | 10 +- .../item/stop/stop_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- .../history_definitions_request_builder.py | 28 +- ...history_definition_item_request_builder.py | 30 +- .../instances/count/count_request_builder.py | 10 +- .../instances/instances_request_builder.py | 24 +- ...w_history_instance_item_request_builder.py | 24 +- .../generate_download_uri_request_builder.py | 12 +- .../app_consent_request_builder.py | 24 +- .../app_consent_requests_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- ...pp_consent_request_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../item/approval/approval_request_builder.py | 24 +- .../stages/count/count_request_builder.py | 10 +- .../approval_stage_item_request_builder.py | 34 +- .../approval/stages/stages_request_builder.py | 24 +- ...er_consent_request_item_request_builder.py | 30 +- .../user_consent_requests_request_builder.py | 24 +- ...ge_assignment_approvals_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../item/approval_item_request_builder.py | 30 +- .../stages/count/count_request_builder.py | 10 +- .../approval_stage_item_request_builder.py | 34 +- .../item/stages/stages_request_builder.py | 24 +- .../access_packages_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../access_package_item_request_builder.py | 40 +- ...kages_incompatible_with_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../access_package_item_request_builder.py | 10 +- .../assignment_policies_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../access_package_request_builder.py | 10 +- ..._assignment_policy_item_request_builder.py | 24 +- .../item/catalog/catalog_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...xtension_stage_settings_request_builder.py | 18 +- .../custom_extension_request_builder.py | 10 +- ...sion_stage_setting_item_request_builder.py | 24 +- .../questions/count/count_request_builder.py | 10 +- ...s_package_question_item_request_builder.py | 24 +- .../questions/questions_request_builder.py | 18 +- .../item/catalog/catalog_request_builder.py | 10 +- ...able_policy_requirements_post_response.py} | 8 +- ...ble_policy_requirements_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...patible_access_packages_request_builder.py | 16 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../incompatible_groups_request_builder.py | 16 +- .../item/group_item_request_builder.py | 10 + .../item/ref/ref_request_builder.py | 14 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../ref/ref_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- ...esource_role_scope_item_request_builder.py | 28 +- .../environment_request_builder.py | 10 +- .../role/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/role/role_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/scope/scope_request_builder.py | 24 +- .../resource_role_scopes_request_builder.py | 22 +- .../assignment_policies_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../access_package_request_builder.py | 10 +- ..._assignment_policy_item_request_builder.py | 34 +- .../item/catalog/catalog_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...xtension_stage_settings_request_builder.py | 18 +- .../custom_extension_request_builder.py | 10 +- ...sion_stage_setting_item_request_builder.py | 24 +- .../questions/count/count_request_builder.py | 10 +- ...s_package_question_item_request_builder.py | 24 +- .../questions/questions_request_builder.py | 18 +- .../assignment_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../access_package_request_builder.py | 10 +- ...assignment_request_item_request_builder.py | 34 +- .../assignment/assignment_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../reprocess/reprocess_request_builder.py | 10 +- .../requestor/requestor_request_builder.py | 10 +- .../item/resume/resume_request_builder.py | 11 +- ...e.py => additional_access_get_response.py} | 8 +- .../additional_access_request_builder.py | 20 +- ...patible_access_package_id_get_response.py} | 8 +- ...tible_access_package_id_request_builder.py | 23 +- .../assignments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../access_package_request_builder.py | 10 +- ...package_assignment_item_request_builder.py | 30 +- .../assignment_policy_request_builder.py | 10 +- .../reprocess/reprocess_request_builder.py | 10 +- .../catalogs/catalogs_request_builder.py | 28 +- .../catalogs/count/count_request_builder.py | 10 +- ...ss_package_catalog_item_request_builder.py | 56 +-- .../access_packages_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../access_package_item_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...tom_workflow_extensions_request_builder.py | 30 +- ..._callout_extension_item_request_builder.py | 41 ++- .../count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource_roles_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource_scopes_request_builder.py | 18 +- .../resources/count/count_request_builder.py | 10 +- ...s_package_resource_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../item/scopes/scopes_request_builder.py | 18 +- .../resources/resources_request_builder.py | 24 +- ...connected_organizations_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ected_organization_item_request_builder.py | 38 +- .../count/count_request_builder.py | 10 +- .../external_sponsors/delta/delta_response.py | 57 --- .../external_sponsors_request_builder.py | 108 +----- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_response.py | 57 --- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- .../validate_properties_request_builder.py | 91 ----- .../count/count_request_builder.py | 10 +- .../internal_sponsors/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../get_by_ids/get_by_ids_response.py | 57 --- .../internal_sponsors_request_builder.py | 108 +----- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- .../entitlement_management_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...source_environment_item_request_builder.py | 24 +- .../resources/count/count_request_builder.py | 10 +- ...s_package_resource_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../item/scopes/scopes_request_builder.py | 18 +- .../resources/resources_request_builder.py | 18 +- .../resource_environments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...e_resource_request_item_request_builder.py | 24 +- .../access_packages_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../access_package_item_request_builder.py | 10 +- .../item/catalog/catalog_request_builder.py | 42 +-- .../count/count_request_builder.py | 10 +- ...tom_workflow_extensions_request_builder.py | 30 +- ..._callout_extension_item_request_builder.py | 41 ++- .../count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource_roles_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource_scopes_request_builder.py | 18 +- .../resources/count/count_request_builder.py | 10 +- ...s_package_resource_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../item/scopes/scopes_request_builder.py | 18 +- .../resources/resources_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...esource_role_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../role/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/role/role_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../resource/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/scope/scope_request_builder.py | 24 +- .../resource_role_scopes_request_builder.py | 18 +- .../resources/count/count_request_builder.py | 10 +- ...s_package_resource_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/scopes/scopes_request_builder.py | 18 +- .../item/roles/roles_request_builder.py | 18 +- .../scopes/count/count_request_builder.py | 10 +- ...age_resource_scope_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../roles/count/count_request_builder.py | 10 +- ...kage_resource_role_item_request_builder.py | 24 +- .../environment_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 24 +- .../resource/roles/roles_request_builder.py | 18 +- .../item/scopes/scopes_request_builder.py | 18 +- .../resources/resources_request_builder.py | 18 +- .../settings/settings_request_builder.py | 34 +- .../identity_governance_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../custom_task_extensions_request_builder.py | 28 +- .../created_by/created_by_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ ...tom_task_extension_item_request_builder.py | 38 +- .../last_modified_by_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../deleted_items_request_builder.py | 16 +- .../workflows/count/count_request_builder.py | 10 +- .../created_by/created_by_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../execution_scope_request_builder.py | 16 +- ..._processing_result_item_request_builder.py | 16 +- .../last_modified_by_request_builder.py | 26 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ ...ity_governance_activate_request_builder.py | 10 +- ...ance_create_new_version_request_builder.py | 12 +- ...tity_governance_restore_request_builder.py | 12 +- .../item/runs/count/count_request_builder.py | 10 +- .../runs/item/run_item_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- ..._processing_result_item_request_builder.py | 16 +- ...time_with_end_date_time_request_builder.py | 11 +- ...user_processing_results_request_builder.py | 16 +- ...time_with_end_date_time_request_builder.py | 11 +- .../item/runs/runs_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/task/task_request_builder.py | 10 +- .../task_definition_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- .../item/task_report_item_request_builder.py | 10 +- ...time_with_end_date_time_request_builder.py | 11 +- .../task_reports_request_builder.py | 16 +- .../item/tasks/count/count_request_builder.py | 10 +- .../tasks/item/task_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 10 +- .../item/tasks/tasks_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- ..._processing_result_item_request_builder.py | 10 +- ...time_with_end_date_time_request_builder.py | 11 +- ...user_processing_results_request_builder.py | 16 +- .../versions/count/count_request_builder.py | 10 +- .../created_by/created_by_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../last_modified_by_request_builder.py | 26 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/tasks/count/count_request_builder.py | 10 +- .../tasks/item/task_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 10 +- .../item/tasks/tasks_request_builder.py | 18 +- ...ion_version_number_item_request_builder.py | 16 +- .../item/versions/versions_request_builder.py | 16 +- .../item/workflow_item_request_builder.py | 28 +- .../workflows/workflows_request_builder.py | 16 +- .../lifecycle_workflows_request_builder.py | 40 +- .../settings/settings_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../task_definition_item_request_builder.py | 16 +- .../task_definitions_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/tasks/count/count_request_builder.py | 10 +- .../tasks/item/task_item_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 10 +- .../item/tasks/tasks_request_builder.py | 10 +- .../workflow_template_item_request_builder.py | 16 +- .../workflow_templates_request_builder.py | 16 +- .../workflows/count/count_request_builder.py | 10 +- .../created_by/created_by_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../execution_scope_request_builder.py | 16 +- ..._processing_result_item_request_builder.py | 16 +- .../last_modified_by_request_builder.py | 26 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ ...ity_governance_activate_request_builder.py | 10 +- ...ance_create_new_version_request_builder.py | 12 +- ...tity_governance_restore_request_builder.py | 12 +- .../item/runs/count/count_request_builder.py | 10 +- .../runs/item/run_item_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- ..._processing_result_item_request_builder.py | 16 +- ...time_with_end_date_time_request_builder.py | 11 +- ...user_processing_results_request_builder.py | 16 +- ...time_with_end_date_time_request_builder.py | 11 +- .../item/runs/runs_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/task/task_request_builder.py | 10 +- .../task_definition_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- .../item/task_report_item_request_builder.py | 10 +- ...time_with_end_date_time_request_builder.py | 11 +- .../task_reports_request_builder.py | 16 +- .../item/tasks/count/count_request_builder.py | 10 +- .../tasks/item/task_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 10 +- .../item/tasks/tasks_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 16 +- ..._processing_result_item_request_builder.py | 10 +- ...time_with_end_date_time_request_builder.py | 11 +- ...user_processing_results_request_builder.py | 16 +- .../versions/count/count_request_builder.py | 10 +- .../created_by/created_by_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../last_modified_by_request_builder.py | 26 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/tasks/count/count_request_builder.py | 10 +- .../tasks/item/task_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ntity_governance_resume_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/subject/subject_request_builder.py | 26 +- .../item/task/task_request_builder.py | 10 +- ..._processing_result_item_request_builder.py | 10 +- ...task_processing_results_request_builder.py | 10 +- .../item/tasks/tasks_request_builder.py | 18 +- ...ion_version_number_item_request_builder.py | 16 +- .../item/versions/versions_request_builder.py | 16 +- .../item/workflow_item_request_builder.py | 40 +- .../workflows/workflows_request_builder.py | 28 +- .../assignment_approvals_request_builder.py | 239 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...er_by_current_user_with_on_get_response.py | 57 +++ ...y_current_user_with_on_request_builder.py} | 53 +-- .../item/approval_item_request_builder.py | 224 ++++++++++++ .../stages/count/count_request_builder.py | 113 ++++++ .../approval_stage_item_request_builder.py | 216 +++++++++++ .../item/stages/stages_request_builder.py | 227 ++++++++++++ ...ment_schedule_instances_request_builder.py | 240 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...er_by_current_user_with_on_get_response.py | 57 +++ ...by_current_user_with_on_request_builder.py | 144 ++++++++ .../activated_using_request_builder.py | 116 ++++++ .../item/group/group_request_builder.py | 126 +++++++ .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../principal/principal_request_builder.py | 116 ++++++ ..._schedule_instance_item_request_builder.py | 245 +++++++++++++ ...nment_schedule_requests_request_builder.py | 241 +++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...er_by_current_user_with_on_get_response.py | 57 +++ ...y_current_user_with_on_request_builder.py} | 57 +-- .../activated_using_request_builder.py | 116 ++++++ .../item/cancel/cancel_request_builder.py} | 40 +- .../item/group/group_request_builder.py | 126 +++++++ .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../principal/principal_request_builder.py | 116 ++++++ ...t_schedule_request_item_request_builder.py | 265 ++++++++++++++ .../target_schedule_request_builder.py | 116 ++++++ .../assignment_schedules_request_builder.py | 240 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...er_by_current_user_with_on_get_response.py | 57 +++ ...y_current_user_with_on_request_builder.py} | 53 +-- .../activated_using_request_builder.py | 116 ++++++ .../item/group/group_request_builder.py | 126 +++++++ .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../principal/principal_request_builder.py | 116 ++++++ ...ssignment_schedule_item_request_builder.py | 245 +++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...lity_schedule_instances_request_builder.py | 240 ++++++++++++ ...er_by_current_user_with_on_get_response.py | 57 +++ ...by_current_user_with_on_request_builder.py | 144 ++++++++ .../item/group/group_request_builder.py | 126 +++++++ .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../principal/principal_request_builder.py | 116 ++++++ ..._schedule_instance_item_request_builder.py | 235 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ ...ility_schedule_requests_request_builder.py | 241 +++++++++++++ ...r_by_current_user_with_on_get_response.py} | 18 +- ...by_current_user_with_on_request_builder.py | 144 ++++++++ .../item/cancel/cancel_request_builder.py} | 50 +-- .../item/group/group_request_builder.py | 126 +++++++ .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../principal/principal_request_builder.py | 116 ++++++ ...y_schedule_request_item_request_builder.py | 255 +++++++++++++ .../target_schedule_request_builder.py | 116 ++++++ .../count/count_request_builder.py | 113 ++++++ .../eligibility_schedules_request_builder.py | 240 ++++++++++++ ...er_by_current_user_with_on_get_response.py | 57 +++ ...y_current_user_with_on_request_builder.py} | 57 +-- .../item/group/group_request_builder.py | 126 +++++++ .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../principal/principal_request_builder.py | 116 ++++++ ...igibility_schedule_item_request_builder.py | 235 ++++++++++++ .../group/group_request_builder.py | 284 +++++++++++++++ .../privileged_access_request_builder.py | 224 ++++++++++++ .../agreement_acceptances_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...reement_acceptance_item_request_builder.py | 24 +- .../agreements/agreements_request_builder.py | 28 +- .../agreements/count/count_request_builder.py | 10 +- .../acceptances_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...reement_acceptance_item_request_builder.py | 24 +- .../item/agreement_item_request_builder.py | 38 +- .../item/file/file_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ..._file_localization_item_request_builder.py | 24 +- .../versions/count/count_request_builder.py | 10 +- ...ement_file_version_item_request_builder.py | 30 +- .../item/versions/versions_request_builder.py | 24 +- .../localizations_request_builder.py | 24 +- .../item/files/count/count_request_builder.py | 10 +- .../item/files/files_request_builder.py | 22 +- ..._file_localization_item_request_builder.py | 24 +- .../versions/count/count_request_builder.py | 10 +- ...ement_file_version_item_request_builder.py | 30 +- .../item/versions/versions_request_builder.py | 24 +- .../terms_of_use_request_builder.py | 26 +- .../identity_protection_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- .../risk_detection_item_request_builder.py | 30 +- .../risk_detections_request_builder.py | 24 +- .../confirm_compromised_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../dismiss/dismiss_request_builder.py | 10 +- .../history/count/count_request_builder.py | 10 +- .../item/history/history_request_builder.py | 24 +- ...cipal_history_item_item_request_builder.py | 30 +- ..._service_principal_item_request_builder.py | 30 +- ...isky_service_principals_request_builder.py | 24 +- .../confirm_compromised_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../dismiss/dismiss_request_builder.py | 10 +- .../history/count/count_request_builder.py | 10 +- .../item/history/history_request_builder.py | 24 +- ..._user_history_item_item_request_builder.py | 24 +- .../item/risky_user_item_request_builder.py | 30 +- .../risky_users_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...pal_risk_detection_item_request_builder.py | 30 +- ...incipal_risk_detections_request_builder.py | 24 +- ... available_provider_types_get_response.py} | 8 +- ...vailable_provider_types_request_builder.py | 20 +- .../count/count_request_builder.py | 10 +- .../identity_providers_request_builder.py | 28 +- .../identity_provider_item_request_builder.py | 38 +- .../bitlocker/bitlocker_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ocker_recovery_key_item_request_builder.py | 16 +- .../recovery_keys_request_builder.py | 16 +- .../information_protection_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../results/count/count_request_builder.py | 10 +- ..._assessment_result_item_request_builder.py | 24 +- .../item/results/results_request_builder.py | 18 +- ...assessment_request_item_request_builder.py | 30 +- ...eat_assessment_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../invitations_request_builder.py | 22 +- .../item/invitation_item_request_builder.py | 24 +- .../invited_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ce_provisioning_errors_request_builder.py} | 63 ++-- msgraph/generated/kiota-lock.json | 5 +- msgraph/generated/models/access_action.py | 4 +- .../generated/models/access_package_answer.py | 4 +- .../models/access_package_answer_choice.py | 4 +- .../models/access_package_approval_stage.py | 4 +- ...ss_package_assignment_approval_settings.py | 8 +- .../access_package_assignment_request.py | 4 +- ...ackage_assignment_request_callback_data.py | 2 +- ...package_assignment_request_requirements.py | 4 +- ...s_package_assignment_requestor_settings.py | 6 +- ...cess_package_assignment_review_settings.py | 4 +- ...cess_package_automatic_request_settings.py | 4 +- .../models/access_package_localized_text.py | 4 +- .../access_package_text_input_question.py | 4 +- .../models/access_review_apply_action.py | 4 +- ...access_review_history_schedule_settings.py | 6 +- ..._review_instance_decision_item_resource.py | 4 +- ...cess_review_notification_recipient_item.py | 4 +- ...ess_review_notification_recipient_scope.py | 4 +- ...s_review_recommendation_insight_setting.py | 4 +- .../models/access_review_reviewer_scope.py | 4 +- .../access_review_schedule_definition.py | 10 +- .../models/access_review_schedule_settings.py | 6 +- .../generated/models/access_review_scope.py | 4 +- .../generated/models/access_review_stage.py | 2 +- .../models/access_review_stage_settings.py | 6 +- .../models/account_target_content.py | 78 ++++ .../models/account_target_content_type.py | 8 + .../generated/models/action_result_part.py | 4 +- msgraph/generated/models/add_in.py | 4 +- .../address_book_account_target_content.py | 56 +++ msgraph/generated/models/admin.py | 11 +- .../generated/models/aggregation_option.py | 6 +- msgraph/generated/models/agreement.py | 2 +- .../generated/models/agreement_file_data.py | 4 +- .../models/agreement_file_localization.py | 2 +- .../models/agreement_file_properties.py | 4 +- msgraph/generated/models/album.py | 4 +- msgraph/generated/models/alert.py | 2 +- msgraph/generated/models/alert_detection.py | 4 +- .../generated/models/alert_history_state.py | 4 +- msgraph/generated/models/alert_trigger.py | 4 +- msgraph/generated/models/allowed_value.py | 2 +- .../generated/models/alteration_response.py | 4 +- .../generated/models/altered_query_token.py | 4 +- .../models/alternative_security_id.py | 4 +- .../android_minimum_operating_system.py | 4 +- msgraph/generated/models/api_application.py | 8 +- .../api_authentication_configuration_base.py | 4 +- .../models/app_configuration_setting_item.py | 4 +- .../models/app_consent_request_scope.py | 4 +- msgraph/generated/models/app_identity.py | 10 +- msgraph/generated/models/app_list_item.py | 4 +- .../app_log_collection_download_details.py | 4 +- .../models/app_management_configuration.py | 4 +- msgraph/generated/models/app_role.py | 6 +- msgraph/generated/models/application.py | 18 +- .../models/application_service_principal.py | 4 +- .../applied_conditional_access_policy.py | 6 +- msgraph/generated/models/approval_settings.py | 4 +- .../generated/models/archived_print_job.py | 4 +- msgraph/generated/models/assigned_label.py | 4 +- msgraph/generated/models/assigned_license.py | 4 +- msgraph/generated/models/assigned_plan.py | 4 +- .../models/assigned_training_info.py | 4 +- msgraph/generated/models/assignment_order.py | 4 +- msgraph/generated/models/attachment_base.py | 2 +- msgraph/generated/models/attachment_info.py | 6 +- msgraph/generated/models/attachment_item.py | 8 +- .../models/attack_simulation_operation.py | 67 ++++ ...imulation_operation_collection_response.py | 57 +++ .../attack_simulation_operation_type.py | 7 + .../attack_simulation_repeat_offender.py | 4 +- .../models/attack_simulation_root.py | 42 +++ ...ack_simulation_simulation_user_coverage.py | 4 +- ...ttack_simulation_training_user_coverage.py | 4 +- .../models/attack_simulation_user.py | 6 +- .../generated/models/attendance_interval.py | 4 +- .../generated/models/attendee_availability.py | 4 +- .../generated/models/attribute_definition.py | 4 +- .../attribute_definition_metadata_entry.py | 4 +- msgraph/generated/models/attribute_mapping.py | 4 +- .../attribute_mapping_parameter_schema.py | 4 +- .../models/attribute_mapping_source.py | 4 +- msgraph/generated/models/audio.py | 4 +- .../generated/models/audio_conferencing.py | 4 +- .../models/audit_activity_initiator.py | 4 +- msgraph/generated/models/audit_actor.py | 4 +- msgraph/generated/models/audit_property.py | 4 +- msgraph/generated/models/audit_resource.py | 4 +- .../authentication_context_class_reference.py | 2 +- ...entication_method_feature_configuration.py | 6 +- .../models/authentication_methods_policy.py | 6 +- ...ntication_methods_registration_campaign.py | 4 +- ...ds_registration_campaign_include_target.py | 6 +- .../models/authentication_methods_root.py | 2 +- .../models/authentication_strength_root.py | 6 +- .../models/authentication_strength_usage.py | 4 +- .../generated/models/authorization_info.py | 4 +- .../generated/models/authorization_policy.py | 2 +- .../models/automatic_replies_mail_tips.py | 4 +- .../models/automatic_replies_setting.py | 4 +- msgraph/generated/models/availability_item.py | 6 +- .../models/average_comparative_score.py | 4 +- ...e_communication_services_user_identity.py} | 26 +- ...se_collection_pagination_count_response.py | 8 +- .../models/base_delta_function_response.py | 8 +- .../models/base_end_user_notification.py | 89 +++++ msgraph/generated/models/base_item.py | 6 +- .../bit_locker_removable_drive_policy.py | 4 +- .../generated/models/booking_appointment.py | 6 +- .../booking_customer_information_base.py | 4 +- .../models/booking_question_answer.py | 4 +- .../models/booking_question_assignment.py | 6 +- msgraph/generated/models/booking_reminder.py | 4 +- .../models/booking_scheduling_policy.py | 4 +- .../generated/models/booking_work_hours.py | 4 +- .../models/booking_work_time_slot.py | 4 +- msgraph/generated/models/boolean_column.py | 4 +- .../broadcast_meeting_caption_settings.py | 4 +- .../models/broadcast_meeting_settings.py | 4 +- .../models/browser_shared_cookie_history.py | 4 +- .../generated/models/browser_site_history.py | 4 +- .../models/bucket_aggregation_definition.py | 4 +- .../models/bucket_aggregation_range.py | 4 +- msgraph/generated/models/bundle.py | 4 +- msgraph/generated/models/calculated_column.py | 4 +- .../models/calendar_sharing_message_action.py | 4 +- msgraph/generated/models/call.py | 4 +- msgraph/generated/models/call_media_state.py | 4 +- msgraph/generated/models/call_options.py | 4 +- .../generated/models/call_participant_info.py | 4 +- .../models/call_records/device_info.py | 4 +- .../call_records/direct_routing_log_row.py | 4 +- .../generated/models/call_records/endpoint.py | 4 +- .../models/call_records/failure_info.py | 4 +- .../models/call_records/feedback_token_set.py | 4 +- .../generated/models/call_records/media.py | 4 +- .../models/call_records/media_stream.py | 4 +- .../models/call_records/network_info.py | 4 +- .../models/call_records/pstn_call_log_row.py | 4 +- .../models/call_records/trace_route_hop.py | 4 +- .../models/call_records/user_agent.py | 4 +- .../models/call_records/user_feedback.py | 4 +- msgraph/generated/models/call_route.py | 4 +- msgraph/generated/models/call_transcript.py | 80 ++++ .../call_transcript_collection_response.py | 57 +++ .../models/call_transcription_info.py | 4 +- .../generated/models/certificate_authority.py | 4 +- msgraph/generated/models/certification.py | 6 +- .../generated/models/certification_control.py | 4 +- msgraph/generated/models/channel_identity.py | 4 +- msgraph/generated/models/chat_info.py | 4 +- .../models/chat_message_attachment.py | 4 +- .../models/chat_message_history_item.py | 4 +- .../generated/models/chat_message_mention.py | 4 +- .../models/chat_message_policy_violation.py | 4 +- ...hat_message_policy_violation_policy_tip.py | 4 +- .../generated/models/chat_message_reaction.py | 4 +- msgraph/generated/models/chat_viewpoint.py | 4 +- msgraph/generated/models/choice_column.py | 4 +- .../models/cloud_app_security_state.py | 4 +- .../generated/models/cloud_communications.py | 4 +- .../coachmark_location.py} | 35 +- .../models/coachmark_location_type.py | 11 + msgraph/generated/models/collapse_property.py | 4 +- msgraph/generated/models/column_validation.py | 4 +- .../communications_application_identity.py | 60 +++ ...nications_application_instance_identity.py | 60 +++ .../communications_encrypted_identity.py | 52 +++ .../models/communications_guest_identity.py | 52 +++ .../models/communications_identity_set.py | 90 +++++ .../models/communications_phone_identity.py | 52 +++ .../models/communications_user_identity.py | 56 +++ msgraph/generated/models/compliance.py | 4 +- .../models/compliance_information.py | 4 +- ...ompliance_management_partner_assignment.py | 4 +- .../models/conditional_access_applications.py | 4 +- .../conditional_access_client_applications.py | 4 +- .../conditional_access_condition_set.py | 4 +- .../models/conditional_access_devices.py | 4 +- .../conditional_access_external_tenants.py | 4 +- .../models/conditional_access_filter.py | 4 +- .../conditional_access_grant_controls.py | 4 +- ...itional_access_guests_or_external_users.py | 4 +- .../models/conditional_access_locations.py | 4 +- .../models/conditional_access_platforms.py | 4 +- .../conditional_access_policy_detail.py | 4 +- .../conditional_access_session_control.py | 4 +- .../conditional_access_session_controls.py | 4 +- .../models/conditional_access_users.py | 4 +- ...uration_manager_client_enabled_features.py | 4 +- msgraph/generated/models/container_filter.py | 4 +- .../models/content_approval_status_column.py | 4 +- msgraph/generated/models/content_type_info.py | 4 +- .../generated/models/content_type_order.py | 4 +- msgraph/generated/models/control_score.py | 4 +- msgraph/generated/models/convert_id_result.py | 8 +- .../generated/models/copy_notebook_model.py | 4 +- ...cross_tenant_access_policy_b2_b_setting.py | 4 +- ...ant_access_policy_configuration_partner.py | 6 +- ...ross_tenant_access_policy_inbound_trust.py | 4 +- .../cross_tenant_access_policy_target.py | 4 +- ...nant_access_policy_target_configuration.py | 4 +- ...oss_tenant_identity_sync_policy_partner.py | 4 +- .../models/cross_tenant_user_sync_inbound.py | 4 +- msgraph/generated/models/currency_column.py | 4 +- ..._extension_authentication_configuration.py | 4 +- ...custom_extension_callback_configuration.py | 4 +- .../custom_extension_callout_instance.py | 4 +- .../custom_extension_client_configuration.py | 6 +- .../generated/models/custom_extension_data.py | 4 +- ...custom_extension_endpoint_configuration.py | 4 +- .../models/custom_security_attribute_value.py | 4 +- .../models/custom_training_setting.py | 75 ++++ msgraph/generated/models/data_subject.py | 4 +- msgraph/generated/models/date_time_column.py | 4 +- .../generated/models/date_time_time_zone.py | 4 +- .../generated/models/default_column_value.py | 4 +- .../models/default_user_role_permissions.py | 10 +- .../defender_detected_malware_actions.py | 4 +- .../delegated_admin_access_container.py | 4 +- .../models/delegated_admin_access_details.py | 4 +- .../models/delegated_admin_relationship.py | 11 + ...admin_relationship_customer_participant.py | 4 +- ...gated_admin_relationship_request_action.py | 1 + msgraph/generated/models/deleted.py | 4 +- msgraph/generated/models/details_info.py | 4 +- .../generated/models/device_action_result.py | 4 +- ...ce_and_app_management_assignment_target.py | 4 +- .../models/device_and_app_management_data.py | 4 +- .../device_compliance_policy_setting_state.py | 4 +- .../device_configuration_setting_state.py | 4 +- msgraph/generated/models/device_detail.py | 4 +- .../device_enrollment_platform_restriction.py | 4 +- .../device_exchange_access_state_summary.py | 4 +- .../generated/models/device_geo_location.py | 4 +- .../models/device_health_attestation_state.py | 4 +- .../device_management_partner_assignment.py | 4 +- .../models/device_management_settings.py | 4 +- .../models/device_operating_system_summary.py | 4 +- .../models/device_protection_overview.py | 4 +- msgraph/generated/models/dictionary.py | 4 +- .../generated/models/directory_definition.py | 2 +- .../models/display_name_localization.py | 4 +- msgraph/generated/models/document_set.py | 4 +- .../generated/models/document_set_content.py | 4 +- .../models/document_set_version_item.py | 4 +- msgraph/generated/models/domain_state.py | 4 +- .../drive_item_uploadable_properties.py | 4 +- msgraph/generated/models/drive_recipient.py | 4 +- .../models/edge_search_engine_base.py | 4 +- .../models/education_assignment_grade.py | 4 +- .../models/education_assignment_grade_type.py | 4 +- .../models/education_assignment_recipient.py | 4 +- msgraph/generated/models/education_course.py | 4 +- .../generated/models/education_feedback.py | 4 +- .../generated/models/education_item_body.py | 4 +- .../models/education_on_premises_info.py | 4 +- .../generated/models/education_resource.py | 4 +- msgraph/generated/models/education_root.py | 4 +- msgraph/generated/models/education_student.py | 4 +- .../models/education_submission_recipient.py | 4 +- msgraph/generated/models/education_teacher.py | 4 +- msgraph/generated/models/education_term.py | 4 +- msgraph/generated/models/email_address.py | 4 +- ...ail_authentication_method_configuration.py | 2 +- .../models/email_file_assessment_request.py | 2 +- .../generated/models/email_payload_detail.py | 68 ++++ msgraph/generated/models/email_settings.py | 4 +- .../generated/models/employee_experience.py | 4 +- msgraph/generated/models/employee_org_data.py | 4 +- .../generated/models/end_user_notification.py | 112 ++++++ ...d_user_notification_collection_response.py | 57 +++ .../models/end_user_notification_detail.py | 79 ++++ ...notification_detail_collection_response.py | 57 +++ .../end_user_notification_preference.py | 8 + .../models/end_user_notification_setting.py | 92 +++++ .../end_user_notification_setting_type.py | 9 + .../models/end_user_notification_type.py | 10 + .../models/entitlement_management_schedule.py | 4 +- msgraph/generated/models/entity.py | 341 ++++++++++++++---- .../generated/models/event_message_detail.py | 22 +- msgraph/generated/models/exclude_target.py | 4 +- .../generated/models/expiration_pattern.py | 4 +- .../models/expression_input_object.py | 4 +- .../models/extension_schema_property.py | 4 +- .../models/external_connectors/acl.py | 6 +- .../external_connectors/activity_settings.py | 4 +- .../external_connectors/configuration.py | 4 +- .../external_connectors/display_template.py | 4 +- .../models/external_connectors/external.py | 4 +- .../external_item_content.py | 4 +- .../models/external_connectors/label.py | 1 + .../models/external_connectors/properties.py | 4 +- .../models/external_connectors/property_.py | 10 +- .../external_connectors/property_rule.py | 4 +- .../external_connectors/search_settings.py | 4 +- .../external_connectors/url_match_info.py | 4 +- .../url_to_item_resolver_base.py | 4 +- msgraph/generated/models/external_link.py | 4 +- .../extract_sensitivity_labels_result.py | 4 +- msgraph/generated/models/feature_target.py | 4 +- .../models/fido2_key_restrictions.py | 4 +- msgraph/generated/models/file.py | 4 +- .../models/file_assessment_request.py | 2 +- .../generated/models/file_encryption_info.py | 80 ++++ msgraph/generated/models/file_hash.py | 4 +- .../generated/models/file_security_state.py | 4 +- msgraph/generated/models/file_system_info.py | 4 +- msgraph/generated/models/filter.py | 8 +- msgraph/generated/models/filter_clause.py | 4 +- msgraph/generated/models/filter_group.py | 4 +- msgraph/generated/models/filter_operand.py | 4 +- msgraph/generated/models/folder.py | 4 +- msgraph/generated/models/folder_view.py | 4 +- msgraph/generated/models/followup_flag.py | 4 +- msgraph/generated/models/free_busy_error.py | 4 +- msgraph/generated/models/generic_error.py | 4 +- msgraph/generated/models/geo_coordinates.py | 4 +- .../generated/models/geolocation_column.py | 4 +- msgraph/generated/models/group_filter.py | 4 +- msgraph/generated/models/hashes.py | 4 +- .../generated/models/host_security_state.py | 6 +- .../models/hyperlink_or_picture_column.py | 4 +- msgraph/generated/models/identity.py | 55 ++- .../identity_governance.py | 11 +- .../models/identity_governance/parameter.py | 4 +- .../models/identity_governance/run_summary.py | 4 +- .../task_report_summary.py | 4 +- .../identity_governance/user_summary.py | 4 +- .../models/identity_governance/workflow.py | 2 +- .../identity_governance/workflow_base.py | 6 +- .../workflow_execution_conditions.py | 4 +- .../workflow_execution_trigger.py | 4 +- .../models/identity_protection_root.py | 18 +- ...ty_security_defaults_enforcement_policy.py | 2 +- msgraph/generated/models/identity_set.py | 11 +- msgraph/generated/models/identity_source.py | 4 +- ...identity_user_flow_attribute_assignment.py | 4 +- .../generated/models/idle_session_sign_out.py | 4 +- msgraph/generated/models/image.py | 4 +- msgraph/generated/models/image_info.py | 4 +- .../models/implicit_grant_settings.py | 4 +- ...windows_autopilot_device_identity_state.py | 4 +- .../inbound_outbound_policy_configuration.py | 4 +- .../include_all_account_target_content.py | 52 +++ msgraph/generated/models/incoming_context.py | 4 +- msgraph/generated/models/incomplete_data.py | 4 +- .../models/information_protection.py | 4 +- msgraph/generated/models/informational_url.py | 4 +- msgraph/generated/models/insight_identity.py | 6 +- msgraph/generated/models/integer_range.py | 4 +- .../models/internal_domain_federation.py | 8 +- .../models/internet_message_header.py | 4 +- msgraph/generated/models/intune_brand.py | 4 +- .../models/investigation_security_state.py | 4 +- msgraph/generated/models/invitation.py | 4 +- .../models/invitation_participant_info.py | 4 +- .../models/invited_user_message_info.py | 4 +- msgraph/generated/models/ios_device_type.py | 4 +- .../models/ios_home_screen_folder_page.py | 4 +- .../generated/models/ios_home_screen_item.py | 4 +- .../generated/models/ios_home_screen_page.py | 4 +- .../models/ios_minimum_operating_system.py | 4 +- .../models/ios_network_usage_rule.py | 4 +- .../models/ios_notification_settings.py | 4 +- msgraph/generated/models/ip_named_location.py | 2 +- msgraph/generated/models/ip_range.py | 4 +- msgraph/generated/models/item_action_stat.py | 4 +- msgraph/generated/models/item_body.py | 4 +- msgraph/generated/models/item_preview_info.py | 4 +- msgraph/generated/models/item_reference.py | 4 +- .../models/join_meeting_id_settings.py | 4 +- msgraph/generated/models/json.py | 4 +- msgraph/generated/models/key_credential.py | 4 +- .../models/key_credential_configuration.py | 4 +- msgraph/generated/models/key_value.py | 4 +- msgraph/generated/models/key_value_pair.py | 4 +- msgraph/generated/models/landing_page.py | 109 ++++++ .../landing_page_collection_response.py | 57 +++ .../generated/models/landing_page_detail.py | 64 ++++ ...landing_page_detail_collection_response.py | 57 +++ .../models/license_assignment_state.py | 4 +- .../models/license_processing_state.py | 4 +- .../generated/models/license_units_detail.py | 4 +- msgraph/generated/models/list_.py | 6 +- msgraph/generated/models/list_info.py | 6 +- .../generated/models/lobby_bypass_settings.py | 4 +- msgraph/generated/models/locale_info.py | 4 +- msgraph/generated/models/location.py | 4 +- .../generated/models/location_constraint.py | 6 +- msgraph/generated/models/login_page.py | 102 ++++++ .../models/login_page_collection_response.py | 57 +++ .../models/login_page_layout_configuration.py | 4 +- .../login_page_text_visibility_settings.py | 4 +- .../models/long_running_operation.py | 7 + msgraph/generated/models/lookup_column.py | 4 +- .../generated/models/mac_o_s_included_app.py | 4 +- .../generated/models/mac_o_s_lob_child_app.py | 4 +- .../mac_o_s_minimum_operating_system.py | 4 +- msgraph/generated/models/mail_tips.py | 4 +- msgraph/generated/models/mail_tips_error.py | 4 +- msgraph/generated/models/mailbox_settings.py | 4 +- msgraph/generated/models/malware.py | 4 +- msgraph/generated/models/malware_state.py | 6 +- .../models/managed_app_diagnostic_status.py | 4 +- ...d_app_policy_deployment_summary_per_app.py | 4 +- msgraph/generated/models/managed_e_book.py | 6 +- msgraph/generated/models/media_config.py | 4 +- .../models/media_content_rating_australia.py | 4 +- .../models/media_content_rating_canada.py | 4 +- .../models/media_content_rating_france.py | 4 +- .../models/media_content_rating_germany.py | 4 +- .../models/media_content_rating_ireland.py | 4 +- .../models/media_content_rating_japan.py | 4 +- .../media_content_rating_new_zealand.py | 4 +- .../media_content_rating_united_kingdom.py | 4 +- .../media_content_rating_united_states.py | 4 +- msgraph/generated/models/media_info.py | 8 +- msgraph/generated/models/media_stream.py | 4 +- msgraph/generated/models/meeting_info.py | 4 +- .../models/meeting_participant_info.py | 4 +- .../generated/models/meeting_participants.py | 4 +- .../models/meeting_time_suggestion.py | 4 +- .../models/meeting_time_suggestions_result.py | 4 +- .../generated/models/message_rule_actions.py | 4 +- .../models/message_rule_predicates.py | 4 +- .../models/message_security_state.py | 4 +- ...oft_authenticator_authentication_method.py | 4 +- ...icrosoft_authenticator_feature_settings.py | 4 +- .../microsoft_custom_training_setting.py | 71 ++++ .../microsoft_managed_training_setting.py | 64 ++++ .../microsoft_training_assignment_mapping.py | 66 ++++ msgraph/generated/models/mime_content.py | 4 +- .../models/mobile_app_assignment_settings.py | 4 +- .../mobile_app_content_collection_response.py | 57 +++ ...le_app_content_file_collection_response.py | 57 +++ .../generated/models/mobile_app_identifier.py | 4 +- .../mobile_app_install_time_settings.py | 4 +- ...obile_contained_app_collection_response.py | 57 +++ msgraph/generated/models/modified_property.py | 4 +- .../generated/models/network_connection.py | 4 +- .../no_training_notification_setting.py | 59 +++ .../generated/models/no_training_setting.py | 52 +++ msgraph/generated/models/notebook_links.py | 4 +- .../models/notification_delivery_frequency.py | 8 + .../notification_delivery_preference.py | 8 + msgraph/generated/models/number_column.py | 4 +- msgraph/generated/models/o_auth_app_scope.py | 13 + .../o_auth_consent_app_detail.py} | 40 +- .../models/o_data_errors/inner_error.py | 12 +- .../models/o_data_errors/o_data_error.py | 8 + msgraph/generated/models/object_definition.py | 4 +- .../object_definition_metadata_entry.py | 4 +- msgraph/generated/models/object_identity.py | 6 +- msgraph/generated/models/object_mapping.py | 4 +- .../models/object_mapping_metadata_entry.py | 4 +- msgraph/generated/models/oma_setting.py | 4 +- ...premises_accidental_deletion_prevention.py | 4 +- ...directory_synchronization_configuration.py | 4 +- ...mises_directory_synchronization_feature.py | 10 +- .../on_premises_extension_attributes.py | 4 +- .../models/on_premises_provisioning_error.py | 4 +- msgraph/generated/models/onenote.py | 4 +- .../models/onenote_entity_hierarchy_model.py | 4 +- .../models/onenote_operation_error.py | 4 +- .../generated/models/onenote_page_preview.py | 4 +- .../models/onenote_page_preview_links.py | 4 +- .../models/onenote_patch_content_command.py | 4 +- msgraph/generated/models/online_meeting.py | 13 +- .../generated/models/online_meeting_info.py | 4 +- .../models/online_meeting_restricted.py | 4 +- msgraph/generated/models/operation_error.py | 4 +- msgraph/generated/models/optional_claim.py | 4 +- msgraph/generated/models/optional_claims.py | 4 +- .../organizational_branding_properties.py | 2 +- msgraph/generated/models/os_version_count.py | 4 +- .../models/outlook_geo_coordinates.py | 4 +- msgraph/generated/models/package.py | 4 +- msgraph/generated/models/page_links.py | 4 +- .../models/parental_control_settings.py | 4 +- .../models/parse_expression_response.py | 4 +- msgraph/generated/models/participant_info.py | 6 +- .../generated/models/password_credential.py | 6 +- .../password_credential_configuration.py | 4 +- msgraph/generated/models/password_profile.py | 4 +- .../models/password_reset_response.py | 6 +- .../generated/models/patterned_recurrence.py | 4 +- msgraph/generated/models/payload.py | 174 +++++++++ msgraph/generated/models/payload_brand.py | 25 ++ msgraph/generated/models/payload_coachmark.py | 80 ++++ .../payload_collection_response.py} | 26 +- .../generated/models/payload_complexity.py | 9 + msgraph/generated/models/payload_detail.py | 79 ++++ msgraph/generated/models/payload_industry.py | 26 ++ msgraph/generated/models/payload_theme.py | 36 ++ .../models/pending_content_update.py | 4 +- .../generated/models/pending_operations.py | 4 +- .../generated/models/people_admin_settings.py | 59 +++ .../models/permission_grant_condition_set.py | 10 +- msgraph/generated/models/permission_scope.py | 4 +- .../models/person_or_group_column.py | 4 +- msgraph/generated/models/person_type.py | 4 +- msgraph/generated/models/phone.py | 4 +- msgraph/generated/models/photo.py | 4 +- msgraph/generated/models/physical_address.py | 4 +- .../models/physical_office_address.py | 4 +- .../models/pkcs12_certificate_information.py | 6 +- .../models/planner_applied_categories.py | 4 +- .../generated/models/planner_assignments.py | 4 +- .../models/planner_category_descriptions.py | 4 +- .../models/planner_checklist_items.py | 4 +- .../models/planner_external_references.py | 4 +- .../models/planner_order_hints_by_assignee.py | 4 +- msgraph/generated/models/planner_plan.py | 4 +- .../models/planner_plan_container.py | 4 +- msgraph/generated/models/planner_task.py | 6 +- msgraph/generated/models/planner_user_ids.py | 4 +- msgraph/generated/models/policy_root.py | 14 +- .../positive_reinforcement_notification.py | 59 +++ .../models/pre_authorized_application.py | 4 +- msgraph/generated/models/presence.py | 2 +- .../models/presence_status_message.py | 10 +- msgraph/generated/models/print.py | 10 +- .../print_certificate_signing_request.py | 4 +- .../print_document_upload_properties.py | 4 +- .../models/print_job_configuration.py | 10 +- msgraph/generated/models/print_job_status.py | 4 +- msgraph/generated/models/print_margin.py | 4 +- .../models/print_operation_status.py | 4 +- msgraph/generated/models/print_settings.py | 4 +- msgraph/generated/models/print_task_status.py | 4 +- msgraph/generated/models/printer.py | 6 +- msgraph/generated/models/printer_base.py | 2 +- .../generated/models/printer_capabilities.py | 10 +- msgraph/generated/models/printer_defaults.py | 4 +- msgraph/generated/models/printer_location.py | 4 +- .../models/printer_share_viewpoint.py | 4 +- msgraph/generated/models/printer_status.py | 4 +- msgraph/generated/models/privacy.py | 4 +- msgraph/generated/models/privacy_profile.py | 4 +- .../models/privileged_access_group.py | 101 ++++++ ...ileged_access_group_assignment_schedule.py | 102 ++++++ ...assignment_schedule_collection_response.py | 57 +++ ...cess_group_assignment_schedule_instance.py | 106 ++++++ ...t_schedule_instance_collection_response.py | 57 +++ ...ccess_group_assignment_schedule_request.py | 96 +++++ ...nt_schedule_request_collection_response.py | 57 +++ ...privileged_access_group_assignment_type.py | 7 + ...leged_access_group_eligibility_schedule.py | 88 +++++ ...ligibility_schedule_collection_response.py | 57 +++ ...ess_group_eligibility_schedule_instance.py | 92 +++++ ...y_schedule_instance_collection_response.py | 57 +++ ...cess_group_eligibility_schedule_request.py | 92 +++++ ...ty_schedule_request_collection_response.py | 57 +++ .../privileged_access_group_member_type.py | 7 + .../privileged_access_group_relationships.py | 7 + .../models/privileged_access_root.py | 59 +++ .../models/privileged_access_schedule.py | 94 +++++ .../privileged_access_schedule_instance.py | 79 ++++ .../privileged_access_schedule_request.py | 99 +++++ msgraph/generated/models/process.py | 4 +- .../profile_card_annotation.py} | 36 +- .../generated/models/profile_card_property.py | 63 ++++ ...ofile_card_property_collection_response.py | 57 +++ msgraph/generated/models/prompt.py | 4 +- .../models/provision_channel_email_result.py | 4 +- msgraph/generated/models/provisioned_plan.py | 4 +- .../models/provisioning_error_info.py | 6 +- .../models/provisioning_object_summary.py | 4 +- .../models/provisioning_status_info.py | 4 +- msgraph/generated/models/provisioning_step.py | 4 +- msgraph/generated/models/proxied_domain.py | 4 +- .../models/public_client_application.py | 4 +- msgraph/generated/models/public_error.py | 4 +- .../generated/models/public_error_detail.py | 4 +- .../generated/models/public_inner_error.py | 4 +- msgraph/generated/models/publication_facet.py | 4 +- msgraph/generated/models/quota.py | 4 +- msgraph/generated/models/recent_notebook.py | 4 +- .../generated/models/recent_notebook_links.py | 4 +- msgraph/generated/models/recipient.py | 4 +- .../generated/models/recommended_action.py | 4 +- msgraph/generated/models/recording_info.py | 4 +- .../generated/models/recurrence_pattern.py | 4 +- msgraph/generated/models/recurrence_range.py | 4 +- .../generated/models/redirect_uri_settings.py | 4 +- msgraph/generated/models/reference_create.py | 4 +- msgraph/generated/models/reference_update.py | 8 +- msgraph/generated/models/referenced_object.py | 4 +- .../models/registration_enforcement.py | 4 +- .../generated/models/registry_key_state.py | 4 +- msgraph/generated/models/related_contact.py | 4 +- msgraph/generated/models/reminder.py | 4 +- msgraph/generated/models/remote_item.py | 4 +- msgraph/generated/models/report.py | 4 +- msgraph/generated/models/report_root.py | 6 +- msgraph/generated/models/request.py | 21 ++ msgraph/generated/models/request_schedule.py | 4 +- .../models/request_signature_verification.py | 4 +- .../models/required_resource_access.py | 4 +- .../reseller_delegated_admin_relationship.py | 60 +++ msgraph/generated/models/resource_access.py | 4 +- msgraph/generated/models/resource_action.py | 4 +- .../generated/models/resource_reference.py | 4 +- .../models/resource_specific_permission.py | 4 +- .../resource_specific_permission_grant.py | 6 +- .../models/resource_visualization.py | 8 +- msgraph/generated/models/response_status.py | 4 +- msgraph/generated/models/result_info.py | 4 +- .../models/result_template_option.py | 4 +- msgraph/generated/models/rgb_color.py | 4 +- .../models/risk_service_principal_activity.py | 4 +- .../generated/models/risk_user_activity.py | 4 +- .../models/risky_service_principal.py | 12 +- .../risky_service_principal_history_item.py | 6 +- msgraph/generated/models/risky_user.py | 6 +- .../models/risky_user_history_item.py | 6 +- msgraph/generated/models/role_management.py | 4 +- msgraph/generated/models/role_permission.py | 4 +- msgraph/generated/models/root.py | 4 +- msgraph/generated/models/rubric_criterion.py | 4 +- msgraph/generated/models/rubric_level.py | 6 +- msgraph/generated/models/rubric_quality.py | 4 +- .../models/rubric_quality_feedback_model.py | 4 +- .../rubric_quality_selected_column_model.py | 4 +- .../models/saml_or_ws_fed_provider.py | 4 +- .../models/saml_single_sign_on_settings.py | 4 +- msgraph/generated/models/schedule_entity.py | 4 +- .../generated/models/schedule_information.py | 4 +- msgraph/generated/models/schedule_item.py | 4 +- .../models/schedule_request_actions.py | 14 + msgraph/generated/models/schema_extension.py | 2 +- .../generated/models/scored_email_address.py | 4 +- .../generated/models/search_aggregation.py | 4 +- msgraph/generated/models/search_alteration.py | 4 +- .../models/search_alteration_options.py | 8 +- msgraph/generated/models/search_bucket.py | 4 +- msgraph/generated/models/search_hit.py | 4 +- .../generated/models/search_hits_container.py | 6 +- msgraph/generated/models/search_query.py | 4 +- msgraph/generated/models/search_request.py | 4 +- msgraph/generated/models/search_response.py | 4 +- msgraph/generated/models/search_result.py | 4 +- msgraph/generated/models/section_links.py | 4 +- .../models/secure_score_control_profile.py | 2 +- .../secure_score_control_state_update.py | 4 +- msgraph/generated/models/security/alert.py | 4 +- .../models/security/alert_comment.py | 4 +- .../models/security/alert_evidence.py | 6 +- msgraph/generated/models/security/artifact.py | 20 +- .../models/security/autonomous_system.py | 4 +- .../generated/models/security/cvss_summary.py | 4 +- .../models/security/device_evidence.py | 2 +- .../generated/models/security/dictionary.py | 4 +- .../security/ediscovery_export_operation.py | 6 +- .../generated/models/security/email_sender.py | 4 +- .../security/event_propagation_result.py | 4 +- .../generated/models/security/event_query.py | 4 +- .../models/security/export_file_metadata.py | 4 +- .../generated/models/security/file_details.py | 4 +- .../generated/models/security/file_hash.py | 4 +- .../models/security/formatted_content.py | 4 +- msgraph/generated/models/security/host.py | 46 ++- .../models/security/host_component.py | 2 +- .../generated/models/security/host_pair.py | 76 ++++ .../security/host_pair_collection_response.py | 57 +++ .../models/security/host_reputation_rule.py | 4 +- .../models/security/host_ssl_certificate.py | 82 +++++ ...ost_ssl_certificate_collection_response.py | 57 +++ .../security/host_ssl_certificate_port.py | 62 ++++ .../models/security/hunting_query_results.py | 4 +- .../models/security/hunting_row_result.py | 4 +- .../generated/models/security/hyperlink.py | 4 +- msgraph/generated/models/security/incident.py | 10 +- ...nce_profile_country_or_region_of_origin.py | 4 +- .../generated/models/security/ip_address.py | 2 +- .../generated/models/security/ip_evidence.py | 2 +- .../security/kubernetes_service_port.py | 4 +- .../models/security/logged_on_user.py | 4 +- .../generated/models/security/ocr_settings.py | 4 +- .../security/redundancy_detection_settings.py | 4 +- .../models/security/retention_event_status.py | 4 +- .../models/security/single_property_schema.py | 4 +- .../models/security/ssl_certificate.py | 99 +++++ .../ssl_certificate_collection_response.py | 57 +++ .../models/security/ssl_certificate_entity.py | 92 +++++ .../generated/models/security/subdomain.py | 64 ++++ .../security/subdomain_collection_response.py | 57 +++ .../models/security/threat_intelligence.py | 56 ++- .../security/topic_modeling_settings.py | 4 +- .../generated/models/security/user_account.py | 10 +- .../generated/models/security/vm_metadata.py | 4 +- .../models/security/whois_base_record.py | 152 ++++++++ .../models/security/whois_contact.py | 80 ++++ .../models/security/whois_history_record.py | 52 +++ ...hois_history_record_collection_response.py | 57 +++ .../security/whois_nameserver.py} | 36 +- .../generated/models/security/whois_record.py | 59 +++ .../whois_record_collection_response.py | 57 +++ msgraph/generated/models/security_resource.py | 4 +- .../models/security_vendor_information.py | 4 +- ...gn_up_authentication_flow_configuration.py | 6 +- .../models/self_signed_certificate.py | 4 +- .../models/sensitivity_label_assignment.py | 4 +- .../models/service_health_issue_post.py | 4 +- msgraph/generated/models/service_plan_info.py | 4 +- msgraph/generated/models/service_principal.py | 20 +- .../service_principal_lock_configuration.py | 4 +- .../models/service_provisioning_error.py | 4 +- ..._provisioning_error_collection_response.py | 57 +++ .../service_update_message_viewpoint.py | 4 +- msgraph/generated/models/setting_source.py | 4 +- .../models/setting_template_value.py | 4 +- msgraph/generated/models/setting_value.py | 4 +- .../models/share_point_one_drive_options.py | 4 +- msgraph/generated/models/shared.py | 4 +- msgraph/generated/models/shared_drive_item.py | 6 +- .../shared_p_c_account_manager_policy.py | 4 +- msgraph/generated/models/sharepoint_ids.py | 4 +- msgraph/generated/models/sharing_detail.py | 4 +- .../generated/models/sharing_invitation.py | 4 +- msgraph/generated/models/sharing_link.py | 4 +- msgraph/generated/models/shift_activity.py | 4 +- .../generated/models/shift_availability.py | 4 +- msgraph/generated/models/sign_in.py | 10 +- msgraph/generated/models/sign_in_activity.py | 8 +- .../sign_in_frequency_session_control.py | 6 +- msgraph/generated/models/sign_in_location.py | 4 +- msgraph/generated/models/sign_in_status.py | 4 +- .../signing_certificate_update_status.py | 4 +- msgraph/generated/models/simulation.py | 57 +++ .../models/simulation_content_source.py | 8 + .../models/simulation_content_status.py | 10 + msgraph/generated/models/simulation_event.py | 4 +- .../models/simulation_events_content.py | 4 +- .../models/simulation_notification.py | 59 +++ msgraph/generated/models/simulation_report.py | 4 +- .../models/simulation_report_overview.py | 4 +- msgraph/generated/models/single_user.py | 4 +- msgraph/generated/models/site_collection.py | 4 +- msgraph/generated/models/size_range.py | 4 +- ...e_for_business_user_conversation_member.py | 2 +- .../sms_authentication_method_target.py | 2 +- msgraph/generated/models/solutions_root.py | 4 +- msgraph/generated/models/sort_property.py | 4 +- msgraph/generated/models/spa_application.py | 4 +- msgraph/generated/models/special_folder.py | 4 +- .../models/staff_availability_item.py | 4 +- .../models/standard_time_zone_offset.py | 4 +- .../models/storage_plan_information.py | 4 +- ...key_attribute_mapping_source_value_pair.py | 4 +- .../models/string_key_long_value_pair.py | 6 +- .../models/string_key_object_value_pair.py | 4 +- .../models/string_key_string_value_pair.py | 4 +- .../models/subject_rights_request.py | 42 +-- .../models/subject_rights_request_detail.py | 4 +- ...hts_request_enumerated_mailbox_location.py | 2 +- ...rights_request_enumerated_site_location.py | 2 +- .../models/subject_rights_request_history.py | 6 +- ...subject_rights_request_mailbox_location.py | 4 +- .../subject_rights_request_site_location.py | 4 +- .../subject_rights_request_stage_detail.py | 6 +- msgraph/generated/models/subject_set.py | 4 +- msgraph/generated/models/subscribed_sku.py | 2 +- msgraph/generated/models/subscription.py | 2 +- msgraph/generated/models/synchronization.py | 2 +- .../generated/models/synchronization_error.py | 4 +- ...chronization_job_application_parameters.py | 4 +- .../synchronization_job_restart_criteria.py | 6 +- .../models/synchronization_job_subject.py | 8 +- .../models/synchronization_linked_objects.py | 4 +- .../models/synchronization_metadata_entry.py | 4 +- .../models/synchronization_progress.py | 4 +- .../models/synchronization_quarantine.py | 4 +- .../generated/models/synchronization_rule.py | 8 +- .../models/synchronization_schedule.py | 8 +- ...ronization_secret_key_string_value_pair.py | 4 +- .../models/synchronization_status.py | 4 +- .../models/synchronization_task_execution.py | 4 +- msgraph/generated/models/system_facet.py | 4 +- msgraph/generated/models/target_resource.py | 4 +- .../generated/models/targetted_user_type.py | 9 + msgraph/generated/models/team.py | 26 +- msgraph/generated/models/team_fun_settings.py | 4 +- .../generated/models/team_guest_settings.py | 4 +- msgraph/generated/models/team_info.py | 2 +- .../generated/models/team_member_settings.py | 4 +- .../models/team_messaging_settings.py | 4 +- msgraph/generated/models/team_summary.py | 4 +- .../models/teams_app_authorization.py | 4 +- .../models/teams_app_permission_set.py | 4 +- .../teams_app_resource_specific_permission.py | 4 +- .../generated/models/teams_app_settings.py | 2 +- msgraph/generated/models/teams_tab.py | 2 +- .../models/teams_tab_configuration.py | 4 +- msgraph/generated/models/teamwork.py | 2 +- .../models/teamwork_activity_topic.py | 6 +- .../models/teamwork_notification_recipient.py | 4 +- .../models/teamwork_online_meeting_info.py | 4 +- msgraph/generated/models/teamwork_tag.py | 4 +- .../teleconference_device_media_quality.py | 4 +- .../models/teleconference_device_quality.py | 4 +- .../generated/models/tenant_information.py | 12 +- .../generated/models/tenant_relationship.py | 4 +- msgraph/generated/models/term_column.py | 4 +- .../term_store/localized_description.py | 4 +- .../models/term_store/localized_label.py | 4 +- .../models/term_store/localized_name.py | 4 +- msgraph/generated/models/terms_expiration.py | 6 +- .../models/terms_of_use_container.py | 2 +- msgraph/generated/models/text_column.py | 4 +- msgraph/generated/models/thumbnail.py | 4 +- msgraph/generated/models/thumbnail_column.py | 4 +- msgraph/generated/models/ticket_info.py | 4 +- msgraph/generated/models/time_constraint.py | 4 +- msgraph/generated/models/time_range.py | 4 +- msgraph/generated/models/time_slot.py | 4 +- msgraph/generated/models/time_zone_base.py | 4 +- .../generated/models/time_zone_information.py | 4 +- msgraph/generated/models/tone_info.py | 4 +- msgraph/generated/models/training.py | 124 +++++++ .../generated/models/training_assigned_to.py | 12 + .../models/training_availability_status.py | 10 + .../models/training_collection_response.py | 57 +++ .../models/training_completion_duration.py | 8 + .../models/training_events_content.py | 4 +- .../models/training_language_detail.py | 92 +++++ ...ng_language_detail_collection_response.py} | 26 +- .../models/training_notification_setting.py | 66 ++++ .../models/training_reminder_notification.py | 59 +++ msgraph/generated/models/training_setting.py | 99 +++++ .../generated/models/training_setting_type.py | 9 + msgraph/generated/models/training_type.py | 7 + .../models/unified_approval_stage.py | 4 +- msgraph/generated/models/unified_role.py | 4 +- ...ified_role_assignment_schedule_instance.py | 2 +- .../models/unified_role_definition.py | 4 +- .../models/unified_role_management_policy.py | 2 +- ...ified_role_management_policy_assignment.py | 4 +- ...ment_policy_authentication_context_rule.py | 2 +- ...fied_role_management_policy_rule_target.py | 4 +- .../models/unified_role_permission.py | 4 +- .../update_allowed_combinations_result.py | 4 +- ...windows_device_account_action_parameter.py | 4 +- msgraph/generated/models/upload_session.py | 6 +- .../models/uri_click_security_state.py | 4 +- msgraph/generated/models/usage_details.py | 6 +- msgraph/generated/models/user.py | 32 +- .../models/user_attribute_values_item.py | 4 +- ...nce_analytics_autopilot_devices_summary.py | 4 +- ...nalytics_cloud_identity_devices_summary.py | 4 +- ...lytics_cloud_management_devices_summary.py | 4 +- .../user_experience_analytics_insight.py | 4 +- ...user_experience_analytics_insight_value.py | 4 +- .../user_experience_analytics_settings.py | 4 +- ...nce_analytics_windows10_devices_summary.py | 4 +- ...tics_work_from_anywhere_devices_summary.py | 4 +- .../user_flow_api_connector_configuration.py | 4 +- .../user_flow_language_configuration.py | 4 +- ..._sign_in_recommendation_insight_setting.py | 2 +- msgraph/generated/models/user_print.py | 4 +- .../models/user_registration_details.py | 6 +- .../models/user_registration_feature_count.py | 4 +- .../user_registration_feature_summary.py | 4 +- .../models/user_registration_method_count.py | 4 +- .../user_registration_method_summary.py | 4 +- .../generated/models/user_security_state.py | 4 +- .../models/user_simulation_details.py | 4 +- .../models/user_simulation_event_info.py | 4 +- .../user_training_content_event_info.py | 4 +- .../models/user_training_event_info.py | 4 +- .../models/user_training_status_info.py | 4 +- msgraph/generated/models/verified_domain.py | 4 +- .../generated/models/verified_publisher.py | 4 +- msgraph/generated/models/video.py | 4 +- msgraph/generated/models/visual_info.py | 4 +- .../generated/models/vpp_licensing_type.py | 4 +- .../generated/models/vulnerability_state.py | 4 +- .../models/watermark_protection_values.py | 4 +- msgraph/generated/models/web_application.py | 4 +- msgraph/generated/models/website.py | 4 +- .../win32_lob_app_install_experience.py | 4 +- .../models/win32_lob_app_msi_information.py | 4 +- .../models/win32_lob_app_restart_settings.py | 4 +- .../models/win32_lob_app_return_code.py | 4 +- .../generated/models/win32_lob_app_rule.py | 4 +- .../models/windows10_network_proxy_server.py | 4 +- .../models/windows_device_account.py | 10 +- .../windows_firewall_network_profile.py | 4 +- .../windows_information_protection_app.py | 4 +- ...on_protection_data_recovery_certificate.py | 4 +- ...rmation_protection_i_p_range_collection.py | 4 +- ...on_protection_proxied_domain_collection.py | 4 +- ...ormation_protection_resource_collection.py | 4 +- .../models/windows_malware_category_count.py | 4 +- .../windows_malware_execution_state_count.py | 4 +- .../models/windows_malware_name_count.py | 4 +- .../models/windows_malware_overview.py | 4 +- .../models/windows_malware_severity_count.py | 4 +- .../models/windows_malware_state_count.py | 4 +- .../windows_minimum_operating_system.py | 4 +- .../windows_update_install_schedule_type.py | 4 +- .../generated/models/workbook_chart_font.py | 6 +- .../models/workbook_chart_point_format.py | 2 +- .../models/workbook_chart_series_format.py | 2 +- .../generated/models/workbook_chart_title.py | 2 +- .../models/workbook_filter_criteria.py | 4 +- msgraph/generated/models/workbook_icon.py | 4 +- .../models/workbook_operation_error.py | 4 +- msgraph/generated/models/workbook_range.py | 2 +- .../generated/models/workbook_range_fill.py | 2 +- .../generated/models/workbook_range_font.py | 4 +- .../generated/models/workbook_range_format.py | 4 +- .../generated/models/workbook_range_view.py | 4 +- .../generated/models/workbook_session_info.py | 4 +- .../generated/models/workbook_sort_field.py | 4 +- .../workbook_worksheet_protection_options.py | 4 +- .../workforce_integration_encryption.py | 4 +- msgraph/generated/models/working_hours.py | 4 +- ...ate_authentication_method_configuration.py | 2 +- ...icate_authentication_mode_configuration.py | 4 +- .../generated/models/x509_certificate_rule.py | 4 +- .../models/x509_certificate_user_binding.py | 8 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...2_permission_grant_item_request_builder.py | 38 +- ...auth2_permission_grants_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../organization/delta/delta_get_response.py | 57 +++ .../delta/delta_request_builder.py | 20 +- .../organization/delta/delta_response.py | 57 --- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- .../background_image_request_builder.py | 12 +- .../banner_logo_request_builder.py | 12 +- .../item/branding/branding_request_builder.py | 40 +- .../custom_c_s_s_request_builder.py | 12 +- .../favicon/favicon_request_builder.py | 20 +- .../header_logo_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- .../background_image_request_builder.py | 12 +- .../banner_logo_request_builder.py | 12 +- .../custom_c_s_s_request_builder.py | 12 +- .../item/favicon/favicon_request_builder.py | 20 +- .../header_logo_request_builder.py | 12 +- ...nding_localization_item_request_builder.py | 40 +- .../square_logo_request_builder.py | 12 +- .../square_logo_dark_request_builder.py | 12 +- .../localizations_request_builder.py | 30 +- .../square_logo_request_builder.py | 12 +- .../square_logo_dark_request_builder.py | 12 +- ...ased_auth_configuration_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...auth_configuration_item_request_builder.py | 26 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../item/organization_item_request_builder.py | 26 +- .../item/restore/restore_request_builder.py | 12 +- ...vice_management_authority_post_response.py | 49 +++ ...ce_management_authority_request_builder.py | 18 +- ...le_device_management_authority_response.py | 49 --- .../organization_request_builder.py | 28 +- .../validate_properties_request_builder.py | 10 +- .../delta/delta_get_response.py | 57 +++ .../delta/delta_request_builder.py | 20 +- .../permission_grants/delta/delta_response.py | 57 --- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 24 +- .../item/restore/restore_request_builder.py | 12 +- .../permission_grants_request_builder.py | 18 +- .../validate_properties_request_builder.py | 10 +- .../places/count/count_request_builder.py | 10 +- .../graph_room/count/count_request_builder.py | 10 +- .../graph_room/graph_room_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_room_list_request_builder.py | 10 +- .../graph_room/graph_room_request_builder.py | 10 +- .../graph_room_list_request_builder.py | 20 +- .../rooms/count/count_request_builder.py | 113 ++++++ .../rooms/item/room_item_request_builder.py | 214 +++++++++++ .../rooms/rooms_request_builder.py | 226 ++++++++++++ .../places/item/place_item_request_builder.py | 18 +- .../buckets/buckets_request_builder.py | 28 +- .../buckets/count/count_request_builder.py | 10 +- .../planner_bucket_item_request_builder.py | 34 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../item/tasks/tasks_request_builder.py | 24 +- .../planner/planner_request_builder.py | 18 +- .../plans/count/count_request_builder.py | 10 +- .../item/buckets/buckets_request_builder.py | 24 +- .../buckets/count/count_request_builder.py | 10 +- .../planner_bucket_item_request_builder.py | 24 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../item/tasks/tasks_request_builder.py | 24 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_plan_item_request_builder.py | 38 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../plans/item/tasks/tasks_request_builder.py | 24 +- .../planner/plans/plans_request_builder.py | 28 +- .../tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 34 +- ...gress_task_board_format_request_builder.py | 30 +- .../planner/tasks/tasks_request_builder.py | 28 +- ..._based_timeout_policies_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...sed_timeout_policy_item_request_builder.py | 38 +- .../applies_to/applies_to_request_builder.py | 10 +- .../applies_to/count/count_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ..._consent_request_policy_request_builder.py | 30 +- ...app_management_policies_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ..._management_policy_item_request_builder.py | 38 +- .../applies_to/applies_to_request_builder.py | 16 +- .../applies_to/count/count_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...entication_flows_policy_request_builder.py | 34 +- ...n_method_configurations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...thod_configuration_item_request_builder.py | 24 +- ...tication_methods_policy_request_builder.py | 34 +- ...ation_strength_policies_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...on_strength_policy_item_request_builder.py | 38 +- ...bination_configurations_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...tion_configuration_item_request_builder.py | 38 +- ...te_allowed_combinations_request_builder.py | 12 +- .../item/usage/usage_request_builder.py | 8 +- .../authorization_policy_request_builder.py | 34 +- ...claims_mapping_policies_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../applies_to/applies_to_request_builder.py | 10 +- .../applies_to/count/count_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...ims_mapping_policy_item_request_builder.py | 38 +- ...itional_access_policies_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...onal_access_policy_item_request_builder.py | 24 +- ...ss_tenant_access_policy_request_builder.py | 34 +- .../default/default_request_builder.py | 34 +- ...reset_to_system_default_request_builder.py | 10 +- .../partners/count/count_request_builder.py | 10 +- ...ion_partner_tenant_item_request_builder.py | 38 +- ...dentity_synchronization_request_builder.py | 34 +- .../partners/partners_request_builder.py | 28 +- ...t_app_management_policy_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- ...eature_rollout_policies_request_builder.py | 28 +- .../applies_to/applies_to_request_builder.py | 62 +--- .../applies_to/count/count_request_builder.py | 10 +- .../item/applies_to/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../get_by_ids/get_by_ids_response.py | 57 --- .../item/ref/ref_request_builder.py | 14 +- .../applies_to/ref/ref_request_builder.py | 20 +- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- ...ure_rollout_policy_item_request_builder.py | 38 +- .../count/count_request_builder.py | 10 +- ...ealm_discovery_policies_request_builder.py | 28 +- .../applies_to/applies_to_request_builder.py | 10 +- .../applies_to/count/count_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...m_discovery_policy_item_request_builder.py | 38 +- ...ults_enforcement_policy_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../excludes/count/count_request_builder.py | 10 +- .../item/excludes/excludes_request_builder.py | 28 +- ...rant_condition_set_item_request_builder.py | 28 +- .../includes/count/count_request_builder.py | 10 +- .../item/includes/includes_request_builder.py | 28 +- ...rant_condition_set_item_request_builder.py | 28 +- ...ssion_grant_policy_item_request_builder.py | 38 +- ...rmission_grant_policies_request_builder.py | 28 +- .../policies/policies_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../effective_rules_request_builder.py | 18 +- ...gement_policy_rule_item_request_builder.py | 24 +- .../item/rules/count/count_request_builder.py | 10 +- ...gement_policy_rule_item_request_builder.py | 34 +- .../item/rules/rules_request_builder.py | 24 +- ..._management_policy_item_request_builder.py | 30 +- ...ole_management_policies_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/policy/policy_request_builder.py | 10 +- ..._policy_assignment_item_request_builder.py | 30 +- ...ment_policy_assignments_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../applies_to/applies_to_request_builder.py | 10 +- .../applies_to/count/count_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...en_issuance_policy_item_request_builder.py | 38 +- ...token_issuance_policies_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../applies_to/applies_to_request_builder.py | 10 +- .../applies_to/count/count_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...en_lifetime_policy_item_request_builder.py | 38 +- ...token_lifetime_policies_request_builder.py | 28 +- .../connectors/connectors_request_builder.py | 24 +- .../connectors/count/count_request_builder.py | 10 +- .../print_connector_item_request_builder.py | 38 +- .../operations/count/count_request_builder.py | 10 +- .../print_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../generated/print/print_request_builder.py | 18 +- .../printers/count/count_request_builder.py | 10 +- .../printers/create/create_request_builder.py | 10 +- .../connectors/connectors_request_builder.py | 16 +- .../connectors/count/count_request_builder.py | 10 +- .../print_connector_item_request_builder.py | 10 +- .../item/jobs/count/count_request_builder.py | 10 +- .../jobs/item/abort/abort_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../documents/count/count_request_builder.py | 10 +- .../documents/documents_request_builder.py | 18 +- .../create_upload_session_request_builder.py | 12 +- .../print_document_item_request_builder.py | 24 +- .../item/value/content_request_builder.py | 12 +- .../item/print_job_item_request_builder.py | 24 +- .../item/redirect/redirect_request_builder.py | 12 +- .../jobs/item/start/start_request_builder.py | 12 +- .../item/tasks/count/count_request_builder.py | 10 +- .../definition/definition_request_builder.py | 10 +- .../item/print_task_item_request_builder.py | 24 +- .../item/trigger/trigger_request_builder.py | 10 +- .../jobs/item/tasks/tasks_request_builder.py | 18 +- .../item/jobs/jobs_request_builder.py | 18 +- .../item/printer_item_request_builder.py | 38 +- ...estore_factory_defaults_request_builder.py | 10 +- .../shares/count/count_request_builder.py | 10 +- .../printer_share_item_request_builder.py | 10 +- .../item/shares/shares_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../definition/definition_request_builder.py | 16 +- ...print_task_trigger_item_request_builder.py | 34 +- .../task_triggers_request_builder.py | 28 +- .../printers/printers_request_builder.py | 24 +- .../services/count/count_request_builder.py | 10 +- .../endpoints/count/count_request_builder.py | 10 +- .../endpoints/endpoints_request_builder.py | 24 +- ...t_service_endpoint_item_request_builder.py | 30 +- .../print_service_item_request_builder.py | 30 +- .../services/services_request_builder.py | 24 +- .../shares/count/count_request_builder.py | 10 +- .../allowed_groups_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/group_item_request_builder.py | 10 + .../item/ref/ref_request_builder.py | 14 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../allowed_groups/ref/ref_request_builder.py | 26 +- .../allowed_users_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../item/ref/ref_request_builder.py | 14 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/user_item_request_builder.py | 10 + .../allowed_users/ref/ref_request_builder.py | 26 +- .../item/jobs/count/count_request_builder.py | 10 +- .../jobs/item/abort/abort_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../documents/count/count_request_builder.py | 10 +- .../documents/documents_request_builder.py | 18 +- .../create_upload_session_request_builder.py | 12 +- .../print_document_item_request_builder.py | 24 +- .../item/value/content_request_builder.py | 12 +- .../item/print_job_item_request_builder.py | 24 +- .../item/redirect/redirect_request_builder.py | 12 +- .../jobs/item/start/start_request_builder.py | 12 +- .../item/tasks/count/count_request_builder.py | 10 +- .../definition/definition_request_builder.py | 10 +- .../item/print_task_item_request_builder.py | 24 +- .../item/trigger/trigger_request_builder.py | 10 +- .../jobs/item/tasks/tasks_request_builder.py | 18 +- .../shares/item/jobs/jobs_request_builder.py | 18 +- .../item/printer/printer_request_builder.py | 10 +- .../printer_share_item_request_builder.py | 38 +- .../print/shares/shares_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...nt_task_definition_item_request_builder.py | 38 +- .../item/tasks/count/count_request_builder.py | 10 +- .../definition/definition_request_builder.py | 10 +- .../item/print_task_item_request_builder.py | 34 +- .../item/trigger/trigger_request_builder.py | 10 +- .../item/tasks/tasks_request_builder.py | 24 +- .../task_definitions_request_builder.py | 28 +- .../privacy/privacy_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../approvers/approvers_request_builder.py | 16 +- .../approvers/count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/user_item_request_builder.py | 26 +- .../collaborators_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/user_item_request_builder.py | 26 +- .../get_final_attachment_request_builder.py | 6 +- .../get_final_report_request_builder.py | 6 +- .../item/notes/count/count_request_builder.py | 10 +- .../authored_note_item_request_builder.py | 24 +- .../item/notes/notes_request_builder.py | 28 +- ...ect_rights_request_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- ...subject_rights_requests_request_builder.py | 28 +- .../authentication_methods_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- ...gistration_details_item_request_builder.py | 30 +- ...er_registration_details_request_builder.py | 24 +- ...s_registered_by_feature_request_builder.py | 8 +- ...ith_included_user_roles_request_builder.py | 11 +- ...rs_registered_by_method_request_builder.py | 8 +- ...ith_included_user_roles_request_builder.py | 11 +- .../count/count_request_builder.py | 10 +- ..._print_usage_by_printer_request_builder.py | 24 +- ...t_usage_by_printer_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...ily_print_usage_by_user_request_builder.py | 24 +- ...rint_usage_by_user_item_request_builder.py | 30 +- ...uration_device_activity_request_builder.py | 8 +- ...iguration_user_activity_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...y_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...e_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...e_time_with_end_date_time_get_response.py} | 8 +- ...time_with_end_date_time_request_builder.py | 24 +- ...user_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...p_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...sage_detail_with_period_request_builder.py | 8 +- ...lbox_counts_with_period_request_builder.py | 8 +- ...lbox_counts_with_period_request_builder.py | 8 +- ...age_storage_with_period_request_builder.py | 8 +- ...ce365_activation_counts_request_builder.py | 6 +- ...activations_user_counts_request_builder.py | 6 +- ...activations_user_detail_request_builder.py | 6 +- ...user_counts_with_period_request_builder.py | 8 +- ...e_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...tivity_detail_with_date_request_builder.py | 8 +- ...vity_detail_with_period_request_builder.py | 8 +- ...file_counts_with_period_request_builder.py | 8 +- ...roup_counts_with_period_request_builder.py | 8 +- ...ity_storage_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...file_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...y_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...ount_counts_with_period_request_builder.py | 8 +- ...ccount_detail_with_date_request_builder.py | 8 +- ...ount_detail_with_period_request_builder.py | 8 +- ...file_counts_with_period_request_builder.py | 8 +- ...age_storage_with_period_request_builder.py | 8 +- ...e_time_with_end_date_time_get_response.py} | 8 +- ...time_with_end_date_time_request_builder.py | 24 +- ...file_counts_with_period_request_builder.py | 8 +- ...ivity_pages_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...y_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ..._usage_detail_with_date_request_builder.py | 8 +- ...sage_detail_with_period_request_builder.py | 8 +- ...file_counts_with_period_request_builder.py | 8 +- ...usage_pages_with_period_request_builder.py | 8 +- ...site_counts_with_period_request_builder.py | 8 +- ...age_storage_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...y_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...e_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...nute_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...nute_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...nute_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...e_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...tivity_detail_with_date_request_builder.py | 8 +- ...vity_detail_with_period_request_builder.py | 8 +- ...tion_counts_with_period_request_builder.py | 8 +- ...team_counts_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...y_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...e_time_with_end_date_time_get_response.py} | 8 +- ...time_with_end_date_time_request_builder.py | 24 +- ...vity_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...y_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...user_counts_with_period_request_builder.py | 8 +- ...e_user_detail_with_date_request_builder.py | 8 +- ...user_detail_with_period_request_builder.py | 8 +- ...vity_counts_with_period_request_builder.py | 8 +- ...tivity_detail_with_date_request_builder.py | 8 +- ...vity_detail_with_period_request_builder.py | 8 +- ...roup_counts_with_period_request_builder.py | 8 +- ...ollment_failure_details_request_builder.py | 8 +- ..._filter_with_skip_token_request_builder.py | 13 +- ...enrollment_top_failures_request_builder.py | 8 +- ...op_failures_with_period_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...t_usage_by_printer_item_request_builder.py | 24 +- ..._print_usage_by_printer_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...rint_usage_by_user_item_request_builder.py | 24 +- ...hly_print_usage_by_user_request_builder.py | 24 +- .../reports/reports_request_builder.py | 20 +- ...mulation_repeat_offenders_get_response.py} | 8 +- ...lation_repeat_offenders_request_builder.py | 20 +- ..._simulation_user_coverage_get_response.py} | 8 +- ...imulation_user_coverage_request_builder.py | 20 +- ...on_training_user_coverage_get_response.py} | 8 +- ..._training_user_coverage_request_builder.py | 20 +- .../security/security_request_builder.py | 24 +- .../directory/directory_request_builder.py | 46 +-- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ac_resource_action_item_request_builder.py | 24 +- .../resource_actions_request_builder.py | 18 +- ...resource_namespace_item_request_builder.py | 24 +- .../resource_namespaces_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../activated_using_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ..._schedule_instance_item_request_builder.py | 30 +- ...ment_schedule_instances_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../activated_using_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- .../target_schedule_request_builder.py | 10 +- ...t_schedule_request_item_request_builder.py | 30 +- ...nment_schedule_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../activated_using_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ...ssignment_schedule_item_request_builder.py | 30 +- ...le_assignment_schedules_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 24 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ...ed_role_assignment_item_request_builder.py | 34 +- .../role_assignments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...herits_permissions_from_request_builder.py | 24 +- ...ed_role_definition_item_request_builder.py | 30 +- ...ed_role_definition_item_request_builder.py | 38 +- .../role_definitions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ..._schedule_instance_item_request_builder.py | 30 +- ...lity_schedule_instances_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../app_scope/app_scope_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- .../target_schedule_request_builder.py | 10 +- ...y_schedule_request_item_request_builder.py | 30 +- ...ility_schedule_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ...igibility_schedule_item_request_builder.py | 30 +- ...e_eligibility_schedules_request_builder.py | 24 +- .../entitlement_management_request_builder.py | 46 +-- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...ac_resource_action_item_request_builder.py | 24 +- .../resource_actions_request_builder.py | 18 +- ...resource_namespace_item_request_builder.py | 24 +- .../resource_namespaces_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../activated_using_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ..._schedule_instance_item_request_builder.py | 30 +- ...ment_schedule_instances_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../activated_using_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- .../target_schedule_request_builder.py | 10 +- ...t_schedule_request_item_request_builder.py | 30 +- ...nment_schedule_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../activated_using_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ...ssignment_schedule_item_request_builder.py | 30 +- ...le_assignment_schedules_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../app_scope/app_scope_request_builder.py | 24 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ...ed_role_assignment_item_request_builder.py | 34 +- .../role_assignments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...herits_permissions_from_request_builder.py | 24 +- ...ed_role_definition_item_request_builder.py | 30 +- ...ed_role_definition_item_request_builder.py | 38 +- .../role_definitions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ..._schedule_instance_item_request_builder.py | 30 +- ...lity_schedule_instances_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../app_scope/app_scope_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- .../target_schedule_request_builder.py | 10 +- ...y_schedule_request_item_request_builder.py | 30 +- ...ility_schedule_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...r_by_current_user_with_on_get_response.py} | 8 +- ...by_current_user_with_on_request_builder.py | 22 +- .../app_scope/app_scope_request_builder.py | 10 +- .../directory_scope_request_builder.py | 10 +- .../principal/principal_request_builder.py | 10 +- .../role_definition_request_builder.py | 10 +- ...igibility_schedule_item_request_builder.py | 30 +- ...e_eligibility_schedules_request_builder.py | 24 +- .../role_management_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../schema_extension_item_request_builder.py | 38 +- .../schema_extensions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ed_role_membership_item_request_builder.py | 24 +- ...scoped_role_memberships_request_builder.py | 18 +- ...ery_response.py => query_post_response.py} | 8 +- .../search/query/query_request_builder.py | 22 +- .../search/search_request_builder.py | 18 +- .../security/alerts/alerts_request_builder.py | 24 +- .../alerts/count/count_request_builder.py | 10 +- .../alerts/item/alert_item_request_builder.py | 28 +- .../alerts_v2/alerts_v2_request_builder.py | 24 +- .../alerts_v2/count/count_request_builder.py | 10 +- .../item/alert_item_request_builder.py | 34 +- .../item/comments/comments_request_builder.py | 8 +- .../comments/count/count_request_builder.py | 10 +- .../attack_simulation_request_builder.py | 86 ++++- .../count/count_request_builder.py | 113 ++++++ .../end_user_notifications_request_builder.py | 226 ++++++++++++ .../details/count/count_request_builder.py | 113 ++++++ .../item/details/details_request_builder.py | 226 ++++++++++++ ...otification_detail_item_request_builder.py | 214 +++++++++++ ..._user_notification_item_request_builder.py | 224 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../details/count/count_request_builder.py | 113 ++++++ .../item/details/details_request_builder.py | 226 ++++++++++++ ...anding_page_detail_item_request_builder.py | 214 +++++++++++ .../item/landing_page_item_request_builder.py | 224 ++++++++++++ .../landing_pages_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../item/login_page_item_request_builder.py | 214 +++++++++++ .../login_pages_request_builder.py | 226 ++++++++++++ .../operations/count/count_request_builder.py | 113 ++++++ ...mulation_operation_item_request_builder.py | 214 +++++++++++ .../operations/operations_request_builder.py | 226 ++++++++++++ .../payloads/count/count_request_builder.py | 113 ++++++ .../item/payload_item_request_builder.py | 214 +++++++++++ .../payloads/payloads_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 10 +- .../item/runs/count/count_request_builder.py | 10 +- ...ion_automation_run_item_request_builder.py | 24 +- .../item/runs/runs_request_builder.py | 24 +- ...ulation_automation_item_request_builder.py | 30 +- .../simulation_automations_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../landing_page_request_builder.py | 116 ++++++ .../login_page/login_page_request_builder.py | 116 ++++++ .../item/payload/payload_request_builder.py | 116 ++++++ .../item/simulation_item_request_builder.py | 60 ++- .../simulations_request_builder.py | 24 +- .../trainings/count/count_request_builder.py | 113 ++++++ .../count/count_request_builder.py | 113 ++++++ ...ng_language_detail_item_request_builder.py | 214 +++++++++++ .../language_details_request_builder.py | 226 ++++++++++++ .../item/training_item_request_builder.py | 224 ++++++++++++ .../trainings/trainings_request_builder.py | 226 ++++++++++++ .../security/cases/cases_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../ediscovery_cases_request_builder.py | 28 +- .../custodians/count/count_request_builder.py | 10 +- .../custodians/custodians_request_builder.py | 28 +- ...iscovery_custodian_item_request_builder.py | 30 +- .../last_index_operation_request_builder.py | 16 +- ...graph_security_activate_request_builder.py | 10 +- ...aph_security_apply_hold_request_builder.py | 10 +- ..._graph_security_release_request_builder.py | 10 +- ...ph_security_remove_hold_request_builder.py | 10 +- ...h_security_update_index_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../item/site/site_request_builder.py | 10 +- .../item/site_source_item_request_builder.py | 24 +- .../site_sources_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../item/group/group_request_builder.py | 20 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ ...ified_group_source_item_request_builder.py | 24 +- .../unified_group_sources_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../item/user_source_item_request_builder.py | 24 +- .../user_sources_request_builder.py | 28 +- ...aph_security_apply_hold_request_builder.py | 6 +- ...ph_security_remove_hold_request_builder.py | 6 +- .../ediscovery_case_item_request_builder.py | 38 +- ...ft_graph_security_close_request_builder.py | 10 +- ...t_graph_security_reopen_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../data_source_request_builder.py | 24 +- ...todial_data_source_item_request_builder.py | 24 +- .../last_index_operation_request_builder.py | 10 +- ...aph_security_apply_hold_request_builder.py | 10 +- ..._graph_security_release_request_builder.py | 10 +- ...ph_security_remove_hold_request_builder.py | 10 +- ...h_security_update_index_request_builder.py | 10 +- ...aph_security_apply_hold_request_builder.py | 6 +- ...ph_security_remove_hold_request_builder.py | 6 +- ...ncustodial_data_sources_request_builder.py | 22 +- .../operations/count/count_request_builder.py | 10 +- .../case_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...scovery_review_set_item_request_builder.py | 30 +- ...urity_add_to_review_set_request_builder.py | 10 +- ...t_graph_security_export_request_builder.py | 10 +- .../queries/count/count_request_builder.py | 10 +- ...y_review_set_query_item_request_builder.py | 38 +- ...aph_security_apply_tags_request_builder.py | 10 +- ...t_graph_security_export_request_builder.py | 10 +- .../item/queries/queries_request_builder.py | 28 +- .../review_sets_request_builder.py | 28 +- .../searches/count/count_request_builder.py | 10 +- ...to_review_set_operation_request_builder.py | 10 +- .../additional_sources_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../item/data_source_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../custodian_sources_request_builder.py | 16 +- .../item/data_source_item_request_builder.py | 16 +- .../ediscovery_search_item_request_builder.py | 54 +-- ...te_statistics_operation_request_builder.py | 16 +- ...ity_estimate_statistics_request_builder.py | 10 +- ...aph_security_purge_data_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...todial_data_source_item_request_builder.py | 16 +- .../noncustodial_sources_request_builder.py | 10 +- .../item/searches/searches_request_builder.py | 28 +- ...curity_reset_to_default_request_builder.py | 10 +- .../item/settings/settings_request_builder.py | 34 +- .../item/tags/count/count_request_builder.py | 10 +- .../child_tags/child_tags_request_builder.py | 10 +- .../child_tags/count/count_request_builder.py | 10 +- ...scovery_review_tag_item_request_builder.py | 10 +- ...scovery_review_tag_item_request_builder.py | 38 +- .../item/parent/parent_request_builder.py | 10 +- ...sponse.py => as_hierarchy_get_response.py} | 8 +- ...h_security_as_hierarchy_request_builder.py | 20 +- .../item/tags/tags_request_builder.py | 28 +- .../incidents/count/count_request_builder.py | 10 +- .../incidents/incidents_request_builder.py | 24 +- .../item/alerts/alerts_request_builder.py | 10 +- .../alerts/count/count_request_builder.py | 10 +- .../alerts/item/alert_item_request_builder.py | 10 +- .../item/comments/comments_request_builder.py | 8 +- .../comments/count/count_request_builder.py | 10 +- .../item/incident_item_request_builder.py | 34 +- ...urity_run_hunting_query_request_builder.py | 8 +- .../count/count_request_builder.py | 10 +- ...re_control_profile_item_request_builder.py | 34 +- ..._score_control_profiles_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/secure_score_item_request_builder.py | 30 +- .../secure_scores_request_builder.py | 24 +- .../security/security_request_builder.py | 36 +- .../count/count_request_builder.py | 10 +- .../approvers/approvers_request_builder.py | 16 +- .../approvers/count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/user_item_request_builder.py | 26 +- .../collaborators_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/user_item_request_builder.py | 26 +- .../get_final_attachment_request_builder.py | 6 +- .../get_final_report_request_builder.py | 6 +- .../item/notes/count/count_request_builder.py | 10 +- .../authored_note_item_request_builder.py | 24 +- .../item/notes/notes_request_builder.py | 28 +- ...ect_rights_request_item_request_builder.py | 24 +- .../item/team/team_request_builder.py | 10 +- ...subject_rights_requests_request_builder.py | 18 +- .../article_indicators_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../article_indicator_item_request_builder.py | 30 +- .../item/artifact/artifact_request_builder.py | 10 +- .../articles/articles_request_builder.py | 26 +- .../articles/count/count_request_builder.py | 10 +- .../item/article_item_request_builder.py | 30 +- .../indicators/count/count_request_builder.py | 10 +- .../indicators/indicators_request_builder.py | 16 +- .../article_indicator_item_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../host_components_request_builder.py | 24 +- .../item/host/host_request_builder.py | 10 +- .../host_component_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../host_cookies_request_builder.py | 24 +- .../item/host/host_request_builder.py | 10 +- .../item/host_cookie_item_request_builder.py | 30 +- .../host_pairs/count/count_request_builder.py | 113 ++++++ .../host_pairs/host_pairs_request_builder.py | 226 ++++++++++++ .../child_host/child_host_request_builder.py | 116 ++++++ .../item/host_pair_item_request_builder.py | 235 ++++++++++++ .../parent_host_request_builder.py | 116 ++++++ .../count/count_request_builder.py | 113 ++++++ .../host_ssl_certificates_request_builder.py | 226 ++++++++++++ .../item/host/host_request_builder.py | 116 ++++++ ...st_ssl_certificate_item_request_builder.py | 235 ++++++++++++ .../ssl_certificate_request_builder.py | 116 ++++++ .../count/count_request_builder.py | 10 +- .../host_trackers_request_builder.py | 24 +- .../item/host/host_request_builder.py | 10 +- .../item/host_tracker_item_request_builder.py | 30 +- .../hosts/count/count_request_builder.py | 10 +- .../hosts/hosts_request_builder.py | 24 +- .../child_host_pairs_request_builder.py | 172 +++++++++ .../count/count_request_builder.py | 113 ++++++ .../item/host_pair_item_request_builder.py | 116 ++++++ .../components/components_request_builder.py | 16 +- .../components/count/count_request_builder.py | 10 +- .../host_component_item_request_builder.py | 10 +- .../item/cookies/cookies_request_builder.py | 16 +- .../cookies/count/count_request_builder.py | 10 +- .../item/host_cookie_item_request_builder.py | 10 +- .../hosts/item/host_item_request_builder.py | 90 ++++- .../host_pairs/count/count_request_builder.py | 113 ++++++ .../host_pairs/host_pairs_request_builder.py | 172 +++++++++ .../item/host_pair_item_request_builder.py | 116 ++++++ .../count/count_request_builder.py | 113 ++++++ .../item/host_pair_item_request_builder.py | 116 ++++++ .../parent_host_pairs_request_builder.py | 172 +++++++++ .../count/count_request_builder.py | 10 +- ...passive_dns_record_item_request_builder.py | 10 +- .../passive_dns_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...passive_dns_record_item_request_builder.py | 10 +- .../passive_dns_reverse_request_builder.py | 16 +- .../reputation/reputation_request_builder.py | 30 +- .../count/count_request_builder.py | 113 ++++++ ...st_ssl_certificate_item_request_builder.py | 116 ++++++ .../ssl_certificates_request_builder.py | 172 +++++++++ .../subdomains/count/count_request_builder.py | 113 ++++++ .../item/subdomain_item_request_builder.py | 116 ++++++ .../subdomains/subdomains_request_builder.py | 172 +++++++++ .../trackers/count/count_request_builder.py | 10 +- .../item/host_tracker_item_request_builder.py | 10 +- .../item/trackers/trackers_request_builder.py | 16 +- .../hosts/item/whois/whois_request_builder.py | 117 ++++++ .../count/count_request_builder.py | 10 +- .../intel_profiles_request_builder.py | 26 +- .../indicators/count/count_request_builder.py | 10 +- .../indicators/indicators_request_builder.py | 16 +- ..._profile_indicator_item_request_builder.py | 10 +- ...telligence_profile_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...ence_profile_indicators_request_builder.py | 24 +- .../item/artifact/artifact_request_builder.py | 10 +- ..._profile_indicator_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../item/artifact/artifact_request_builder.py | 10 +- .../parent_host_request_builder.py | 10 +- ...passive_dns_record_item_request_builder.py | 30 +- .../passive_dns_records_request_builder.py | 24 +- .../count/count_request_builder.py | 113 ++++++ .../count/count_request_builder.py | 113 ++++++ .../item/host_item_request_builder.py | 116 ++++++ .../related_hosts_request_builder.py | 171 +++++++++ .../ssl_certificate_item_request_builder.py | 225 ++++++++++++ .../ssl_certificates_request_builder.py | 227 ++++++++++++ .../subdomains/count/count_request_builder.py | 113 ++++++ .../item/host/host_request_builder.py | 116 ++++++ .../item/subdomain_item_request_builder.py | 225 ++++++++++++ .../subdomains/subdomains_request_builder.py | 226 ++++++++++++ .../threat_intelligence_request_builder.py | 104 ++++-- .../count/count_request_builder.py | 10 +- .../item/articles/articles_request_builder.py | 10 +- .../articles/count/count_request_builder.py | 10 +- .../item/article_item_request_builder.py | 10 +- .../components/components_request_builder.py | 24 +- .../components/count/count_request_builder.py | 10 +- ...rability_component_item_request_builder.py | 30 +- .../vulnerability_item_request_builder.py | 30 +- .../vulnerabilities_request_builder.py | 24 +- .../count/count_request_builder.py | 113 ++++++ .../item/host/host_request_builder.py | 116 ++++++ ...ois_history_record_item_request_builder.py | 224 ++++++++++++ .../whois_history_records_request_builder.py | 226 ++++++++++++ .../count/count_request_builder.py | 113 ++++++ .../history/count/count_request_builder.py | 113 ++++++ .../item/history/history_request_builder.py | 172 +++++++++ ...ois_history_record_item_request_builder.py | 116 ++++++ .../item/host/host_request_builder.py | 116 ++++++ .../item/whois_record_item_request_builder.py | 235 ++++++++++++ .../whois_records_request_builder.py | 227 ++++++++++++ .../count/count_request_builder.py | 10 +- ...tention_event_type_item_request_builder.py | 30 +- .../retention_event_types_request_builder.py | 28 +- .../trigger_types_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../retention_event_item_request_builder.py | 34 +- .../retention_event_type_request_builder.py | 10 +- .../retention_events_request_builder.py | 28 +- .../triggers/triggers_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 20 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../get_by_ids/get_by_ids_response.py | 57 --- .../item/add_key/add_key_request_builder.py | 12 +- .../add_password_request_builder.py | 12 +- ...ken_signing_certificate_request_builder.py | 12 +- ...app_management_policies_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ..._management_policy_item_request_builder.py | 20 +- .../app_role_assigned_to_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...pp_role_assignment_item_request_builder.py | 28 +- .../app_role_assignments_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...pp_role_assignment_item_request_builder.py | 28 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- ...claims_mapping_policies_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../created_objects_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...mission_classifications_request_builder.py | 28 +- ...ion_classification_item_request_builder.py | 28 +- .../endpoints/count/count_request_builder.py | 10 +- .../endpoints/endpoints_request_builder.py | 18 +- .../item/endpoint_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ed_identity_credentials_request_builder.py | 18 +- ...dentity_credential_item_request_builder.py | 24 +- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- .../count/count_request_builder.py | 10 +- ...ealm_discovery_policies_request_builder.py | 16 +- .../item/ref/ref_request_builder.py | 14 +- .../ref/ref_request_builder.py | 26 +- .../member_of/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../member_of/member_of_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...2_permission_grant_item_request_builder.py | 10 +- ...auth2_permission_grants_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 26 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../owned_objects_request_builder.py | 26 +- .../owners/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../owners/item/ref/ref_request_builder.py | 14 +- .../item/owners/owners_request_builder.py | 10 +- .../item/owners/ref/ref_request_builder.py | 20 +- .../remove_key/remove_key_request_builder.py | 10 +- .../remove_password_request_builder.py | 10 +- .../item/restore/restore_request_builder.py | 12 +- .../service_principal_item_request_builder.py | 34 +- .../acquire_access_token_request_builder.py | 10 +- .../jobs/count/count_request_builder.py | 10 +- .../jobs/item/pause/pause_request_builder.py | 10 +- .../provision_on_demand_request_builder.py | 12 +- .../item/restart/restart_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../directories_request_builder.py | 18 +- ...rectory_definition_item_request_builder.py | 24 +- .../item/discover/discover_request_builder.py | 12 +- .../filter_operators_get_response.py} | 8 +- .../filter_operators_request_builder.py | 20 +- .../functions/functions_get_response.py} | 8 +- .../functions/functions_request_builder.py | 20 +- .../parse_expression_request_builder.py | 12 +- .../item/schema/schema_request_builder.py | 30 +- .../jobs/item/start/start_request_builder.py | 10 +- ...ynchronization_job_item_request_builder.py | 34 +- .../validate_credentials_request_builder.py | 10 +- .../jobs/jobs_request_builder.py | 28 +- .../validate_credentials_request_builder.py | 6 +- .../secrets/count/count_request_builder.py | 10 +- .../secrets/secrets_request_builder.py | 8 +- .../synchronization_request_builder.py | 30 +- .../templates/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../directories_request_builder.py | 18 +- ...rectory_definition_item_request_builder.py | 24 +- .../item/discover/discover_request_builder.py | 12 +- .../filter_operators_get_response.py} | 8 +- .../filter_operators_request_builder.py | 20 +- .../functions/functions_get_response.py} | 8 +- .../functions/functions_request_builder.py | 20 +- .../parse_expression_request_builder.py | 12 +- .../item/schema/schema_request_builder.py | 24 +- ...onization_template_item_request_builder.py | 34 +- .../templates/templates_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...en_issuance_policy_item_request_builder.py | 10 +- ...token_issuance_policies_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...en_lifetime_policy_item_request_builder.py | 10 +- ...token_lifetime_policies_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../transitive_member_of_request_builder.py | 10 +- .../service_principals_request_builder.py | 28 +- .../validate_properties_request_builder.py | 10 +- ..._principals_with_app_id_request_builder.py | 36 +- .../shares/count/count_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 16 +- .../item/items/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 14 +- .../item/drive_item_item_request_builder.py | 10 +- .../item/items/items_request_builder.py | 10 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../list_/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 24 +- .../source_column_request_builder.py | 10 +- .../add_copy/add_copy_request_builder.py | 12 +- ...y_from_content_type_hub_request_builder.py | 12 +- .../content_types_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...patible_hub_content_types_get_response.py} | 8 +- ...tible_hub_content_types_request_builder.py | 20 +- ...ssociate_with_hub_sites_request_builder.py | 10 +- .../item/base/base_request_builder_.py | 10 +- .../base_types/base_types_request_builder.py | 10 +- .../base_types/count/count_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 10 +- .../column_links_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/column_link_item_request_builder.py | 24 +- .../column_positions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 38 +- .../source_column_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 26 +- ...efault_content_location_request_builder.py | 10 +- .../is_published/is_published_get_response.py | 49 +++ .../is_published_request_builder.py | 18 +- .../is_published/is_published_response.py | 49 --- .../item/publish/publish_request_builder.py | 10 +- .../unpublish/unpublish_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/list_/drive/drive_request_builder.py | 16 +- .../analytics/analytics_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../document_set_versions_request_builder.py | 28 +- ...cument_set_version_item_request_builder.py | 34 +- .../item/fields/fields_request_builder.py | 24 +- .../item/restore/restore_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 28 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/list_item_item_request_builder.py | 34 +- .../versions/count/count_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 24 +- .../list_item_version_item_request_builder.py | 30 +- .../restore_version_request_builder.py | 10 +- .../item/versions/versions_request_builder.py | 24 +- .../item/list_/items/items_request_builder.py | 28 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../shares/item/list_/list_request_builder.py | 24 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../reauthorize_request_builder.py | 10 +- .../item/subscription_item_request_builder.py | 24 +- .../subscriptions_request_builder.py | 18 +- .../list_item/list_item_request_builder.py | 10 +- ...ant_response.py => grant_post_response.py} | 8 +- .../permission/grant/grant_request_builder.py | 22 +- .../permission/permission_request_builder.py | 24 +- .../root/content/content_request_builder.py | 14 +- .../shares/item/root/root_request_builder.py | 10 +- .../shared_drive_item_item_request_builder.py | 32 +- .../shares/item/site/site_request_builder.py | 10 +- .../shares/shares_request_builder.py | 24 +- .../add_post_response.py} | 8 +- .../sites/add/add_request_builder.py | 18 +- .../sites/count/count_request_builder.py | 10 +- ...ponse.py => get_all_sites_get_response.py} | 8 +- .../get_all_sites_request_builder.py | 20 +- .../all_time/all_time_request_builder.py | 16 +- .../analytics/analytics_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../activities/activities_request_builder.py | 18 +- .../activities/count/count_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item_activity_item_request_builder.py | 24 +- ...item_activity_stat_item_request_builder.py | 24 +- .../item_activity_stats_request_builder.py | 18 +- .../last_seven_days_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 24 +- .../source_column_request_builder.py | 10 +- .../add_copy/add_copy_request_builder.py | 12 +- ...y_from_content_type_hub_request_builder.py | 12 +- .../content_types_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...patible_hub_content_types_get_response.py} | 8 +- ...tible_hub_content_types_request_builder.py | 20 +- ...ssociate_with_hub_sites_request_builder.py | 10 +- .../item/base/base_request_builder_.py | 10 +- .../base_types/base_types_request_builder.py | 10 +- .../base_types/count/count_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 10 +- .../column_links_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/column_link_item_request_builder.py | 24 +- .../column_positions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 38 +- .../source_column_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 40 +- ...efault_content_location_request_builder.py | 10 +- .../is_published/is_published_get_response.py | 49 +++ .../is_published_request_builder.py | 18 +- .../is_published/is_published_response.py | 49 --- .../item/publish/publish_request_builder.py | 10 +- .../unpublish/unpublish_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../sites/item/drive/drive_request_builder.py | 10 +- .../drives/count/count_request_builder.py | 10 +- .../item/drives/drives_request_builder.py | 10 +- .../drives/item/drive_item_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../external_columns_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- ...pes_for_list_with_list_id_get_response.py} | 8 +- ...s_for_list_with_list_id_request_builder.py | 22 +- .../get_by_path_with_path_request_builder.py | 10 +- .../item/items/count/count_request_builder.py | 10 +- .../item/base_item_item_request_builder.py | 10 +- .../sites/item/items/items_request_builder.py | 10 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/lists/count/count_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 24 +- .../source_column_request_builder.py | 10 +- .../add_copy/add_copy_request_builder.py | 12 +- ...y_from_content_type_hub_request_builder.py | 12 +- .../content_types_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...patible_hub_content_types_get_response.py} | 8 +- ...tible_hub_content_types_request_builder.py | 20 +- ...ssociate_with_hub_sites_request_builder.py | 10 +- .../item/base/base_request_builder_.py | 10 +- .../base_types/base_types_request_builder.py | 10 +- .../base_types/count/count_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 10 +- .../column_links_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../item/column_link_item_request_builder.py | 24 +- .../column_positions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 10 +- .../item/columns/columns_request_builder.py | 28 +- .../columns/count/count_request_builder.py | 10 +- .../column_definition_item_request_builder.py | 38 +- .../source_column_request_builder.py | 10 +- .../item/content_type_item_request_builder.py | 26 +- ...efault_content_location_request_builder.py | 10 +- .../is_published/is_published_get_response.py | 49 +++ .../is_published_request_builder.py | 18 +- .../is_published/is_published_response.py | 49 --- .../item/publish/publish_request_builder.py | 10 +- .../unpublish/unpublish_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../lists/item/drive/drive_request_builder.py | 16 +- .../analytics/analytics_request_builder.py | 10 +- .../created_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../count/count_request_builder.py | 10 +- .../document_set_versions_request_builder.py | 28 +- ...cument_set_version_item_request_builder.py | 34 +- .../item/fields/fields_request_builder.py | 24 +- .../item/restore/restore_request_builder.py | 10 +- .../content/content_request_builder.py | 14 +- .../drive_item/drive_item_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 28 +- ...et_activities_by_interval_get_response.py} | 8 +- ..._activities_by_interval_request_builder.py | 20 +- ...d_date_time_with_interval_get_response.py} | 8 +- ...date_time_with_interval_request_builder.py | 24 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../item/list_item_item_request_builder.py | 34 +- .../versions/count/count_request_builder.py | 10 +- .../item/fields/fields_request_builder.py | 24 +- .../list_item_version_item_request_builder.py | 30 +- .../restore_version_request_builder.py | 10 +- .../item/versions/versions_request_builder.py | 24 +- .../lists/item/items/items_request_builder.py | 28 +- .../last_modified_by_user_request_builder.py | 20 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 113 ++++++ ...ice_provisioning_errors_request_builder.py | 156 ++++++++ .../lists/item/list_item_request_builder.py | 30 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../reauthorize_request_builder.py | 10 +- .../item/subscription_item_request_builder.py | 24 +- .../subscriptions_request_builder.py | 18 +- .../sites/item/lists/lists_request_builder.py | 30 +- .../notebooks/count/count_request_builder.py | 10 +- ...t_notebook_from_web_url_request_builder.py | 12 +- ...nclude_personal_notebooks_get_response.py} | 8 +- ...lude_personal_notebooks_request_builder.py | 22 +- .../copy_notebook_request_builder.py | 14 +- .../item/notebook_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 28 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../notebooks/notebooks_request_builder.py | 28 +- .../item/onenote/onenote_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- .../onenote_operation_item_request_builder.py | 32 +- .../operations/operations_request_builder.py | 26 +- .../pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 36 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../onenote/pages/pages_request_builder.py | 30 +- .../resources/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../onenote_resource_item_request_builder.py | 32 +- .../resources/resources_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 24 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 32 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../sections/sections_request_builder.py | 26 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/grant/grant_post_response.py} | 8 +- .../item/grant/grant_request_builder.py | 22 +- .../item/permission_item_request_builder.py | 38 +- .../permissions_request_builder.py | 28 +- .../sites/item/site_item_request_builder.py | 18 +- .../item/sites/count/count_request_builder.py | 10 +- .../sites/item/site_item_request_builder.py | 10 +- .../sites/item/sites/sites_request_builder.py | 16 +- .../groups/count/count_request_builder.py | 10 +- .../groups/groups_request_builder.py | 28 +- .../groups/item/group_item_request_builder.py | 34 +- .../item/sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../groups/item/sets/sets_request_builder.py | 24 +- .../sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../parent_group/sets/sets_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 38 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../term_store/sets/sets_request_builder.py | 28 +- .../term_store/term_store_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../groups/count/count_request_builder.py | 10 +- .../item/groups/groups_request_builder.py | 28 +- .../groups/item/group_item_request_builder.py | 34 +- .../item/sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../groups/item/sets/sets_request_builder.py | 24 +- .../item/sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../parent_group_request_builder.py | 24 +- .../sets/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 28 +- .../children/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 24 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../parent_group/sets/sets_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 24 +- .../sets/item/set_item_request_builder.py | 38 +- .../item/terms/count/count_request_builder.py | 10 +- .../item/children/children_request_builder.py | 18 +- .../children/count/count_request_builder.py | 10 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../children/item/set/set_request_builder.py | 10 +- .../item/term_item_request_builder.py | 24 +- .../relations/count/count_request_builder.py | 10 +- .../from_term/from_term_request_builder.py | 10 +- .../item/relation_item_request_builder.py | 24 +- .../relations/item/set/set_request_builder.py | 10 +- .../item/to_term/to_term_request_builder.py | 10 +- .../relations/relations_request_builder.py | 18 +- .../terms/item/set/set_request_builder.py | 10 +- .../terms/item/term_item_request_builder.py | 38 +- .../sets/item/terms/terms_request_builder.py | 24 +- .../item/sets/sets_request_builder.py | 28 +- .../item/store_item_request_builder.py | 24 +- .../term_stores_request_builder.py | 18 +- .../remove_post_response.py} | 8 +- .../sites/remove/remove_request_builder.py | 18 +- .../generated/sites/sites_request_builder.py | 18 +- .../booking_businesses_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../appointments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ooking_appointment_item_request_builder.py | 38 +- .../item/cancel/cancel_request_builder.py | 10 +- .../booking_business_item_request_builder.py | 54 +-- .../calendar_view_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...ooking_appointment_item_request_builder.py | 24 +- .../item/cancel/cancel_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../custom_questions_request_builder.py | 28 +- ...ng_custom_question_item_request_builder.py | 38 +- .../customers/count/count_request_builder.py | 10 +- .../customers/customers_request_builder.py | 28 +- ...king_customer_base_item_request_builder.py | 38 +- ...> get_staff_availability_post_response.py} | 8 +- .../get_staff_availability_request_builder.py | 22 +- .../item/publish/publish_request_builder.py | 10 +- .../services/count/count_request_builder.py | 10 +- .../booking_service_item_request_builder.py | 38 +- .../item/services/services_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ..._staff_member_base_item_request_builder.py | 38 +- .../staff_members_request_builder.py | 28 +- .../unpublish/unpublish_request_builder.py | 10 +- .../booking_currencies_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../booking_currency_item_request_builder.py | 30 +- .../solutions/solutions_request_builder.py | 18 +- .../subscribed_sku_item_request_builder.py | 30 +- .../subscribed_skus_request_builder.py | 24 +- .../reauthorize_request_builder.py | 10 +- .../item/subscription_item_request_builder.py | 38 +- .../subscriptions_request_builder.py | 28 +- .../teams/count/count_request_builder.py | 10 +- .../get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../all_channels_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/channel_item_request_builder.py | 10 +- .../item/archive/archive_request_builder.py | 10 +- .../item/channels/channels_request_builder.py | 28 +- .../channels/count/count_request_builder.py | 10 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../item/channel_item_request_builder.py | 38 +- .../complete_migration_request_builder.py | 10 +- ..._name_user_principal_name_get_response.py} | 8 +- ...ame_user_principal_name_request_builder.py | 20 +- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../item/members/add/add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../item/members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- .../messages/delta/delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../item/tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../item/tabs/tabs_request_builder.py | 28 +- .../teams/item/clone/clone_request_builder.py | 10 +- .../complete_migration_request_builder.py | 10 +- .../teams/item/group/group_request_builder.py | 20 +- .../count/count_request_builder.py | 113 ++++++ ...ce_provisioning_errors_request_builder.py} | 63 ++-- .../count/count_request_builder.py | 10 +- .../incoming_channels_request_builder.py | 16 +- .../item/channel_item_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../installed_apps_request_builder.py | 28 +- .../teams_app/teams_app_request_builder.py | 10 +- .../teams_app_definition_request_builder.py | 10 +- ...s_app_installation_item_request_builder.py | 34 +- .../item/upgrade/upgrade_request_builder.py | 10 +- .../item/members/add/add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 38 +- .../item/members/members_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- ...ms_async_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../permission_grants/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_request_body.py | 49 --- .../check_member_groups_request_builder.py | 95 ----- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_request_body.py | 49 --- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_request_body.py | 49 --- .../get_member_groups_request_builder.py | 95 ----- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_request_body.py | 49 --- .../get_member_objects_request_builder.py | 95 ----- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 74 +--- .../permission_grants_request_builder.py | 64 +--- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- .../teams/item/photo/photo_request_builder.py | 24 +- .../photo/value/content_request_builder.py | 12 +- .../complete_migration_request_builder.py | 10 +- ..._name_user_principal_name_get_response.py} | 8 +- ...ame_user_principal_name_request_builder.py | 20 +- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../members/add/add_post_response.py} | 8 +- .../members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../messages/messages_request_builder.py | 30 +- .../primary_channel_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../tabs/tabs_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ffer_shift_request_item_request_builder.py | 32 +- .../offer_shift_requests_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...ift_change_request_item_request_builder.py | 32 +- ...n_shift_change_requests_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../item/open_shift_item_request_builder.py | 36 +- .../open_shifts_request_builder.py | 30 +- .../item/schedule/schedule_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../scheduling_group_item_request_builder.py | 34 +- .../scheduling_groups_request_builder.py | 28 +- .../schedule/share/share_request_builder.py | 10 +- .../shifts/count/count_request_builder.py | 10 +- .../shifts/item/shift_item_request_builder.py | 34 +- .../schedule/shifts/shifts_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...fts_change_request_item_request_builder.py | 30 +- ..._shifts_change_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../time_off_reason_item_request_builder.py | 34 +- .../time_off_reasons_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../time_off_request_item_request_builder.py | 34 +- .../time_off_requests_request_builder.py | 24 +- .../times_off/count/count_request_builder.py | 10 +- .../item/time_off_item_request_builder.py | 34 +- .../times_off/times_off_request_builder.py | 28 +- ...d_activity_notification_request_builder.py | 10 +- .../item/tags/count/count_request_builder.py | 10 +- .../members/count/count_request_builder.py | 10 +- ...eamwork_tag_member_item_request_builder.py | 34 +- .../item/members/members_request_builder.py | 28 +- .../item/teamwork_tag_item_request_builder.py | 38 +- .../teams/item/tags/tags_request_builder.py | 28 +- .../teams/item/team_item_request_builder.py | 34 +- .../item/template/template_request_builder.py | 10 +- .../unarchive/unarchive_request_builder.py | 10 +- .../generated/teams/teams_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../teams_template_item_request_builder.py | 24 +- .../teams_templates_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../deleted_teams_request_builder.py | 24 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../item/channels/channels_request_builder.py | 18 +- .../channels/count/count_request_builder.py | 10 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../item/channel_item_request_builder.py | 24 +- .../complete_migration_request_builder.py | 10 +- ...l_name_user_principal_name_get_response.py | 49 +++ ...ame_user_principal_name_request_builder.py | 20 +- ...cipal_name_user_principal_name_response.py | 49 --- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../item/members/add/add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../item/members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../item/tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../item/tabs/tabs_request_builder.py | 28 +- .../item/deleted_team_item_request_builder.py | 24 +- ...ification_to_recipients_request_builder.py | 10 +- .../teams_app_settings_request_builder.py | 36 +- .../teamwork/teamwork_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...kforce_integration_item_request_builder.py | 38 +- .../workforce_integrations_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...legated_admin_customers_request_builder.py | 24 +- ...ted_admin_customer_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ..._management_detail_item_request_builder.py | 24 +- ...vice_management_details_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ted_admin_relationships_request_builder.py | 28 +- .../access_assignments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ..._access_assignment_item_request_builder.py | 38 +- ...admin_relationship_item_request_builder.py | 38 +- .../operations/count/count_request_builder.py | 10 +- ...tionship_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../requests/count/count_request_builder.py | 10 +- ...lationship_request_item_request_builder.py | 30 +- .../item/requests/requests_request_builder.py | 28 +- ...n_name_with_domain_name_request_builder.py | 10 +- ...enant_id_with_tenant_id_request_builder.py | 10 +- .../tenant_relationships_request_builder.py | 18 +- .../users/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../users/delta/delta_request_builder.py | 20 +- ...able_extension_properties_post_response.py | 57 +++ ...le_extension_properties_request_builder.py | 22 +- ...available_extension_properties_response.py | 57 --- .../get_by_ids/get_by_ids_post_response.py | 57 +++ .../get_by_ids/get_by_ids_request_builder.py | 22 +- .../users/get_by_ids/get_by_ids_response.py | 57 --- .../activities/activities_request_builder.py | 24 +- .../activities/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../history_items_request_builder.py | 18 +- .../item/activity/activity_request_builder.py | 10 +- ...ivity_history_item_item_request_builder.py | 30 +- .../user_activity_item_request_builder.py | 28 +- ...ent_response.py => recent_get_response.py} | 8 +- .../recent/recent_request_builder.py | 26 +- .../agreement_acceptances_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...reement_acceptance_item_request_builder.py | 10 +- .../app_role_assignments_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...pp_role_assignment_item_request_builder.py | 28 +- .../assign_license_request_builder.py | 12 +- .../authentication_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../email_methods_request_builder.py | 28 +- ...hentication_method_item_request_builder.py | 38 +- .../count/count_request_builder.py | 10 +- .../fido2_methods_request_builder.py | 16 +- ...hentication_method_item_request_builder.py | 26 +- .../methods/count/count_request_builder.py | 10 +- ...hentication_method_item_request_builder.py | 24 +- .../reset_password_request_builder.py | 12 +- .../methods/methods_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../item/device/device_request_builder.py | 16 +- ...hentication_method_item_request_builder.py | 26 +- ...t_authenticator_methods_request_builder.py | 16 +- .../operations/count/count_request_builder.py | 10 +- ..._running_operation_item_request_builder.py | 30 +- .../operations/operations_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...hentication_method_item_request_builder.py | 16 +- .../password_methods_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../disable_sms_sign_in_request_builder.py | 10 +- .../enable_sms_sign_in_request_builder.py | 10 +- ...hentication_method_item_request_builder.py | 38 +- .../phone_methods_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...hentication_method_item_request_builder.py | 26 +- .../software_oath_methods_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...hentication_method_item_request_builder.py | 26 +- ...ary_access_pass_methods_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../item/device/device_request_builder.py | 10 +- ...hentication_method_item_request_builder.py | 26 +- ...lo_for_business_methods_request_builder.py | 16 +- ...r_sharing_roles_with_user_get_response.py} | 8 +- ...sharing_roles_with_user_request_builder.py | 22 +- .../calendar_permissions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...alendar_permission_item_request_builder.py | 38 +- .../item/calendar/calendar_request_builder.py | 28 +- .../calendar_view_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../events/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../events/delta/delta_request_builder.py | 26 +- .../calendar/events/events_request_builder.py | 28 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../events/item/event_item_request_builder.py | 28 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- ...ponse.py => get_schedule_post_response.py} | 8 +- .../get_schedule_request_builder.py | 22 +- .../calendar_groups_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../calendar_group_item_request_builder.py | 38 +- .../calendars/calendars_request_builder.py | 28 +- .../calendars/count/count_request_builder.py | 10 +- ...r_sharing_roles_with_user_get_response.py} | 8 +- ...sharing_roles_with_user_request_builder.py | 22 +- .../item/calendar_item_request_builder.py | 24 +- .../calendar_permissions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...alendar_permission_item_request_builder.py | 38 +- .../calendar_view_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../events/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../events/delta/delta_request_builder.py | 26 +- .../item/events/events_request_builder.py | 28 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../events/item/event_item_request_builder.py | 28 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- ...ponse.py => get_schedule_post_response.py} | 8 +- .../get_schedule_request_builder.py | 22 +- .../calendar_view_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- .../instances/delta/delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../calendars/calendars_request_builder.py | 28 +- .../calendars/count/count_request_builder.py | 10 +- ...r_sharing_roles_with_user_get_response.py} | 8 +- ...sharing_roles_with_user_request_builder.py | 22 +- .../item/calendar_item_request_builder.py | 24 +- .../calendar_permissions_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...alendar_permission_item_request_builder.py | 38 +- .../calendar_view_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../delta/delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../events/count/count_request_builder.py | 10 +- .../item/events/delta/delta_get_response.py | 57 +++ .../events/delta/delta_request_builder.py | 26 +- .../item/events/delta/delta_response.py | 57 --- .../item/events/events_request_builder.py | 28 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../events/item/event_item_request_builder.py | 28 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../instances/delta/delta_request_builder.py | 26 +- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- ...ponse.py => get_schedule_post_response.py} | 8 +- .../get_schedule_request_builder.py | 22 +- .../change_password_request_builder.py | 10 +- .../users/item/chats/chats_request_builder.py | 24 +- .../item/chats/count/count_request_builder.py | 10 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../chats/item/chat_item_request_builder.py | 30 +- .../hide_for_user_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../installed_apps_request_builder.py | 28 +- .../teams_app/teams_app_request_builder.py | 10 +- .../teams_app_definition_request_builder.py | 10 +- ...s_app_installation_item_request_builder.py | 34 +- .../item/upgrade/upgrade_request_builder.py | 10 +- .../last_message_preview_request_builder.py | 24 +- ...mark_chat_read_for_user_request_builder.py | 10 +- ...rk_chat_unread_for_user_request_builder.py | 10 +- .../item/members/add/add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 34 +- .../item/members/members_request_builder.py | 28 +- .../messages/count/count_request_builder.py | 10 +- .../messages/delta/delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../permission_grants/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_request_body.py | 49 --- .../check_member_groups_request_builder.py | 95 ----- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_request_body.py | 49 --- .../check_member_objects_request_builder.py | 94 ----- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_request_body.py | 49 --- .../get_member_groups_request_builder.py | 95 ----- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_request_body.py | 49 --- .../get_member_objects_request_builder.py | 95 ----- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 74 +--- .../item/restore/restore_request_builder.py | 87 ----- .../permission_grants_request_builder.py | 64 +--- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- .../count/count_request_builder.py | 10 +- .../item/message/message_request_builder.py | 10 +- ..._chat_message_info_item_request_builder.py | 28 +- .../pinned_messages_request_builder.py | 28 +- ...d_activity_notification_request_builder.py | 10 +- .../item/tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../chats/item/tabs/tabs_request_builder.py | 28 +- .../unhide_for_user_request_builder.py | 10 +- .../check_member_groups_post_response.py | 54 +++ .../check_member_groups_request_builder.py | 22 +- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_response.py | 54 +++ .../check_member_objects_request_builder.py | 18 +- .../check_member_objects_response.py | 54 --- .../contact_folders_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../child_folders_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../contact_folder_item_request_builder.py | 24 +- .../item/contacts/contacts_request_builder.py | 28 +- .../contacts/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../contacts/delta/delta_request_builder.py | 26 +- .../item/contact_item_request_builder.py | 24 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../item/photo/photo_request_builder.py | 18 +- .../photo/value/content_request_builder.py | 12 +- .../contact_folder_item_request_builder.py | 38 +- .../item/contacts/contacts_request_builder.py | 28 +- .../contacts/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../contacts/delta/delta_request_builder.py | 26 +- .../item/contact_item_request_builder.py | 24 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../item/photo/photo_request_builder.py | 18 +- .../photo/value/content_request_builder.py | 12 +- .../item/contacts/contacts_request_builder.py | 28 +- .../contacts/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../contacts/delta/delta_request_builder.py | 26 +- .../item/contact_item_request_builder.py | 38 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../item/photo/photo_request_builder.py | 18 +- .../photo/value/content_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- .../created_objects_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ..._troubleshooting_events_request_builder.py | 18 +- ...ubleshooting_event_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../direct_reports_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../graph_user/count/count_request_builder.py | 10 +- .../graph_user/graph_user_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- .../graph_org_contact_request_builder.py | 12 +- .../graph_user/graph_user_request_builder.py | 10 +- .../users/item/drive/drive_request_builder.py | 16 +- .../drives/count/count_request_builder.py | 10 +- .../item/drives/drives_request_builder.py | 16 +- .../drives/item/drive_item_request_builder.py | 10 +- .../employee_experience_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ng_course_activity_item_request_builder.py | 16 +- ...rning_course_activities_request_builder.py | 16 +- .../events/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../events/delta/delta_request_builder.py | 26 +- .../item/events/events_request_builder.py | 30 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../events/item/event_item_request_builder.py | 38 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../instances/count/count_request_builder.py | 10 +- .../instances/delta/delta_get_response.py | 57 +++ .../instances/delta/delta_request_builder.py | 26 +- .../item/instances/delta/delta_response.py | 57 --- .../instances/instances_request_builder.py | 10 +- .../item/accept/accept_request_builder.py | 10 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 20 +- .../item/calendar/calendar_request_builder.py | 10 +- .../item/cancel/cancel_request_builder.py | 10 +- .../item/decline/decline_request_builder.py | 10 +- .../dismiss_reminder_request_builder.py | 10 +- .../item/event_item_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 30 +- .../item/forward/forward_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- .../snooze_reminder_request_builder.py | 10 +- .../tentatively_accept_request_builder.py | 10 +- ...and_app_management_data_request_builder.py | 8 +- ...data_with_skip_with_top_request_builder.py | 11 +- .../export_personal_data_request_builder.py | 10 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../find_meeting_times_request_builder.py | 12 +- .../count/count_request_builder.py | 10 +- .../followed_sites_request_builder.py | 16 +- .../item/site_item_request_builder.py | 10 +- ...onse.py => get_mail_tips_post_response.py} | 8 +- .../get_mail_tips_request_builder.py | 22 +- ...d_app_diagnostic_statuses_get_response.py} | 8 +- ...app_diagnostic_statuses_request_builder.py | 20 +- ... get_managed_app_policies_get_response.py} | 8 +- ...et_managed_app_policies_request_builder.py | 20 +- ..._devices_with_app_failures_get_response.py | 54 +++ ...vices_with_app_failures_request_builder.py | 20 +- ...aged_devices_with_app_failures_response.py | 54 --- .../get_member_groups_post_response.py | 54 +++ .../get_member_groups_request_builder.py | 22 +- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_response.py | 54 +++ .../get_member_objects_request_builder.py | 22 +- .../get_member_objects_response.py | 54 --- ...nference_classification_request_builder.py | 18 +- .../overrides/count/count_request_builder.py | 10 +- ...ification_override_item_request_builder.py | 32 +- .../overrides/overrides_request_builder.py | 28 +- .../item/insights/insights_request_builder.py | 26 +- .../shared/count/count_request_builder.py | 10 +- .../last_shared_method_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 10 +- .../shared_insight_item_request_builder.py | 24 +- .../insights/shared/shared_request_builder.py | 24 +- .../trending/count/count_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 10 +- .../item/trending_item_request_builder.py | 24 +- .../trending/trending_request_builder.py | 24 +- .../used/count/count_request_builder.py | 10 +- .../item/resource/resource_request_builder.py | 10 +- .../item/used_insight_item_request_builder.py | 24 +- .../insights/used/used_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../all_channels_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../item/channel_item_request_builder.py | 10 +- .../item/archive/archive_request_builder.py | 10 +- .../item/channels/channels_request_builder.py | 28 +- .../channels/count/count_request_builder.py | 10 +- ...se.py => get_all_messages_get_response.py} | 8 +- .../get_all_messages_request_builder.py | 20 +- .../item/channel_item_request_builder.py | 38 +- .../complete_migration_request_builder.py | 10 +- ...l_name_user_principal_name_get_response.py | 49 +++ ...ame_user_principal_name_request_builder.py | 20 +- ...cipal_name_user_principal_name_response.py | 49 --- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../{add_response.py => add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../item/members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../item/tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../item/tabs/tabs_request_builder.py | 28 +- .../item/clone/clone_request_builder.py | 10 +- .../complete_migration_request_builder.py | 10 +- .../item/group/group_request_builder.py | 20 +- .../count/count_request_builder.py | 113 ++++++ ...ce_provisioning_errors_request_builder.py} | 63 ++-- .../count/count_request_builder.py | 10 +- .../incoming_channels_request_builder.py | 16 +- .../item/channel_item_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- .../installed_apps_request_builder.py | 28 +- .../teams_app/teams_app_request_builder.py | 10 +- .../teams_app_definition_request_builder.py | 10 +- ...s_app_installation_item_request_builder.py | 34 +- .../item/upgrade/upgrade_request_builder.py | 10 +- .../{add_response.py => add_post_response.py} | 8 +- .../item/members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 38 +- .../item/members/members_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- ...ms_async_operation_item_request_builder.py | 24 +- .../operations/operations_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- .../permission_grants/delta/delta_response.py | 57 --- ..._extension_properties_post_request_body.py | 49 --- ...le_extension_properties_request_builder.py | 95 ----- ...available_extension_properties_response.py | 57 --- .../get_by_ids_post_request_body.py | 53 --- .../get_by_ids/get_by_ids_request_builder.py | 95 ----- .../get_by_ids/get_by_ids_response.py | 57 --- .../check_member_groups_post_request_body.py | 49 --- .../check_member_groups_request_builder.py | 95 ----- .../check_member_groups_response.py | 54 --- .../check_member_objects_post_request_body.py | 49 --- .../check_member_objects_request_builder.py | 94 ----- .../check_member_objects_response.py | 54 --- .../get_member_groups_post_request_body.py | 49 --- .../get_member_groups_request_builder.py | 95 ----- .../get_member_groups_response.py | 54 --- .../get_member_objects_post_request_body.py | 49 --- .../get_member_objects_request_builder.py | 95 ----- .../get_member_objects_response.py | 54 --- ...c_permission_grant_item_request_builder.py | 74 +--- .../item/restore/restore_request_builder.py | 87 ----- .../permission_grants_request_builder.py | 64 +--- .../validate_properties_post_request_body.py | 62 ---- .../validate_properties_request_builder.py | 91 ----- .../item/photo/photo_request_builder.py | 24 +- .../photo/value/content_request_builder.py | 12 +- .../complete_migration_request_builder.py | 10 +- ...l_name_user_principal_name_get_response.py | 49 +++ ...ame_user_principal_name_request_builder.py | 20 +- ...cipal_name_user_principal_name_response.py | 49 --- .../content/content_request_builder.py | 14 +- .../files_folder_request_builder.py | 16 +- .../members/add/add_post_response.py} | 8 +- .../members/add/add_request_builder.py | 22 +- .../members/count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 42 +-- .../members/members_request_builder.py | 30 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../replies/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../replies/delta/delta_request_builder.py | 20 +- .../item/chat_message_item_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../hosted_contents_request_builder.py | 24 +- ...age_hosted_content_item_request_builder.py | 30 +- .../item/value/content_request_builder.py | 12 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 28 +- .../set_reaction_request_builder.py | 6 +- .../soft_delete_request_builder.py | 10 +- .../undo_soft_delete_request_builder.py | 10 +- .../unset_reaction_request_builder.py | 6 +- .../messages/messages_request_builder.py | 30 +- .../primary_channel_request_builder.py | 30 +- .../provision_email_request_builder.py | 12 +- .../remove_email_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../allowed_members_request_builder.py | 16 +- .../count/count_request_builder.py | 10 +- ...onversation_member_item_request_builder.py | 10 +- ..._channel_team_info_item_request_builder.py | 34 +- .../item/team/team_request_builder.py | 10 +- .../shared_with_teams_request_builder.py | 24 +- .../tabs/count/count_request_builder.py | 10 +- .../teams_app/teams_app_request_builder.py | 16 +- .../item/teams_tab_item_request_builder.py | 38 +- .../tabs/tabs_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...ffer_shift_request_item_request_builder.py | 32 +- .../offer_shift_requests_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- ...ift_change_request_item_request_builder.py | 32 +- ...n_shift_change_requests_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../item/open_shift_item_request_builder.py | 36 +- .../open_shifts_request_builder.py | 30 +- .../item/schedule/schedule_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../scheduling_group_item_request_builder.py | 34 +- .../scheduling_groups_request_builder.py | 28 +- .../schedule/share/share_request_builder.py | 10 +- .../shifts/count/count_request_builder.py | 10 +- .../shifts/item/shift_item_request_builder.py | 34 +- .../schedule/shifts/shifts_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- ...fts_change_request_item_request_builder.py | 30 +- ..._shifts_change_requests_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../time_off_reason_item_request_builder.py | 34 +- .../time_off_reasons_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../time_off_request_item_request_builder.py | 34 +- .../time_off_requests_request_builder.py | 24 +- .../times_off/count/count_request_builder.py | 10 +- .../item/time_off_item_request_builder.py | 34 +- .../times_off/times_off_request_builder.py | 28 +- ...d_activity_notification_request_builder.py | 10 +- .../item/tags/count/count_request_builder.py | 10 +- .../members/count/count_request_builder.py | 10 +- ...eamwork_tag_member_item_request_builder.py | 34 +- .../item/members/members_request_builder.py | 28 +- .../item/teamwork_tag_item_request_builder.py | 38 +- .../item/tags/tags_request_builder.py | 28 +- .../item/team_item_request_builder.py | 24 +- .../item/template/template_request_builder.py | 10 +- .../unarchive/unarchive_request_builder.py | 10 +- .../joined_teams_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../license_details_item_request_builder.py | 24 +- .../license_details_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../child_folders_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../delta/delta_request_builder.py | 26 +- .../item/copy/copy_request_builder.py | 12 +- .../item/mail_folder_item_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../item/message_rule_item_request_builder.py | 38 +- .../message_rules_request_builder.py | 28 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 26 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 22 +- .../item/copy/copy_request_builder.py | 12 +- .../create_forward_request_builder.py | 12 +- .../create_reply_request_builder.py | 12 +- .../create_reply_all_request_builder.py | 12 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 34 +- .../item/forward/forward_request_builder.py | 10 +- .../item/message_item_request_builder.py | 24 +- .../item/move/move_request_builder.py | 12 +- .../item/reply/reply_request_builder.py | 10 +- .../reply_all/reply_all_request_builder.py | 10 +- .../item/send/send_request_builder.py | 10 +- .../item/value/content_request_builder.py | 12 +- .../item/messages/messages_request_builder.py | 28 +- .../item/move/move_request_builder.py | 12 +- .../item/copy/copy_request_builder.py | 12 +- .../item/mail_folder_item_request_builder.py | 34 +- .../count/count_request_builder.py | 10 +- .../item/message_rule_item_request_builder.py | 38 +- .../message_rules_request_builder.py | 28 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 26 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 22 +- .../item/copy/copy_request_builder.py | 12 +- .../create_forward_request_builder.py | 12 +- .../create_reply_request_builder.py | 12 +- .../create_reply_all_request_builder.py | 12 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 34 +- .../item/forward/forward_request_builder.py | 10 +- .../item/message_item_request_builder.py | 24 +- .../item/move/move_request_builder.py | 12 +- .../item/reply/reply_request_builder.py | 10 +- .../reply_all/reply_all_request_builder.py | 10 +- .../item/send/send_request_builder.py | 10 +- .../item/value/content_request_builder.py | 12 +- .../item/messages/messages_request_builder.py | 28 +- .../item/move/move_request_builder.py | 12 +- .../mail_folders_request_builder.py | 22 +- .../mailbox_settings_request_builder.py | 18 +- .../count/count_request_builder.py | 10 +- ...d_app_registration_item_request_builder.py | 10 +- ...naged_app_registrations_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../bypass_activation_lock_request_builder.py | 6 +- .../clean_windows_device_request_builder.py | 6 +- ...rom_shared_apple_device_request_builder.py | 6 +- .../device_category_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ompliance_policy_states_request_builder.py | 18 +- ...iance_policy_state_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...ce_configuration_states_request_builder.py | 18 +- ...onfiguration_state_item_request_builder.py | 24 +- .../disable_lost_mode_request_builder.py | 6 +- .../locate_device_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- .../create_download_url_post_response.py} | 8 +- .../create_download_url_request_builder.py | 18 +- ...ollection_response_item_request_builder.py | 24 +- ...log_collection_requests_request_builder.py | 18 +- ...pple_device_active_user_request_builder.py | 6 +- .../managed_device_item_request_builder.py | 26 +- .../reboot_now/reboot_now_request_builder.py | 6 +- .../recover_passcode_request_builder.py | 6 +- .../remote_lock_request_builder.py | 6 +- ...quest_remote_assistance_request_builder.py | 6 +- .../reset_passcode_request_builder.py | 6 +- .../item/retire/retire_request_builder.py | 6 +- .../shut_down/shut_down_request_builder.py | 6 +- .../sync_device_request_builder.py | 6 +- ..._windows_device_account_request_builder.py | 6 +- .../item/users/users_request_builder.py | 10 +- .../windows_defender_scan_request_builder.py | 6 +- ...ender_update_signatures_request_builder.py | 6 +- .../count/count_request_builder.py | 10 +- .../detected_malware_state_request_builder.py | 18 +- ...vice_malware_state_item_request_builder.py | 24 +- ...indows_protection_state_request_builder.py | 24 +- .../item/wipe/wipe_request_builder.py | 6 +- .../managed_devices_request_builder.py | 18 +- .../item/manager/manager_request_builder.py | 26 +- .../item/manager/ref/ref_request_builder.py | 32 +- .../member_of/count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../member_of/member_of_request_builder.py | 10 +- .../messages/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../messages/delta/delta_request_builder.py | 26 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../item/attachment_item_request_builder.py | 22 +- .../item/copy/copy_request_builder.py | 12 +- .../create_forward_request_builder.py | 12 +- .../create_reply_request_builder.py | 12 +- .../create_reply_all_request_builder.py | 12 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 28 +- .../item/extension_item_request_builder.py | 34 +- .../item/forward/forward_request_builder.py | 10 +- .../item/message_item_request_builder.py | 34 +- .../item/move/move_request_builder.py | 12 +- .../item/reply/reply_request_builder.py | 10 +- .../reply_all/reply_all_request_builder.py | 10 +- .../item/send/send_request_builder.py | 10 +- .../item/value/content_request_builder.py | 12 +- .../item/messages/messages_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- ...2_permission_grant_item_request_builder.py | 10 +- ...auth2_permission_grants_request_builder.py | 16 +- .../notebooks/count/count_request_builder.py | 10 +- ...t_notebook_from_web_url_request_builder.py | 12 +- ...nclude_personal_notebooks_get_response.py} | 8 +- ...lude_personal_notebooks_request_builder.py | 22 +- .../copy_notebook_request_builder.py | 14 +- .../item/notebook_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 28 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../notebooks/notebooks_request_builder.py | 28 +- .../item/onenote/onenote_request_builder.py | 28 +- .../operations/count/count_request_builder.py | 10 +- .../onenote_operation_item_request_builder.py | 32 +- .../operations/operations_request_builder.py | 26 +- .../pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 36 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../onenote/pages/pages_request_builder.py | 30 +- .../resources/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../onenote_resource_item_request_builder.py | 32 +- .../resources/resources_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../section_group_item_request_builder.py | 32 +- .../count/count_request_builder.py | 10 +- .../section_group_item_request_builder.py | 10 +- .../section_groups_request_builder.py | 16 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 26 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../item/sections/sections_request_builder.py | 30 +- .../section_groups_request_builder.py | 24 +- .../sections/count/count_request_builder.py | 10 +- .../copy_to_notebook_request_builder.py | 14 +- .../copy_to_section_group_request_builder.py | 14 +- .../onenote_section_item_request_builder.py | 32 +- .../item/pages/count/count_request_builder.py | 10 +- .../item/content/content_request_builder.py | 16 +- .../copy_to_section_request_builder.py | 14 +- .../item/onenote_page_item_request_builder.py | 26 +- .../onenote_patch_content_request_builder.py | 6 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_request_builder.py | 12 +- .../item/preview/preview_request_builder.py | 10 +- .../item/pages/pages_request_builder.py | 30 +- .../parent_notebook_request_builder.py | 10 +- .../parent_section_group_request_builder.py | 10 +- .../sections/sections_request_builder.py | 26 +- .../count/count_request_builder.py | 10 +- .../create_or_get_request_builder.py | 14 +- .../attendance_reports_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../attendance_records_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../attendance_record_item_request_builder.py | 24 +- ..._attendance_report_item_request_builder.py | 30 +- .../attendee_report_request_builder.py | 20 +- ...l_appointment_join_web_url_get_response.py | 49 +++ ...ppointment_join_web_url_request_builder.py | 18 +- ...rtual_appointment_join_web_url_response.py | 49 --- .../online_meeting_item_request_builder.py | 50 ++- .../count/count_request_builder.py} | 72 ++-- .../call_transcript_item_request_builder.py | 235 ++++++++++++ .../item/content/content_request_builder.py | 138 +++++++ .../metadata_content_request_builder.py | 134 +++++++ .../transcripts_request_builder.py | 227 ++++++++++++ .../online_meetings_request_builder.py | 30 +- .../count/count_request_builder.py | 10 +- .../outlook_category_item_request_builder.py | 40 +- .../master_categories_request_builder.py | 30 +- .../item/outlook/outlook_request_builder.py | 12 +- ...py => supported_languages_get_response.py} | 8 +- .../supported_languages_request_builder.py | 26 +- ...y => supported_time_zones_get_response.py} | 8 +- .../supported_time_zones_request_builder.py | 20 +- ...s_with_time_zone_standard_get_response.py} | 8 +- ...with_time_zone_standard_request_builder.py | 22 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../owned_devices_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- .../graph_application_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- ...graph_service_principal_request_builder.py | 10 +- .../owned_objects_request_builder.py | 10 +- .../people/count/count_request_builder.py | 10 +- .../item/person_item_request_builder.py | 10 +- .../item/people/people_request_builder.py | 16 +- .../users/item/photo/photo_request_builder.py | 30 +- .../photo/value/content_request_builder.py | 12 +- .../photos/count/count_request_builder.py | 10 +- .../profile_photo_item_request_builder.py | 10 +- .../item/value/content_request_builder.py | 12 +- .../item/photos/photos_request_builder.py | 10 +- .../item/planner/planner_request_builder.py | 24 +- .../plans/count/count_request_builder.py | 10 +- .../item/buckets/buckets_request_builder.py | 24 +- .../buckets/count/count_request_builder.py | 10 +- .../planner_bucket_item_request_builder.py | 24 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../item/tasks/tasks_request_builder.py | 24 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_plan_item_request_builder.py | 24 +- .../item/tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../plans/item/tasks/tasks_request_builder.py | 24 +- .../planner/plans/plans_request_builder.py | 24 +- .../tasks/count/count_request_builder.py | 10 +- ...ed_to_task_board_format_request_builder.py | 30 +- ...ucket_task_board_format_request_builder.py | 30 +- .../item/details/details_request_builder.py | 30 +- .../item/planner_task_item_request_builder.py | 24 +- ...gress_task_board_format_request_builder.py | 30 +- .../planner/tasks/tasks_request_builder.py | 24 +- .../clear_presence_request_builder.py | 10 +- ...user_preferred_presence_request_builder.py | 10 +- .../item/presence/presence_request_builder.py | 32 +- .../set_presence_request_builder.py | 10 +- .../set_status_message_request_builder.py | 11 +- ...user_preferred_presence_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 16 +- ...aph_app_role_assignment_request_builder.py | 10 +- .../graph_device_request_builder.py | 10 +- .../graph_endpoint_request_builder.py | 10 +- .../registered_devices_request_builder.py | 16 +- ...e_time_with_end_date_time_get_response.py} | 8 +- ...time_with_end_date_time_request_builder.py | 23 +- ...devices_from_management_request_builder.py | 6 +- ...cess_license_assignment_request_builder.py | 12 +- .../item/restore/restore_request_builder.py | 12 +- ...ry_service_provisioning_request_builder.py | 6 +- .../revoke_sign_in_sessions_post_response.py | 49 +++ ...revoke_sign_in_sessions_request_builder.py | 22 +- .../revoke_sign_in_sessions_response.py | 49 --- .../count/count_request_builder.py | 10 +- ...ed_role_membership_item_request_builder.py | 24 +- .../scoped_role_member_of_request_builder.py | 18 +- .../send_mail/send_mail_request_builder.py | 10 +- .../count/count_request_builder.py | 113 ++++++ ...ce_provisioning_errors_request_builder.py} | 63 ++-- .../item/settings/settings_request_builder.py | 34 +- .../shift_preferences_request_builder.py | 34 +- .../associated_teams_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- ...sociated_team_info_item_request_builder.py | 24 +- .../item/team/team_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../installed_apps_request_builder.py | 28 +- .../item/chat/chat_request_builder.py | 16 +- .../teams_app/teams_app_request_builder.py | 10 +- .../teams_app_definition_request_builder.py | 10 +- ...s_app_installation_item_request_builder.py | 34 +- ...d_activity_notification_request_builder.py | 10 +- .../item/teamwork/teamwork_request_builder.py | 24 +- .../todo/lists/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../todo/lists/delta/delta_request_builder.py | 20 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../item/tasks/count/count_request_builder.py | 10 +- ...elta_response.py => delta_get_response.py} | 8 +- .../item/tasks/delta/delta_request_builder.py | 20 +- .../attachment_sessions_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...attachment_session_item_request_builder.py | 24 +- .../item/content/content_request_builder.py | 14 +- .../attachments_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../create_upload_session_request_builder.py | 12 +- .../attachment_base_item_request_builder.py | 26 +- .../item/value/content_request_builder.py | 12 +- .../checklist_items_request_builder.py | 28 +- .../count/count_request_builder.py | 10 +- .../checklist_item_item_request_builder.py | 38 +- .../extensions/count/count_request_builder.py | 10 +- .../extensions/extensions_request_builder.py | 18 +- .../item/extension_item_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../linked_resource_item_request_builder.py | 38 +- .../linked_resources_request_builder.py | 28 +- .../item/todo_task_item_request_builder.py | 54 +-- .../lists/item/tasks/tasks_request_builder.py | 28 +- .../todo_task_list_item_request_builder.py | 38 +- .../item/todo/lists/lists_request_builder.py | 28 +- .../users/item/todo/todo_request_builder.py | 24 +- .../count/count_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../count/count_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../directory_object_item_request_builder.py | 10 +- ...aph_administrative_unit_request_builder.py | 10 +- .../graph_directory_role_request_builder.py | 10 +- .../graph_group_request_builder.py | 10 +- .../transitive_member_of_request_builder.py | 10 +- ...> translate_exchange_ids_post_response.py} | 8 +- .../translate_exchange_ids_request_builder.py | 22 +- .../users/item/user_item_request_builder.py | 86 +++-- ...strations_by_device_tag_request_builder.py | 6 +- .../generated/users/users_request_builder.py | 18 +- .../validate_properties_request_builder.py | 10 +- 9074 files changed, 154603 insertions(+), 76384 deletions(-) create mode 100644 msgraph/generated/admin/people/people_request_builder.py create mode 100644 msgraph/generated/admin/people/profile_card_properties/count/count_request_builder.py create mode 100644 msgraph/generated/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.py create mode 100644 msgraph/generated/admin/people/profile_card_properties/profile_card_properties_request_builder.py rename msgraph/generated/{drives/item/list_/content_types/item/is_published/is_published_response.py => admin/service_announcement/messages/archive/archive_post_response.py} (91%) rename msgraph/generated/admin/service_announcement/messages/{archive/archive_response.py => favorite/favorite_post_response.py} (91%) rename msgraph/generated/admin/service_announcement/messages/{favorite/favorite_response.py => mark_read/mark_read_post_response.py} (91%) create mode 100644 msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_post_response.py create mode 100644 msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_post_response.py create mode 100644 msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_post_response.py delete mode 100644 msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_response.py rename msgraph/generated/applications/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{contacts/get_available_extension_properties/get_available_extension_properties_response.py => applications/get_available_extension_properties/get_available_extension_properties_post_response.py} (89%) rename msgraph/generated/{contracts/get_by_ids/get_by_ids_response.py => applications/get_by_ids/get_by_ids_post_response.py} (92%) create mode 100644 msgraph/generated/applications/item/check_member_groups/check_member_groups_post_response.py rename msgraph/generated/{directory/federation_configurations/available_provider_types/available_provider_types_response.py => applications/item/check_member_objects/check_member_objects_post_response.py} (90%) rename msgraph/generated/applications/item/{get_member_objects/get_member_objects_response.py => get_member_groups/get_member_groups_post_response.py} (90%) create mode 100644 msgraph/generated/applications/item/get_member_objects/get_member_objects_post_response.py rename msgraph/generated/{service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py => applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py} (91%) rename msgraph/generated/{service_principals/item/synchronization/jobs/item/schema/functions/functions_response.py => applications/item/synchronization/jobs/item/schema/functions/functions_get_response.py} (92%) rename msgraph/generated/applications/item/synchronization/{jobs/item/schema/filter_operators/filter_operators_response.py => templates/item/schema/filter_operators/filter_operators_get_response.py} (91%) rename msgraph/generated/applications/item/synchronization/{jobs/item/schema/functions/functions_response.py => templates/item/schema/functions/functions_get_response.py} (92%) rename msgraph/generated/{teams/get_all_messages/get_all_messages_response.py => chats/get_all_messages/get_all_messages_get_response.py} (91%) rename msgraph/generated/{teams/item/members/add/add_response.py => chats/item/members/add/add_post_response.py} (93%) rename msgraph/generated/chats/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{groups/item/team/primary_channel/messages/delta/delta_response.py => chats/item/messages/item/replies/delta/delta_get_response.py} (93%) delete mode 100644 msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py delete mode 100644 msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py delete mode 100644 msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py rename msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/{get_direct_routing_calls_with_from_date_time_with_to_date_time_response.py => get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py} (94%) rename msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/{get_pstn_calls_with_from_date_time_with_to_date_time_response.py => get_pstn_calls_with_from_date_time_with_to_date_time_get_response.py} (88%) rename msgraph/generated/communications/get_presences_by_user_id/{get_presences_by_user_id_response.py => get_presences_by_user_id_post_response.py} (90%) rename msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/{get_virtual_appointment_join_web_url_response.py => get_virtual_appointment_join_web_url_get_response.py} (87%) create mode 100644 msgraph/generated/communications/online_meetings/item/transcripts/count/count_request_builder.py create mode 100644 msgraph/generated/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py create mode 100644 msgraph/generated/communications/online_meetings/item/transcripts/item/content/content_request_builder.py create mode 100644 msgraph/generated/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py create mode 100644 msgraph/generated/communications/online_meetings/item/transcripts/transcripts_request_builder.py rename msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/{add_activities_response.py => add_activities_post_response.py} (92%) rename msgraph/generated/contacts/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{applications/get_available_extension_properties/get_available_extension_properties_response.py => contacts/get_available_extension_properties/get_available_extension_properties_post_response.py} (89%) rename msgraph/generated/contacts/get_by_ids/{get_by_ids_response.py => get_by_ids_post_response.py} (92%) create mode 100644 msgraph/generated/contacts/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/contacts/item/check_member_groups/check_member_groups_response.py rename msgraph/generated/{identity/identity_providers/available_provider_types/available_provider_types_response.py => contacts/item/check_member_objects/check_member_objects_post_response.py} (90%) delete mode 100644 msgraph/generated/contacts/item/check_member_objects/check_member_objects_response.py rename msgraph/generated/{applications/item/check_member_objects/check_member_objects_response.py => contacts/item/get_member_groups/get_member_groups_post_response.py} (90%) delete mode 100644 msgraph/generated/contacts/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/contacts/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/contacts/item/get_member_objects/get_member_objects_response.py create mode 100644 msgraph/generated/contacts/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/{directory_objects/delta/delta_response.py => contracts/delta/delta_get_response.py} (93%) rename msgraph/generated/contracts/get_available_extension_properties/{get_available_extension_properties_response.py => get_available_extension_properties_post_response.py} (89%) rename msgraph/generated/{applications/get_by_ids/get_by_ids_response.py => contracts/get_by_ids/get_by_ids_post_response.py} (92%) create mode 100644 msgraph/generated/contracts/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/contracts/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/contracts/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/contracts/item/check_member_objects/check_member_objects_response.py rename msgraph/generated/{applications/item/get_member_groups/get_member_groups_response.py => contracts/item/get_member_groups/get_member_groups_post_response.py} (90%) delete mode 100644 msgraph/generated/contracts/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/contracts/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/contracts/item/get_member_objects/get_member_objects_response.py create mode 100644 msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.py rename msgraph/generated/{drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_response.py => device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py} (71%) rename msgraph/generated/{chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py => device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py} (61%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py rename msgraph/generated/{teams/item/permission_grants/item/restore/restore_request_builder.py => device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py} (54%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py rename msgraph/generated/{teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py => device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.py} (61%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py rename msgraph/generated/{chats/item/permission_grants/item/restore/restore_request_builder.py => device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py} (54%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.py rename msgraph/generated/{groups/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py => device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.py} (60%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py rename msgraph/generated/{groups/item/permission_grants/item/restore/restore_request_builder.py => device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py} (54%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py rename msgraph/generated/{groups/item/team/permission_grants/item/check_member_objects/check_member_objects_request_builder.py => device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py} (60%) create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.py create mode 100644 msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.py rename msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/{download_apple_push_notification_certificate_signing_request_response.py => download_apple_push_notification_certificate_signing_request_get_response.py} (92%) rename msgraph/generated/{device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.py => device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.py} (89%) delete mode 100644 msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.py create mode 100644 msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.py delete mode 100644 msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_response.py rename msgraph/generated/device_management/device_compliance_policies/item/assign/{assign_response.py => assign_post_response.py} (93%) rename msgraph/generated/device_management/device_configurations/item/assign/{assign_response.py => assign_post_response.py} (93%) rename msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/{get_oma_setting_plain_text_value_with_secret_reference_value_id_response.py => get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.py} (92%) rename msgraph/generated/device_management/get_effective_permissions_with_scope/{get_effective_permissions_with_scope_response.py => get_effective_permissions_with_scope_get_response.py} (89%) rename msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/{import_response.py => import_post_response.py} (93%) rename msgraph/generated/{drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_response.py => device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py} (90%) rename msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/{summarize_device_performance_devices_with_summarize_by_response.py => summarize_device_performance_devices_with_summarize_by_get_response.py} (92%) rename msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/{verify_windows_enrollment_auto_discovery_with_domain_name_response.py => verify_windows_enrollment_auto_discovery_with_domain_name_get_response.py} (93%) rename msgraph/generated/devices/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/devices/get_available_extension_properties/{get_available_extension_properties_response.py => get_available_extension_properties_post_response.py} (89%) rename msgraph/generated/devices/get_by_ids/{get_by_ids_response.py => get_by_ids_post_response.py} (92%) create mode 100644 msgraph/generated/devices/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/devices/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/devices/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/devices/item/check_member_objects/check_member_objects_response.py rename msgraph/generated/{applications/item/check_member_groups/check_member_groups_response.py => devices/item/get_member_groups/get_member_groups_post_response.py} (90%) delete mode 100644 msgraph/generated/devices/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/devices/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/devices/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/directory/administrative_units/delta/{delta_response.py => delta_get_response.py} (93%) delete mode 100644 msgraph/generated/directory/deleted_items/delta/delta_response.py rename msgraph/generated/directory/deleted_items/get_available_extension_properties/{get_available_extension_properties_response.py => get_available_extension_properties_post_response.py} (89%) rename msgraph/generated/directory/deleted_items/get_by_ids/{get_by_ids_response.py => get_by_ids_post_response.py} (92%) rename msgraph/generated/directory/deleted_items/item/{get_member_groups/get_member_groups_response.py => check_member_groups/check_member_groups_post_response.py} (90%) rename msgraph/generated/directory/deleted_items/item/check_member_objects/{check_member_objects_response.py => check_member_objects_post_response.py} (90%) rename msgraph/generated/directory/deleted_items/item/{get_member_objects/get_member_objects_response.py => get_member_groups/get_member_groups_post_response.py} (90%) rename msgraph/generated/directory/deleted_items/item/{check_member_groups/check_member_groups_response.py => get_member_objects/get_member_objects_post_response.py} (90%) create mode 100644 msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_get_response.py rename msgraph/generated/{directory_role_templates/delta/delta_response.py => directory_objects/delta/delta_get_response.py} (93%) create mode 100644 msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/directory_objects/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/directory_objects/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/{contracts/delta/delta_response.py => directory_role_templates/delta/delta_get_response.py} (93%) create mode 100644 msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/directory_roles/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/directory_roles/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/directory_roles/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/{group_lifecycle_policies/item/remove_group/remove_group_response.py => domains/item/promote/promote_post_response.py} (91%) create mode 100644 msgraph/generated/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/drives/item/items/item/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/drives/item/items/item/delta_with_token/{delta_with_token_response.py => delta_with_token_get_response.py} (91%) rename msgraph/generated/{groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_response.py => drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/{get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) rename msgraph/generated/{sites/item/permissions/item/grant/grant_response.py => drives/item/items/item/invite/invite_post_response.py} (92%) create mode 100644 msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/drives/item/items/item/permissions/item/grant/{grant_response.py => grant_post_response.py} (92%) rename msgraph/generated/drives/item/items/item/search_with_q/{search_with_q_response.py => search_with_q_get_response.py} (92%) rename msgraph/generated/drives/item/items/item/workbook/tables/count/{count_response.py => count_get_response.py} (92%) rename msgraph/generated/drives/item/items/item/workbook/tables/item/{rows/count/count_response.py => columns/count/count_get_response.py} (92%) rename msgraph/generated/drives/item/items/item/workbook/{worksheets/item/charts/count/count_response.py => tables/item/rows/count/count_get_response.py} (92%) rename msgraph/generated/drives/item/items/item/workbook/{tables/item/columns/count/count_response.py => worksheets/item/charts/count/count_get_response.py} (92%) rename msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/{image_response.py => image_get_response.py} (92%) rename msgraph/generated/{users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py => drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py} (91%) rename msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/{image_with_width_with_height_response.py => image_with_width_with_height_get_response.py} (89%) create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py delete mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py delete mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_get_response.py delete mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py delete mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py delete mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_response.py create mode 100644 msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/{get_compatible_hub_content_types_response.py => get_compatible_hub_content_types_get_response.py} (89%) create mode 100644 msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_get_response.py create mode 100644 msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/{shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py => drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/{shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) create mode 100644 msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/drives/item/recent/{recent_response.py => recent_get_response.py} (92%) rename msgraph/generated/drives/item/search_with_q/{search_with_q_response.py => search_with_q_get_response.py} (92%) rename msgraph/generated/drives/item/shared_with_me/{shared_with_me_response.py => shared_with_me_get_response.py} (91%) rename msgraph/generated/education/classes/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/education/classes/item/assignment_categories/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/education/{users/item/assignments/delta/delta_response.py => classes/item/assignments/delta/delta_get_response.py} (93%) rename msgraph/generated/education/classes/item/assignments/item/categories/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/education/classes/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/education/classes/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/education/me/assignments/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/education/me/assignments/item/categories/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/education/me/user/service_provisioning_errors/count/count_request_builder.py rename msgraph/generated/{chats/item/permission_grants/delta/delta_request_builder.py => education/me/user/service_provisioning_errors/service_provisioning_errors_request_builder.py} (65%) rename msgraph/generated/education/schools/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/education/users/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/education/{classes/item/assignments/delta/delta_response.py => users/item/assignments/delta/delta_get_response.py} (93%) rename msgraph/generated/education/users/item/assignments/item/categories/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/education/users/item/user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/education/users/item/user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/{add_activities_response.py => add_activities_post_response.py} (92%) rename msgraph/generated/{admin/service_announcement/messages/mark_read/mark_read_response.py => group_lifecycle_policies/item/add_group/add_group_post_response.py} (91%) delete mode 100644 msgraph/generated/group_lifecycle_policies/item/add_group/add_group_response.py create mode 100644 msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_post_response.py rename msgraph/generated/group_setting_templates/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/groups/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/groups/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/groups/get_by_ids/get_by_ids_response.py rename msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/{allowed_calendar_sharing_roles_with_user_response.py => allowed_calendar_sharing_roles_with_user_get_response.py} (88%) rename msgraph/generated/{users/item/calendar/calendar_view/delta/delta_response.py => groups/item/calendar/calendar_view/delta/delta_get_response.py} (93%) rename msgraph/generated/groups/item/calendar/{events/item/instances/delta/delta_response.py => calendar_view/item/instances/delta/delta_get_response.py} (93%) rename msgraph/generated/groups/item/calendar/{calendar_view/delta/delta_response.py => events/delta/delta_get_response.py} (93%) rename msgraph/generated/groups/item/calendar/{calendar_view/item/instances/delta/delta_response.py => events/item/instances/delta/delta_get_response.py} (93%) rename msgraph/generated/groups/item/calendar/get_schedule/{get_schedule_response.py => get_schedule_post_response.py} (92%) rename msgraph/generated/groups/item/calendar_view/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{users/item/calendar_view/item/instances/delta/delta_response.py => groups/item/calendar_view/item/instances/delta/delta_get_response.py} (93%) rename msgraph/generated/groups/item/check_granted_permissions_for_app/{check_granted_permissions_for_app_response.py => check_granted_permissions_for_app_post_response.py} (90%) create mode 100644 msgraph/generated/groups/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/groups/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/groups/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/groups/item/check_member_objects/check_member_objects_response.py rename msgraph/generated/groups/item/events/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{users/item/calendars/item/calendar_view/delta/delta_response.py => groups/item/events/item/instances/delta/delta_get_response.py} (93%) create mode 100644 msgraph/generated/groups/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/groups/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/groups/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/groups/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/{admin/service_announcement/messages/mark_unread/mark_unread_response.py => groups/item/group_lifecycle_policies/item/add_group/add_group_post_response.py} (91%) delete mode 100644 msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_response.py create mode 100644 msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_post_response.py delete mode 100644 msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_response.py rename msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/{get_recent_notebooks_with_include_personal_notebooks_response.py => get_recent_notebooks_with_include_personal_notebooks_get_response.py} (89%) delete mode 100644 msgraph/generated/groups/item/permission_grants/delta/delta_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py delete mode 100644 msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_response.py delete mode 100644 msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_request_builder.py create mode 100644 msgraph/generated/groups/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/groups/item/sites/add/{add_response.py => add_post_response.py} (93%) rename msgraph/generated/groups/item/sites/get_all_sites/{get_all_sites_response.py => get_all_sites_get_response.py} (91%) rename msgraph/generated/{sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py => groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py} (89%) create mode 100644 msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_get_response.py delete mode 100644 msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_response.py create mode 100644 msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/{drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py => groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/{get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) rename msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/{get_applicable_content_types_for_list_with_list_id_response.py => get_applicable_content_types_for_list_with_list_id_get_response.py} (87%) create mode 100644 msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/{get_compatible_hub_content_types_response.py => get_compatible_hub_content_types_get_response.py} (89%) create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py delete mode 100644 msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_response.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/{get_activities_by_interval_response.py => get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/{get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/{get_recent_notebooks_with_include_personal_notebooks_response.py => get_recent_notebooks_with_include_personal_notebooks_get_response.py} (89%) rename msgraph/generated/groups/item/sites/item/permissions/item/grant/{grant_response.py => grant_post_response.py} (92%) rename msgraph/generated/groups/item/sites/remove/{remove_response.py => remove_post_response.py} (92%) rename msgraph/generated/groups/item/team/channels/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) rename msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/{does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py => does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py} (91%) rename msgraph/generated/groups/item/team/channels/item/members/add/{add_response.py => add_post_response.py} (93%) rename msgraph/generated/groups/item/team/channels/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/groups/item/team/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/groups/item/team/group/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/{teams/item/primary_channel/members/add/add_response.py => groups/item/team/members/add/add_post_response.py} (93%) delete mode 100644 msgraph/generated/groups/item/team/permission_grants/delta/delta_response.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_request_builder.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_response.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_response.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_request_builder.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_response.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_request_builder.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_response.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_request_builder.py rename msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/{does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py => does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py} (91%) rename msgraph/generated/{teams/item/channels/item/members/add/add_response.py => groups/item/team/primary_channel/members/add/add_post_response.py} (93%) rename msgraph/generated/{teams/item/channels/item/messages/delta/delta_response.py => groups/item/team/primary_channel/messages/delta/delta_get_response.py} (93%) rename msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_get_response.py rename msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/{get_applicable_policy_requirements_response.py => get_applicable_policy_requirements_post_response.py} (90%) create mode 100644 msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/{additional_access_response.py => additional_access_get_response.py} (91%) rename msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/{additional_access_with_access_package_id_with_incompatible_access_package_id_response.py => additional_access_with_access_package_id_with_incompatible_access_package_id_get_response.py} (94%) rename msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_response.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_request_builder.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_response.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/assignment_approvals_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py rename msgraph/generated/{groups/item/team/permission_grants/delta/delta_request_builder.py => identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py} (68%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/approval_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/item/approval_stage_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/stages_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/assignment_schedule_instances_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/activated_using/activated_using_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/principal/principal_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/privileged_access_group_assignment_schedule_instance_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/assignment_schedule_requests_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py rename msgraph/generated/identity_governance/{entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_request_builder.py => privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py} (67%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/activated_using/activated_using_request_builder.py rename msgraph/generated/{groups/item/team/permission_grants/item/restore/restore_request_builder.py => identity_governance/privileged_access/group/assignment_schedule_requests/item/cancel/cancel_request_builder.py} (58%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/principal/principal_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/privileged_access_group_assignment_schedule_request_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/assignment_schedules_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py rename msgraph/generated/{policies/feature_rollout_policies/item/applies_to/delta/delta_request_builder.py => identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py} (68%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/activated_using/activated_using_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/principal/principal_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/privileged_access_group_assignment_schedule_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/eligibility_schedule_instances_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/principal/principal_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/privileged_access_group_eligibility_schedule_instance_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/eligibility_schedule_requests_request_builder.py rename msgraph/generated/{groups/item/team/permission_grants/get_by_ids/get_by_ids_response.py => identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py} (71%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py rename msgraph/generated/identity_governance/{entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_request_builder.py => privileged_access/group/eligibility_schedule_requests/item/cancel/cancel_request_builder.py} (56%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/principal/principal_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/privileged_access_group_eligibility_schedule_request_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/eligibility_schedules_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py rename msgraph/generated/identity_governance/{entitlement_management/connected_organizations/item/external_sponsors/delta/delta_request_builder.py => privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py} (67%) create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/principal/principal_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/privileged_access_group_eligibility_schedule_item_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/group/group_request_builder.py create mode 100644 msgraph/generated/identity_governance/privileged_access/privileged_access_request_builder.py rename msgraph/generated/identity_providers/available_provider_types/{available_provider_types_response.py => available_provider_types_get_response.py} (89%) create mode 100644 msgraph/generated/invitations/item/invited_user/service_provisioning_errors/count/count_request_builder.py rename msgraph/generated/{groups/item/permission_grants/delta/delta_request_builder.py => invitations/item/invited_user/service_provisioning_errors/service_provisioning_errors_request_builder.py} (65%) create mode 100644 msgraph/generated/models/account_target_content.py create mode 100644 msgraph/generated/models/account_target_content_type.py create mode 100644 msgraph/generated/models/address_book_account_target_content.py create mode 100644 msgraph/generated/models/attack_simulation_operation.py create mode 100644 msgraph/generated/models/attack_simulation_operation_collection_response.py create mode 100644 msgraph/generated/models/attack_simulation_operation_type.py rename msgraph/generated/{chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py => models/azure_communication_services_user_identity.py} (61%) create mode 100644 msgraph/generated/models/base_end_user_notification.py create mode 100644 msgraph/generated/models/call_transcript.py create mode 100644 msgraph/generated/models/call_transcript_collection_response.py rename msgraph/generated/{admin/service_announcement/messages/unarchive/unarchive_response.py => models/coachmark_location.py} (60%) create mode 100644 msgraph/generated/models/coachmark_location_type.py create mode 100644 msgraph/generated/models/communications_application_identity.py create mode 100644 msgraph/generated/models/communications_application_instance_identity.py create mode 100644 msgraph/generated/models/communications_encrypted_identity.py create mode 100644 msgraph/generated/models/communications_guest_identity.py create mode 100644 msgraph/generated/models/communications_identity_set.py create mode 100644 msgraph/generated/models/communications_phone_identity.py create mode 100644 msgraph/generated/models/communications_user_identity.py create mode 100644 msgraph/generated/models/custom_training_setting.py create mode 100644 msgraph/generated/models/email_payload_detail.py create mode 100644 msgraph/generated/models/end_user_notification.py create mode 100644 msgraph/generated/models/end_user_notification_collection_response.py create mode 100644 msgraph/generated/models/end_user_notification_detail.py create mode 100644 msgraph/generated/models/end_user_notification_detail_collection_response.py create mode 100644 msgraph/generated/models/end_user_notification_preference.py create mode 100644 msgraph/generated/models/end_user_notification_setting.py create mode 100644 msgraph/generated/models/end_user_notification_setting_type.py create mode 100644 msgraph/generated/models/end_user_notification_type.py create mode 100644 msgraph/generated/models/file_encryption_info.py create mode 100644 msgraph/generated/models/include_all_account_target_content.py create mode 100644 msgraph/generated/models/landing_page.py create mode 100644 msgraph/generated/models/landing_page_collection_response.py create mode 100644 msgraph/generated/models/landing_page_detail.py create mode 100644 msgraph/generated/models/landing_page_detail_collection_response.py create mode 100644 msgraph/generated/models/login_page.py create mode 100644 msgraph/generated/models/login_page_collection_response.py create mode 100644 msgraph/generated/models/microsoft_custom_training_setting.py create mode 100644 msgraph/generated/models/microsoft_managed_training_setting.py create mode 100644 msgraph/generated/models/microsoft_training_assignment_mapping.py create mode 100644 msgraph/generated/models/mobile_app_content_collection_response.py create mode 100644 msgraph/generated/models/mobile_app_content_file_collection_response.py create mode 100644 msgraph/generated/models/mobile_contained_app_collection_response.py create mode 100644 msgraph/generated/models/no_training_notification_setting.py create mode 100644 msgraph/generated/models/no_training_setting.py create mode 100644 msgraph/generated/models/notification_delivery_frequency.py create mode 100644 msgraph/generated/models/notification_delivery_preference.py create mode 100644 msgraph/generated/models/o_auth_app_scope.py rename msgraph/generated/{identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_post_request_body.py => models/o_auth_consent_app_detail.py} (66%) create mode 100644 msgraph/generated/models/payload.py create mode 100644 msgraph/generated/models/payload_brand.py create mode 100644 msgraph/generated/models/payload_coachmark.py rename msgraph/generated/{chats/item/permission_grants/delta/delta_response.py => models/payload_collection_response.py} (66%) create mode 100644 msgraph/generated/models/payload_complexity.py create mode 100644 msgraph/generated/models/payload_detail.py create mode 100644 msgraph/generated/models/payload_industry.py create mode 100644 msgraph/generated/models/payload_theme.py create mode 100644 msgraph/generated/models/people_admin_settings.py create mode 100644 msgraph/generated/models/positive_reinforcement_notification.py create mode 100644 msgraph/generated/models/privileged_access_group.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_schedule.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_schedule_collection_response.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_schedule_instance.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_schedule_instance_collection_response.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_schedule_request.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_schedule_request_collection_response.py create mode 100644 msgraph/generated/models/privileged_access_group_assignment_type.py create mode 100644 msgraph/generated/models/privileged_access_group_eligibility_schedule.py create mode 100644 msgraph/generated/models/privileged_access_group_eligibility_schedule_collection_response.py create mode 100644 msgraph/generated/models/privileged_access_group_eligibility_schedule_instance.py create mode 100644 msgraph/generated/models/privileged_access_group_eligibility_schedule_instance_collection_response.py create mode 100644 msgraph/generated/models/privileged_access_group_eligibility_schedule_request.py create mode 100644 msgraph/generated/models/privileged_access_group_eligibility_schedule_request_collection_response.py create mode 100644 msgraph/generated/models/privileged_access_group_member_type.py create mode 100644 msgraph/generated/models/privileged_access_group_relationships.py create mode 100644 msgraph/generated/models/privileged_access_root.py create mode 100644 msgraph/generated/models/privileged_access_schedule.py create mode 100644 msgraph/generated/models/privileged_access_schedule_instance.py create mode 100644 msgraph/generated/models/privileged_access_schedule_request.py rename msgraph/generated/{chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py => models/profile_card_annotation.py} (68%) create mode 100644 msgraph/generated/models/profile_card_property.py create mode 100644 msgraph/generated/models/profile_card_property_collection_response.py create mode 100644 msgraph/generated/models/reseller_delegated_admin_relationship.py create mode 100644 msgraph/generated/models/schedule_request_actions.py create mode 100644 msgraph/generated/models/security/host_pair.py create mode 100644 msgraph/generated/models/security/host_pair_collection_response.py create mode 100644 msgraph/generated/models/security/host_ssl_certificate.py create mode 100644 msgraph/generated/models/security/host_ssl_certificate_collection_response.py create mode 100644 msgraph/generated/models/security/host_ssl_certificate_port.py create mode 100644 msgraph/generated/models/security/ssl_certificate.py create mode 100644 msgraph/generated/models/security/ssl_certificate_collection_response.py create mode 100644 msgraph/generated/models/security/ssl_certificate_entity.py create mode 100644 msgraph/generated/models/security/subdomain.py create mode 100644 msgraph/generated/models/security/subdomain_collection_response.py create mode 100644 msgraph/generated/models/security/whois_base_record.py create mode 100644 msgraph/generated/models/security/whois_contact.py create mode 100644 msgraph/generated/models/security/whois_history_record.py create mode 100644 msgraph/generated/models/security/whois_history_record_collection_response.py rename msgraph/generated/{domains/item/promote/promote_response.py => models/security/whois_nameserver.py} (53%) create mode 100644 msgraph/generated/models/security/whois_record.py create mode 100644 msgraph/generated/models/security/whois_record_collection_response.py create mode 100644 msgraph/generated/models/service_provisioning_error_collection_response.py create mode 100644 msgraph/generated/models/simulation_content_source.py create mode 100644 msgraph/generated/models/simulation_content_status.py create mode 100644 msgraph/generated/models/simulation_notification.py create mode 100644 msgraph/generated/models/targetted_user_type.py create mode 100644 msgraph/generated/models/training.py create mode 100644 msgraph/generated/models/training_assigned_to.py create mode 100644 msgraph/generated/models/training_availability_status.py create mode 100644 msgraph/generated/models/training_collection_response.py create mode 100644 msgraph/generated/models/training_completion_duration.py create mode 100644 msgraph/generated/models/training_language_detail.py rename msgraph/generated/{chats/item/permission_grants/get_by_ids/get_by_ids_response.py => models/training_language_detail_collection_response.py} (61%) create mode 100644 msgraph/generated/models/training_notification_setting.py create mode 100644 msgraph/generated/models/training_reminder_notification.py create mode 100644 msgraph/generated/models/training_setting.py create mode 100644 msgraph/generated/models/training_setting_type.py create mode 100644 msgraph/generated/models/training_type.py rename msgraph/generated/oauth2_permission_grants/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/organization/delta/delta_get_response.py delete mode 100644 msgraph/generated/organization/delta/delta_response.py create mode 100644 msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/organization/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/organization/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/organization/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/organization/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/organization/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/organization/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/organization/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/organization/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/organization/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/organization/item/get_member_objects/get_member_objects_response.py create mode 100644 msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_post_response.py delete mode 100644 msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_response.py create mode 100644 msgraph/generated/permission_grants/delta/delta_get_response.py delete mode 100644 msgraph/generated/permission_grants/delta/delta_response.py create mode 100644 msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/permission_grants/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/permission_grants/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_response.py create mode 100644 msgraph/generated/places/item/graph_room_list/rooms/count/count_request_builder.py create mode 100644 msgraph/generated/places/item/graph_room_list/rooms/item/room_item_request_builder.py create mode 100644 msgraph/generated/places/item/graph_room_list/rooms/rooms_request_builder.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/delta/delta_response.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_request_builder.py create mode 100644 msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/{get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_response.py => get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_get_response.py} (93%) rename msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/{get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_response.py => get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_get_response.py} (93%) rename msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/{get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_response.py => get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_get_response.py} (94%) rename msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/{get_attack_simulation_repeat_offenders_response.py => get_attack_simulation_repeat_offenders_get_response.py} (89%) rename msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/{get_attack_simulation_simulation_user_coverage_response.py => get_attack_simulation_simulation_user_coverage_get_response.py} (88%) rename msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/{get_attack_simulation_training_user_coverage_response.py => get_attack_simulation_training_user_coverage_get_response.py} (89%) rename msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/{filter_by_current_user_with_on_response.py => filter_by_current_user_with_on_get_response.py} (90%) rename msgraph/generated/search/query/{query_response.py => query_post_response.py} (92%) create mode 100644 msgraph/generated/security/attack_simulation/end_user_notifications/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/end_user_notifications/end_user_notifications_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/end_user_notifications/item/details/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/end_user_notifications/item/details/details_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/end_user_notifications/item/details/item/end_user_notification_detail_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/end_user_notifications/item/end_user_notification_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/landing_pages/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/landing_pages/item/details/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/landing_pages/item/details/details_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/landing_pages/item/details/item/landing_page_detail_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/landing_pages/item/landing_page_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/landing_pages/landing_pages_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/login_pages/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/login_pages/item/login_page_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/login_pages/login_pages_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/operations/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/operations/item/attack_simulation_operation_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/operations/operations_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/payloads/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/payloads/item/payload_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/payloads/payloads_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/simulations/item/landing_page/landing_page_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/simulations/item/login_page/login_page_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/simulations/item/payload/payload_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/trainings/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/trainings/item/language_details/count/count_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/trainings/item/language_details/item/training_language_detail_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/trainings/item/language_details/language_details_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/trainings/item/training_item_request_builder.py create mode 100644 msgraph/generated/security/attack_simulation/trainings/trainings_request_builder.py create mode 100644 msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/{as_hierarchy_response.py => as_hierarchy_get_response.py} (92%) create mode 100644 msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_pairs/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_pairs/host_pairs_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_pairs/item/child_host/child_host_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_pairs/item/host_pair_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_pairs/item/parent_host/parent_host_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_ssl_certificates/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_ssl_certificates/host_ssl_certificates_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host/host_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host_ssl_certificate_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/ssl_certificate/ssl_certificate_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/child_host_pairs_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/item/host_pair_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/host_pairs_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/item/host_pair_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/item/host_pair_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/parent_host_pairs_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/item/host_ssl_certificate_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/ssl_certificates_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/subdomains/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/subdomains/item/subdomain_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/subdomains/subdomains_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/hosts/item/whois/whois_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/ssl_certificates/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/item/host_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/related_hosts_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/ssl_certificates/item/ssl_certificate_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/ssl_certificates/ssl_certificates_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/subdomains/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/subdomains/item/host/host_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/subdomains/item/subdomain_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/subdomains/subdomains_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_history_records/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_history_records/item/host/host_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_history_records/item/whois_history_record_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_history_records/whois_history_records_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/item/history/count/count_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/item/history/history_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/item/history/item/whois_history_record_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/item/host/host_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/item/whois_record_item_request_builder.py create mode 100644 msgraph/generated/security/threat_intelligence/whois_records/whois_records_request_builder.py rename msgraph/generated/service_principals/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/service_principals/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/service_principals/get_by_ids/get_by_ids_response.py create mode 100644 msgraph/generated/service_principals/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/service_principals/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/service_principals/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/service_principals/item/check_member_objects/check_member_objects_response.py create mode 100644 msgraph/generated/service_principals/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/service_principals/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/service_principals/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/service_principals/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/service_principals/item/synchronization/{templates/item/schema/filter_operators/filter_operators_response.py => jobs/item/schema/filter_operators/filter_operators_get_response.py} (91%) rename msgraph/generated/service_principals/item/synchronization/{templates/item/schema/functions/functions_response.py => jobs/item/schema/functions/functions_get_response.py} (92%) rename msgraph/generated/{applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py => service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py} (91%) rename msgraph/generated/{applications/item/synchronization/templates/item/schema/functions/functions_response.py => service_principals/item/synchronization/templates/item/schema/functions/functions_get_response.py} (92%) create mode 100644 msgraph/generated/shares/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/shares/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/{get_compatible_hub_content_types_response.py => get_compatible_hub_content_types_get_response.py} (89%) create mode 100644 msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_get_response.py delete mode 100644 msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_response.py create mode 100644 msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/{drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py => shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/{drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) create mode 100644 msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/shares/item/permission/grant/{grant_response.py => grant_post_response.py} (92%) rename msgraph/generated/sites/{remove/remove_response.py => add/add_post_response.py} (93%) rename msgraph/generated/sites/get_all_sites/{get_all_sites_response.py => get_all_sites_get_response.py} (91%) rename msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/{get_compatible_hub_content_types_response.py => get_compatible_hub_content_types_get_response.py} (89%) create mode 100644 msgraph/generated/sites/item/content_types/item/is_published/is_published_get_response.py delete mode 100644 msgraph/generated/sites/item/content_types/item/is_published/is_published_response.py create mode 100644 msgraph/generated/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/sites/item/get_activities_by_interval/{get_activities_by_interval_response.py => get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/{get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) rename msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/{get_applicable_content_types_for_list_with_list_id_response.py => get_applicable_content_types_for_list_with_list_id_get_response.py} (87%) create mode 100644 msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/{groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py => sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py} (89%) create mode 100644 msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py delete mode 100644 msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_response.py create mode 100644 msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/{get_activities_by_interval_response.py => get_activities_by_interval_get_response.py} (90%) rename msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/{get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py => get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py} (94%) create mode 100644 msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py rename msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/{get_recent_notebooks_with_include_personal_notebooks_response.py => get_recent_notebooks_with_include_personal_notebooks_get_response.py} (89%) rename msgraph/generated/{drives/item/items/item/invite/invite_response.py => sites/item/permissions/item/grant/grant_post_response.py} (92%) rename msgraph/generated/sites/{add/add_response.py => remove/remove_post_response.py} (92%) rename msgraph/generated/solutions/booking_businesses/item/get_staff_availability/{get_staff_availability_response.py => get_staff_availability_post_response.py} (91%) rename msgraph/generated/{chats/get_all_messages/get_all_messages_response.py => teams/get_all_messages/get_all_messages_get_response.py} (91%) rename msgraph/generated/teams/item/channels/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) rename msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/{does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py => does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py} (91%) rename msgraph/generated/{users/item/chats/item/members/add/add_response.py => teams/item/channels/item/members/add/add_post_response.py} (93%) rename msgraph/generated/{users/item/chats/item/messages/delta/delta_response.py => teams/item/channels/item/messages/delta/delta_get_response.py} (93%) rename msgraph/generated/teams/item/channels/item/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/teams/item/group/service_provisioning_errors/count/count_request_builder.py rename msgraph/generated/teams/item/{permission_grants/delta/delta_request_builder.py => group/service_provisioning_errors/service_provisioning_errors_request_builder.py} (65%) rename msgraph/generated/{chats/item/members/add/add_response.py => teams/item/members/add/add_post_response.py} (93%) delete mode 100644 msgraph/generated/teams/item/permission_grants/delta/delta_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py delete mode 100644 msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py delete mode 100644 msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_request_builder.py rename msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/{does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py => does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py} (91%) rename msgraph/generated/{groups/item/team/members/add/add_response.py => teams/item/primary_channel/members/add/add_post_response.py} (93%) rename msgraph/generated/teams/item/primary_channel/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/teamwork/deleted_teams/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) rename msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) create mode 100644 msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py delete mode 100644 msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename msgraph/generated/{users/item/joined_teams/item/primary_channel/members/add/add_response.py => teamwork/deleted_teams/item/channels/item/members/add/add_post_response.py} (93%) rename msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_post_response.py delete mode 100644 msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_response.py create mode 100644 msgraph/generated/users/get_by_ids/get_by_ids_post_response.py delete mode 100644 msgraph/generated/users/get_by_ids/get_by_ids_response.py rename msgraph/generated/users/item/activities/recent/{recent_response.py => recent_get_response.py} (92%) rename msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/{allowed_calendar_sharing_roles_with_user_response.py => allowed_calendar_sharing_roles_with_user_get_response.py} (88%) rename msgraph/generated/{groups/item/calendar/events/delta/delta_response.py => users/item/calendar/calendar_view/delta/delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar/events/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar/events/item/instances/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar/get_schedule/{get_schedule_response.py => get_schedule_post_response.py} (92%) rename msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/{allowed_calendar_sharing_roles_with_user_response.py => allowed_calendar_sharing_roles_with_user_get_response.py} (88%) rename msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/{get_schedule_response.py => get_schedule_post_response.py} (92%) rename msgraph/generated/users/item/calendar_view/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{groups/item/calendar_view/item/instances/delta/delta_response.py => users/item/calendar_view/item/instances/delta/delta_get_response.py} (93%) rename msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/{allowed_calendar_sharing_roles_with_user_response.py => allowed_calendar_sharing_roles_with_user_get_response.py} (88%) rename msgraph/generated/{groups/item/events/item/instances/delta/delta_response.py => users/item/calendars/item/calendar_view/delta/delta_get_response.py} (93%) rename msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/users/item/calendars/item/events/delta/delta_get_response.py delete mode 100644 msgraph/generated/users/item/calendars/item/events/delta/delta_response.py rename msgraph/generated/users/item/calendars/item/events/item/instances/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/calendars/item/get_schedule/{get_schedule_response.py => get_schedule_post_response.py} (92%) rename msgraph/generated/users/item/chats/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) rename msgraph/generated/{groups/item/team/primary_channel/members/add/add_response.py => users/item/chats/item/members/add/add_post_response.py} (93%) rename msgraph/generated/{chats/item/messages/item/replies/delta/delta_response.py => users/item/chats/item/messages/delta/delta_get_response.py} (93%) rename msgraph/generated/users/item/chats/item/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/delta/delta_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/item/restore/restore_request_builder.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py create mode 100644 msgraph/generated/users/item/check_member_groups/check_member_groups_post_response.py delete mode 100644 msgraph/generated/users/item/check_member_groups/check_member_groups_response.py create mode 100644 msgraph/generated/users/item/check_member_objects/check_member_objects_post_response.py delete mode 100644 msgraph/generated/users/item/check_member_objects/check_member_objects_response.py rename msgraph/generated/users/item/contact_folders/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/contact_folders/item/child_folders/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/contact_folders/item/contacts/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/contacts/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/events/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/users/item/events/item/instances/delta/delta_get_response.py delete mode 100644 msgraph/generated/users/item/events/item/instances/delta/delta_response.py rename msgraph/generated/users/item/get_mail_tips/{get_mail_tips_response.py => get_mail_tips_post_response.py} (91%) rename msgraph/generated/users/item/get_managed_app_diagnostic_statuses/{get_managed_app_diagnostic_statuses_response.py => get_managed_app_diagnostic_statuses_get_response.py} (89%) rename msgraph/generated/users/item/get_managed_app_policies/{get_managed_app_policies_response.py => get_managed_app_policies_get_response.py} (90%) create mode 100644 msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_get_response.py delete mode 100644 msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_response.py create mode 100644 msgraph/generated/users/item/get_member_groups/get_member_groups_post_response.py delete mode 100644 msgraph/generated/users/item/get_member_groups/get_member_groups_response.py create mode 100644 msgraph/generated/users/item/get_member_objects/get_member_objects_post_response.py delete mode 100644 msgraph/generated/users/item/get_member_objects/get_member_objects_response.py rename msgraph/generated/users/item/joined_teams/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) rename msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/{get_all_messages_response.py => get_all_messages_get_response.py} (91%) create mode 100644 msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename msgraph/generated/users/item/joined_teams/item/channels/item/members/add/{add_response.py => add_post_response.py} (93%) rename msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) create mode 100644 msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/count/count_request_builder.py rename msgraph/generated/users/item/joined_teams/item/{permission_grants/delta/delta_request_builder.py => group/service_provisioning_errors/service_provisioning_errors_request_builder.py} (65%) rename msgraph/generated/users/item/joined_teams/item/members/add/{add_response.py => add_post_response.py} (93%) delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/item/restore/restore_request_builder.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_request_builder.py create mode 100644 msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py delete mode 100644 msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename msgraph/generated/{teamwork/deleted_teams/item/channels/item/members/add/add_response.py => users/item/joined_teams/item/primary_channel/members/add/add_post_response.py} (93%) rename msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/mail_folders/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/mail_folders/item/child_folders/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/mail_folders/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/{device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py => users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py} (90%) rename msgraph/generated/users/item/messages/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/{get_recent_notebooks_with_include_personal_notebooks_response.py => get_recent_notebooks_with_include_personal_notebooks_get_response.py} (89%) create mode 100644 msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.py delete mode 100644 msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py rename msgraph/generated/users/item/{chats/item/permission_grants/delta/delta_request_builder.py => online_meetings/item/transcripts/count/count_request_builder.py} (65%) create mode 100644 msgraph/generated/users/item/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py create mode 100644 msgraph/generated/users/item/online_meetings/item/transcripts/item/content/content_request_builder.py create mode 100644 msgraph/generated/users/item/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py create mode 100644 msgraph/generated/users/item/online_meetings/item/transcripts/transcripts_request_builder.py rename msgraph/generated/users/item/outlook/supported_languages/{supported_languages_response.py => supported_languages_get_response.py} (91%) rename msgraph/generated/users/item/outlook/supported_time_zones/{supported_time_zones_response.py => supported_time_zones_get_response.py} (91%) rename msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/{supported_time_zones_with_time_zone_standard_response.py => supported_time_zones_with_time_zone_standard_get_response.py} (88%) rename msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/{reminder_view_with_start_date_time_with_end_date_time_response.py => reminder_view_with_start_date_time_with_end_date_time_get_response.py} (87%) create mode 100644 msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_post_response.py delete mode 100644 msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_response.py create mode 100644 msgraph/generated/users/item/service_provisioning_errors/count/count_request_builder.py rename msgraph/generated/{directory/deleted_items/delta/delta_request_builder.py => users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py} (65%) rename msgraph/generated/users/item/todo/lists/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/todo/lists/item/tasks/delta/{delta_response.py => delta_get_response.py} (93%) rename msgraph/generated/users/item/translate_exchange_ids/{translate_exchange_ids_response.py => translate_exchange_ids_post_response.py} (90%) diff --git a/msgraph/generated/admin/admin_request_builder.py b/msgraph/generated/admin/admin_request_builder.py index d25ecacf3a2..f8969a25b07 100644 --- a/msgraph/generated/admin/admin_request_builder.py +++ b/msgraph/generated/admin/admin_request_builder.py @@ -13,6 +13,7 @@ from ..models.admin import Admin from ..models.o_data_errors.o_data_error import ODataError from .edge.edge_request_builder import EdgeRequestBuilder + from .people.people_request_builder import PeopleRequestBuilder from .service_announcement.service_announcement_request_builder import ServiceAnnouncementRequestBuilder from .sharepoint.sharepoint_request_builder import SharepointRequestBuilder @@ -81,14 +82,14 @@ def to_get_request_information(self,request_configuration: Optional[AdminRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Admin] = None, request_configuration: Optional[AdminRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -101,13 +102,13 @@ def to_patch_request_information(self,body: Optional[Admin] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -130,6 +131,15 @@ def edge(self) -> EdgeRequestBuilder: return EdgeRequestBuilder(self.request_adapter, self.path_parameters) + @property + def people(self) -> PeopleRequestBuilder: + """ + Provides operations to manage the people property of the microsoft.graph.admin entity. + """ + from .people.people_request_builder import PeopleRequestBuilder + + return PeopleRequestBuilder(self.request_adapter, self.path_parameters) + @property def service_announcement(self) -> ServiceAnnouncementRequestBuilder: """ diff --git a/msgraph/generated/admin/edge/edge_request_builder.py b/msgraph/generated/admin/edge/edge_request_builder.py index 4a1afe7c1d3..59238a2018f 100644 --- a/msgraph/generated/admin/edge/edge_request_builder.py +++ b/msgraph/generated/admin/edge/edge_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[EdgeReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdgeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[EdgeRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Edge] = None, request_configuration: Optional[EdgeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Edge] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.py index 1c82ac883f3..ad862cd69a6 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[InternetE Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[InternetExplorerModeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[InternetExpl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InternetExplorerMode] = None, request_configuration: Optional[InternetExplorerModeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[InternetExplorerMode] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.py index 8356a250635..78352f741d4 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.py index b0179332bb5..98a56b7a6db 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BrowserSiteListItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a browserSiteList object. + Delete a browserSiteList object. This API is available in the following national cloud deployments. 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/internetexplorermode-delete-sitelists?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[BrowserSiteListItemRequest async def get(self,request_configuration: Optional[BrowserSiteListItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BrowserSiteList]: """ - Get a browserSiteList that contains browserSite and browserSharedCookie resources. + Get a browserSiteList that contains browserSite and browserSharedCookie resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSiteList] Find more info here: https://learn.microsoft.com/graph/api/browsersitelist-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[BrowserSiteListItemRequestBui async def patch(self,body: Optional[BrowserSiteList] = None, request_configuration: Optional[BrowserSiteListItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BrowserSiteList]: """ - Update the properties of a browserSiteList object. + Update the properties of a browserSiteList object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSiteList] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[BrowserSiteList] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[BrowserSiteListItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a browserSiteList object. + Delete a browserSiteList object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BrowserSiteListItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a browserSiteList that contains browserSite and browserSharedCookie resources. + Get a browserSiteList that contains browserSite and browserSharedCookie resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BrowserSiteList] = None, request_configuration: Optional[BrowserSiteListItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a browserSiteList object. + Update the properties of a browserSiteList object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[BrowserSiteList] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class BrowserSiteListItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class BrowserSiteListItemRequestBuilderGetQueryParameters(): """ - Get a browserSiteList that contains browserSite and browserSharedCookie resources. + Get a browserSiteList that contains browserSite and browserSharedCookie resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.py index a6bd1498aa6..2a4eb1646d9 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[PublishPostRequestBody] = None, request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> Optional[BrowserSiteList]: """ - Publish the specified browserSiteList for devices to download. + Publish the specified browserSiteList for devices to download. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSiteList] @@ -54,7 +54,7 @@ async def post(self,body: Optional[PublishPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[PublishPostRequestBody] = None, request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publish the specified browserSiteList for devices to download. + Publish the specified browserSiteList for devices to download. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[PublishPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.py index f380b3ed1b8..d849f31dbaf 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.py index 97cfc3164a8..8fde0ab7536 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a browserSharedCookie from a browserSiteList. + Delete a browserSharedCookie from a browserSiteList. This API is available in the following national cloud deployments. 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/browsersitelist-delete-sharedcookies?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[BrowserSharedCookieItemReq async def get(self,request_configuration: Optional[BrowserSharedCookieItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BrowserSharedCookie]: """ - Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. + Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSharedCookie] Find more info here: https://learn.microsoft.com/graph/api/browsersharedcookie-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[BrowserSharedCookieItemReques async def patch(self,body: Optional[BrowserSharedCookie] = None, request_configuration: Optional[BrowserSharedCookieItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BrowserSharedCookie]: """ - Update the properties of a browserSharedCookie object. + Update the properties of a browserSharedCookie object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSharedCookie] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[BrowserSharedCookie] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[BrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a browserSharedCookie from a browserSiteList. + Delete a browserSharedCookie from a browserSiteList. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BrowserSharedCookieItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. + Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BrowserSharedCookie] = None, request_configuration: Optional[BrowserSharedCookieItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a browserSharedCookie object. + Update the properties of a browserSharedCookie object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[BrowserSharedCookie] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class BrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class BrowserSharedCookieItemRequestBuilderGetQueryParameters(): """ - Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. + Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.py index 45a08c7f18a..27d0e89e162 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.py @@ -45,7 +45,7 @@ def by_browser_shared_cookie_id(self,browser_shared_cookie_id: str) -> BrowserSh async def get(self,request_configuration: Optional[SharedCookiesRequestBuilderGetRequestConfiguration] = None) -> Optional[BrowserSharedCookieCollectionResponse]: """ - Get a list of the browserSharedCookie objects and their properties. + Get a list of the browserSharedCookie objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSharedCookieCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/browsersitelist-list-sharedcookies?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SharedCookiesRequestBuilderGe async def post(self,body: Optional[BrowserSharedCookie] = None, request_configuration: Optional[SharedCookiesRequestBuilderPostRequestConfiguration] = None) -> Optional[BrowserSharedCookie]: """ - Create a new browserSharedCookie object in a browserSiteList. + Create a new browserSharedCookie object in a browserSiteList. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSharedCookie] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BrowserSharedCookie] = None, request_configur def to_get_request_information(self,request_configuration: Optional[SharedCookiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the browserSharedCookie objects and their properties. + Get a list of the browserSharedCookie objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BrowserSharedCookie] = None, request_configuration: Optional[SharedCookiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new browserSharedCookie object in a browserSiteList. + Create a new browserSharedCookie object in a browserSiteList. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BrowserSharedCookie] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedCookiesRequestBuilderGetQueryParameters(): """ - Get a list of the browserSharedCookie objects and their properties. + Get a list of the browserSharedCookie objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.py index 84b318befef..91417cbc219 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.py index 5cff203e61c..e57c99ca958 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BrowserSiteItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a browserSite from a browserSiteList. + Delete a browserSite from a browserSiteList. This API is available in the following national cloud deployments. 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/browsersitelist-delete-sites?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[BrowserSiteItemRequestBuil async def get(self,request_configuration: Optional[BrowserSiteItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BrowserSite]: """ - Get a browserSite that resides on a browserSiteList. + Get a browserSite that resides on a browserSiteList. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSite] Find more info here: https://learn.microsoft.com/graph/api/browsersite-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[BrowserSiteItemRequestBuilder async def patch(self,body: Optional[BrowserSite] = None, request_configuration: Optional[BrowserSiteItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BrowserSite]: """ - Update the properties of a browserSite object. + Update the properties of a browserSite object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSite] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[BrowserSite] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[BrowserSiteItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a browserSite from a browserSiteList. + Delete a browserSite from a browserSiteList. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BrowserSiteItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a browserSite that resides on a browserSiteList. + Get a browserSite that resides on a browserSiteList. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BrowserSite] = None, request_configuration: Optional[BrowserSiteItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a browserSite object. + Update the properties of a browserSite object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[BrowserSite] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class BrowserSiteItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class BrowserSiteItemRequestBuilderGetQueryParameters(): """ - Get a browserSite that resides on a browserSiteList. + Get a browserSite that resides on a browserSiteList. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.py index 19e796621b9..d580c669432 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.py @@ -45,7 +45,7 @@ def by_browser_site_id(self,browser_site_id: str) -> BrowserSiteItemRequestBuild async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[BrowserSiteCollectionResponse]: """ - Get a list of the browserSite objects and their properties. + Get a list of the browserSite objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSiteCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/browsersitelist-list-sites?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequest async def post(self,body: Optional[BrowserSite] = None, request_configuration: Optional[SitesRequestBuilderPostRequestConfiguration] = None) -> Optional[BrowserSite]: """ - Create a new browserSite object in a browserSiteList. + Create a new browserSite object in a browserSiteList. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSite] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BrowserSite] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the browserSite objects and their properties. + Get a list of the browserSite objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BrowserSite] = None, request_configuration: Optional[SitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new browserSite object in a browserSiteList. + Create a new browserSite object in a browserSiteList. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BrowserSite] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SitesRequestBuilderGetQueryParameters(): """ - Get a list of the browserSite objects and their properties. + Get a list of the browserSite objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.py b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.py index 5bf6a30632e..579c1314a0b 100644 --- a/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.py +++ b/msgraph/generated/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.py @@ -45,7 +45,7 @@ def by_browser_site_list_id(self,browser_site_list_id: str) -> BrowserSiteListIt async def get(self,request_configuration: Optional[SiteListsRequestBuilderGetRequestConfiguration] = None) -> Optional[BrowserSiteListCollectionResponse]: """ - Get a list of the browserSiteList objects and their properties. + Get a list of the browserSiteList objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSiteListCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/internetexplorermode-list-sitelists?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SiteListsRequestBuilderGetReq async def post(self,body: Optional[BrowserSiteList] = None, request_configuration: Optional[SiteListsRequestBuilderPostRequestConfiguration] = None) -> Optional[BrowserSiteList]: """ - Create a new browserSiteList object to support Internet Explorer mode. + Create a new browserSiteList object to support Internet Explorer mode. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BrowserSiteList] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BrowserSiteList] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SiteListsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the browserSiteList objects and their properties. + Get a list of the browserSiteList objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BrowserSiteList] = None, request_configuration: Optional[SiteListsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new browserSiteList object to support Internet Explorer mode. + Create a new browserSiteList object to support Internet Explorer mode. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BrowserSiteList] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SiteListsRequestBuilderGetQueryParameters(): """ - Get a list of the browserSiteList objects and their properties. + Get a list of the browserSiteList objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/people/people_request_builder.py b/msgraph/generated/admin/people/people_request_builder.py new file mode 100644 index 00000000000..1e525827c1e --- /dev/null +++ b/msgraph/generated/admin/people/people_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.people_admin_settings import PeopleAdminSettings + from .profile_card_properties.profile_card_properties_request_builder import ProfileCardPropertiesRequestBuilder + +class PeopleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the people property of the microsoft.graph.admin entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PeopleRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/admin/people{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PeopleRequestBuilderGetRequestConfiguration] = None) -> Optional[PeopleAdminSettings]: + """ + Get people from admin + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PeopleAdminSettings] + """ + 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.people_admin_settings import PeopleAdminSettings + + return await self.request_adapter.send_async(request_info, PeopleAdminSettings, error_mapping) + + async def patch(self,body: Optional[PeopleAdminSettings] = None, request_configuration: Optional[PeopleRequestBuilderPatchRequestConfiguration] = None) -> Optional[PeopleAdminSettings]: + """ + Update the navigation property people in admin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PeopleAdminSettings] + """ + 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.people_admin_settings import PeopleAdminSettings + + return await self.request_adapter.send_async(request_info, PeopleAdminSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PeopleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get people from admin + 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(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[PeopleAdminSettings] = None, request_configuration: Optional[PeopleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property people in admin + param body: The request body + param request_configuration: Configuration for 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(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) -> PeopleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PeopleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PeopleRequestBuilder(self.request_adapter, raw_url) + + @property + def profile_card_properties(self) -> ProfileCardPropertiesRequestBuilder: + """ + Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + """ + from .profile_card_properties.profile_card_properties_request_builder import ProfileCardPropertiesRequestBuilder + + return ProfileCardPropertiesRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PeopleRequestBuilderGetQueryParameters(): + """ + Get people from admin + """ + 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 PeopleRequestBuilderGetRequestConfiguration(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[PeopleRequestBuilder.PeopleRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PeopleRequestBuilderPatchRequestConfiguration(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/admin/people/profile_card_properties/count/count_request_builder.py b/msgraph/generated/admin/people/profile_card_properties/count/count_request_builder.py new file mode 100644 index 00000000000..6434e3d4738 --- /dev/null +++ b/msgraph/generated/admin/people/profile_card_properties/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/admin/people/profileCardProperties/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.py b/msgraph/generated/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.py new file mode 100644 index 00000000000..e8e3107bb8e --- /dev/null +++ b/msgraph/generated/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.py @@ -0,0 +1,214 @@ +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.profile_card_property import ProfileCardProperty + +class ProfileCardPropertyItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ProfileCardPropertyItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/admin/people/profileCardProperties/{profileCardProperty%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[ProfileCardPropertyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property profileCardProperties for admin + 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[ProfileCardPropertyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfileCardProperty]: + """ + Get profileCardProperties from admin + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ProfileCardProperty] + """ + 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.profile_card_property import ProfileCardProperty + + return await self.request_adapter.send_async(request_info, ProfileCardProperty, error_mapping) + + async def patch(self,body: Optional[ProfileCardProperty] = None, request_configuration: Optional[ProfileCardPropertyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ProfileCardProperty]: + """ + Update the navigation property profileCardProperties in admin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ProfileCardProperty] + """ + 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.profile_card_property import ProfileCardProperty + + return await self.request_adapter.send_async(request_info, ProfileCardProperty, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[ProfileCardPropertyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property profileCardProperties for admin + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[ProfileCardPropertyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get profileCardProperties from admin + 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(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[ProfileCardProperty] = None, request_configuration: Optional[ProfileCardPropertyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property profileCardProperties in admin + param body: The request body + param request_configuration: Configuration for 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(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) -> ProfileCardPropertyItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ProfileCardPropertyItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ProfileCardPropertyItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ProfileCardPropertyItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class ProfileCardPropertyItemRequestBuilderGetQueryParameters(): + """ + Get profileCardProperties from admin + """ + 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 ProfileCardPropertyItemRequestBuilderGetRequestConfiguration(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[ProfileCardPropertyItemRequestBuilder.ProfileCardPropertyItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ProfileCardPropertyItemRequestBuilderPatchRequestConfiguration(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/admin/people/profile_card_properties/profile_card_properties_request_builder.py b/msgraph/generated/admin/people/profile_card_properties/profile_card_properties_request_builder.py new file mode 100644 index 00000000000..8532d33767e --- /dev/null +++ b/msgraph/generated/admin/people/profile_card_properties/profile_card_properties_request_builder.py @@ -0,0 +1,226 @@ +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.profile_card_property import ProfileCardProperty + from ....models.profile_card_property_collection_response import ProfileCardPropertyCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.profile_card_property_item_request_builder import ProfileCardPropertyItemRequestBuilder + +class ProfileCardPropertiesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ProfileCardPropertiesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/admin/people/profileCardProperties{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_profile_card_property_id(self,profile_card_property_id: str) -> ProfileCardPropertyItemRequestBuilder: + """ + Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + param profile_card_property_id: The unique identifier of profileCardProperty + Returns: ProfileCardPropertyItemRequestBuilder + """ + if not profile_card_property_id: + raise TypeError("profile_card_property_id cannot be null.") + from .item.profile_card_property_item_request_builder import ProfileCardPropertyItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["profileCardProperty%2Did"] = profile_card_property_id + return ProfileCardPropertyItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ProfileCardPropertiesRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfileCardPropertyCollectionResponse]: + """ + Get profileCardProperties from admin + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ProfileCardPropertyCollectionResponse] + """ + 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.profile_card_property_collection_response import ProfileCardPropertyCollectionResponse + + return await self.request_adapter.send_async(request_info, ProfileCardPropertyCollectionResponse, error_mapping) + + async def post(self,body: Optional[ProfileCardProperty] = None, request_configuration: Optional[ProfileCardPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[ProfileCardProperty]: + """ + Create new navigation property to profileCardProperties for admin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ProfileCardProperty] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.profile_card_property import ProfileCardProperty + + return await self.request_adapter.send_async(request_info, ProfileCardProperty, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ProfileCardPropertiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get profileCardProperties from admin + 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(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[ProfileCardProperty] = None, request_configuration: Optional[ProfileCardPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to profileCardProperties for admin + param body: The request body + param request_configuration: Configuration for 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(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) -> ProfileCardPropertiesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ProfileCardPropertiesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ProfileCardPropertiesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ProfileCardPropertiesRequestBuilderGetQueryParameters(): + """ + Get profileCardProperties from admin + """ + 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 ProfileCardPropertiesRequestBuilderGetRequestConfiguration(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[ProfileCardPropertiesRequestBuilder.ProfileCardPropertiesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ProfileCardPropertiesRequestBuilderPostRequestConfiguration(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/admin/service_announcement/health_overviews/count/count_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/count/count_request_builder.py index e572b52a05f..6139a0b6999 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/count/count_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/health_overviews/health_overviews_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/health_overviews_request_builder.py index de2e579d1dc..41fdfd212c2 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/health_overviews_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/health_overviews_request_builder.py @@ -45,7 +45,7 @@ def by_service_health_id(self,service_health_id: str) -> ServiceHealthItemReques async def get(self,request_configuration: Optional[HealthOverviewsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceHealthCollectionResponse]: """ - Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. + Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceHealthCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceannouncement-list-healthoverviews?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ServiceHealth] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[HealthOverviewsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. + Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceHealth] = None, request_configuration: Optional[HealthOverviewsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ServiceHealth] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HealthOverviewsRequestBuilderGetQueryParameters(): """ - Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. + Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.py index 736683f90a0..3c7c952ddc2 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/issues_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/issues_request_builder.py index 47a169be2bd..cdd70801b78 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/issues_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/issues_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[IssuesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceHealthIssue] = None, request_configuration: Optional[IssuesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ServiceHealthIssue] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.py index b0485386eb8..a16c31052f9 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[IncidentRepo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> IncidentReportRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.py index d15b0dd7d1e..ba945f9d8bc 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ServiceHe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServiceHealthIssueItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ServiceHealt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceHealthIssue] = None, request_configuration: Optional[ServiceHealthIssueItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ServiceHealthIssue] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/health_overviews/item/service_health_item_request_builder.py b/msgraph/generated/admin/service_announcement/health_overviews/item/service_health_item_request_builder.py index db286c8b0c3..0b592779ba4 100644 --- a/msgraph/generated/admin/service_announcement/health_overviews/item/service_health_item_request_builder.py +++ b/msgraph/generated/admin/service_announcement/health_overviews/item/service_health_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ServiceHealthItemRequestBu async def get(self,request_configuration: Optional[ServiceHealthItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceHealth]: """ - Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. + Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceHealth] Find more info here: https://learn.microsoft.com/graph/api/servicehealth-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ServiceHe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServiceHealthItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. + Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceHealth] = None, request_configuration: Optional[ServiceHealthItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ServiceHealth] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ServiceHealthItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ServiceHealthItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. + Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/issues/count/count_request_builder.py b/msgraph/generated/admin/service_announcement/issues/count/count_request_builder.py index 54fa7c754ae..17511408bdc 100644 --- a/msgraph/generated/admin/service_announcement/issues/count/count_request_builder.py +++ b/msgraph/generated/admin/service_announcement/issues/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/issues/issues_request_builder.py b/msgraph/generated/admin/service_announcement/issues/issues_request_builder.py index 38b6a162b4d..25091592518 100644 --- a/msgraph/generated/admin/service_announcement/issues/issues_request_builder.py +++ b/msgraph/generated/admin/service_announcement/issues/issues_request_builder.py @@ -45,7 +45,7 @@ def by_service_health_issue_id(self,service_health_issue_id: str) -> ServiceHeal async def get(self,request_configuration: Optional[IssuesRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceHealthIssueCollectionResponse]: """ - Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. + Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceHealthIssueCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceannouncement-list-issues?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ServiceHealthIssue] = None, request_configura def to_get_request_information(self,request_configuration: Optional[IssuesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. + Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceHealthIssue] = None, request_configuration: Optional[IssuesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ServiceHealthIssue] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IssuesRequestBuilderGetQueryParameters(): """ - Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. + Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.py b/msgraph/generated/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.py index d3d37810cbd..933f8e24ff8 100644 --- a/msgraph/generated/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.py +++ b/msgraph/generated/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[IncidentRepo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> IncidentReportRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/issues/item/service_health_issue_item_request_builder.py b/msgraph/generated/admin/service_announcement/issues/item/service_health_issue_item_request_builder.py index 044893382e0..da68e3a7e6d 100644 --- a/msgraph/generated/admin/service_announcement/issues/item/service_health_issue_item_request_builder.py +++ b/msgraph/generated/admin/service_announcement/issues/item/service_health_issue_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ServiceHealthIssueItemRequ async def get(self,request_configuration: Optional[ServiceHealthIssueItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceHealthIssue]: """ - Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. + Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceHealthIssue] Find more info here: https://learn.microsoft.com/graph/api/servicehealthissue-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ServiceHe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServiceHealthIssueItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. + Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceHealthIssue] = None, request_configuration: Optional[ServiceHealthIssueItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ServiceHealthIssue] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ServiceHealthIssueItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ServiceHealthIssueItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. + Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_response.py b/msgraph/generated/admin/service_announcement/messages/archive/archive_post_response.py similarity index 91% rename from msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_response.py rename to msgraph/generated/admin/service_announcement/messages/archive/archive_post_response.py index 7e0c9f380cc..8623e7da06c 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_response.py +++ b/msgraph/generated/admin/service_announcement/messages/archive/archive_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): +class ArchivePostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ArchivePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: IsPublishedResponse + Returns: ArchivePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return IsPublishedResponse() + return ArchivePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/admin/service_announcement/messages/archive/archive_request_builder.py b/msgraph/generated/admin/service_announcement/messages/archive/archive_request_builder.py index 310d88a2ef7..bfb0bbc03a7 100644 --- a/msgraph/generated/admin/service_announcement/messages/archive/archive_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/archive/archive_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .archive_post_request_body import ArchivePostRequestBody - from .archive_response import ArchiveResponse + from .archive_post_response import ArchivePostResponse class ArchiveRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/archive", path_parameters) - async def post(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> Optional[ArchiveResponse]: + async def post(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> Optional[ArchivePostResponse]: """ - Archive a list of serviceUpdateMessages for the signed in user. + Archive a list of serviceUpdateMessages for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[ArchiveResponse] + Returns: Optional[ArchivePostResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-archive?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[ArchivePostRequestBody] = None, request_confi } if not self.request_adapter: raise Exception("Http core is null") - from .archive_response import ArchiveResponse + from .archive_post_response import ArchivePostResponse - return await self.request_adapter.send_async(request_info, ArchiveResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ArchivePostResponse, error_mapping) def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Archive a list of serviceUpdateMessages for the signed in user. + Archive a list of serviceUpdateMessages for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/count/count_request_builder.py b/msgraph/generated/admin/service_announcement/messages/count/count_request_builder.py index 86a1b1202d7..4c199401350 100644 --- a/msgraph/generated/admin/service_announcement/messages/count/count_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/messages/archive/archive_response.py b/msgraph/generated/admin/service_announcement/messages/favorite/favorite_post_response.py similarity index 91% rename from msgraph/generated/admin/service_announcement/messages/archive/archive_response.py rename to msgraph/generated/admin/service_announcement/messages/favorite/favorite_post_response.py index 23c93aacb89..8c6449f9719 100644 --- a/msgraph/generated/admin/service_announcement/messages/archive/archive_response.py +++ b/msgraph/generated/admin/service_announcement/messages/favorite/favorite_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class ArchiveResponse(AdditionalDataHolder, BackedModel, Parsable): +class FavoritePostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class ArchiveResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ArchiveResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FavoritePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ArchiveResponse + Returns: FavoritePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ArchiveResponse() + return FavoritePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/admin/service_announcement/messages/favorite/favorite_request_builder.py b/msgraph/generated/admin/service_announcement/messages/favorite/favorite_request_builder.py index 210f4316051..aaf225b38f0 100644 --- a/msgraph/generated/admin/service_announcement/messages/favorite/favorite_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/favorite/favorite_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .favorite_post_request_body import FavoritePostRequestBody - from .favorite_response import FavoriteResponse + from .favorite_post_response import FavoritePostResponse class FavoriteRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/favorite", path_parameters) - async def post(self,body: Optional[FavoritePostRequestBody] = None, request_configuration: Optional[FavoriteRequestBuilderPostRequestConfiguration] = None) -> Optional[FavoriteResponse]: + async def post(self,body: Optional[FavoritePostRequestBody] = None, request_configuration: Optional[FavoriteRequestBuilderPostRequestConfiguration] = None) -> Optional[FavoritePostResponse]: """ - Change the status of a list of serviceUpdateMessages to favorite for the signed in user. + Change the status of a list of serviceUpdateMessages to favorite for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FavoriteResponse] + Returns: Optional[FavoritePostResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-favorite?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[FavoritePostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .favorite_response import FavoriteResponse + from .favorite_post_response import FavoritePostResponse - return await self.request_adapter.send_async(request_info, FavoriteResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FavoritePostResponse, error_mapping) def to_post_request_information(self,body: Optional[FavoritePostRequestBody] = None, request_configuration: Optional[FavoriteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Change the status of a list of serviceUpdateMessages to favorite for the signed in user. + Change the status of a list of serviceUpdateMessages to favorite for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[FavoritePostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/item/attachments/attachments_request_builder.py b/msgraph/generated/admin/service_announcement/messages/item/attachments/attachments_request_builder.py index 197cdeb4c9e..1e881f20dc2 100644 --- a/msgraph/generated/admin/service_announcement/messages/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/item/attachments/attachments_request_builder.py @@ -45,7 +45,7 @@ def by_service_announcement_attachment_id(self,service_announcement_attachment_i async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceAnnouncementAttachmentCollectionResponse]: """ - Get the list of attachments associated with a service message. + Get the list of attachments associated with a service message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceAnnouncementAttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-list-attachments?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ServiceAnnouncementAttachment] = None, reques def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of attachments associated with a service message. + Get the list of attachments associated with a service message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceAnnouncementAttachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ServiceAnnouncementAttachmen if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Get the list of attachments associated with a service message. + Get the list of attachments associated with a service message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/messages/item/attachments/count/count_request_builder.py b/msgraph/generated/admin/service_announcement/messages/item/attachments/count/count_request_builder.py index 0714ded6b0d..6a8ca562694 100644 --- a/msgraph/generated/admin/service_announcement/messages/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.py b/msgraph/generated/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.py index 805e730f55a..df7cde7d0bd 100644 --- a/msgraph/generated/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.py b/msgraph/generated/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.py index e37911b9d9c..b57bf4191d8 100644 --- a/msgraph/generated/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ServiceAnnouncementAttachm async def get(self,request_configuration: Optional[ServiceAnnouncementAttachmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceAnnouncementAttachment]: """ - Read the properties and relationships of a serviceAnnouncementAttachment object. + Read the properties and relationships of a serviceAnnouncementAttachment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceAnnouncementAttachment] Find more info here: https://learn.microsoft.com/graph/api/serviceannouncementattachment-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ServiceAn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServiceAnnouncementAttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a serviceAnnouncementAttachment object. + Read the properties and relationships of a serviceAnnouncementAttachment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceAnnouncementAttachment] = None, request_configuration: Optional[ServiceAnnouncementAttachmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ServiceAnnouncementAttachme if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ServiceAnnouncementAttachmentItemRequestBuilderDeleteRequestConfiguration( @dataclass class ServiceAnnouncementAttachmentItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a serviceAnnouncementAttachment object. + Read the properties and relationships of a serviceAnnouncementAttachment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.py b/msgraph/generated/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.py index d484e50ec52..d39759d8361 100644 --- a/msgraph/generated/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentsA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[AttachmentsArchiveRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/item/service_update_message_item_request_builder.py b/msgraph/generated/admin/service_announcement/messages/item/service_update_message_item_request_builder.py index 79c8cc7edb2..2576b31b1a3 100644 --- a/msgraph/generated/admin/service_announcement/messages/item/service_update_message_item_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/item/service_update_message_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ServiceUpdateMessageItemRe async def get(self,request_configuration: Optional[ServiceUpdateMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceUpdateMessage]: """ - Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. + Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceUpdateMessage] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[ServiceUp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServiceUpdateMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. + Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceUpdateMessage] = None, request_configuration: Optional[ServiceUpdateMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ServiceUpdateMessage] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class ServiceUpdateMessageItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class ServiceUpdateMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. + Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/messages/favorite/favorite_response.py b/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_post_response.py similarity index 91% rename from msgraph/generated/admin/service_announcement/messages/favorite/favorite_response.py rename to msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_post_response.py index 45470b891c0..ba02696ccad 100644 --- a/msgraph/generated/admin/service_announcement/messages/favorite/favorite_response.py +++ b/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class FavoriteResponse(AdditionalDataHolder, BackedModel, Parsable): +class MarkReadPostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class FavoriteResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FavoriteResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MarkReadPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FavoriteResponse + Returns: MarkReadPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FavoriteResponse() + return MarkReadPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_request_builder.py b/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_request_builder.py index 53aa1992eac..77b20d476a3 100644 --- a/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .mark_read_post_request_body import MarkReadPostRequestBody - from .mark_read_response import MarkReadResponse + from .mark_read_post_response import MarkReadPostResponse class MarkReadRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/markRead", path_parameters) - async def post(self,body: Optional[MarkReadPostRequestBody] = None, request_configuration: Optional[MarkReadRequestBuilderPostRequestConfiguration] = None) -> Optional[MarkReadResponse]: + async def post(self,body: Optional[MarkReadPostRequestBody] = None, request_configuration: Optional[MarkReadRequestBuilderPostRequestConfiguration] = None) -> Optional[MarkReadPostResponse]: """ - Mark a list of serviceUpdateMessages as read for the signed in user. + Mark a list of serviceUpdateMessages as read for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[MarkReadResponse] + Returns: Optional[MarkReadPostResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-markread?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[MarkReadPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .mark_read_response import MarkReadResponse + from .mark_read_post_response import MarkReadPostResponse - return await self.request_adapter.send_async(request_info, MarkReadResponse, error_mapping) + return await self.request_adapter.send_async(request_info, MarkReadPostResponse, error_mapping) def to_post_request_information(self,body: Optional[MarkReadPostRequestBody] = None, request_configuration: Optional[MarkReadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mark a list of serviceUpdateMessages as read for the signed in user. + Mark a list of serviceUpdateMessages as read for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MarkReadPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_post_response.py b/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_post_response.py new file mode 100644 index 00000000000..f7532d6c927 --- /dev/null +++ b/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_post_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 MarkUnreadPostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MarkUnreadPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MarkUnreadPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MarkUnreadPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.py b/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.py index cbfbead5d41..0a248ed56a9 100644 --- a/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .mark_unread_post_request_body import MarkUnreadPostRequestBody - from .mark_unread_response import MarkUnreadResponse + from .mark_unread_post_response import MarkUnreadPostResponse class MarkUnreadRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/markUnread", path_parameters) - async def post(self,body: Optional[MarkUnreadPostRequestBody] = None, request_configuration: Optional[MarkUnreadRequestBuilderPostRequestConfiguration] = None) -> Optional[MarkUnreadResponse]: + async def post(self,body: Optional[MarkUnreadPostRequestBody] = None, request_configuration: Optional[MarkUnreadRequestBuilderPostRequestConfiguration] = None) -> Optional[MarkUnreadPostResponse]: """ - Mark a list of serviceUpdateMessages as unread for the signed in user. + Mark a list of serviceUpdateMessages as unread for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[MarkUnreadResponse] + Returns: Optional[MarkUnreadPostResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-markunread?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[MarkUnreadPostRequestBody] = None, request_co } if not self.request_adapter: raise Exception("Http core is null") - from .mark_unread_response import MarkUnreadResponse + from .mark_unread_post_response import MarkUnreadPostResponse - return await self.request_adapter.send_async(request_info, MarkUnreadResponse, error_mapping) + return await self.request_adapter.send_async(request_info, MarkUnreadPostResponse, error_mapping) def to_post_request_information(self,body: Optional[MarkUnreadPostRequestBody] = None, request_configuration: Optional[MarkUnreadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mark a list of serviceUpdateMessages as unread for the signed in user. + Mark a list of serviceUpdateMessages as unread for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MarkUnreadPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/messages_request_builder.py b/msgraph/generated/admin/service_announcement/messages/messages_request_builder.py index f880898f92a..05e59fa2c78 100644 --- a/msgraph/generated/admin/service_announcement/messages/messages_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/messages_request_builder.py @@ -51,7 +51,7 @@ def by_service_update_message_id(self,service_update_message_id: str) -> Service async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceUpdateMessageCollectionResponse]: """ - Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. + Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServiceUpdateMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceannouncement-list-messages?view=graph-rest-1.0 @@ -97,19 +97,19 @@ async def post(self,body: Optional[ServiceUpdateMessage] = None, request_configu def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. + Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceUpdateMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -122,13 +122,13 @@ def to_post_request_information(self,body: Optional[ServiceUpdateMessage] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ def unfavorite(self) -> UnfavoriteRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. + Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_post_response.py b/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_post_response.py new file mode 100644 index 00000000000..15736f7693d --- /dev/null +++ b/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_post_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 UnarchivePostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> UnarchivePostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: UnarchivePostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return UnarchivePostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_request_builder.py b/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_request_builder.py index 86df2e3b97e..81391fbba57 100644 --- a/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .unarchive_post_request_body import UnarchivePostRequestBody - from .unarchive_response import UnarchiveResponse + from .unarchive_post_response import UnarchivePostResponse class UnarchiveRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/unarchive", path_parameters) - async def post(self,body: Optional[UnarchivePostRequestBody] = None, request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> Optional[UnarchiveResponse]: + async def post(self,body: Optional[UnarchivePostRequestBody] = None, request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> Optional[UnarchivePostResponse]: """ - Unarchive a list of serviceUpdateMessages for the signed in user. + Unarchive a list of serviceUpdateMessages for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[UnarchiveResponse] + Returns: Optional[UnarchivePostResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-unarchive?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[UnarchivePostRequestBody] = None, request_con } if not self.request_adapter: raise Exception("Http core is null") - from .unarchive_response import UnarchiveResponse + from .unarchive_post_response import UnarchivePostResponse - return await self.request_adapter.send_async(request_info, UnarchiveResponse, error_mapping) + return await self.request_adapter.send_async(request_info, UnarchivePostResponse, error_mapping) def to_post_request_information(self,body: Optional[UnarchivePostRequestBody] = None, request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unarchive a list of serviceUpdateMessages for the signed in user. + Unarchive a list of serviceUpdateMessages for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UnarchivePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_post_response.py b/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_post_response.py new file mode 100644 index 00000000000..e3f1befe10b --- /dev/null +++ b/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_post_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 UnfavoritePostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> UnfavoritePostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: UnfavoritePostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return UnfavoritePostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.py b/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.py index 6e6776ef15b..1871242164e 100644 --- a/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.py +++ b/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .unfavorite_post_request_body import UnfavoritePostRequestBody - from .unfavorite_response import UnfavoriteResponse + from .unfavorite_post_response import UnfavoritePostResponse class UnfavoriteRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/unfavorite", path_parameters) - async def post(self,body: Optional[UnfavoritePostRequestBody] = None, request_configuration: Optional[UnfavoriteRequestBuilderPostRequestConfiguration] = None) -> Optional[UnfavoriteResponse]: + async def post(self,body: Optional[UnfavoritePostRequestBody] = None, request_configuration: Optional[UnfavoriteRequestBuilderPostRequestConfiguration] = None) -> Optional[UnfavoritePostResponse]: """ - Remove the favorite status of serviceUpdateMessages for the signed in user. + Remove the favorite status of serviceUpdateMessages for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[UnfavoriteResponse] + Returns: Optional[UnfavoritePostResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceupdatemessage-unfavorite?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[UnfavoritePostRequestBody] = None, request_co } if not self.request_adapter: raise Exception("Http core is null") - from .unfavorite_response import UnfavoriteResponse + from .unfavorite_post_response import UnfavoritePostResponse - return await self.request_adapter.send_async(request_info, UnfavoriteResponse, error_mapping) + return await self.request_adapter.send_async(request_info, UnfavoritePostResponse, error_mapping) def to_post_request_information(self,body: Optional[UnfavoritePostRequestBody] = None, request_configuration: Optional[UnfavoriteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the favorite status of serviceUpdateMessages for the signed in user. + Remove the favorite status of serviceUpdateMessages for the signed in user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UnfavoritePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_response.py b/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_response.py deleted file mode 100644 index af6382bbb13..00000000000 --- a/msgraph/generated/admin/service_announcement/messages/unfavorite/unfavorite_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 UnfavoriteResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> UnfavoriteResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: UnfavoriteResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return UnfavoriteResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/admin/service_announcement/service_announcement_request_builder.py b/msgraph/generated/admin/service_announcement/service_announcement_request_builder.py index 510f81920ce..029377c589b 100644 --- a/msgraph/generated/admin/service_announcement/service_announcement_request_builder.py +++ b/msgraph/generated/admin/service_announcement/service_announcement_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ServiceAn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServiceAnnouncementRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ServiceAnnou Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServiceAnnouncement] = None, request_configuration: Optional[ServiceAnnouncementRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ServiceAnnouncement] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/admin/sharepoint/settings/settings_request_builder.py b/msgraph/generated/admin/sharepoint/settings/settings_request_builder.py index 75024b37e03..4cd9cf011a0 100644 --- a/msgraph/generated/admin/sharepoint/settings/settings_request_builder.py +++ b/msgraph/generated/admin/sharepoint/settings/settings_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SettingsRequestBuilderDele async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharepointSettings]: """ - Get the tenant-level settings for SharePoint and OneDrive. + Get the tenant-level settings for SharePoint and OneDrive. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharepointSettings] Find more info here: https://learn.microsoft.com/graph/api/sharepointsettings-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequ async def patch(self,body: Optional[SharepointSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[SharepointSettings]: """ - Update one or more tenant-level settings for SharePoint and OneDrive. + Update one or more tenant-level settings for SharePoint and OneDrive. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharepointSettings] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[SettingsR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the tenant-level settings for SharePoint and OneDrive. + Get the tenant-level settings for SharePoint and OneDrive. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharepointSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update one or more tenant-level settings for SharePoint and OneDrive. + Update one or more tenant-level settings for SharePoint and OneDrive. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[SharepointSettings] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class SettingsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class SettingsRequestBuilderGetQueryParameters(): """ - Get the tenant-level settings for SharePoint and OneDrive. + Get the tenant-level settings for SharePoint and OneDrive. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/sharepoint/sharepoint_request_builder.py b/msgraph/generated/admin/sharepoint/sharepoint_request_builder.py index ed090af7542..36bbf838143 100644 --- a/msgraph/generated/admin/sharepoint/sharepoint_request_builder.py +++ b/msgraph/generated/admin/sharepoint/sharepoint_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Sharepoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharepointRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[SharepointRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Sharepoint] = None, request_configuration: Optional[SharepointRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Sharepoint] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreement_acceptances/agreement_acceptances_request_builder.py b/msgraph/generated/agreement_acceptances/agreement_acceptances_request_builder.py index 9a159615eed..784047bab6d 100644 --- a/msgraph/generated/agreement_acceptances/agreement_acceptances_request_builder.py +++ b/msgraph/generated/agreement_acceptances/agreement_acceptances_request_builder.py @@ -94,14 +94,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AgreementAcceptancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -114,13 +114,13 @@ def to_post_request_information(self,body: Optional[AgreementAcceptance] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreement_acceptances/item/agreement_acceptance_item_request_builder.py b/msgraph/generated/agreement_acceptances/item/agreement_acceptance_item_request_builder.py index f43b25f01bc..c0fb10c6ad4 100644 --- a/msgraph/generated/agreement_acceptances/item/agreement_acceptance_item_request_builder.py +++ b/msgraph/generated/agreement_acceptances/item/agreement_acceptance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementAcceptanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AgreementAcceptanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementAcceptance] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/agreements_request_builder.py b/msgraph/generated/agreements/agreements_request_builder.py index fa405dfaa03..eeeffa2a234 100644 --- a/msgraph/generated/agreements/agreements_request_builder.py +++ b/msgraph/generated/agreements/agreements_request_builder.py @@ -94,14 +94,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Agreement] = None, request_configuration: Optional[AgreementsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -114,13 +114,13 @@ def to_post_request_information(self,body: Optional[Agreement] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/item/acceptances/acceptances_request_builder.py b/msgraph/generated/agreements/item/acceptances/acceptances_request_builder.py index 23309730b18..0bc74b54eeb 100644 --- a/msgraph/generated/agreements/item/acceptances/acceptances_request_builder.py +++ b/msgraph/generated/agreements/item/acceptances/acceptances_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_acceptance_id(self,agreement_acceptance_id: str) -> AgreementAc async def get(self,request_configuration: Optional[AcceptancesRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementAcceptanceCollectionResponse]: """ - Get the details about the acceptance records for a specific agreement. + Get the details about the acceptance records for a specific agreement. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementAcceptanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/agreement-list-acceptances?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AgreementAcceptance] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AcceptancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the details about the acceptance records for a specific agreement. + Get the details about the acceptance records for a specific agreement. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AcceptancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AgreementAcceptance] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AcceptancesRequestBuilderGetQueryParameters(): """ - Get the details about the acceptance records for a specific agreement. + Get the details about the acceptance records for a specific agreement. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/agreements/item/acceptances/count/count_request_builder.py b/msgraph/generated/agreements/item/acceptances/count/count_request_builder.py index c6b3c6d82b6..c0493cc81ed 100644 --- a/msgraph/generated/agreements/item/acceptances/count/count_request_builder.py +++ b/msgraph/generated/agreements/item/acceptances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py b/msgraph/generated/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py index 573ef010930..73441831326 100644 --- a/msgraph/generated/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py +++ b/msgraph/generated/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementAcceptanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AgreementAcceptanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementAcceptance] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/item/agreement_item_request_builder.py b/msgraph/generated/agreements/item/agreement_item_request_builder.py index 9ea0e689a21..f8ba04dfe93 100644 --- a/msgraph/generated/agreements/item/agreement_item_request_builder.py +++ b/msgraph/generated/agreements/item/agreement_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Agreement] = None, request_configuration: Optional[AgreementItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Agreement] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/item/file/file_request_builder.py b/msgraph/generated/agreements/item/file/file_request_builder.py index bd5890da66d..2e64d61be36 100644 --- a/msgraph/generated/agreements/item/file/file_request_builder.py +++ b/msgraph/generated/agreements/item/file/file_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[FileRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FileRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFile]: """ - Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. + Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFile] Find more info here: https://learn.microsoft.com/graph/api/agreementfile-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[FileReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FileRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. + Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFile] = None, request_configuration: Optional[FileRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AgreementFile] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class FileRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FileRequestBuilderGetQueryParameters(): """ - Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. + Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/agreements/item/file/localizations/count/count_request_builder.py b/msgraph/generated/agreements/item/file/localizations/count/count_request_builder.py index 74c3576c29b..c641ba7e90a 100644 --- a/msgraph/generated/agreements/item/file/localizations/count/count_request_builder.py +++ b/msgraph/generated/agreements/item/file/localizations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py b/msgraph/generated/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py index 59811acd018..f22cdb14519 100644 --- a/msgraph/generated/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py +++ b/msgraph/generated/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementFil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileLocalization] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/item/file/localizations/item/versions/count/count_request_builder.py b/msgraph/generated/agreements/item/file/localizations/item/versions/count/count_request_builder.py index 8bf773bde6d..129f9903606 100644 --- a/msgraph/generated/agreements/item/file/localizations/item/versions/count/count_request_builder.py +++ b/msgraph/generated/agreements/item/file/localizations/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py b/msgraph/generated/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py index fab8adb941f..98e7cc55024 100644 --- a/msgraph/generated/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py +++ b/msgraph/generated/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AgreementFileVersionItemRe async def get(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersion]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersion] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[AgreementFileVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileVersion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class AgreementFileVersionItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class AgreementFileVersionItemRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/agreements/item/file/localizations/item/versions/versions_request_builder.py b/msgraph/generated/agreements/item/file/localizations/item/versions/versions_request_builder.py index 2c4373eb979..f8e1122d12a 100644 --- a/msgraph/generated/agreements/item/file/localizations/item/versions/versions_request_builder.py +++ b/msgraph/generated/agreements/item/file/localizations/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_file_version_id(self,agreement_file_version_id: str) -> Agreeme async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersionCollectionResponse]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[AgreementFileVersion] = None, request_configu def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AgreementFileVersion] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/agreements/item/file/localizations/localizations_request_builder.py b/msgraph/generated/agreements/item/file/localizations/localizations_request_builder.py index bcf6f8233a5..b06a1ed72d1 100644 --- a/msgraph/generated/agreements/item/file/localizations/localizations_request_builder.py +++ b/msgraph/generated/agreements/item/file/localizations/localizations_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_file_localization_id(self,agreement_file_localization_id: str) async def get(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileLocalizationCollectionResponse]: """ - Get a list of the default and localized agreement files. + Get a list of the default and localized agreement files. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileLocalizationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/agreementfile-list-localizations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AgreementFileLocalization] = None, request_co def to_get_request_information(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the default and localized agreement files. + Get a list of the default and localized agreement files. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[LocalizationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AgreementFileLocalization] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LocalizationsRequestBuilderGetQueryParameters(): """ - Get a list of the default and localized agreement files. + Get a list of the default and localized agreement files. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/agreements/item/files/count/count_request_builder.py b/msgraph/generated/agreements/item/files/count/count_request_builder.py index 0fb51dae9a9..f009ce17554 100644 --- a/msgraph/generated/agreements/item/files/count/count_request_builder.py +++ b/msgraph/generated/agreements/item/files/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/agreements/item/files/files_request_builder.py b/msgraph/generated/agreements/item/files/files_request_builder.py index bbac8a7a687..792a33dea52 100644 --- a/msgraph/generated/agreements/item/files/files_request_builder.py +++ b/msgraph/generated/agreements/item/files/files_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequest async def post(self,body: Optional[AgreementFileLocalization] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[AgreementFileLocalization]: """ - Create a new localized agreement file. + Create a new localized agreement file. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileLocalization] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[FilesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new localized agreement file. + Create a new localized agreement file. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AgreementFileLocalization] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/item/files/item/agreement_file_localization_item_request_builder.py b/msgraph/generated/agreements/item/files/item/agreement_file_localization_item_request_builder.py index a0e828957c8..194b1aa7219 100644 --- a/msgraph/generated/agreements/item/files/item/agreement_file_localization_item_request_builder.py +++ b/msgraph/generated/agreements/item/files/item/agreement_file_localization_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementFil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileLocalization] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/agreements/item/files/item/versions/count/count_request_builder.py b/msgraph/generated/agreements/item/files/item/versions/count/count_request_builder.py index 0ed431f75bd..82e52801fb0 100644 --- a/msgraph/generated/agreements/item/files/item/versions/count/count_request_builder.py +++ b/msgraph/generated/agreements/item/files/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py b/msgraph/generated/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py index 7ba2c97dc6b..e97480d9884 100644 --- a/msgraph/generated/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py +++ b/msgraph/generated/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AgreementFileVersionItemRe async def get(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersion]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersion] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[AgreementFileVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileVersion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class AgreementFileVersionItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class AgreementFileVersionItemRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/agreements/item/files/item/versions/versions_request_builder.py b/msgraph/generated/agreements/item/files/item/versions/versions_request_builder.py index 4d9a3049190..a18e732b3ce 100644 --- a/msgraph/generated/agreements/item/files/item/versions/versions_request_builder.py +++ b/msgraph/generated/agreements/item/files/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_file_version_id(self,agreement_file_version_id: str) -> Agreeme async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersionCollectionResponse]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[AgreementFileVersion] = None, request_configu def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AgreementFileVersion] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/app_catalogs/app_catalogs_request_builder.py b/msgraph/generated/app_catalogs/app_catalogs_request_builder.py index 1fc642c68d3..add4fcebd7a 100644 --- a/msgraph/generated/app_catalogs/app_catalogs_request_builder.py +++ b/msgraph/generated/app_catalogs/app_catalogs_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[AppCatalogsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppCatalogs] = None, request_configuration: Optional[AppCatalogsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[AppCatalogs] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/app_catalogs/teams_apps/count/count_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/count/count_request_builder.py index 2330f953241..d4306db0eb2 100644 --- a/msgraph/generated/app_catalogs/teams_apps/count/count_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.py index d4146f893e4..323389ad996 100644 --- a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[AppDefinitionsRequestBuilderG async def post(self,body: Optional[TeamsAppDefinition] = None, request_configuration: Optional[AppDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsAppDefinition]: """ - Update an app previously published to the Microsoft Teams app catalog. To update an app, the distributionMethod property for the app must be set to organization. This API specifically updates an app published to your organization's app catalog (the tenant app catalog). + Update an app previously published to the Microsoft Teams app catalog. To update an app, the distributionMethod property for the app must be set to organization. This API specifically updates an app published to your organization's app catalog (the tenant app catalog). This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppDefinition] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[AppDefinitio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppDefinition] = None, request_configuration: Optional[AppDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Update an app previously published to the Microsoft Teams app catalog. To update an app, the distributionMethod property for the app must be set to organization. This API specifically updates an app published to your organization's app catalog (the tenant app catalog). + Update an app previously published to the Microsoft Teams app catalog. To update an app, the distributionMethod property for the app must be set to organization. This API specifically updates an app published to your organization's app catalog (the tenant app catalog). This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[TeamsAppDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.py index 3a045d26099..c57a2fdc6f6 100644 --- a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.py index 7e0775c2a0e..89b5a9b2c22 100644 --- a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BotRequestBuilderDeleteReq async def get(self,request_configuration: Optional[BotRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkBot]: """ - Get the bot associated with a specific definition of the TeamsApp. + Get the bot associated with a specific definition of the TeamsApp. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkBot] Find more info here: https://learn.microsoft.com/graph/api/teamworkbot-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[BotReques Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BotRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the bot associated with a specific definition of the TeamsApp. + Get the bot associated with a specific definition of the TeamsApp. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkBot] = None, request_configuration: Optional[BotRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[TeamworkBot] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class BotRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class BotRequestBuilderGetQueryParameters(): """ - Get the bot associated with a specific definition of the TeamsApp. + Get the bot associated with a specific definition of the TeamsApp. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.py index 5ec75a54a09..e12826d9e11 100644 --- a/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.py @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[TeamsAppDefinitionItemRequest async def patch(self,body: Optional[TeamsAppDefinition] = None, request_configuration: Optional[TeamsAppDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsAppDefinition]: """ - Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppDefinition] @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamsAppD Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppDefinition] = None, request_configuration: Optional[TeamsAppDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/app_catalogs/teams_apps/item/teams_app_item_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/item/teams_app_item_request_builder.py index a4a7ad20210..fab50cbabee 100644 --- a/msgraph/generated/app_catalogs/teams_apps/item/teams_app_item_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/item/teams_app_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete teamsApp + This API is available in the following national cloud deployments. 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/teamsapp-delete?view=graph-rest-1.0 @@ -94,17 +94,17 @@ async def patch(self,body: Optional[TeamsApp] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete teamsApp + This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsApp] = None, request_configuration: Optional[TeamsAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TeamsApp] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/app_catalogs/teams_apps/teams_apps_request_builder.py b/msgraph/generated/app_catalogs/teams_apps/teams_apps_request_builder.py index b5e17c6d21c..77e05258ae2 100644 --- a/msgraph/generated/app_catalogs/teams_apps/teams_apps_request_builder.py +++ b/msgraph/generated/app_catalogs/teams_apps/teams_apps_request_builder.py @@ -45,7 +45,7 @@ def by_teams_app_id(self,teams_app_id: str) -> TeamsAppItemRequestBuilder: async def get(self,request_configuration: Optional[TeamsAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppCollectionResponse]: """ - List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. + List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/appcatalogs-list-teamsapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TeamsAppsRequestBuilderGetReq async def post(self,body: Optional[TeamsApp] = None, request_configuration: Optional[TeamsAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsApp]: """ - Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsApp] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TeamsAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. + List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsApp] = None, request_configuration: Optional[TeamsAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsApp] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TeamsAppsRequestBuilderGetQueryParameters(): """ - List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. + List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/application_templates/application_templates_request_builder.py b/msgraph/generated/application_templates/application_templates_request_builder.py index 002fd7408fe..4c74fe11574 100644 --- a/msgraph/generated/application_templates/application_templates_request_builder.py +++ b/msgraph/generated/application_templates/application_templates_request_builder.py @@ -44,7 +44,7 @@ def by_application_template_id(self,application_template_id: str) -> Application async def get(self,request_configuration: Optional[ApplicationTemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[ApplicationTemplateCollectionResponse]: """ - Retrieve a list of applicationTemplate objects from the Azure AD application gallery. + Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApplicationTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/applicationtemplate-list?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[ApplicationTemplatesRequestBu def to_get_request_information(self,request_configuration: Optional[ApplicationTemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of applicationTemplate objects from the Azure AD application gallery. + Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ApplicationTemplatesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ApplicationTemplatesRequestBuilderGetQueryParameters(): """ - Retrieve a list of applicationTemplate objects from the Azure AD application gallery. + Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/application_templates/count/count_request_builder.py b/msgraph/generated/application_templates/count/count_request_builder.py index df64bac964a..8e592f26083 100644 --- a/msgraph/generated/application_templates/count/count_request_builder.py +++ b/msgraph/generated/application_templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/application_templates/item/application_template_item_request_builder.py b/msgraph/generated/application_templates/item/application_template_item_request_builder.py index 0e734fc476f..334138c8a7d 100644 --- a/msgraph/generated/application_templates/item/application_template_item_request_builder.py +++ b/msgraph/generated/application_templates/item/application_template_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[ApplicationTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ApplicationTemplate]: """ - Retrieve the properties of an applicationTemplate object. + Retrieve the properties of an applicationTemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApplicationTemplate] Find more info here: https://learn.microsoft.com/graph/api/applicationtemplate-get?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[ApplicationTemplateItemReques def to_get_request_information(self,request_configuration: Optional[ApplicationTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of an applicationTemplate object. + Retrieve the properties of an applicationTemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ApplicationTemplateItemRequestBuilder: @@ -88,7 +88,7 @@ def instantiate(self) -> InstantiateRequestBuilder: @dataclass class ApplicationTemplateItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of an applicationTemplate object. + Retrieve the properties of an applicationTemplate object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/application_templates/item/instantiate/instantiate_request_builder.py b/msgraph/generated/application_templates/item/instantiate/instantiate_request_builder.py index ee7a89c2f04..51bfec21b22 100644 --- a/msgraph/generated/application_templates/item/instantiate/instantiate_request_builder.py +++ b/msgraph/generated/application_templates/item/instantiate/instantiate_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[InstantiatePostRequestBody] = None, request_configuration: Optional[InstantiateRequestBuilderPostRequestConfiguration] = None) -> Optional[ApplicationServicePrincipal]: """ - Add an instance of an application from the Azure AD application gallery into your directory. You can also use this API to instantiate non-gallery apps. Use the following ID for the applicationTemplate object: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621. + Add an instance of an application from the Microsoft Entra application gallery into your directory. You can also use this API to instantiate non-gallery apps. Use the following ID for the applicationTemplate object: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApplicationServicePrincipal] @@ -54,7 +54,7 @@ async def post(self,body: Optional[InstantiatePostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[InstantiatePostRequestBody] = None, request_configuration: Optional[InstantiateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an instance of an application from the Azure AD application gallery into your directory. You can also use this API to instantiate non-gallery apps. Use the following ID for the applicationTemplate object: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621. + Add an instance of an application from the Microsoft Entra application gallery into your directory. You can also use this API to instantiate non-gallery apps. Use the following ID for the applicationTemplate object: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[InstantiatePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/applications_request_builder.py b/msgraph/generated/applications/applications_request_builder.py index 5ac8c706242..0bdc5e85080 100644 --- a/msgraph/generated/applications/applications_request_builder.py +++ b/msgraph/generated/applications/applications_request_builder.py @@ -49,7 +49,7 @@ def by_application_id(self,application_id: str) -> ApplicationItemRequestBuilder async def get(self,request_configuration: Optional[ApplicationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ApplicationCollectionResponse]: """ - Get the list of applications in this organization. + Get the list of applications in this organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApplicationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ApplicationsRequestBuilderGet async def post(self,body: Optional[Application] = None, request_configuration: Optional[ApplicationsRequestBuilderPostRequestConfiguration] = None) -> Optional[Application]: """ - Create a new application object. + Create a new application object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Application] @@ -96,24 +96,24 @@ async def post(self,body: Optional[Application] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ApplicationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of applications in this organization. + Get the list of applications in this organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Application] = None, request_configuration: Optional[ApplicationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new application object. + Create a new application object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -121,13 +121,13 @@ def to_post_request_information(self,body: Optional[Application] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -189,7 +189,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class ApplicationsRequestBuilderGetQueryParameters(): """ - Get the list of applications in this organization. + Get the list of applications in this organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/count/count_request_builder.py b/msgraph/generated/applications/count/count_request_builder.py index 0ff1a61a7fc..01dd9e863fb 100644 --- a/msgraph/generated/applications/count/count_request_builder.py +++ b/msgraph/generated/applications/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/delta/delta_response.py b/msgraph/generated/applications/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/applications/delta/delta_response.py rename to msgraph/generated/applications/delta/delta_get_response.py index 155c7066faf..7cd10aa70e3 100644 --- a/msgraph/generated/applications/delta/delta_response.py +++ b/msgraph/generated/applications/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Application]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/delta/delta_request_builder.py b/msgraph/generated/applications/delta/delta_request_builder.py index 0234a268d9e..d2a94441717 100644 --- a/msgraph/generated/applications/delta/delta_request_builder.py +++ b/msgraph/generated/applications/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_post_response.py similarity index 89% rename from msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_response.py rename to msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_post_response.py index bbc810c760f..4811ce7ed9a 100644 --- a/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_response.py +++ b/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExtensionProperty]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse + Returns: GetAvailableExtensionPropertiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() + return GetAvailableExtensionPropertiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_request_builder.py index ccb28caccb1..6977808aaed 100644 --- a/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/get_by_ids/get_by_ids_response.py b/msgraph/generated/applications/get_by_ids/get_by_ids_post_response.py similarity index 92% rename from msgraph/generated/contracts/get_by_ids/get_by_ids_response.py rename to msgraph/generated/applications/get_by_ids/get_by_ids_post_response.py index 3628311761a..11bb9a8ae29 100644 --- a/msgraph/generated/contracts/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/applications/get_by_ids/get_by_ids_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: GetByIdsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return GetByIdsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/applications/get_by_ids/get_by_ids_request_builder.py index d4df19bf843..fc42dc1aac5 100644 --- a/msgraph/generated/applications/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/applications/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/add_key/add_key_request_builder.py b/msgraph/generated/applications/item/add_key/add_key_request_builder.py index 4c74bbd8eb2..4839a6105f8 100644 --- a/msgraph/generated/applications/item/add_key/add_key_request_builder.py +++ b/msgraph/generated/applications/item/add_key/add_key_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddKeyPostRequestBody] = None, request_configuration: Optional[AddKeyRequestBuilderPostRequestConfiguration] = None) -> Optional[KeyCredential]: """ - Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don’t have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. You can use the Update application operation to perform an update instead. + Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don’t have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. You can use the Update application operation to perform an update instead. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[KeyCredential] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddKeyPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AddKeyPostRequestBody] = None, request_configuration: Optional[AddKeyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don’t have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. You can use the Update application operation to perform an update instead. + Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don’t have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. You can use the Update application operation to perform an update instead. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddKeyPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/add_password/add_password_request_builder.py b/msgraph/generated/applications/item/add_password/add_password_request_builder.py index 5ed09325c31..cf1eb0de55f 100644 --- a/msgraph/generated/applications/item/add_password/add_password_request_builder.py +++ b/msgraph/generated/applications/item/add_password/add_password_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPasswordPostRequestBody] = None, request_configuration: Optional[AddPasswordRequestBuilderPostRequestConfiguration] = None) -> Optional[PasswordCredential]: """ - Adds a strong password or secret to an application. + Adds a strong password or secret to an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordCredential] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPasswordPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[AddPasswordPostRequestBody] = None, request_configuration: Optional[AddPasswordRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a strong password or secret to an application. + Adds a strong password or secret to an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPasswordPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/app_management_policies/app_management_policies_request_builder.py b/msgraph/generated/applications/item/app_management_policies/app_management_policies_request_builder.py index 81eb6751b30..84c94287094 100644 --- a/msgraph/generated/applications/item/app_management_policies/app_management_policies_request_builder.py +++ b/msgraph/generated/applications/item/app_management_policies/app_management_policies_request_builder.py @@ -71,14 +71,14 @@ def to_get_request_information(self,request_configuration: Optional[AppManagemen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppManagementPoliciesRequestBuilder: diff --git a/msgraph/generated/applications/item/app_management_policies/count/count_request_builder.py b/msgraph/generated/applications/item/app_management_policies/count/count_request_builder.py index 3f5ae15a893..cedd9580a48 100644 --- a/msgraph/generated/applications/item/app_management_policies/count/count_request_builder.py +++ b/msgraph/generated/applications/item/app_management_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/app_management_policies/item/ref/ref_request_builder.py b/msgraph/generated/applications/item/app_management_policies/item/ref/ref_request_builder.py index 631f782e376..db939e7fe0d 100644 --- a/msgraph/generated/applications/item/app_management_policies/item/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/app_management_policies/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. This API is available in the following national cloud deployments. 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/appmanagementpolicy-delete-appliesto?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/app_management_policies/ref/ref_request_builder.py b/msgraph/generated/applications/item/app_management_policies/ref/ref_request_builder.py index 69ff7376bab..75dd583a72b 100644 --- a/msgraph/generated/applications/item/app_management_policies/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/app_management_policies/ref/ref_request_builder.py @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Assign an appManagementPolicy policy object to an application or service principal object. The application or service principal adopts this policy over the tenant-wide tenantAppManagementPolicy setting. Only one policy object can be assigned to an application or service principal. + Assign an appManagementPolicy policy object to an application or service principal object. The application or service principal adopts this policy over the tenant-wide tenantAppManagementPolicy setting. Only one policy object can be assigned to an application or service principal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -78,19 +78,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign an appManagementPolicy policy object to an application or service principal object. The application or service principal adopts this policy over the tenant-wide tenantAppManagementPolicy setting. Only one policy object can be assigned to an application or service principal. + Assign an appManagementPolicy policy object to an application or service principal object. The application or service principal adopts this policy over the tenant-wide tenantAppManagementPolicy setting. Only one policy object can be assigned to an application or service principal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -98,12 +98,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/application_item_request_builder.py b/msgraph/generated/applications/item/application_item_request_builder.py index 1e19eb5b4c6..089cd2fecda 100644 --- a/msgraph/generated/applications/item/application_item_request_builder.py +++ b/msgraph/generated/applications/item/application_item_request_builder.py @@ -49,7 +49,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ApplicationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. + Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. This API is available in the following national cloud deployments. 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/application-delete?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def delete(self,request_configuration: Optional[ApplicationItemRequestBuil async def get(self,request_configuration: Optional[ApplicationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Application]: """ - Get the properties and relationships of an application object. + Get the properties and relationships of an application object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Application] Find more info here: https://learn.microsoft.com/graph/api/application-get?view=graph-rest-1.0 @@ -91,7 +91,7 @@ async def get(self,request_configuration: Optional[ApplicationItemRequestBuilder async def patch(self,body: Optional[Application] = None, request_configuration: Optional[ApplicationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Application]: """ - Update the properties of an application object. + Update the properties of an application object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Application] @@ -116,39 +116,39 @@ async def patch(self,body: Optional[Application] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[ApplicationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. + Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApplicationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of an application object. + Get the properties and relationships of an application object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Application] = None, request_configuration: Optional[ApplicationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an application object. + Update the properties of an application object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -156,13 +156,13 @@ def to_patch_request_information(self,body: Optional[Application] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -378,7 +378,7 @@ class ApplicationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ApplicationItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of an application object. + Get the properties and relationships of an application object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/applications/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/applications/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/applications/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/applications/item/check_member_groups/check_member_groups_request_builder.py index 508bf365b3e..2cfe4bd3b76 100644 --- a/msgraph/generated/applications/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/applications/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_response.py b/msgraph/generated/applications/item/check_member_objects/check_member_objects_post_response.py similarity index 90% rename from msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_response.py rename to msgraph/generated/applications/item/check_member_objects/check_member_objects_post_response.py index c669566391f..f7859b2118e 100644 --- a/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_response.py +++ b/msgraph/generated/applications/item/check_member_objects/check_member_objects_post_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AvailableProviderTypesResponse(BaseCollectionPaginationCountResponse): +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AvailableProviderTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AvailableProviderTypesResponse + Returns: CheckMemberObjectsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AvailableProviderTypesResponse() + return CheckMemberObjectsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/applications/item/check_member_objects/check_member_objects_request_builder.py index 0422ac52d12..756544c4ef9 100644 --- a/msgraph/generated/applications/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/applications/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.py b/msgraph/generated/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.py index a7ece66cc4a..2b353cdc6f8 100644 --- a/msgraph/generated/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.py +++ b/msgraph/generated/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedOnBeh Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedOnBehalfOfRequestBuilder: diff --git a/msgraph/generated/applications/item/extension_properties/count/count_request_builder.py b/msgraph/generated/applications/item/extension_properties/count/count_request_builder.py index 261b62e1a11..8061719a1ed 100644 --- a/msgraph/generated/applications/item/extension_properties/count/count_request_builder.py +++ b/msgraph/generated/applications/item/extension_properties/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/extension_properties/extension_properties_request_builder.py b/msgraph/generated/applications/item/extension_properties/extension_properties_request_builder.py index d6914846b1d..c8b2d242244 100644 --- a/msgraph/generated/applications/item/extension_properties/extension_properties_request_builder.py +++ b/msgraph/generated/applications/item/extension_properties/extension_properties_request_builder.py @@ -45,7 +45,7 @@ def by_extension_property_id(self,extension_property_id: str) -> ExtensionProper async def get(self,request_configuration: Optional[ExtensionPropertiesRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionPropertyCollectionResponse]: """ - Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. + Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionPropertyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list-extensionproperty?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ExtensionPropertiesRequestBui async def post(self,body: Optional[ExtensionProperty] = None, request_configuration: Optional[ExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[ExtensionProperty]: """ - Create a new directory extension definition, represented by an extensionProperty object. + Create a new directory extension definition, represented by an extensionProperty object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionProperty] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ExtensionProperty] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[ExtensionPropertiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. + Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExtensionProperty] = None, request_configuration: Optional[ExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new directory extension definition, represented by an extensionProperty object. + Create a new directory extension definition, represented by an extensionProperty object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ExtensionProperty] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionPropertiesRequestBuilderGetQueryParameters(): """ - Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. + Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/extension_properties/item/extension_property_item_request_builder.py b/msgraph/generated/applications/item/extension_properties/item/extension_property_item_request_builder.py index fd8ffb0e80f..572e635d867 100644 --- a/msgraph/generated/applications/item/extension_properties/item/extension_property_item_request_builder.py +++ b/msgraph/generated/applications/item/extension_properties/item/extension_property_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a directory extension definition represented by an extensionProperty object. You can delete only directory extensions that aren't synced from on-premises active directory (AD). + Delete a directory extension definition represented by an extensionProperty object. You can delete only directory extensions that aren't synced from on-premises active directory (AD). This API is available in the following national cloud deployments. 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/extensionproperty-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ExtensionPropertyItemReque async def get(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionProperty]: """ - Read a directory extension definition represented by an extensionProperty object. + Read a directory extension definition represented by an extensionProperty object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionProperty] Find more info here: https://learn.microsoft.com/graph/api/extensionproperty-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[ExtensionProperty] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a directory extension definition represented by an extensionProperty object. You can delete only directory extensions that aren't synced from on-premises active directory (AD). + Delete a directory extension definition represented by an extensionProperty object. You can delete only directory extensions that aren't synced from on-premises active directory (AD). This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read a directory extension definition represented by an extensionProperty object. + Read a directory extension definition represented by an extensionProperty object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExtensionProperty] = None, request_configuration: Optional[ExtensionPropertyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ExtensionProperty] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionPropertyItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class ExtensionPropertyItemRequestBuilderGetQueryParameters(): """ - Read a directory extension definition represented by an extensionProperty object. + Read a directory extension definition represented by an extensionProperty object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/federated_identity_credentials/count/count_request_builder.py b/msgraph/generated/applications/item/federated_identity_credentials/count/count_request_builder.py index 102e0507560..cee5f4f129b 100644 --- a/msgraph/generated/applications/item/federated_identity_credentials/count/count_request_builder.py +++ b/msgraph/generated/applications/item/federated_identity_credentials/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.py b/msgraph/generated/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.py index ab54e2f363d..83d6caba2f7 100644 --- a/msgraph/generated/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.py +++ b/msgraph/generated/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.py @@ -45,7 +45,7 @@ def by_federated_identity_credential_id(self,federated_identity_credential_id: s async def get(self,request_configuration: Optional[FederatedIdentityCredentialsRequestBuilderGetRequestConfiguration] = None) -> Optional[FederatedIdentityCredentialCollectionResponse]: """ - Get a list of the federatedIdentityCredential objects and their properties. + Get a list of the federatedIdentityCredential objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FederatedIdentityCredentialCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list-federatedidentitycredentials?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[FederatedIdentityCredentialsR async def post(self,body: Optional[FederatedIdentityCredential] = None, request_configuration: Optional[FederatedIdentityCredentialsRequestBuilderPostRequestConfiguration] = None) -> Optional[FederatedIdentityCredential]: """ - Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Azure AD application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. + Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FederatedIdentityCredential] @@ -92,24 +92,24 @@ async def post(self,body: Optional[FederatedIdentityCredential] = None, request_ def to_get_request_information(self,request_configuration: Optional[FederatedIdentityCredentialsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the federatedIdentityCredential objects and their properties. + Get a list of the federatedIdentityCredential objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FederatedIdentityCredential] = None, request_configuration: Optional[FederatedIdentityCredentialsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Azure AD application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. + Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[FederatedIdentityCredential] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class FederatedIdentityCredentialsRequestBuilderGetQueryParameters(): """ - Get a list of the federatedIdentityCredential objects and their properties. + Get a list of the federatedIdentityCredential objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py b/msgraph/generated/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py index d175003886c..ec80fe1733e 100644 --- a/msgraph/generated/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py +++ b/msgraph/generated/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a federatedIdentityCredential object from an application. + Delete a federatedIdentityCredential object from an application. This API is available in the following national cloud deployments. 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/federatedidentitycredential-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[FederatedIdentityCredentia async def get(self,request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderGetRequestConfiguration] = None) -> Optional[FederatedIdentityCredential]: """ - Read the properties and relationships of a federatedIdentityCredential object. + Read the properties and relationships of a federatedIdentityCredential object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FederatedIdentityCredential] Find more info here: https://learn.microsoft.com/graph/api/federatedidentitycredential-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[FederatedIdentityCredentialIt async def patch(self,body: Optional[FederatedIdentityCredential] = None, request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[FederatedIdentityCredential]: """ - Update the properties of a federatedIdentityCredential object. + Update the properties of a federatedIdentityCredential object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FederatedIdentityCredential] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[FederatedIdentityCredential] = None, request def to_delete_request_information(self,request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a federatedIdentityCredential object from an application. + Delete a federatedIdentityCredential object from an application. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a federatedIdentityCredential object. + Read the properties and relationships of a federatedIdentityCredential object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FederatedIdentityCredential] = None, request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a federatedIdentityCredential object. + Update the properties of a federatedIdentityCredential object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[FederatedIdentityCredential if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class FederatedIdentityCredentialItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class FederatedIdentityCredentialItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a federatedIdentityCredential object. + Read the properties and relationships of a federatedIdentityCredential object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/applications/item/get_member_groups/get_member_groups_post_response.py similarity index 90% rename from msgraph/generated/applications/item/get_member_objects/get_member_objects_response.py rename to msgraph/generated/applications/item/get_member_groups/get_member_groups_post_response.py index 72f84b89eb4..cfbe18b3b1a 100644 --- a/msgraph/generated/applications/item/get_member_objects/get_member_objects_response.py +++ b/msgraph/generated/applications/item/get_member_groups/get_member_groups_post_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse + Returns: GetMemberGroupsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() + return GetMemberGroupsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/applications/item/get_member_groups/get_member_groups_request_builder.py index 65f4cf4b03d..01a19e80864 100644 --- a/msgraph/generated/applications/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/applications/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/applications/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/applications/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/applications/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/applications/item/get_member_objects/get_member_objects_request_builder.py index df1ad9fab27..9f50c151305 100644 --- a/msgraph/generated/applications/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/applications/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/home_realm_discovery_policies/count/count_request_builder.py b/msgraph/generated/applications/item/home_realm_discovery_policies/count/count_request_builder.py index 238b4ea7767..2942be96326 100644 --- a/msgraph/generated/applications/item/home_realm_discovery_policies/count/count_request_builder.py +++ b/msgraph/generated/applications/item/home_realm_discovery_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py b/msgraph/generated/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py index 699cca09664..dd968d937a7 100644 --- a/msgraph/generated/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py +++ b/msgraph/generated/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[HomeRealmDis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HomeRealmDiscoveryPoliciesRequestBuilder: diff --git a/msgraph/generated/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py b/msgraph/generated/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py index d51ea582036..ce21f84a664 100644 --- a/msgraph/generated/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py +++ b/msgraph/generated/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HomeRealmDis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HomeRealmDiscoveryPolicyItemRequestBuilder: diff --git a/msgraph/generated/applications/item/logo/logo_request_builder.py b/msgraph/generated/applications/item/logo/logo_request_builder.py index ea4c4e1c3ca..0bb45d67b32 100644 --- a/msgraph/generated/applications/item/logo/logo_request_builder.py +++ b/msgraph/generated/applications/item/logo/logo_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[LogoRequestB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[LogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/applications/item/owners/count/count_request_builder.py b/msgraph/generated/applications/item/owners/count/count_request_builder.py index ef1ee863e70..98a292fe836 100644 --- a/msgraph/generated/applications/item/owners/count/count_request_builder.py +++ b/msgraph/generated/applications/item/owners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/applications/item/owners/graph_app_role_assignment/count/count_request_builder.py index 486fe7a3bb1..6f474e77de1 100644 --- a/msgraph/generated/applications/item/owners/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 231c6f9c5ed..93d7382669d 100644 --- a/msgraph/generated/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_endpoint/count/count_request_builder.py b/msgraph/generated/applications/item/owners/graph_endpoint/count/count_request_builder.py index f3f686ba988..8a6cd1d875d 100644 --- a/msgraph/generated/applications/item/owners/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.py index 228facbbfe8..eb19f4ca22e 100644 --- a/msgraph/generated/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_service_principal/count/count_request_builder.py b/msgraph/generated/applications/item/owners/graph_service_principal/count/count_request_builder.py index c82e84e8819..781a275dcde 100644 --- a/msgraph/generated/applications/item/owners/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.py index 91e3cdada76..836b5cb4df5 100644 --- a/msgraph/generated/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_user/count/count_request_builder.py b/msgraph/generated/applications/item/owners/graph_user/count/count_request_builder.py index 16e53da8111..c75c4cf3827 100644 --- a/msgraph/generated/applications/item/owners/graph_user/count/count_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/graph_user/graph_user_request_builder.py b/msgraph/generated/applications/item/owners/graph_user/graph_user_request_builder.py index 1bccebde636..fea9e06cb83 100644 --- a/msgraph/generated/applications/item/owners/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/applications/item/owners/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 85f58957e49..7d24e1384da 100644 --- a/msgraph/generated/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py index d218c336768..1d85bdeb456 100644 --- a/msgraph/generated/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py index d3ac53a176d..5ffdeb26339 100644 --- a/msgraph/generated/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/item/graph_user/graph_user_request_builder.py b/msgraph/generated/applications/item/owners/item/graph_user/graph_user_request_builder.py index 343755accc9..6d9023d59ab 100644 --- a/msgraph/generated/applications/item/owners/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/applications/item/owners/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/item/ref/ref_request_builder.py b/msgraph/generated/applications/item/owners/item/ref/ref_request_builder.py index 5a1c7ac17b5..3c1e6e4a724 100644 --- a/msgraph/generated/applications/item/owners/item/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/owners/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an owner from an application. As a recommended best practice, apps should have at least two owners. + Remove an owner from an application. As a recommended best practice, apps should have at least two owners. This API is available in the following national cloud deployments. 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/application-delete-owners?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an owner from an application. As a recommended best practice, apps should have at least two owners. + Remove an owner from an application. As a recommended best practice, apps should have at least two owners. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an owner from an application. As a recommended best practice, apps should have at least two owners. + Remove an owner from an application. As a recommended best practice, apps should have at least two owners. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/owners/owners_request_builder.py b/msgraph/generated/applications/item/owners/owners_request_builder.py index 10f93d4add5..e75558cc860 100644 --- a/msgraph/generated/applications/item/owners/owners_request_builder.py +++ b/msgraph/generated/applications/item/owners/owners_request_builder.py @@ -76,14 +76,14 @@ def to_get_request_information(self,request_configuration: Optional[OwnersReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OwnersRequestBuilder: diff --git a/msgraph/generated/applications/item/owners/ref/ref_request_builder.py b/msgraph/generated/applications/item/owners/ref/ref_request_builder.py index b2482188797..08d7664a081 100644 --- a/msgraph/generated/applications/item/owners/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/owners/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add an owner to an application by posting to the owners collection. + Add an owner to an application by posting to the owners collection. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an owner to an application by posting to the owners collection. + Add an owner to an application by posting to the owners collection. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/remove_key/remove_key_request_builder.py b/msgraph/generated/applications/item/remove_key/remove_key_request_builder.py index b9020795dcf..21069e25224 100644 --- a/msgraph/generated/applications/item/remove_key/remove_key_request_builder.py +++ b/msgraph/generated/applications/item/remove_key/remove_key_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RemoveKeyPostRequestBody] = None, request_configuration: Optional[RemoveKeyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove a key credential from an application. This method along with addKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. + Remove a key credential from an application. This method along with addKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. This API is available in the following national cloud deployments. 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[RemoveKeyPostRequestBody] = None, request_con def to_post_request_information(self,body: Optional[RemoveKeyPostRequestBody] = None, request_configuration: Optional[RemoveKeyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove a key credential from an application. This method along with addKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. + Remove a key credential from an application. This method along with addKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RemoveKeyPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/remove_password/remove_password_request_builder.py b/msgraph/generated/applications/item/remove_password/remove_password_request_builder.py index 9c55ad1abc0..e5ecdf023f9 100644 --- a/msgraph/generated/applications/item/remove_password/remove_password_request_builder.py +++ b/msgraph/generated/applications/item/remove_password/remove_password_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RemovePasswordPostRequestBody] = None, request_configuration: Optional[RemovePasswordRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove a password from an application. + Remove a password from an application. This API is available in the following national cloud deployments. 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[RemovePasswordPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[RemovePasswordPostRequestBody] = None, request_configuration: Optional[RemovePasswordRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove a password from an application. + Remove a password from an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RemovePasswordPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/restore/restore_request_builder.py b/msgraph/generated/applications/item/restore/restore_request_builder.py index 24476d8c69b..888393eb1f8 100644 --- a/msgraph/generated/applications/item/restore/restore_request_builder.py +++ b/msgraph/generated/applications/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/applications/item/set_verified_publisher/set_verified_publisher_request_builder.py b/msgraph/generated/applications/item/set_verified_publisher/set_verified_publisher_request_builder.py index 5defec86dce..e5d2be67152 100644 --- a/msgraph/generated/applications/item/set_verified_publisher/set_verified_publisher_request_builder.py +++ b/msgraph/generated/applications/item/set_verified_publisher/set_verified_publisher_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetVerifiedPublisherPostRequestBody] = None, request_configuration: Optional[SetVerifiedPublisherRequestBuilderPostRequestConfiguration] = None) -> None: """ - Set the verifiedPublisher on an application. For more information, including prerequisites to setting a verified publisher, see Publisher verification. + Set the verifiedPublisher on an application. For more information, including prerequisites to setting a verified publisher, see Publisher verification. This API is available in the following national cloud deployments. 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[SetVerifiedPublisherPostRequestBody] = None, def to_post_request_information(self,body: Optional[SetVerifiedPublisherPostRequestBody] = None, request_configuration: Optional[SetVerifiedPublisherRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set the verifiedPublisher on an application. For more information, including prerequisites to setting a verified publisher, see Publisher verification. + Set the verifiedPublisher on an application. For more information, including prerequisites to setting a verified publisher, see Publisher verification. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetVerifiedPublisherPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py b/msgraph/generated/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py index 2bc18f26efb..4578824d156 100644 --- a/msgraph/generated/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcquireAccessTokenPostRequestBody] = None, request_configuration: Optional[AcquireAccessTokenRequestBuilderPostRequestConfiguration] = None) -> None: """ - Acquire an OAuth access token to authorize the Azure AD provisioning service to provision users into an application. + Acquire an OAuth access token to authorize the Microsoft Entra provisioning service to provision users into an application. This API is available in the following national cloud deployments. 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[AcquireAccessTokenPostRequestBody] = None, re def to_post_request_information(self,body: Optional[AcquireAccessTokenPostRequestBody] = None, request_configuration: Optional[AcquireAccessTokenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Acquire an OAuth access token to authorize the Azure AD provisioning service to provision users into an application. + Acquire an OAuth access token to authorize the Microsoft Entra provisioning service to provision users into an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcquireAccessTokenPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/count/count_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/count/count_request_builder.py index 7627f907ce9..07c8a62624a 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/count/count_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/pause/pause_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/pause/pause_request_builder.py index 2de9e28fb79..d68d391f6b5 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/pause/pause_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/pause/pause_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PauseRequestBuilderPostRequestConfiguration] = None) -> None: """ - Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. + Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. This API is available in the following national cloud deployments. 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/synchronization-synchronizationjob-pause?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PauseRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[PauseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. + Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PauseRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py index 5ce816d22fd..fb84638aa0b 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ProvisionOnDemandPostRequestBody] = None, request_configuration: Optional[ProvisionOnDemandRequestBuilderPostRequestConfiguration] = None) -> Optional[StringKeyStringValuePair]: """ - Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. + Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringKeyStringValuePair] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ProvisionOnDemandPostRequestBody] = None, req def to_post_request_information(self,body: Optional[ProvisionOnDemandPostRequestBody] = None, request_configuration: Optional[ProvisionOnDemandRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. + Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ProvisionOnDemandPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/restart/restart_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/restart/restart_request_builder.py index 54db725159c..032b77e549b 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/restart/restart_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/restart/restart_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RestartPostRequestBody] = None, request_configuration: Optional[RestartRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. + Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. This API is available in the following national cloud deployments. 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[RestartPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[RestartPostRequestBody] = None, request_configuration: Optional[RestartRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. + Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RestartPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py index e095a5bae1c..6fc1e6ed40b 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.py index 49a96225166..7a974a31cf0 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoriesR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DirectoryDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py index 264747b9f2d..6aa5f78153c 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryDef Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DirectoryDefinition] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py index e758d24fa6b..a46e6779723 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryDefinition]: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryDefinition] Find more info here: https://learn.microsoft.com/graph/api/synchronization-directorydefinition-discover?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DiscoverRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py similarity index 91% rename from msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py rename to msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py index 9a7ec25d741..4f5437977e1 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterOperatorsResponse(BaseCollectionPaginationCountResponse): +class FilterOperatorsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[FilterOperatorSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterOperatorsResponse + Returns: FilterOperatorsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterOperatorsResponse() + return FilterOperatorsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py index 5978fa2603b..1f7efe46eeb 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse class FilterOperatorsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsResponse]: + async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsGetResponse]: """ Invoke function filterOperators param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterOperatorsResponse] + Returns: Optional[FilterOperatorsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilder } if not self.request_adapter: raise Exception("Http core is null") - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse - return await self.request_adapter.send_async(request_info, FilterOperatorsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterOperatorsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterOperat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterOperatorsRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_response.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_get_response.py similarity index 92% rename from msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_response.py rename to msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_get_response.py index 8cca32a1b5d..362ed77654b 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_response.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FunctionsResponse(BaseCollectionPaginationCountResponse): +class FunctionsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttributeMappingFunctionSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FunctionsResponse + Returns: FunctionsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FunctionsResponse() + return FunctionsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.py index e74cd2ac6cb..c430b48bb12 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse class FunctionsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsResponse]: + async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsGetResponse]: """ Invoke function functions param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FunctionsResponse] + Returns: Optional[FunctionsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetReq } if not self.request_adapter: raise Exception("Http core is null") - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse - return await self.request_adapter.send_async(request_info, FunctionsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FunctionsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FunctionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FunctionsRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py index 5b4ec661136..c8b7d7bbe50 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> Optional[ParseExpressionResponse]: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ParseExpressionResponse] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, reque def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/schema_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/schema/schema_request_builder.py index 92e0b3a2453..4451b37c157 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/schema_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/schema/schema_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SchemaRequestBuilderDelete async def get(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationSchema]: """ - Retrieve the schema for a given synchronization job or template. + Retrieve the schema for a given synchronization job or template. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationSchema] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronizationschema-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[SchemaReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the schema for a given synchronization job or template. + Retrieve the schema for a given synchronization job or template. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationSchema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationSchema] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -207,7 +207,7 @@ class SchemaRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SchemaRequestBuilderGetQueryParameters(): """ - Retrieve the schema for a given synchronization job or template. + Retrieve the schema for a given synchronization job or template. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/start/start_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/start/start_request_builder.py index 56a4f1b9ad9..b79656cab5b 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/start/start_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/start/start_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start an existing synchronization job. If the job is in a paused state, it will continue processing changes from the point where it was paused. If the job is in quarantine, the quarantine status will be cleared. Do not create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. + Start an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. This API is available in the following national cloud deployments. 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/synchronization-synchronizationjob-start?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[StartRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start an existing synchronization job. If the job is in a paused state, it will continue processing changes from the point where it was paused. If the job is in quarantine, the quarantine status will be cleared. Do not create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. + Start an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> StartRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.py index b84365c6378..36134bddbdd 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.py @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. + Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. This API is available in the following national cloud deployments. 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/synchronization-synchronizationjob-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[SynchronizationJobItemRequ async def get(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationJob]: """ - Retrieve the existing synchronization job and its properties. + Retrieve the existing synchronization job and its properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationJob] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronizationjob-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[SynchronizationJob] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. + Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the existing synchronization job and its properties. + Retrieve the existing synchronization job and its properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationJob] = None, request_configuration: Optional[SynchronizationJobItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationJob] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class SynchronizationJobItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class SynchronizationJobItemRequestBuilderGetQueryParameters(): """ - Retrieve the existing synchronization job and its properties. + Retrieve the existing synchronization job and its properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py index 13addb8fc91..787ee38c529 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidateCredentialsPostRequestBody] = None, request_configuration: Optional[ValidateCredentialsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that the credentials are valid in the tenant. + Validate that the credentials are valid in the tenant. This API is available in the following national cloud deployments. 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[ValidateCredentialsPostRequestBody] = None, r def to_post_request_information(self,body: Optional[ValidateCredentialsPostRequestBody] = None, request_configuration: Optional[ValidateCredentialsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that the credentials are valid in the tenant. + Validate that the credentials are valid in the tenant. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidateCredentialsPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/jobs/jobs_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/jobs_request_builder.py index 5dad13b9edb..1e16548f5dd 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/jobs_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/jobs_request_builder.py @@ -46,7 +46,7 @@ def by_synchronization_job_id(self,synchronization_job_id: str) -> Synchronizati async def get(self,request_configuration: Optional[JobsRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationJobCollectionResponse]: """ - List existing jobs for a given application instance (service principal). + List existing jobs for a given application instance (service principal). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationJobCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronization-list-jobs?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[JobsRequestBuilderGetRequestC async def post(self,body: Optional[SynchronizationJob] = None, request_configuration: Optional[JobsRequestBuilderPostRequestConfiguration] = None) -> Optional[SynchronizationJob]: """ - Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. + Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationJob] @@ -93,24 +93,24 @@ async def post(self,body: Optional[SynchronizationJob] = None, request_configura def to_get_request_information(self,request_configuration: Optional[JobsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List existing jobs for a given application instance (service principal). + List existing jobs for a given application instance (service principal). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationJob] = None, request_configuration: Optional[JobsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. + Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[SynchronizationJob] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def validate_credentials(self) -> ValidateCredentialsRequestBuilder: @dataclass class JobsRequestBuilderGetQueryParameters(): """ - List existing jobs for a given application instance (service principal). + List existing jobs for a given application instance (service principal). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py b/msgraph/generated/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py index d24873887e9..b12bb990e1d 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ValidateCredentialsPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/secrets/count/count_request_builder.py b/msgraph/generated/applications/item/synchronization/secrets/count/count_request_builder.py index cbab55f3d0e..88ec88cabc7 100644 --- a/msgraph/generated/applications/item/synchronization/secrets/count/count_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/secrets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 a496ef55eaa..26c4799605f 100644 --- a/msgraph/generated/applications/item/synchronization/secrets/secrets_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/secrets/secrets_request_builder.py @@ -61,13 +61,13 @@ def to_put_request_information(self,body: Optional[List[SynchronizationSecretKey if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/synchronization_request_builder.py b/msgraph/generated/applications/item/synchronization/synchronization_request_builder.py index a4d1808e13d..9ede3acd997 100644 --- a/msgraph/generated/applications/item/synchronization/synchronization_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/synchronization_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SynchronizationRequestBuil async def get(self,request_configuration: Optional[SynchronizationRequestBuilderGetRequestConfiguration] = None) -> Optional[Synchronization]: """ - Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Synchronization] """ @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[Synchroni Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SynchronizationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[Synchronization] = None, request_configuration: Optional[SynchronizationRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_put_request_information(self,body: Optional[Synchronization] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -205,7 +205,7 @@ class SynchronizationRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class SynchronizationRequestBuilderGetQueryParameters(): """ - Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/synchronization/templates/count/count_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/count/count_request_builder.py index 0d42b5503e3..968d8b6b848 100644 --- a/msgraph/generated/applications/item/synchronization/templates/count/count_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.py index f1e01704e89..8f6a9fedb80 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.py index 31835b5cc60..cddf6a35b7f 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoriesR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DirectoryDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py index 52acdb14669..df155fa6354 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryDef Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DirectoryDefinition] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py index 94d84eaccf6..b1c8efec82f 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryDefinition]: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryDefinition] Find more info here: https://learn.microsoft.com/graph/api/synchronization-directorydefinition-discover?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DiscoverRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py similarity index 91% rename from msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py rename to msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py index 9a7ec25d741..4f5437977e1 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterOperatorsResponse(BaseCollectionPaginationCountResponse): +class FilterOperatorsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[FilterOperatorSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterOperatorsResponse + Returns: FilterOperatorsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterOperatorsResponse() + return FilterOperatorsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py index 94bf0c5f54b..849c43e6513 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse class FilterOperatorsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsResponse]: + async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsGetResponse]: """ Invoke function filterOperators param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterOperatorsResponse] + Returns: Optional[FilterOperatorsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilder } if not self.request_adapter: raise Exception("Http core is null") - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse - return await self.request_adapter.send_async(request_info, FilterOperatorsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterOperatorsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterOperat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterOperatorsRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_response.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_get_response.py similarity index 92% rename from msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_response.py rename to msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_get_response.py index 8cca32a1b5d..362ed77654b 100644 --- a/msgraph/generated/applications/item/synchronization/jobs/item/schema/functions/functions_response.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FunctionsResponse(BaseCollectionPaginationCountResponse): +class FunctionsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttributeMappingFunctionSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FunctionsResponse + Returns: FunctionsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FunctionsResponse() + return FunctionsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.py index de48459d07f..4dd56987fb1 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse class FunctionsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsResponse]: + async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsGetResponse]: """ Invoke function functions param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FunctionsResponse] + Returns: Optional[FunctionsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetReq } if not self.request_adapter: raise Exception("Http core is null") - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse - return await self.request_adapter.send_async(request_info, FunctionsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FunctionsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FunctionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FunctionsRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py index 11f77afe0c8..927f718fb4d 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> Optional[ParseExpressionResponse]: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ParseExpressionResponse] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, reque def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/schema_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/schema/schema_request_builder.py index 4f5f92735a7..5818a5b6fa2 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/schema_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/schema/schema_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SchemaReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SchemaReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationSchema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationSchema] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.py index 38886d293fa..99b6ab57480 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SynchronizationTemplateIte async def get(self,request_configuration: Optional[SynchronizationTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationTemplate]: """ - Pre-configured synchronization settings for a particular application. + Preconfigured synchronization settings for a particular application. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationTemplate] """ @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[SynchronizationTemplateItemRe async def patch(self,body: Optional[SynchronizationTemplate] = None, request_configuration: Optional[SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[SynchronizationTemplate]: """ - Update (override) the synchronization template associated with a given application. + Update (override) the synchronization template associated with a given application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationTemplate] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Synchroni Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SynchronizationTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Pre-configured synchronization settings for a particular application. + Preconfigured synchronization settings for a particular application. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationTemplate] = None, request_configuration: Optional[SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update (override) the synchronization template associated with a given application. + Update (override) the synchronization template associated with a given application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationTemplate] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class SynchronizationTemplateItemRequestBuilderGetQueryParameters(): """ - Pre-configured synchronization settings for a particular application. + Preconfigured synchronization settings for a particular application. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/synchronization/templates/templates_request_builder.py b/msgraph/generated/applications/item/synchronization/templates/templates_request_builder.py index 20af2c3b2e0..0bc32e1e334 100644 --- a/msgraph/generated/applications/item/synchronization/templates/templates_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/templates/templates_request_builder.py @@ -45,7 +45,7 @@ def by_synchronization_template_id(self,synchronization_template_id: str) -> Syn async def get(self,request_configuration: Optional[TemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationTemplateCollectionResponse]: """ - List the synchronization templates associated with a given application or service principal. + List the synchronization templates associated with a given application or service principal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronization-list-templates?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SynchronizationTemplate] = None, request_conf def to_get_request_information(self,request_configuration: Optional[TemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the synchronization templates associated with a given application or service principal. + List the synchronization templates associated with a given application or service principal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationTemplate] = None, request_configuration: Optional[TemplatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SynchronizationTemplate] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TemplatesRequestBuilderGetQueryParameters(): """ - List the synchronization templates associated with a given application or service principal. + List the synchronization templates associated with a given application or service principal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/token_issuance_policies/count/count_request_builder.py b/msgraph/generated/applications/item/token_issuance_policies/count/count_request_builder.py index 58806b1cf2a..339b2c47876 100644 --- a/msgraph/generated/applications/item/token_issuance_policies/count/count_request_builder.py +++ b/msgraph/generated/applications/item/token_issuance_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/token_issuance_policies/item/ref/ref_request_builder.py b/msgraph/generated/applications/item/token_issuance_policies/item/ref/ref_request_builder.py index f059566bb4a..a51e00df2fa 100644 --- a/msgraph/generated/applications/item/token_issuance_policies/item/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/token_issuance_policies/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a tokenIssuancePolicy from an application. + Remove a tokenIssuancePolicy from an application. This API is available in the following national cloud deployments. 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/application-delete-tokenissuancepolicies?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a tokenIssuancePolicy from an application. + Remove a tokenIssuancePolicy from an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a tokenIssuancePolicy from an application. + Remove a tokenIssuancePolicy from an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/token_issuance_policies/ref/ref_request_builder.py b/msgraph/generated/applications/item/token_issuance_policies/ref/ref_request_builder.py index 1369b9dabe8..fb0d449f332 100644 --- a/msgraph/generated/applications/item/token_issuance_policies/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/token_issuance_policies/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List the tokenIssuancePolicy objects that are assigned to an application. + List the tokenIssuancePolicy objects that are assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list-tokenissuancepolicies?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Assign a tokenIssuancePolicy to an application. + Assign a tokenIssuancePolicy to an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the tokenIssuancePolicy objects that are assigned to an application. + List the tokenIssuancePolicy objects that are assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign a tokenIssuancePolicy to an application. + Assign a tokenIssuancePolicy to an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List the tokenIssuancePolicy objects that are assigned to an application. + List the tokenIssuancePolicy objects that are assigned to an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/token_issuance_policies/token_issuance_policies_request_builder.py b/msgraph/generated/applications/item/token_issuance_policies/token_issuance_policies_request_builder.py index cfef7398d4c..b4d3141afbc 100644 --- a/msgraph/generated/applications/item/token_issuance_policies/token_issuance_policies_request_builder.py +++ b/msgraph/generated/applications/item/token_issuance_policies/token_issuance_policies_request_builder.py @@ -45,7 +45,7 @@ def by_token_issuance_policy_id(self,token_issuance_policy_id: str) -> TokenIssu async def get(self,request_configuration: Optional[TokenIssuancePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenIssuancePolicyCollectionResponse]: """ - List the tokenIssuancePolicy objects that are assigned to an application. + List the tokenIssuancePolicy objects that are assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenIssuancePolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list-tokenissuancepolicies?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[TokenIssuancePoliciesRequestB def to_get_request_information(self,request_configuration: Optional[TokenIssuancePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the tokenIssuancePolicy objects that are assigned to an application. + List the tokenIssuancePolicy objects that are assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TokenIssuancePoliciesRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class TokenIssuancePoliciesRequestBuilderGetQueryParameters(): """ - List the tokenIssuancePolicy objects that are assigned to an application. + List the tokenIssuancePolicy objects that are assigned to an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/token_lifetime_policies/count/count_request_builder.py b/msgraph/generated/applications/item/token_lifetime_policies/count/count_request_builder.py index 43e8c2b3181..21915f02fcc 100644 --- a/msgraph/generated/applications/item/token_lifetime_policies/count/count_request_builder.py +++ b/msgraph/generated/applications/item/token_lifetime_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/applications/item/token_lifetime_policies/item/ref/ref_request_builder.py b/msgraph/generated/applications/item/token_lifetime_policies/item/ref/ref_request_builder.py index 198a7008da1..b4136021a41 100644 --- a/msgraph/generated/applications/item/token_lifetime_policies/item/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/token_lifetime_policies/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a tokenLifetimePolicy from an application. + Remove a tokenLifetimePolicy from an application. This API is available in the following national cloud deployments. 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/application-delete-tokenlifetimepolicies?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a tokenLifetimePolicy from an application. + Remove a tokenLifetimePolicy from an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a tokenLifetimePolicy from an application. + Remove a tokenLifetimePolicy from an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/token_lifetime_policies/ref/ref_request_builder.py b/msgraph/generated/applications/item/token_lifetime_policies/ref/ref_request_builder.py index 45a9581e23b..9d925c25026 100644 --- a/msgraph/generated/applications/item/token_lifetime_policies/ref/ref_request_builder.py +++ b/msgraph/generated/applications/item/token_lifetime_policies/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. + List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list-tokenlifetimepolicies?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Assign a tokenLifetimePolicy to an application. You can have multiple tokenLifetimePolicy policies in a tenant but can assign only one tokenLifetimePolicy per application. + Assign a tokenLifetimePolicy to an application. You can have multiple tokenLifetimePolicy policies in a tenant but can assign only one tokenLifetimePolicy per application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. + List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign a tokenLifetimePolicy to an application. You can have multiple tokenLifetimePolicy policies in a tenant but can assign only one tokenLifetimePolicy per application. + Assign a tokenLifetimePolicy to an application. You can have multiple tokenLifetimePolicy policies in a tenant but can assign only one tokenLifetimePolicy per application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. + List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.py b/msgraph/generated/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.py index bcc9deb37dd..df528c93178 100644 --- a/msgraph/generated/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.py +++ b/msgraph/generated/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.py @@ -45,7 +45,7 @@ def by_token_lifetime_policy_id(self,token_lifetime_policy_id: str) -> TokenLife async def get(self,request_configuration: Optional[TokenLifetimePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenLifetimePolicyCollectionResponse]: """ - List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. + List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenLifetimePolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/application-list-tokenlifetimepolicies?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[TokenLifetimePoliciesRequestB def to_get_request_information(self,request_configuration: Optional[TokenLifetimePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. + List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TokenLifetimePoliciesRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class TokenLifetimePoliciesRequestBuilderGetQueryParameters(): """ - List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. + List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.py b/msgraph/generated/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.py index fa01d13c379..a4272da9e2a 100644 --- a/msgraph/generated/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.py +++ b/msgraph/generated/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnsetVerifiedPublisherRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unset the verifiedPublisher previously set on an application, removing all verified publisher properties. For more information, see Publisher verification. + Unset the verifiedPublisher previously set on an application, removing all verified publisher properties. For more information, see Publisher verification. This API is available in the following national cloud deployments. 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/application-unsetverifiedpublisher?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnsetVerifiedPublisherReques def to_post_request_information(self,request_configuration: Optional[UnsetVerifiedPublisherRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unset the verifiedPublisher previously set on an application, removing all verified publisher properties. For more information, see Publisher verification. + Unset the verifiedPublisher previously set on an application, removing all verified publisher properties. For more information, see Publisher verification. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnsetVerifiedPublisherRequestBuilder: diff --git a/msgraph/generated/applications/validate_properties/validate_properties_request_builder.py b/msgraph/generated/applications/validate_properties/validate_properties_request_builder.py index 6989ac0db79..aa2da264fa1 100644 --- a/msgraph/generated/applications/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/applications/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications_with_app_id/applications_with_app_id_request_builder.py b/msgraph/generated/applications_with_app_id/applications_with_app_id_request_builder.py index 4712d57387f..79866ecaca2 100644 --- a/msgraph/generated/applications_with_app_id/applications_with_app_id_request_builder.py +++ b/msgraph/generated/applications_with_app_id/applications_with_app_id_request_builder.py @@ -25,11 +25,13 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['app_id'] = str(app_id) super().__init__(request_adapter, "{+baseurl}/applications(appId='{appId}'){?%24select,%24expand}", path_parameters) async def delete(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. + Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. This API is available in the following national cloud deployments. 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/application-delete?view=graph-rest-1.0 @@ -49,7 +51,7 @@ async def delete(self,request_configuration: Optional[ApplicationsWithAppIdReque async def get(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderGetRequestConfiguration] = None) -> Optional[Application]: """ - Get the properties and relationships of an application object. + Get the properties and relationships of an application object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Application] Find more info here: https://learn.microsoft.com/graph/api/application-get?view=graph-rest-1.0 @@ -71,7 +73,7 @@ async def get(self,request_configuration: Optional[ApplicationsWithAppIdRequestB async def patch(self,body: Optional[Application] = None, request_configuration: Optional[ApplicationsWithAppIdRequestBuilderPatchRequestConfiguration] = None) -> Optional[Application]: """ - Update the properties of an application object. + Update the properties of an application object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Application] @@ -96,39 +98,39 @@ async def patch(self,body: Optional[Application] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. + Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of an application object. + Get the properties and relationships of an application object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Application] = None, request_configuration: Optional[ApplicationsWithAppIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an application object. + Update the properties of an application object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Application] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +171,7 @@ class ApplicationsWithAppIdRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class ApplicationsWithAppIdRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of an application object. + Get the properties and relationships of an application object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/audit_logs/audit_logs_request_builder.py b/msgraph/generated/audit_logs/audit_logs_request_builder.py index 8b77349b6e4..10e755be320 100644 --- a/msgraph/generated/audit_logs/audit_logs_request_builder.py +++ b/msgraph/generated/audit_logs/audit_logs_request_builder.py @@ -81,14 +81,14 @@ def to_get_request_information(self,request_configuration: Optional[AuditLogsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuditLogRoot] = None, request_configuration: Optional[AuditLogsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -101,13 +101,13 @@ def to_patch_request_information(self,body: Optional[AuditLogRoot] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/audit_logs/directory_audits/count/count_request_builder.py b/msgraph/generated/audit_logs/directory_audits/count/count_request_builder.py index 0ca87c9ef01..8a9c02e728b 100644 --- a/msgraph/generated/audit_logs/directory_audits/count/count_request_builder.py +++ b/msgraph/generated/audit_logs/directory_audits/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/audit_logs/directory_audits/directory_audits_request_builder.py b/msgraph/generated/audit_logs/directory_audits/directory_audits_request_builder.py index 87bef42f380..6493d031293 100644 --- a/msgraph/generated/audit_logs/directory_audits/directory_audits_request_builder.py +++ b/msgraph/generated/audit_logs/directory_audits/directory_audits_request_builder.py @@ -45,7 +45,7 @@ def by_directory_audit_id(self,directory_audit_id: str) -> DirectoryAuditItemReq async def get(self,request_configuration: Optional[DirectoryAuditsRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryAuditCollectionResponse]: """ - Get the list of audit logs generated by Azure Active Directory (Azure AD). This includes audit logs generated by various services within Azure AD, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. + Get the list of audit logs generated by Microsoft Entra ID. This includes audit logs generated by various services within Microsoft Entra ID, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryAuditCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryaudit-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DirectoryAudit] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[DirectoryAuditsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of audit logs generated by Azure Active Directory (Azure AD). This includes audit logs generated by various services within Azure AD, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. + Get the list of audit logs generated by Microsoft Entra ID. This includes audit logs generated by various services within Microsoft Entra ID, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryAudit] = None, request_configuration: Optional[DirectoryAuditsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DirectoryAudit] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DirectoryAuditsRequestBuilderGetQueryParameters(): """ - Get the list of audit logs generated by Azure Active Directory (Azure AD). This includes audit logs generated by various services within Azure AD, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. + Get the list of audit logs generated by Microsoft Entra ID. This includes audit logs generated by various services within Microsoft Entra ID, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/audit_logs/directory_audits/item/directory_audit_item_request_builder.py b/msgraph/generated/audit_logs/directory_audits/item/directory_audit_item_request_builder.py index 39cc12cde7b..ca348653694 100644 --- a/msgraph/generated/audit_logs/directory_audits/item/directory_audit_item_request_builder.py +++ b/msgraph/generated/audit_logs/directory_audits/item/directory_audit_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DirectoryAuditItemRequestB async def get(self,request_configuration: Optional[DirectoryAuditItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryAudit]: """ - Get a specific Azure Active Directory audit log item. This includes an audit log item generated by various services within Azure Active Directory like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. + Get a specific Microsoft Entra audit log item. This includes an audit log item generated by various services within Microsoft Entra ID like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryAudit] Find more info here: https://learn.microsoft.com/graph/api/directoryaudit-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryAuditItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a specific Azure Active Directory audit log item. This includes an audit log item generated by various services within Azure Active Directory like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. + Get a specific Microsoft Entra audit log item. This includes an audit log item generated by various services within Microsoft Entra ID like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryAudit] = None, request_configuration: Optional[DirectoryAuditItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DirectoryAudit] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class DirectoryAuditItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class DirectoryAuditItemRequestBuilderGetQueryParameters(): """ - Get a specific Azure Active Directory audit log item. This includes an audit log item generated by various services within Azure Active Directory like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. + Get a specific Microsoft Entra audit log item. This includes an audit log item generated by various services within Microsoft Entra ID like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/audit_logs/provisioning/count/count_request_builder.py b/msgraph/generated/audit_logs/provisioning/count/count_request_builder.py index d057c2ac1c3..c7d581da769 100644 --- a/msgraph/generated/audit_logs/provisioning/count/count_request_builder.py +++ b/msgraph/generated/audit_logs/provisioning/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.py b/msgraph/generated/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.py index 8a7a9d0956e..edc5720316c 100644 --- a/msgraph/generated/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.py +++ b/msgraph/generated/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Provision Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProvisioningObjectSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[Provisioning Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProvisioningObjectSummary] = None, request_configuration: Optional[ProvisioningObjectSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ProvisioningObjectSummary] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/audit_logs/provisioning/provisioning_request_builder.py b/msgraph/generated/audit_logs/provisioning/provisioning_request_builder.py index 93e787bef50..85f30731cd2 100644 --- a/msgraph/generated/audit_logs/provisioning/provisioning_request_builder.py +++ b/msgraph/generated/audit_logs/provisioning/provisioning_request_builder.py @@ -45,7 +45,7 @@ def by_provisioning_object_summary_id(self,provisioning_object_summary_id: str) async def get(self,request_configuration: Optional[ProvisioningRequestBuilderGetRequestConfiguration] = None) -> Optional[ProvisioningObjectSummaryCollectionResponse]: """ - Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. + Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisioningObjectSummaryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/provisioningobjectsummary-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ProvisioningObjectSummary] = None, request_co def to_get_request_information(self,request_configuration: Optional[ProvisioningRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. + Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProvisioningObjectSummary] = None, request_configuration: Optional[ProvisioningRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ProvisioningObjectSummary] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ProvisioningRequestBuilderGetQueryParameters(): """ - Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. + Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/audit_logs/sign_ins/count/count_request_builder.py b/msgraph/generated/audit_logs/sign_ins/count/count_request_builder.py index f6f269e16b5..2928b249a74 100644 --- a/msgraph/generated/audit_logs/sign_ins/count/count_request_builder.py +++ b/msgraph/generated/audit_logs/sign_ins/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/audit_logs/sign_ins/item/sign_in_item_request_builder.py b/msgraph/generated/audit_logs/sign_ins/item/sign_in_item_request_builder.py index ac218ea0294..c59c9867753 100644 --- a/msgraph/generated/audit_logs/sign_ins/item/sign_in_item_request_builder.py +++ b/msgraph/generated/audit_logs/sign_ins/item/sign_in_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SignInItemRequestBuilderDe async def get(self,request_configuration: Optional[SignInItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SignIn]: """ - Retrieve a specific Azure AD user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. + Retrieve a specific Microsoft Entra user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SignIn] Find more info here: https://learn.microsoft.com/graph/api/signin-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[SignInIte Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SignInItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a specific Azure AD user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. + Retrieve a specific Microsoft Entra user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SignIn] = None, request_configuration: Optional[SignInItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SignIn] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class SignInItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguratio @dataclass class SignInItemRequestBuilderGetQueryParameters(): """ - Retrieve a specific Azure AD user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. + Retrieve a specific Microsoft Entra user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/audit_logs/sign_ins/sign_ins_request_builder.py b/msgraph/generated/audit_logs/sign_ins/sign_ins_request_builder.py index 53176f2218f..17c76ba8886 100644 --- a/msgraph/generated/audit_logs/sign_ins/sign_ins_request_builder.py +++ b/msgraph/generated/audit_logs/sign_ins/sign_ins_request_builder.py @@ -45,7 +45,7 @@ def by_sign_in_id(self,sign_in_id: str) -> SignInItemRequestBuilder: async def get(self,request_configuration: Optional[SignInsRequestBuilderGetRequestConfiguration] = None) -> Optional[SignInCollectionResponse]: """ - Retrieve the Azure AD user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Azure Active Directory (Azure AD) default retention period are available. + Retrieve the Microsoft Entra user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Microsoft Entra ID default retention period are available. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SignInCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/signin-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SignIn] = None, request_configuration: Option def to_get_request_information(self,request_configuration: Optional[SignInsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the Azure AD user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Azure Active Directory (Azure AD) default retention period are available. + Retrieve the Microsoft Entra user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Microsoft Entra ID default retention period are available. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SignIn] = None, request_configuration: Optional[SignInsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SignIn] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SignInsRequestBuilderGetQueryParameters(): """ - Retrieve the Azure AD user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Azure Active Directory (Azure AD) default retention period are available. + Retrieve the Microsoft Entra user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Microsoft Entra ID default retention period are available. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/authentication_method_configurations/authentication_method_configurations_request_builder.py b/msgraph/generated/authentication_method_configurations/authentication_method_configurations_request_builder.py index e3026cc8393..a03bbca50c6 100644 --- a/msgraph/generated/authentication_method_configurations/authentication_method_configurations_request_builder.py +++ b/msgraph/generated/authentication_method_configurations/authentication_method_configurations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodConfiguration] = None, request_configuration: Optional[AuthenticationMethodConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AuthenticationMethodConfigur if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/authentication_method_configurations/count/count_request_builder.py b/msgraph/generated/authentication_method_configurations/count/count_request_builder.py index 68e9562b29e..e143997efd0 100644 --- a/msgraph/generated/authentication_method_configurations/count/count_request_builder.py +++ b/msgraph/generated/authentication_method_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py b/msgraph/generated/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py index 174df417dd6..2f1befc6f98 100644 --- a/msgraph/generated/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py +++ b/msgraph/generated/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodConfiguration] = None, request_configuration: Optional[AuthenticationMethodConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodConfigu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py b/msgraph/generated/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py index 531d4a5649b..a42d98c7017 100644 --- a/msgraph/generated/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py +++ b/msgraph/generated/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodConfiguration] = None, request_configuration: Optional[AuthenticationMethodConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AuthenticationMethodConfigur if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py b/msgraph/generated/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py index 1521e5b0b08..e6eeab808b5 100644 --- a/msgraph/generated/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py +++ b/msgraph/generated/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py b/msgraph/generated/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py index d119e869e18..d33ef843d44 100644 --- a/msgraph/generated/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py +++ b/msgraph/generated/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodConfiguration] = None, request_configuration: Optional[AuthenticationMethodConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodConfigu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/authentication_methods_policy/authentication_methods_policy_request_builder.py b/msgraph/generated/authentication_methods_policy/authentication_methods_policy_request_builder.py index 7a27fcec51c..eb33cd9185f 100644 --- a/msgraph/generated/authentication_methods_policy/authentication_methods_policy_request_builder.py +++ b/msgraph/generated/authentication_methods_policy/authentication_methods_policy_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodsPolicy] = None, request_configuration: Optional[AuthenticationMethodsPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodsPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/base_graph_service_client.py b/msgraph/generated/base_graph_service_client.py index 5e7a71bce7d..b34ee770de8 100644 --- a/msgraph/generated/base_graph_service_client.py +++ b/msgraph/generated/base_graph_service_client.py @@ -13,15 +13,15 @@ if TYPE_CHECKING: from .admin.admin_request_builder import AdminRequestBuilder - from .agreement_acceptances.agreement_acceptances_request_builder import AgreementAcceptancesRequestBuilder from .agreements.agreements_request_builder import AgreementsRequestBuilder - from .app_catalogs.app_catalogs_request_builder import AppCatalogsRequestBuilder + from .agreement_acceptances.agreement_acceptances_request_builder import AgreementAcceptancesRequestBuilder from .applications.applications_request_builder import ApplicationsRequestBuilder from .applications_with_app_id.applications_with_app_id_request_builder import ApplicationsWithAppIdRequestBuilder from .application_templates.application_templates_request_builder import ApplicationTemplatesRequestBuilder + from .app_catalogs.app_catalogs_request_builder import AppCatalogsRequestBuilder from .audit_logs.audit_logs_request_builder import AuditLogsRequestBuilder - from .authentication_method_configurations.authentication_method_configurations_request_builder import AuthenticationMethodConfigurationsRequestBuilder from .authentication_methods_policy.authentication_methods_policy_request_builder import AuthenticationMethodsPolicyRequestBuilder + from .authentication_method_configurations.authentication_method_configurations_request_builder import AuthenticationMethodConfigurationsRequestBuilder from .certificate_based_auth_configuration.certificate_based_auth_configuration_request_builder import CertificateBasedAuthConfigurationRequestBuilder from .chats.chats_request_builder import ChatsRequestBuilder from .communications.communications_request_builder import CommunicationsRequestBuilder @@ -30,25 +30,25 @@ from .contacts.contacts_request_builder import ContactsRequestBuilder from .contracts.contracts_request_builder import ContractsRequestBuilder from .data_policy_operations.data_policy_operations_request_builder import DataPolicyOperationsRequestBuilder - from .device_app_management.device_app_management_request_builder import DeviceAppManagementRequestBuilder - from .device_management.device_management_request_builder import DeviceManagementRequestBuilder from .devices.devices_request_builder import DevicesRequestBuilder from .devices_with_device_id.devices_with_device_id_request_builder import DevicesWithDeviceIdRequestBuilder + from .device_app_management.device_app_management_request_builder import DeviceAppManagementRequestBuilder + from .device_management.device_management_request_builder import DeviceManagementRequestBuilder from .directory.directory_request_builder import DirectoryRequestBuilder from .directory_objects.directory_objects_request_builder import DirectoryObjectsRequestBuilder from .directory_roles.directory_roles_request_builder import DirectoryRolesRequestBuilder from .directory_roles_with_role_template_id.directory_roles_with_role_template_id_request_builder import DirectoryRolesWithRoleTemplateIdRequestBuilder from .directory_role_templates.directory_role_templates_request_builder import DirectoryRoleTemplatesRequestBuilder - from .domain_dns_records.domain_dns_records_request_builder import DomainDnsRecordsRequestBuilder from .domains.domains_request_builder import DomainsRequestBuilder + from .domain_dns_records.domain_dns_records_request_builder import DomainDnsRecordsRequestBuilder from .drives.drives_request_builder import DrivesRequestBuilder from .education.education_request_builder import EducationRequestBuilder from .employee_experience.employee_experience_request_builder import EmployeeExperienceRequestBuilder from .external.external_request_builder import ExternalRequestBuilder from .filter_operators.filter_operators_request_builder import FilterOperatorsRequestBuilder from .functions.functions_request_builder import FunctionsRequestBuilder - from .group_lifecycle_policies.group_lifecycle_policies_request_builder import GroupLifecyclePoliciesRequestBuilder from .groups.groups_request_builder import GroupsRequestBuilder + from .group_lifecycle_policies.group_lifecycle_policies_request_builder import GroupLifecyclePoliciesRequestBuilder from .group_settings.group_settings_request_builder import GroupSettingsRequestBuilder from .group_setting_templates.group_setting_templates_request_builder import GroupSettingTemplatesRequestBuilder from .identity.identity_request_builder import IdentityRequestBuilder @@ -192,22 +192,22 @@ def app_catalogs(self) -> AppCatalogsRequestBuilder: return AppCatalogsRequestBuilder(self.request_adapter, self.path_parameters) @property - def applications(self) -> ApplicationsRequestBuilder: + def application_templates(self) -> ApplicationTemplatesRequestBuilder: """ - Provides operations to manage the collection of application entities. + Provides operations to manage the collection of applicationTemplate entities. """ - from .applications.applications_request_builder import ApplicationsRequestBuilder + from .application_templates.application_templates_request_builder import ApplicationTemplatesRequestBuilder - return ApplicationsRequestBuilder(self.request_adapter, self.path_parameters) + return ApplicationTemplatesRequestBuilder(self.request_adapter, self.path_parameters) @property - def application_templates(self) -> ApplicationTemplatesRequestBuilder: + def applications(self) -> ApplicationsRequestBuilder: """ - Provides operations to manage the collection of applicationTemplate entities. + Provides operations to manage the collection of application entities. """ - from .application_templates.application_templates_request_builder import ApplicationTemplatesRequestBuilder + from .applications.applications_request_builder import ApplicationsRequestBuilder - return ApplicationTemplatesRequestBuilder(self.request_adapter, self.path_parameters) + return ApplicationsRequestBuilder(self.request_adapter, self.path_parameters) @property def audit_logs(self) -> AuditLogsRequestBuilder: @@ -354,22 +354,22 @@ def directory_objects(self) -> DirectoryObjectsRequestBuilder: return DirectoryObjectsRequestBuilder(self.request_adapter, self.path_parameters) @property - def directory_roles(self) -> DirectoryRolesRequestBuilder: + def directory_role_templates(self) -> DirectoryRoleTemplatesRequestBuilder: """ - Provides operations to manage the collection of directoryRole entities. + Provides operations to manage the collection of directoryRoleTemplate entities. """ - from .directory_roles.directory_roles_request_builder import DirectoryRolesRequestBuilder + from .directory_role_templates.directory_role_templates_request_builder import DirectoryRoleTemplatesRequestBuilder - return DirectoryRolesRequestBuilder(self.request_adapter, self.path_parameters) + return DirectoryRoleTemplatesRequestBuilder(self.request_adapter, self.path_parameters) @property - def directory_role_templates(self) -> DirectoryRoleTemplatesRequestBuilder: + def directory_roles(self) -> DirectoryRolesRequestBuilder: """ - Provides operations to manage the collection of directoryRoleTemplate entities. + Provides operations to manage the collection of directoryRole entities. """ - from .directory_role_templates.directory_role_templates_request_builder import DirectoryRoleTemplatesRequestBuilder + from .directory_roles.directory_roles_request_builder import DirectoryRolesRequestBuilder - return DirectoryRoleTemplatesRequestBuilder(self.request_adapter, self.path_parameters) + return DirectoryRolesRequestBuilder(self.request_adapter, self.path_parameters) @property def domain_dns_records(self) -> DomainDnsRecordsRequestBuilder: @@ -453,13 +453,13 @@ def group_lifecycle_policies(self) -> GroupLifecyclePoliciesRequestBuilder: return GroupLifecyclePoliciesRequestBuilder(self.request_adapter, self.path_parameters) @property - def groups(self) -> GroupsRequestBuilder: + def group_setting_templates(self) -> GroupSettingTemplatesRequestBuilder: """ - Provides operations to manage the collection of group entities. + Provides operations to manage the collection of groupSettingTemplate entities. """ - from .groups.groups_request_builder import GroupsRequestBuilder + from .group_setting_templates.group_setting_templates_request_builder import GroupSettingTemplatesRequestBuilder - return GroupsRequestBuilder(self.request_adapter, self.path_parameters) + return GroupSettingTemplatesRequestBuilder(self.request_adapter, self.path_parameters) @property def group_settings(self) -> GroupSettingsRequestBuilder: @@ -471,13 +471,13 @@ def group_settings(self) -> GroupSettingsRequestBuilder: return GroupSettingsRequestBuilder(self.request_adapter, self.path_parameters) @property - def group_setting_templates(self) -> GroupSettingTemplatesRequestBuilder: + def groups(self) -> GroupsRequestBuilder: """ - Provides operations to manage the collection of groupSettingTemplate entities. + Provides operations to manage the collection of group entities. """ - from .group_setting_templates.group_setting_templates_request_builder import GroupSettingTemplatesRequestBuilder + from .groups.groups_request_builder import GroupsRequestBuilder - return GroupSettingTemplatesRequestBuilder(self.request_adapter, self.path_parameters) + return GroupsRequestBuilder(self.request_adapter, self.path_parameters) @property def identity(self) -> IdentityRequestBuilder: diff --git a/msgraph/generated/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py b/msgraph/generated/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py index 02ede195afd..7f12f9db41b 100644 --- a/msgraph/generated/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py +++ b/msgraph/generated/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[CertificateB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CertificateBasedAuthConfiguration] = None, request_configuration: Optional[CertificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[CertificateBasedAuthConfigur if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/certificate_based_auth_configuration/count/count_request_builder.py b/msgraph/generated/certificate_based_auth_configuration/count/count_request_builder.py index 9005ef3e315..92ace964e59 100644 --- a/msgraph/generated/certificate_based_auth_configuration/count/count_request_builder.py +++ b/msgraph/generated/certificate_based_auth_configuration/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py b/msgraph/generated/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py index 52ad8ba9def..3f166f582b5 100644 --- a/msgraph/generated/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py +++ b/msgraph/generated/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Certifica Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CertificateBasedAuthConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[CertificateB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CertificateBasedAuthConfiguration] = None, request_configuration: Optional[CertificateBasedAuthConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[CertificateBasedAuthConfigu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/chats_request_builder.py b/msgraph/generated/chats/chats_request_builder.py index dd136ea40d9..97a9eb0cef1 100644 --- a/msgraph/generated/chats/chats_request_builder.py +++ b/msgraph/generated/chats/chats_request_builder.py @@ -46,7 +46,7 @@ def by_chat_id(self,chat_id: str) -> ChatItemRequestBuilder: async def get(self,request_configuration: Optional[ChatsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatCollectionResponse]: """ - Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. + Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ChatsRequestBuilderGetRequest async def post(self,body: Optional[Chat] = None, request_configuration: Optional[ChatsRequestBuilderPostRequestConfiguration] = None) -> Optional[Chat]: """ - Create a new chat object. + Create a new chat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Chat] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Chat] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChatsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. + Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Chat] = None, request_configuration: Optional[ChatsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new chat object. + Create a new chat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Chat] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class ChatsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. + Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/count/count_request_builder.py b/msgraph/generated/chats/count/count_request_builder.py index 36084ca9231..d485bc4184c 100644 --- a/msgraph/generated/chats/count/count_request_builder.py +++ b/msgraph/generated/chats/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/get_all_messages/get_all_messages_response.py b/msgraph/generated/chats/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/teams/get_all_messages/get_all_messages_response.py rename to msgraph/generated/chats/get_all_messages/get_all_messages_get_response.py index 8a0681d97d1..2d914ec2570 100644 --- a/msgraph/generated/teams/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/chats/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/chats/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/chats/get_all_messages/get_all_messages_request_builder.py index 66457e47444..45e97193635 100644 --- a/msgraph/generated/chats/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/chats/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/chats/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/chats/item/chat_item_request_builder.py b/msgraph/generated/chats/item/chat_item_request_builder.py index 266c4c35fda..db17d839046 100644 --- a/msgraph/generated/chats/item/chat_item_request_builder.py +++ b/msgraph/generated/chats/item/chat_item_request_builder.py @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[ChatItemRequestBuilderDele async def get(self,request_configuration: Optional[ChatItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Chat]: """ - Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. + Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Chat] Find more info here: https://learn.microsoft.com/graph/api/chat-get?view=graph-rest-1.0 @@ -81,7 +81,7 @@ async def get(self,request_configuration: Optional[ChatItemRequestBuilderGetRequ async def patch(self,body: Optional[Chat] = None, request_configuration: Optional[ChatItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Chat]: """ - Update the properties of a chat object. + Update the properties of a chat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Chat] @@ -111,34 +111,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. + Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Chat] = None, request_configuration: Optional[ChatItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a chat object. + Update the properties of a chat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -146,13 +146,13 @@ def to_patch_request_information(self,body: Optional[Chat] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -287,7 +287,7 @@ class ChatItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ChatItemRequestBuilderGetQueryParameters(): """ - Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. + Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/hide_for_user/hide_for_user_request_builder.py b/msgraph/generated/chats/item/hide_for_user/hide_for_user_request_builder.py index 033560e5303..9a6b3707454 100644 --- a/msgraph/generated/chats/item/hide_for_user/hide_for_user_request_builder.py +++ b/msgraph/generated/chats/item/hide_for_user/hide_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[HideForUserPostRequestBody] = None, request_configuration: Optional[HideForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Hide a chat for a user. + Hide a chat for a user. This API is available in the following national cloud deployments. 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[HideForUserPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[HideForUserPostRequestBody] = None, request_configuration: Optional[HideForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Hide a chat for a user. + Hide a chat for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[HideForUserPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/installed_apps/count/count_request_builder.py b/msgraph/generated/chats/item/installed_apps/count/count_request_builder.py index 62e170cf3b9..e679c178715 100644 --- a/msgraph/generated/chats/item/installed_apps/count/count_request_builder.py +++ b/msgraph/generated/chats/item/installed_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/installed_apps/installed_apps_request_builder.py b/msgraph/generated/chats/item/installed_apps/installed_apps_request_builder.py index 7eef3d3575c..3d655cd6948 100644 --- a/msgraph/generated/chats/item/installed_apps/installed_apps_request_builder.py +++ b/msgraph/generated/chats/item/installed_apps/installed_apps_request_builder.py @@ -45,7 +45,7 @@ def by_teams_app_installation_id(self,teams_app_installation_id: str) -> TeamsAp async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallationCollectionResponse]: """ - List all app installations within a chat. + List all app installations within a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-installedapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGe async def post(self,body: Optional[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Install a teamsApp to the specified chat. + Install a teamsApp to the specified chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsAppInstallation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all app installations within a chat. + List all app installations within a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Install a teamsApp to the specified chat. + Install a teamsApp to the specified chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsAppInstallation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstalledAppsRequestBuilderGetQueryParameters(): """ - List all app installations within a chat. + List all app installations within a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py b/msgraph/generated/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py index e70223e0a0f..b4621afc0c7 100644 --- a/msgraph/generated/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: diff --git a/msgraph/generated/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py b/msgraph/generated/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py index 8fc9c751f1f..d70ee77d424 100644 --- a/msgraph/generated/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py +++ b/msgraph/generated/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppDefinitionRequestBuilder: diff --git a/msgraph/generated/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py b/msgraph/generated/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py index 3d2523a6cd8..a79f0b16ca8 100644 --- a/msgraph/generated/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py +++ b/msgraph/generated/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Uninstall an app installed within a chat. + Uninstall an app installed within a chat. This API is available in the following national cloud deployments. 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/chat-delete-installedapps?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRe async def get(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Get an app installed in a chat. + Get an app installed in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] Find more info here: https://learn.microsoft.com/graph/api/chat-get-installedapps?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[TeamsAppInstallation] = None, request_config def to_delete_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Uninstall an app installed within a chat. + Uninstall an app installed within a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an app installed in a chat. + Get an app installed in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[TeamsAppInstallationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppInstallation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class TeamsAppInstallationItemRequestBuilderGetQueryParameters(): """ - Get an app installed in a chat. + Get an app installed in a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py b/msgraph/generated/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py index 18ab1462802..751d33c6b39 100644 --- a/msgraph/generated/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py +++ b/msgraph/generated/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. 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[UpgradePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/last_message_preview/last_message_preview_request_builder.py b/msgraph/generated/chats/item/last_message_preview/last_message_preview_request_builder.py index e5ef06d2c29..f48a09edae4 100644 --- a/msgraph/generated/chats/item/last_message_preview/last_message_preview_request_builder.py +++ b/msgraph/generated/chats/item/last_message_preview/last_message_preview_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[LastMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LastMessagePreviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[LastMessageP Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageInfo] = None, request_configuration: Optional[LastMessagePreviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageInfo] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py b/msgraph/generated/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py index 67c10f9b7fe..9d5eed6b095 100644 --- a/msgraph/generated/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py +++ b/msgraph/generated/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MarkChatReadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatReadForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Mark a chat as read for a user. + Mark a chat as read for a user. This API is available in the following national cloud deployments. 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[MarkChatReadForUserPostRequestBody] = None, r def to_post_request_information(self,body: Optional[MarkChatReadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatReadForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mark a chat as read for a user. + Mark a chat as read for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[MarkChatReadForUserPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py b/msgraph/generated/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py index c8873852056..45d0216ffcb 100644 --- a/msgraph/generated/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py +++ b/msgraph/generated/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MarkChatUnreadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatUnreadForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Mark a chat as unread for a user. + Mark a chat as unread for a user. This API is available in the following national cloud deployments. 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[MarkChatUnreadForUserPostRequestBody] = None, def to_post_request_information(self,body: Optional[MarkChatUnreadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatUnreadForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mark a chat as unread for a user. + Mark a chat as unread for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[MarkChatUnreadForUserPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/members/add/add_response.py b/msgraph/generated/chats/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/teams/item/members/add/add_response.py rename to msgraph/generated/chats/item/members/add/add_post_response.py index e5795598999..daf4c052a27 100644 --- a/msgraph/generated/teams/item/members/add/add_response.py +++ b/msgraph/generated/chats/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/chats/item/members/add/add_request_builder.py b/msgraph/generated/chats/item/members/add/add_request_builder.py index c6c79b8e7ca..777e8d43934 100644 --- a/msgraph/generated/chats/item/members/add/add_request_builder.py +++ b/msgraph/generated/chats/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/members/count/count_request_builder.py b/msgraph/generated/chats/item/members/count/count_request_builder.py index a7606b6eb6f..d96b9a739b7 100644 --- a/msgraph/generated/chats/item/members/count/count_request_builder.py +++ b/msgraph/generated/chats/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 73144f9e61d..9db747a6f09 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 @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a conversationMember from a chat. + Remove a conversationMember from a chat. This API is available in the following national cloud deployments. 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/chat-delete-members?view=graph-rest-1.0 @@ -48,7 +48,7 @@ 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 or channel. + Retrieve a conversationMember from a chat or channel. This API is available in the following national cloud deployments. 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/conversationmember-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a conversationMember from a chat. + Remove a conversationMember from a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a conversationMember from a chat or channel. + Retrieve a conversationMember from a chat or channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Retrieve a conversationMember from a chat or channel. + Retrieve a conversationMember from a chat or channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/members/members_request_builder.py b/msgraph/generated/chats/item/members/members_request_builder.py index b645f06e760..03eb0cbef7c 100644 --- a/msgraph/generated/chats/item/members/members_request_builder.py +++ b/msgraph/generated/chats/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - List all conversation members in a chat or channel. + List all conversation members in a chat or channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmember-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a chat. + Add a conversationMember to a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all conversation members in a chat or channel. + List all conversation members in a chat or channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a chat. + Add a conversationMember to a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - List all conversation members in a chat or channel. + List all conversation members in a chat or channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/count/count_request_builder.py b/msgraph/generated/chats/item/messages/count/count_request_builder.py index 674d9f86886..ee1dacc56f5 100644 --- a/msgraph/generated/chats/item/messages/count/count_request_builder.py +++ b/msgraph/generated/chats/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/delta/delta_response.py b/msgraph/generated/chats/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/chats/item/messages/delta/delta_response.py rename to msgraph/generated/chats/item/messages/delta/delta_get_response.py index 7186b43ec9d..67012b301ea 100644 --- a/msgraph/generated/chats/item/messages/delta/delta_response.py +++ b/msgraph/generated/chats/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/chats/item/messages/delta/delta_request_builder.py b/msgraph/generated/chats/item/messages/delta/delta_request_builder.py index 6ca05c9f26d..6c1a963778c 100644 --- a/msgraph/generated/chats/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/chats/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/chat_message_item_request_builder.py b/msgraph/generated/chats/item/messages/item/chat_message_item_request_builder.py index ea134233534..3016c33b92d 100644 --- a/msgraph/generated/chats/item/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -104,29 +104,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -226,7 +226,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/chats/item/messages/item/hosted_contents/count/count_request_builder.py index 1be66ab6a58..e2314b7e9bc 100644 --- a/msgraph/generated/chats/item/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py index 20ce7a86e76..6b351c32c10 100644 --- a/msgraph/generated/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 34b0612c235..831e5548ce7 100644 --- a/msgraph/generated/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py index 48bda23bd66..11858f95866 100644 --- a/msgraph/generated/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/chats/item/messages/item/replies/count/count_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/count/count_request_builder.py index b62f43e8239..8634b922206 100644 --- a/msgraph/generated/chats/item/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_response.py b/msgraph/generated/chats/item/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_response.py rename to msgraph/generated/chats/item/messages/item/replies/delta/delta_get_response.py index b52bac4c1d4..59ba7b29309 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_response.py +++ b/msgraph/generated/chats/item/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/chats/item/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/delta/delta_request_builder.py index 9e7290b104b..66fb215a611 100644 --- a/msgraph/generated/chats/item/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/chat_message_item_request_builder.py index b7c8c48a548..6f2a1e6153a 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py index 13ceebdcfbe..57380f21ff6 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index c8190e789ce..1a4d4e69a4a 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 267749f284e..b515d2467ef 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index 33e42b8d23c..ade30e9553b 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index 7c12d7ad329..74d9a5657a7 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index fb2c9868a90..06a664f981d 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index 252fa2174c1..bb6183c2227 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index 291b6d82d2a..86159b25751 100644 --- a/msgraph/generated/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 5713445980d..7ed56559167 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/chats/item/messages/item/set_reaction/set_reaction_request_builder.py index 6af1724e2b7..aa486f547e0 100644 --- a/msgraph/generated/chats/item/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/chats/item/messages/item/soft_delete/soft_delete_request_builder.py index 8566c9f23a2..44222c203e1 100644 --- a/msgraph/generated/chats/item/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index 1f22e71c8bb..a2e27ceefc9 100644 --- a/msgraph/generated/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py index d13f878355a..c1670231d15 100644 --- a/msgraph/generated/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/messages/messages_request_builder.py b/msgraph/generated/chats/item/messages/messages_request_builder.py index e5dc728392e..39fc7884735 100644 --- a/msgraph/generated/chats/item/messages/messages_request_builder.py +++ b/msgraph/generated/chats/item/messages/messages_request_builder.py @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-messages?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 or a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 or a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/permission_grants/count/count_request_builder.py b/msgraph/generated/chats/item/permission_grants/count/count_request_builder.py index 4b620c677a9..ab037d05b94 100644 --- a/msgraph/generated/chats/item/permission_grants/count/count_request_builder.py +++ b/msgraph/generated/chats/item/permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 8493d6b4d50..00000000000 --- a/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 6cc0362e04b..00000000000 --- a/msgraph/generated/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .....models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index ac4fdf6112d..00000000000 --- a/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py b/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py deleted file mode 100644 index a5fc2c2476e..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The groupIds property - group_ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsPostRequestBody() - - 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]] = { - "groupIds": lambda n : setattr(self, 'group_ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("groupIds", self.group_ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py deleted file mode 100644 index 9e9a343fdf1..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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 .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse - -class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?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 .check_member_groups_response import CheckMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberGroupsRequestBuilderPostRequestConfiguration(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/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 37d1b2933a0..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py b/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py deleted file mode 100644 index 5f48b8577ec..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index 5405d07e36b..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py b/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py deleted file mode 100644 index 1a3308bfb6c..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py deleted file mode 100644 index 07d7f2f033d..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse - -class GetMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?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 .get_member_groups_response import GetMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberGroupsRequestBuilderPostRequestConfiguration(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/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py b/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py deleted file mode 100644 index 7552e02e441..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py deleted file mode 100644 index cd91c2980de..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse - -class GetMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?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 .get_member_objects_response import GetMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberObjectsRequestBuilderPostRequestConfiguration(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/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index d78b936af0e..00000000000 --- a/msgraph/generated/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index a8e91cb0f95..d88549f1759 100644 --- a/msgraph/generated/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -12,11 +12,6 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - from .restore.restore_request_builder import RestoreRequestBuilder class ResourceSpecificPermissionGrantItemRequestBuilder(BaseRequestBuilder): """ @@ -102,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -157,51 +152,6 @@ def with_url(self,raw_url: Optional[str] = None) -> ResourceSpecificPermissionGr raise TypeError("raw_url cannot be null.") return ResourceSpecificPermissionGrantItemRequestBuilder(self.request_adapter, raw_url) - @property - def check_member_groups(self) -> CheckMemberGroupsRequestBuilder: - """ - Provides operations to call the checkMemberGroups method. - """ - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - - return CheckMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def check_member_objects(self) -> CheckMemberObjectsRequestBuilder: - """ - Provides operations to call the checkMemberObjects method. - """ - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - - return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_groups(self) -> GetMemberGroupsRequestBuilder: - """ - Provides operations to call the getMemberGroups method. - """ - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - - return GetMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_objects(self) -> GetMemberObjectsRequestBuilder: - """ - Provides operations to call the getMemberObjects method. - """ - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - - return GetMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def restore(self) -> RestoreRequestBuilder: - """ - Provides operations to call the restore method. - """ - from .restore.restore_request_builder import RestoreRequestBuilder - - return RestoreRequestBuilder(self.request_adapter, self.path_parameters) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/chats/item/permission_grants/permission_grants_request_builder.py b/msgraph/generated/chats/item/permission_grants/permission_grants_request_builder.py index 928b920cd0d..54661f97d2c 100644 --- a/msgraph/generated/chats/item/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/chats/item/permission_grants/permission_grants_request_builder.py @@ -14,11 +14,7 @@ from ....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant from ....models.resource_specific_permission_grant_collection_response import ResourceSpecificPermissionGrantCollectionResponse from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.resource_specific_permission_grant_item_request_builder import ResourceSpecificPermissionGrantItemRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class PermissionGrantsRequestBuilder(BaseRequestBuilder): """ @@ -49,7 +45,7 @@ def by_resource_specific_permission_grant_id(self,resource_specific_permission_g async def get(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ResourceSpecificPermissionGrantCollectionResponse]: """ - List all resource-specific permission grants on the chat. This list specifies the Azure AD apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ResourceSpecificPermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-permissiongrants?view=graph-rest-1.0 @@ -95,19 +91,19 @@ async def post(self,body: Optional[ResourceSpecificPermissionGrant] = None, requ def to_get_request_information(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all resource-specific permission grants on the chat. This list specifies the Azure AD apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +116,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,46 +145,10 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class PermissionGrantsRequestBuilderGetQueryParameters(): """ - List all resource-specific permission grants on the chat. This list specifies the Azure AD apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index 0ed3d36218f..00000000000 --- a/msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/chats/item/pinned_messages/count/count_request_builder.py b/msgraph/generated/chats/item/pinned_messages/count/count_request_builder.py index 27bc65d16e8..d72ab80b304 100644 --- a/msgraph/generated/chats/item/pinned_messages/count/count_request_builder.py +++ b/msgraph/generated/chats/item/pinned_messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/pinned_messages/item/message/message_request_builder.py b/msgraph/generated/chats/item/pinned_messages/item/message/message_request_builder.py index af39b1f93e5..7c7816b5033 100644 --- a/msgraph/generated/chats/item/pinned_messages/item/message/message_request_builder.py +++ b/msgraph/generated/chats/item/pinned_messages/item/message/message_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[MessageReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MessageRequestBuilder: diff --git a/msgraph/generated/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py b/msgraph/generated/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py index 8af558cd09e..a02ef5f19d6 100644 --- a/msgraph/generated/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py +++ b/msgraph/generated/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unpin a message from a chat. + Unpin a message from a chat. This API is available in the following national cloud deployments. 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/chat-delete-pinnedmessages?view=graph-rest-1.0 @@ -94,17 +94,17 @@ async def patch(self,body: Optional[PinnedChatMessageInfo] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unpin a message from a chat. + Unpin a message from a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PinnedChatMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PinnedChatMessageInfo] = None, request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PinnedChatMessageInfo] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/pinned_messages/pinned_messages_request_builder.py b/msgraph/generated/chats/item/pinned_messages/pinned_messages_request_builder.py index 56fbd5ffaaa..dba619a3d0a 100644 --- a/msgraph/generated/chats/item/pinned_messages/pinned_messages_request_builder.py +++ b/msgraph/generated/chats/item/pinned_messages/pinned_messages_request_builder.py @@ -45,7 +45,7 @@ def by_pinned_chat_message_info_id(self,pinned_chat_message_info_id: str) -> Pin async def get(self,request_configuration: Optional[PinnedMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[PinnedChatMessageInfoCollectionResponse]: """ - Get a list of pinnedChatMessages in a chat. + Get a list of pinnedChatMessages in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PinnedChatMessageInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-pinnedmessages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PinnedMessagesRequestBuilderG async def post(self,body: Optional[PinnedChatMessageInfo] = None, request_configuration: Optional[PinnedMessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[PinnedChatMessageInfo]: """ - Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. + Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PinnedChatMessageInfo] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PinnedChatMessageInfo] = None, request_config def to_get_request_information(self,request_configuration: Optional[PinnedMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of pinnedChatMessages in a chat. + Get a list of pinnedChatMessages in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PinnedChatMessageInfo] = None, request_configuration: Optional[PinnedMessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. + Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PinnedChatMessageInfo] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PinnedMessagesRequestBuilderGetQueryParameters(): """ - Get a list of pinnedChatMessages in a chat. + Get a list of pinnedChatMessages in a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/send_activity_notification/send_activity_notification_request_builder.py b/msgraph/generated/chats/item/send_activity_notification/send_activity_notification_request_builder.py index 7b2181e97cd..eda9e5d6949 100644 --- a/msgraph/generated/chats/item/send_activity_notification/send_activity_notification_request_builder.py +++ b/msgraph/generated/chats/item/send_activity_notification/send_activity_notification_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationPostRequestBody] = No def to_post_request_information(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/tabs/count/count_request_builder.py b/msgraph/generated/chats/item/tabs/count/count_request_builder.py index b91e4845d08..a4b7edfdb11 100644 --- a/msgraph/generated/chats/item/tabs/count/count_request_builder.py +++ b/msgraph/generated/chats/item/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/chats/item/tabs/item/teams_app/teams_app_request_builder.py index 4baf29a0e98..3bd25be9113 100644 --- a/msgraph/generated/chats/item/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/chats/item/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/chats/item/tabs/item/teams_tab_item_request_builder.py index 41a8cb37e6e..4cdd877ca67 100644 --- a/msgraph/generated/chats/item/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/chats/item/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove (unpin) a tab from the specified chat. + Remove (unpin) a tab from the specified chat. This API is available in the following national cloud deployments. 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/chat-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a chat. + Retrieve the properties and relationships of the specified tab in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/chat-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. + Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove (unpin) a tab from the specified chat. + Remove (unpin) a tab from the specified chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a chat. + Retrieve the properties and relationships of the specified tab in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. + Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a chat. + Retrieve the properties and relationships of the specified tab in a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/tabs/tabs_request_builder.py b/msgraph/generated/chats/item/tabs/tabs_request_builder.py index 5c54fb5bea4..11f3063e6cc 100644 --- a/msgraph/generated/chats/item/tabs/tabs_request_builder.py +++ b/msgraph/generated/chats/item/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified chat. + Retrieve the list of tabs in the specified chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. + Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified chat. + Retrieve the list of tabs in the specified chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. + Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified chat. + Retrieve the list of tabs in the specified chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/unhide_for_user/unhide_for_user_request_builder.py b/msgraph/generated/chats/item/unhide_for_user/unhide_for_user_request_builder.py index 60ddbcbb3d1..22fa53df41c 100644 --- a/msgraph/generated/chats/item/unhide_for_user/unhide_for_user_request_builder.py +++ b/msgraph/generated/chats/item/unhide_for_user/unhide_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UnhideForUserPostRequestBody] = None, request_configuration: Optional[UnhideForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unhide a chat for a user. + Unhide a chat for a user. This API is available in the following national cloud deployments. 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[UnhideForUserPostRequestBody] = None, request def to_post_request_information(self,body: Optional[UnhideForUserPostRequestBody] = None, request_configuration: Optional[UnhideForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unhide a chat for a user. + Unhide a chat for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UnhideForUserPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/call_records/call_records_request_builder.py b/msgraph/generated/communications/call_records/call_records_request_builder.py index cebfca01126..6f366e266a4 100644 --- a/msgraph/generated/communications/call_records/call_records_request_builder.py +++ b/msgraph/generated/communications/call_records/call_records_request_builder.py @@ -48,7 +48,7 @@ def by_call_record_id(self,call_record_id: str) -> CallRecordItemRequestBuilder: async def get(self,request_configuration: Optional[CallRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[CallRecordCollectionResponse]: """ - Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CallRecordCollectionResponse] """ @@ -123,19 +123,19 @@ async def post(self,body: Optional[CallRecord] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[CallRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CallRecord] = None, request_configuration: Optional[CallRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -148,13 +148,13 @@ def to_post_request_information(self,body: Optional[CallRecord] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -180,7 +180,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CallRecordsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/call_records/count/count_request_builder.py b/msgraph/generated/communications/call_records/count/count_request_builder.py index db75ecb8a22..b5e56056dc6 100644 --- a/msgraph/generated/communications/call_records/count/count_request_builder.py +++ b/msgraph/generated/communications/call_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/call_records/item/call_record_item_request_builder.py b/msgraph/generated/communications/call_records/item/call_record_item_request_builder.py index f548d188d0b..25ce4b580fa 100644 --- a/msgraph/generated/communications/call_records/item/call_record_item_request_builder.py +++ b/msgraph/generated/communications/call_records/item/call_record_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CallRecordItemRequestBuild async def get(self,request_configuration: Optional[CallRecordItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CallRecord]: """ - Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CallRecord] Find more info here: https://learn.microsoft.com/graph/api/callrecords-callrecord-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[CallRecor Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CallRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CallRecord] = None, request_configuration: Optional[CallRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[CallRecord] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class CallRecordItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class CallRecordItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/call_records/item/sessions/count/count_request_builder.py b/msgraph/generated/communications/call_records/item/sessions/count/count_request_builder.py index 0b4fae52769..43e286b288b 100644 --- a/msgraph/generated/communications/call_records/item/sessions/count/count_request_builder.py +++ b/msgraph/generated/communications/call_records/item/sessions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/call_records/item/sessions/item/segments/count/count_request_builder.py b/msgraph/generated/communications/call_records/item/sessions/item/segments/count/count_request_builder.py index 807e34af965..56ebf8948d6 100644 --- a/msgraph/generated/communications/call_records/item/sessions/item/segments/count/count_request_builder.py +++ b/msgraph/generated/communications/call_records/item/sessions/item/segments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.py b/msgraph/generated/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.py index 1f21fa4403b..00c3dc2f020 100644 --- a/msgraph/generated/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.py +++ b/msgraph/generated/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[SegmentIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SegmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[SegmentItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Segment] = None, request_configuration: Optional[SegmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Segment] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/call_records/item/sessions/item/segments/segments_request_builder.py b/msgraph/generated/communications/call_records/item/sessions/item/segments/segments_request_builder.py index 05d1e4d31f3..98cdff03886 100644 --- a/msgraph/generated/communications/call_records/item/sessions/item/segments/segments_request_builder.py +++ b/msgraph/generated/communications/call_records/item/sessions/item/segments/segments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[SegmentsRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Segment] = None, request_configuration: Optional[SegmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Segment] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/call_records/item/sessions/item/session_item_request_builder.py b/msgraph/generated/communications/call_records/item/sessions/item/session_item_request_builder.py index 546a4ec51dd..dde64792285 100644 --- a/msgraph/generated/communications/call_records/item/sessions/item/session_item_request_builder.py +++ b/msgraph/generated/communications/call_records/item/sessions/item/session_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[SessionIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SessionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[SessionItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Session] = None, request_configuration: Optional[SessionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Session] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/call_records/item/sessions/sessions_request_builder.py b/msgraph/generated/communications/call_records/item/sessions/sessions_request_builder.py index 3d29d85c8f0..0c4d463493a 100644 --- a/msgraph/generated/communications/call_records/item/sessions/sessions_request_builder.py +++ b/msgraph/generated/communications/call_records/item/sessions/sessions_request_builder.py @@ -45,7 +45,7 @@ def by_session_id(self,session_id: str) -> SessionItemRequestBuilder: async def get(self,request_configuration: Optional[SessionsRequestBuilderGetRequestConfiguration] = None) -> Optional[SessionCollectionResponse]: """ - Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. + Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SessionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/callrecords-session-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Session] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[SessionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. + Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Session] = None, request_configuration: Optional[SessionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Session] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SessionsRequestBuilderGetQueryParameters(): """ - Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. + Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_response.py b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py similarity index 94% rename from msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_response.py rename to msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py index 9b3debf2428..e2883d9e2d7 100644 --- a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_response.py +++ b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse(BaseCollectionPaginationCountResponse): +class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DirectRoutingLogRow]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse + Returns: GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse() + return GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py index 10f2f25c173..efe40e0dd58 100644 --- a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py +++ b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_direct_routing_calls_with_from_date_time_with_to_date_time_response import GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse + from .get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response import GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse class MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,16 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param to_date_time: Usage: toDateTime={toDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['from_date_time'] = str(from_date_time) + path_parameters['to_date_time'] = str(to_date_time) super().__init__(request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse]: + async def get(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse]: """ Invoke function getDirectRoutingCalls param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse] + Returns: Optional[GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +49,9 @@ async def get(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetD } if not self.request_adapter: raise Exception("Http core is null") - from .get_direct_routing_calls_with_from_date_time_with_to_date_time_response import GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse + from .get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response import GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse - return await self.request_adapter.send_async(request_info, GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +60,14 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder: diff --git a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_response.py b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_get_response.py similarity index 88% rename from msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_response.py rename to msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_get_response.py index 5b61c40b4c7..f52b5b50c22 100644 --- a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_response.py +++ b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetPstnCallsWithFromDateTimeWithToDateTimeResponse(BaseCollectionPaginationCountResponse): +class GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[PstnCallLogRow]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetPstnCallsWithFromDateTimeWithToDateTimeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetPstnCallsWithFromDateTimeWithToDateTimeResponse + Returns: GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetPstnCallsWithFromDateTimeWithToDateTimeResponse() + return GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time_request_builder.py b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time_request_builder.py index 0a82b01e382..bcfbc734904 100644 --- a/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time_request_builder.py +++ b/msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_pstn_calls_with_from_date_time_with_to_date_time_response import GetPstnCallsWithFromDateTimeWithToDateTimeResponse + from .get_pstn_calls_with_from_date_time_with_to_date_time_get_response import GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse class MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,16 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param to_date_time: Usage: toDateTime={toDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['from_date_time'] = str(from_date_time) + path_parameters['to_date_time'] = str(to_date_time) super().__init__(request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetPstnCallsWithFromDateTimeWithToDateTimeResponse]: + async def get(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse]: """ Invoke function getPstnCalls param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetPstnCallsWithFromDateTimeWithToDateTimeResponse] + Returns: Optional[GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +49,9 @@ async def get(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetP } if not self.request_adapter: raise Exception("Http core is null") - from .get_pstn_calls_with_from_date_time_with_to_date_time_response import GetPstnCallsWithFromDateTimeWithToDateTimeResponse + from .get_pstn_calls_with_from_date_time_with_to_date_time_get_response import GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse - return await self.request_adapter.send_async(request_info, GetPstnCallsWithFromDateTimeWithToDateTimeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +60,14 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder: diff --git a/msgraph/generated/communications/calls/calls_request_builder.py b/msgraph/generated/communications/calls/calls_request_builder.py index 696568621d1..dde9d827540 100644 --- a/msgraph/generated/communications/calls/calls_request_builder.py +++ b/msgraph/generated/communications/calls/calls_request_builder.py @@ -46,7 +46,7 @@ def by_call_id(self,call_id: str) -> CallItemRequestBuilder: async def get(self,request_configuration: Optional[CallsRequestBuilderGetRequestConfiguration] = None) -> Optional[CallCollectionResponse]: """ - Retrieve the properties and relationships of a call object. + Retrieve the properties and relationships of a call object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CallCollectionResponse] """ @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CallsRequestBuilderGetRequest async def post(self,body: Optional[Call] = None, request_configuration: Optional[CallsRequestBuilderPostRequestConfiguration] = None) -> Optional[Call]: """ - Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You will need to register the calling bot and go through the list of permissions needed as mentioned below. + Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You will need to register the calling bot and go through the list of permissions needed as mentioned below. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Call] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Call] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[CallsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a call object. + Retrieve the properties and relationships of a call object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Call] = None, request_configuration: Optional[CallsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You will need to register the calling bot and go through the list of permissions needed as mentioned below. + Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You will need to register the calling bot and go through the list of permissions needed as mentioned below. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Call] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def log_teleconference_device_quality(self) -> LogTeleconferenceDeviceQualityReq @dataclass class CallsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a call object. + Retrieve the properties and relationships of a call object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/count/count_request_builder.py b/msgraph/generated/communications/calls/count/count_request_builder.py index cc46b45e94d..e73859e1704 100644 --- a/msgraph/generated/communications/calls/count/count_request_builder.py +++ b/msgraph/generated/communications/calls/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.py b/msgraph/generated/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.py index 21c25f5a9b1..bfe6cb0005a 100644 --- a/msgraph/generated/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.py +++ b/msgraph/generated/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddLargeGalleryViewPostRequestBody] = None, request_configuration: Optional[AddLargeGalleryViewRequestBuilderPostRequestConfiguration] = None) -> Optional[AddLargeGalleryViewOperation]: """ - Add the large gallery view to a call. For details about how to identify a large gallery view participant in a roster so that you can retrieve the relevant data to subscribe to the video feed, see Identify large gallery view participants in a roster. + Add the large gallery view to a call. For details about how to identify a large gallery view participant in a roster so that you can retrieve the relevant data to subscribe to the video feed, see Identify large gallery view participants in a roster. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AddLargeGalleryViewOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddLargeGalleryViewPostRequestBody] = None, r def to_post_request_information(self,body: Optional[AddLargeGalleryViewPostRequestBody] = None, request_configuration: Optional[AddLargeGalleryViewRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add the large gallery view to a call. For details about how to identify a large gallery view participant in a roster so that you can retrieve the relevant data to subscribe to the video feed, see Identify large gallery view participants in a roster. + Add the large gallery view to a call. For details about how to identify a large gallery view participant in a roster so that you can retrieve the relevant data to subscribe to the video feed, see Identify large gallery view participants in a roster. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddLargeGalleryViewPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/answer/answer_request_builder.py b/msgraph/generated/communications/calls/item/answer/answer_request_builder.py index 303c73b439e..2eb7ffa5c61 100644 --- a/msgraph/generated/communications/calls/item/answer/answer_request_builder.py +++ b/msgraph/generated/communications/calls/item/answer/answer_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AnswerPostRequestBody] = None, request_configuration: Optional[AnswerRequestBuilderPostRequestConfiguration] = None) -> None: """ - Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios. + Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios. This API is available in the following national cloud deployments. 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[AnswerPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AnswerPostRequestBody] = None, request_configuration: Optional[AnswerRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios. + Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AnswerPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.py b/msgraph/generated/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.py index eb73bc3659d..8b927eb8f99 100644 --- a/msgraph/generated/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.py +++ b/msgraph/generated/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.py @@ -45,7 +45,7 @@ def by_audio_routing_group_id(self,audio_routing_group_id: str) -> AudioRoutingG async def get(self,request_configuration: Optional[AudioRoutingGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[AudioRoutingGroupCollectionResponse]: """ - Retrieve a list of audioRoutingGroup objects. + Retrieve a list of audioRoutingGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AudioRoutingGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/call-list-audioroutinggroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AudioRoutingGroupsRequestBuil async def post(self,body: Optional[AudioRoutingGroup] = None, request_configuration: Optional[AudioRoutingGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[AudioRoutingGroup]: """ - Create a new audioRoutingGroup. + Create a new audioRoutingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AudioRoutingGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AudioRoutingGroup] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[AudioRoutingGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of audioRoutingGroup objects. + Retrieve a list of audioRoutingGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AudioRoutingGroup] = None, request_configuration: Optional[AudioRoutingGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new audioRoutingGroup. + Create a new audioRoutingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AudioRoutingGroup] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AudioRoutingGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of audioRoutingGroup objects. + Retrieve a list of audioRoutingGroup objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/audio_routing_groups/count/count_request_builder.py b/msgraph/generated/communications/calls/item/audio_routing_groups/count/count_request_builder.py index e5bc2f088e7..9b54ec595c6 100644 --- a/msgraph/generated/communications/calls/item/audio_routing_groups/count/count_request_builder.py +++ b/msgraph/generated/communications/calls/item/audio_routing_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.py b/msgraph/generated/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.py index ea29dc6d079..eb3975247b6 100644 --- a/msgraph/generated/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.py +++ b/msgraph/generated/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AudioRoutingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the specified audioRoutingGroup. + Delete the specified audioRoutingGroup. This API is available in the following national cloud deployments. 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/audioroutinggroup-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AudioRoutingGroupItemReque async def get(self,request_configuration: Optional[AudioRoutingGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AudioRoutingGroup]: """ - Retrieve the properties and relationships of an audioRoutingGroup object. + Retrieve the properties and relationships of an audioRoutingGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AudioRoutingGroup] Find more info here: https://learn.microsoft.com/graph/api/audioroutinggroup-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AudioRoutingGroupItemRequestB async def patch(self,body: Optional[AudioRoutingGroup] = None, request_configuration: Optional[AudioRoutingGroupItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AudioRoutingGroup]: """ - Modify sources and receivers of an audioRoutingGroup. + Modify sources and receivers of an audioRoutingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AudioRoutingGroup] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[AudioRoutingGroup] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[AudioRoutingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the specified audioRoutingGroup. + Delete the specified audioRoutingGroup. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AudioRoutingGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an audioRoutingGroup object. + Retrieve the properties and relationships of an audioRoutingGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AudioRoutingGroup] = None, request_configuration: Optional[AudioRoutingGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Modify sources and receivers of an audioRoutingGroup. + Modify sources and receivers of an audioRoutingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AudioRoutingGroup] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class AudioRoutingGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class AudioRoutingGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an audioRoutingGroup object. + Retrieve the properties and relationships of an audioRoutingGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/call_item_request_builder.py b/msgraph/generated/communications/calls/item/call_item_request_builder.py index 33395cf52b3..aff603cc8d3 100644 --- a/msgraph/generated/communications/calls/item/call_item_request_builder.py +++ b/msgraph/generated/communications/calls/item/call_item_request_builder.py @@ -46,7 +46,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CallItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue. + Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue. This API is available in the following national cloud deployments. 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/call-delete?view=graph-rest-1.0 @@ -66,7 +66,7 @@ async def delete(self,request_configuration: Optional[CallItemRequestBuilderDele async def get(self,request_configuration: Optional[CallItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Call]: """ - Retrieve the properties and relationships of a call object. + Retrieve the properties and relationships of a call object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Call] Find more info here: https://learn.microsoft.com/graph/api/call-get?view=graph-rest-1.0 @@ -112,34 +112,34 @@ async def patch(self,body: Optional[Call] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[CallItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue. + Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CallItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a call object. + Retrieve the properties and relationships of a call object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Call] = None, request_configuration: Optional[CallItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -152,13 +152,13 @@ def to_patch_request_information(self,body: Optional[Call] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -347,7 +347,7 @@ class CallItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class CallItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a call object. + Retrieve the properties and relationships of a call object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.py b/msgraph/generated/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.py index 2a924f13f78..95a930e6b17 100644 --- a/msgraph/generated/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.py +++ b/msgraph/generated/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelMediaProcessingPostRequestBody] = None, request_configuration: Optional[CancelMediaProcessingRequestBuilderPostRequestConfiguration] = None) -> Optional[CancelMediaProcessingOperation]: """ - Cancels processing for any in-progress media operations. Media operations refer to the IVR operations playPrompt and recordResponse, which are by default queued to process in order. The cancelMediaProcessing method cancels any operation that is in-process as well as operations that are queued. For example, this method can be used to clean up the IVR operation queue for a new media operation. However, it will not cancel a subscribeToTone operation because it operates independent of any operation queue. + Cancels processing for any in-progress media operations. Media operations refer to the IVR operations playPrompt and recordResponse, which are by default queued to process in order. The cancelMediaProcessing method cancels any operation that is in-process as well as operations that are queued. For example, this method can be used to clean up the IVR operation queue for a new media operation. However, it will not cancel a subscribeToTone operation because it operates independent of any operation queue. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CancelMediaProcessingOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CancelMediaProcessingPostRequestBody] = None, def to_post_request_information(self,body: Optional[CancelMediaProcessingPostRequestBody] = None, request_configuration: Optional[CancelMediaProcessingRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Cancels processing for any in-progress media operations. Media operations refer to the IVR operations playPrompt and recordResponse, which are by default queued to process in order. The cancelMediaProcessing method cancels any operation that is in-process as well as operations that are queued. For example, this method can be used to clean up the IVR operation queue for a new media operation. However, it will not cancel a subscribeToTone operation because it operates independent of any operation queue. + Cancels processing for any in-progress media operations. Media operations refer to the IVR operations playPrompt and recordResponse, which are by default queued to process in order. The cancelMediaProcessing method cancels any operation that is in-process as well as operations that are queued. For example, this method can be used to clean up the IVR operation queue for a new media operation. However, it will not cancel a subscribeToTone operation because it operates independent of any operation queue. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CancelMediaProcessingPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.py b/msgraph/generated/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.py index 04c5ecc3b98..ef8f40af230 100644 --- a/msgraph/generated/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.py +++ b/msgraph/generated/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ChangeScreenSharingRolePostRequestBody] = None, request_configuration: Optional[ChangeScreenSharingRoleRequestBuilderPostRequestConfiguration] = None) -> None: """ - Allow applications to share screen content with the participants of a group call. + Allow applications to share screen content with the participants of a group call. This API is available in the following national cloud deployments. 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[ChangeScreenSharingRolePostRequestBody] = Non def to_post_request_information(self,body: Optional[ChangeScreenSharingRolePostRequestBody] = None, request_configuration: Optional[ChangeScreenSharingRoleRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Allow applications to share screen content with the participants of a group call. + Allow applications to share screen content with the participants of a group call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ChangeScreenSharingRolePostR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.py b/msgraph/generated/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.py index 97602330883..521fb0b4bce 100644 --- a/msgraph/generated/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.py +++ b/msgraph/generated/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.py @@ -45,7 +45,7 @@ def by_content_sharing_session_id(self,content_sharing_session_id: str) -> Conte async def get(self,request_configuration: Optional[ContentSharingSessionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentSharingSessionCollectionResponse]: """ - Retrieve a list of contentSharingSession objects in a call. + Retrieve a list of contentSharingSession objects in a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentSharingSessionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/call-list-contentsharingsessions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ContentSharingSession] = None, request_config def to_get_request_information(self,request_configuration: Optional[ContentSharingSessionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of contentSharingSession objects in a call. + Retrieve a list of contentSharingSession objects in a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentSharingSession] = None, request_configuration: Optional[ContentSharingSessionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ContentSharingSession] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ContentSharingSessionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of contentSharingSession objects in a call. + Retrieve a list of contentSharingSession objects in a call. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/content_sharing_sessions/count/count_request_builder.py b/msgraph/generated/communications/calls/item/content_sharing_sessions/count/count_request_builder.py index 282c08254d2..ddeec7ff99a 100644 --- a/msgraph/generated/communications/calls/item/content_sharing_sessions/count/count_request_builder.py +++ b/msgraph/generated/communications/calls/item/content_sharing_sessions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.py b/msgraph/generated/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.py index 856b87dcd26..1870da2544a 100644 --- a/msgraph/generated/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.py +++ b/msgraph/generated/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ContentSharingSessionItemR async def get(self,request_configuration: Optional[ContentSharingSessionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentSharingSession]: """ - Retrieve the properties of a contentSharingSession object in a call. + Retrieve the properties of a contentSharingSession object in a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentSharingSession] Find more info here: https://learn.microsoft.com/graph/api/contentsharingsession-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[ContentSh Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentSharingSessionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a contentSharingSession object in a call. + Retrieve the properties of a contentSharingSession object in a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentSharingSession] = None, request_configuration: Optional[ContentSharingSessionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ContentSharingSession] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ContentSharingSessionItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class ContentSharingSessionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a contentSharingSession object in a call. + Retrieve the properties of a contentSharingSession object in a call. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/keep_alive/keep_alive_request_builder.py b/msgraph/generated/communications/calls/item/keep_alive/keep_alive_request_builder.py index b82d073218e..be012323e59 100644 --- a/msgraph/generated/communications/calls/item/keep_alive/keep_alive_request_builder.py +++ b/msgraph/generated/communications/calls/item/keep_alive/keep_alive_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[KeepAliveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Make a request to this API every 15 to 45 minutes to ensure that an ongoing call remains active. A call that does not receive this request within 45 minutes is considered inactive and will subsequently end. At least one successful request must be made within 45 minutes of the previous request, or the start of the call. We recommend that you send a request in shorter time intervals (every 15 minutes). Make sure that these requests are successful to prevent the call from timing out and ending. Attempting to send a request to a call that has already ended will result in a 404 Not-Found error. The resources related to the call should be cleaned up on the application side. + Make a request to this API every 15 to 45 minutes to ensure that an ongoing call remains active. A call that does not receive this request within 45 minutes is considered inactive and will subsequently end. At least one successful request must be made within 45 minutes of the previous request, or the start of the call. We recommend that you send a request in shorter time intervals (every 15 minutes). Make sure that these requests are successful to prevent the call from timing out and ending. Attempting to send a request to a call that has already ended will result in a 404 Not-Found error. The resources related to the call should be cleaned up on the application side. This API is available in the following national cloud deployments. 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/call-keepalive?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[KeepAliveRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[KeepAliveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Make a request to this API every 15 to 45 minutes to ensure that an ongoing call remains active. A call that does not receive this request within 45 minutes is considered inactive and will subsequently end. At least one successful request must be made within 45 minutes of the previous request, or the start of the call. We recommend that you send a request in shorter time intervals (every 15 minutes). Make sure that these requests are successful to prevent the call from timing out and ending. Attempting to send a request to a call that has already ended will result in a 404 Not-Found error. The resources related to the call should be cleaned up on the application side. + Make a request to this API every 15 to 45 minutes to ensure that an ongoing call remains active. A call that does not receive this request within 45 minutes is considered inactive and will subsequently end. At least one successful request must be made within 45 minutes of the previous request, or the start of the call. We recommend that you send a request in shorter time intervals (every 15 minutes). Make sure that these requests are successful to prevent the call from timing out and ending. Attempting to send a request to a call that has already ended will result in a 404 Not-Found error. The resources related to the call should be cleaned up on the application side. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> KeepAliveRequestBuilder: diff --git a/msgraph/generated/communications/calls/item/mute/mute_request_builder.py b/msgraph/generated/communications/calls/item/mute/mute_request_builder.py index d081f39bafd..cee7d9fc657 100644 --- a/msgraph/generated/communications/calls/item/mute/mute_request_builder.py +++ b/msgraph/generated/communications/calls/item/mute/mute_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MutePostRequestBody] = None, request_configuration: Optional[MuteRequestBuilderPostRequestConfiguration] = None) -> Optional[MuteParticipantOperation]: """ - Allows the application to mute itself. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more details about how to handle mute operations, see muteParticipantOperation + Allows the application to mute itself. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more details about how to handle mute operations, see muteParticipantOperation This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MuteParticipantOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MutePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MutePostRequestBody] = None, request_configuration: Optional[MuteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Allows the application to mute itself. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more details about how to handle mute operations, see muteParticipantOperation + Allows the application to mute itself. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more details about how to handle mute operations, see muteParticipantOperation This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MutePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/operations/count/count_request_builder.py b/msgraph/generated/communications/calls/item/operations/count/count_request_builder.py index 17db60003e9..4fda7b5edcc 100644 --- a/msgraph/generated/communications/calls/item/operations/count/count_request_builder.py +++ b/msgraph/generated/communications/calls/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/calls/item/operations/item/comms_operation_item_request_builder.py b/msgraph/generated/communications/calls/item/operations/item/comms_operation_item_request_builder.py index 4fabe4a6d66..de7062f4edf 100644 --- a/msgraph/generated/communications/calls/item/operations/item/comms_operation_item_request_builder.py +++ b/msgraph/generated/communications/calls/item/operations/item/comms_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[CommsOperationItemRequestB async def get(self,request_configuration: Optional[CommsOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CommsOperation]: """ - Get the status of an operation that adds the large gallery view to a call. + Get the status of an operation that adds the large gallery view to a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CommsOperation] Find more info here: https://learn.microsoft.com/graph/api/addlargegalleryviewoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[CommsOper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CommsOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of an operation that adds the large gallery view to a call. + Get the status of an operation that adds the large gallery view to a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CommsOperation] = None, request_configuration: Optional[CommsOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[CommsOperation] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class CommsOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class CommsOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of an operation that adds the large gallery view to a call. + Get the status of an operation that adds the large gallery view to a call. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/operations/operations_request_builder.py b/msgraph/generated/communications/calls/item/operations/operations_request_builder.py index 01aedabf8c3..ef217aa5dfc 100644 --- a/msgraph/generated/communications/calls/item/operations/operations_request_builder.py +++ b/msgraph/generated/communications/calls/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_comms_operation_id(self,comms_operation_id: str) -> CommsOperationItemReq async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[CommsOperationCollectionResponse]: """ - Get the status of an operation that adds the large gallery view to a call. + Get the status of an operation that adds the large gallery view to a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CommsOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[CommsOperation] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of an operation that adds the large gallery view to a call. + Get the status of an operation that adds the large gallery view to a call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CommsOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[CommsOperation] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get the status of an operation that adds the large gallery view to a call. + Get the status of an operation that adds the large gallery view to a call. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/participants/count/count_request_builder.py b/msgraph/generated/communications/calls/item/participants/count/count_request_builder.py index 953e40c4919..4465749bd2e 100644 --- a/msgraph/generated/communications/calls/item/participants/count/count_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 851b88328e6..2d1d20f3803 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,7 +29,7 @@ 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. + Invite participants to the active call. For more information about how to handle operations, see commsOperation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InviteParticipantsOperation] @@ -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. + Invite participants to the active call. For more information about how to handle operations, see commsOperation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[InvitePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/participants/item/mute/mute_request_builder.py b/msgraph/generated/communications/calls/item/participants/item/mute/mute_request_builder.py index e27c7ad732b..15a84d32980 100644 --- a/msgraph/generated/communications/calls/item/participants/item/mute/mute_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/item/mute/mute_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MutePostRequestBody] = None, request_configuration: Optional[MuteRequestBuilderPostRequestConfiguration] = None) -> Optional[MuteParticipantOperation]: """ - Mute a specific participant in the call. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more information about how to handle mute operations, see muteParticipantOperation. + Mute a specific participant in the call. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more information about how to handle mute operations, see muteParticipantOperation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MuteParticipantOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MutePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MutePostRequestBody] = None, request_configuration: Optional[MuteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mute a specific participant in the call. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more information about how to handle mute operations, see muteParticipantOperation. + Mute a specific participant in the call. This is a server mute, meaning that the server will drop all audio packets for this participant, even if the participant continues to stream audio. For more information about how to handle mute operations, see muteParticipantOperation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MutePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/participants/item/participant_item_request_builder.py b/msgraph/generated/communications/calls/item/participants/item/participant_item_request_builder.py index 2ac6a7be44f..7d3b71d8296 100644 --- a/msgraph/generated/communications/calls/item/participants/item/participant_item_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/item/participant_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ParticipantItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - 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. + 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. This API is available in the following national cloud deployments. 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/participant-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[ParticipantItemRequestBuil async def get(self,request_configuration: Optional[ParticipantItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Participant]: """ - Retrieve the properties and relationships of a participant object. + Retrieve the properties and relationships of a participant object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Participant] Find more info here: https://learn.microsoft.com/graph/api/participant-get?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[Participant] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[ParticipantItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - 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. + 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. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParticipantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a participant object. + Retrieve the properties and relationships of a participant object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Participant] = None, request_configuration: Optional[ParticipantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[Participant] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class ParticipantItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ParticipantItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a participant object. + Retrieve the properties and relationships of a participant object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.py b/msgraph/generated/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.py index 9f38ceb27df..862bffecc2a 100644 --- a/msgraph/generated/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[StartHoldMusicPostRequestBody] = None, request_configuration: Optional[StartHoldMusicRequestBuilderPostRequestConfiguration] = None) -> Optional[StartHoldMusicOperation]: """ - Put a participant on hold and play music in the background. + Put a participant on hold and play music in the background. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StartHoldMusicOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[StartHoldMusicPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[StartHoldMusicPostRequestBody] = None, request_configuration: Optional[StartHoldMusicRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Put a participant on hold and play music in the background. + Put a participant on hold and play music in the background. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[StartHoldMusicPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.py b/msgraph/generated/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.py index f1811357c9b..961a54aed53 100644 --- a/msgraph/generated/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[StopHoldMusicPostRequestBody] = None, request_configuration: Optional[StopHoldMusicRequestBuilderPostRequestConfiguration] = None) -> Optional[StopHoldMusicOperation]: """ - Reincorporate a participant previously put on hold to the call. + Reincorporate a participant previously put on hold to the call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StopHoldMusicOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[StopHoldMusicPostRequestBody] = None, request def to_post_request_information(self,body: Optional[StopHoldMusicPostRequestBody] = None, request_configuration: Optional[StopHoldMusicRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reincorporate a participant previously put on hold to the call. + Reincorporate a participant previously put on hold to the call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[StopHoldMusicPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/participants/participants_request_builder.py b/msgraph/generated/communications/calls/item/participants/participants_request_builder.py index bcca0456813..119784be827 100644 --- a/msgraph/generated/communications/calls/item/participants/participants_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/participants_request_builder.py @@ -46,7 +46,7 @@ def by_participant_id(self,participant_id: str) -> ParticipantItemRequestBuilder async def get(self,request_configuration: Optional[ParticipantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ParticipantCollectionResponse]: """ - Retrieve a list of participant objects in the call. + Retrieve a list of participant objects in the call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ParticipantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/call-list-participants?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Participant] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ParticipantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of participant objects in the call. + Retrieve a list of participant objects in the call. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Participant] = None, request_configuration: Optional[ParticipantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Participant] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def invite(self) -> InviteRequestBuilder: @dataclass class ParticipantsRequestBuilderGetQueryParameters(): """ - Retrieve a list of participant objects in the call. + Retrieve a list of participant objects in the call. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/calls/item/play_prompt/play_prompt_request_builder.py b/msgraph/generated/communications/calls/item/play_prompt/play_prompt_request_builder.py index 74b6e2fad14..7cd336297b0 100644 --- a/msgraph/generated/communications/calls/item/play_prompt/play_prompt_request_builder.py +++ b/msgraph/generated/communications/calls/item/play_prompt/play_prompt_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[PlayPromptPostRequestBody] = None, request_configuration: Optional[PlayPromptRequestBuilderPostRequestConfiguration] = None) -> Optional[PlayPromptOperation]: """ - Play a prompt in the call. For more information about how to handle operations, see commsOperation + Play a prompt in the call. For more information about how to handle operations, see commsOperation This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlayPromptOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[PlayPromptPostRequestBody] = None, request_co def to_post_request_information(self,body: Optional[PlayPromptPostRequestBody] = None, request_configuration: Optional[PlayPromptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Play a prompt in the call. For more information about how to handle operations, see commsOperation + Play a prompt in the call. For more information about how to handle operations, see commsOperation This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[PlayPromptPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/record_response/record_response_request_builder.py b/msgraph/generated/communications/calls/item/record_response/record_response_request_builder.py index a871806f2e8..7fa8d7aba13 100644 --- a/msgraph/generated/communications/calls/item/record_response/record_response_request_builder.py +++ b/msgraph/generated/communications/calls/item/record_response/record_response_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RecordResponsePostRequestBody] = None, request_configuration: Optional[RecordResponseRequestBuilderPostRequestConfiguration] = None) -> Optional[RecordOperation]: """ - Records a short audio response from the caller.A bot can utilize this to capture a voice response from a caller after they are prompted for a response. For further information on how to handle operations, please review commsOperation This action is not intended to record the entire call. The maximum length of recording is 2 minutes. The recording is not saved permanently by the Cloud Communications Platform and is discarded shortly after the call ends. The bot must download the recording promptly after the recording operation finishes by using the recordingLocation value that's given in the completed notification. + Records a short audio response from the caller.A bot can utilize this to capture a voice response from a caller after they are prompted for a response. For further information on how to handle operations, please review commsOperation This action is not intended to record the entire call. The maximum length of recording is 2 minutes. The recording is not saved permanently by the Cloud Communications Platform and is discarded shortly after the call ends. The bot must download the recording promptly after the recording operation finishes by using the recordingLocation value that's given in the completed notification. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RecordOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[RecordResponsePostRequestBody] = None, reques def to_post_request_information(self,body: Optional[RecordResponsePostRequestBody] = None, request_configuration: Optional[RecordResponseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Records a short audio response from the caller.A bot can utilize this to capture a voice response from a caller after they are prompted for a response. For further information on how to handle operations, please review commsOperation This action is not intended to record the entire call. The maximum length of recording is 2 minutes. The recording is not saved permanently by the Cloud Communications Platform and is discarded shortly after the call ends. The bot must download the recording promptly after the recording operation finishes by using the recordingLocation value that's given in the completed notification. + Records a short audio response from the caller.A bot can utilize this to capture a voice response from a caller after they are prompted for a response. For further information on how to handle operations, please review commsOperation This action is not intended to record the entire call. The maximum length of recording is 2 minutes. The recording is not saved permanently by the Cloud Communications Platform and is discarded shortly after the call ends. The bot must download the recording promptly after the recording operation finishes by using the recordingLocation value that's given in the completed notification. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RecordResponsePostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/redirect/redirect_request_builder.py b/msgraph/generated/communications/calls/item/redirect/redirect_request_builder.py index c0315f3ac1a..6c2c505acab 100644 --- a/msgraph/generated/communications/calls/item/redirect/redirect_request_builder.py +++ b/msgraph/generated/communications/calls/item/redirect/redirect_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RedirectPostRequestBody] = None, request_configuration: Optional[RedirectRequestBuilderPostRequestConfiguration] = None) -> None: """ - Redirect an incoming call that hasn't been answered or rejected yet. The terms 'redirecting' and 'forwarding' a call are used interchangeably. The bot is expected to redirect the call before the call times out. The current timeout value is 15 seconds. + Redirect an incoming call that hasn't been answered or rejected yet. The terms 'redirecting' and 'forwarding' a call are used interchangeably. The bot is expected to redirect the call before the call times out. The current timeout value is 15 seconds. This API is available in the following national cloud deployments. 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[RedirectPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[RedirectPostRequestBody] = None, request_configuration: Optional[RedirectRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Redirect an incoming call that hasn't been answered or rejected yet. The terms 'redirecting' and 'forwarding' a call are used interchangeably. The bot is expected to redirect the call before the call times out. The current timeout value is 15 seconds. + Redirect an incoming call that hasn't been answered or rejected yet. The terms 'redirecting' and 'forwarding' a call are used interchangeably. The bot is expected to redirect the call before the call times out. The current timeout value is 15 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RedirectPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/reject/reject_request_builder.py b/msgraph/generated/communications/calls/item/reject/reject_request_builder.py index 457e2e23abd..00abdbbbf4c 100644 --- a/msgraph/generated/communications/calls/item/reject/reject_request_builder.py +++ b/msgraph/generated/communications/calls/item/reject/reject_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RejectPostRequestBody] = None, request_configuration: Optional[RejectRequestBuilderPostRequestConfiguration] = None) -> None: """ - Enable a bot to reject an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer or reject the call before the call times out. The current timeout value is 15 seconds. This API does not end existing calls that have already been answered. Use delete call to end a call. + Enable a bot to reject an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer or reject the call before the call times out. The current timeout value is 15 seconds. This API does not end existing calls that have already been answered. Use delete call to end a call. This API is available in the following national cloud deployments. 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[RejectPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[RejectPostRequestBody] = None, request_configuration: Optional[RejectRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Enable a bot to reject an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer or reject the call before the call times out. The current timeout value is 15 seconds. This API does not end existing calls that have already been answered. Use delete call to end a call. + Enable a bot to reject an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer or reject the call before the call times out. The current timeout value is 15 seconds. This API does not end existing calls that have already been answered. Use delete call to end a call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RejectPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.py b/msgraph/generated/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.py index 3c74bb92330..66ac023f521 100644 --- a/msgraph/generated/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.py +++ b/msgraph/generated/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SubscribeToTonePostRequestBody] = None, request_configuration: Optional[SubscribeToToneRequestBuilderPostRequestConfiguration] = None) -> Optional[SubscribeToToneOperation]: """ - Subscribe to DTMF (dual-tone multi-frequency signaling). This allows you to be notified when the user presses keys on a 'dialpad'. + Subscribe to DTMF (dual-tone multi-frequency signaling) which allows you to be notified when the user presses keys on a 'dialpad'. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubscribeToToneOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[SubscribeToTonePostRequestBody] = None, reque def to_post_request_information(self,body: Optional[SubscribeToTonePostRequestBody] = None, request_configuration: Optional[SubscribeToToneRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Subscribe to DTMF (dual-tone multi-frequency signaling). This allows you to be notified when the user presses keys on a 'dialpad'. + Subscribe to DTMF (dual-tone multi-frequency signaling) which allows you to be notified when the user presses keys on a 'dialpad'. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[SubscribeToTonePostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/transfer/transfer_request_builder.py b/msgraph/generated/communications/calls/item/transfer/transfer_request_builder.py index 9b6036223d0..ec0dd5d5bbb 100644 --- a/msgraph/generated/communications/calls/item/transfer/transfer_request_builder.py +++ b/msgraph/generated/communications/calls/item/transfer/transfer_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TransferPostRequestBody] = None, request_configuration: Optional[TransferRequestBuilderPostRequestConfiguration] = None) -> None: """ - Transfer an active peer-to-peer call or group call. A consultative transfer means that the transferor can inform the person they want to transfer the call to (the transferee), before the transfer is made. This is opposed to transfering the call directly. + Transfer an active peer-to-peer call or group call. A consultative transfer means that the transferor can inform the person they want to transfer the call to (the transferee), before the transfer is made. This is opposed to transfering the call directly. This API is available in the following national cloud deployments. 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[TransferPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[TransferPostRequestBody] = None, request_configuration: Optional[TransferRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Transfer an active peer-to-peer call or group call. A consultative transfer means that the transferor can inform the person they want to transfer the call to (the transferee), before the transfer is made. This is opposed to transfering the call directly. + Transfer an active peer-to-peer call or group call. A consultative transfer means that the transferor can inform the person they want to transfer the call to (the transferee), before the transfer is made. This is opposed to transfering the call directly. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TransferPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/unmute/unmute_request_builder.py b/msgraph/generated/communications/calls/item/unmute/unmute_request_builder.py index f7efd84d0ca..b76f7cb6112 100644 --- a/msgraph/generated/communications/calls/item/unmute/unmute_request_builder.py +++ b/msgraph/generated/communications/calls/item/unmute/unmute_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UnmutePostRequestBody] = None, request_configuration: Optional[UnmuteRequestBuilderPostRequestConfiguration] = None) -> Optional[UnmuteParticipantOperation]: """ - Allow the application to unmute itself. This is a server unmute, meaning that the server will start sending audio packets for this participant to other participants again. For more information about how to handle unmute operations, see unmuteParticipantOperation. + Allow the application to unmute itself. This is a server unmute, meaning that the server will start sending audio packets for this participant to other participants again. For more information about how to handle unmute operations, see unmuteParticipantOperation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnmuteParticipantOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UnmutePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[UnmutePostRequestBody] = None, request_configuration: Optional[UnmuteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Allow the application to unmute itself. This is a server unmute, meaning that the server will start sending audio packets for this participant to other participants again. For more information about how to handle unmute operations, see unmuteParticipantOperation. + Allow the application to unmute itself. This is a server unmute, meaning that the server will start sending audio packets for this participant to other participants again. For more information about how to handle unmute operations, see unmuteParticipantOperation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UnmutePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/item/update_recording_status/update_recording_status_request_builder.py b/msgraph/generated/communications/calls/item/update_recording_status/update_recording_status_request_builder.py index faf6d1fdf9b..59fa4543743 100644 --- a/msgraph/generated/communications/calls/item/update_recording_status/update_recording_status_request_builder.py +++ b/msgraph/generated/communications/calls/item/update_recording_status/update_recording_status_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpdateRecordingStatusPostRequestBody] = None, request_configuration: Optional[UpdateRecordingStatusRequestBuilderPostRequestConfiguration] = None) -> Optional[UpdateRecordingStatusOperation]: """ - Update the application's recording status associated with a call. This requires the use of the Teams policy-based recording solution. + Update the application's recording status associated with a call. This requires the use of the Teams policy-based recording solution. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UpdateRecordingStatusOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UpdateRecordingStatusPostRequestBody] = None, def to_post_request_information(self,body: Optional[UpdateRecordingStatusPostRequestBody] = None, request_configuration: Optional[UpdateRecordingStatusRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Update the application's recording status associated with a call. This requires the use of the Teams policy-based recording solution. + Update the application's recording status associated with a call. This requires the use of the Teams policy-based recording solution. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UpdateRecordingStatusPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.py b/msgraph/generated/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.py index 18336c9766b..7ad3d48dc70 100644 --- a/msgraph/generated/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.py +++ b/msgraph/generated/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[LogTeleconferenceDeviceQualityPostRequestBody] = None, request_configuration: Optional[LogTeleconferenceDeviceQualityRequestBuilderPostRequestConfiguration] = None) -> None: """ - Log video teleconferencing device quality data. The Cloud Video Interop (CVI) bot represents video teleconferencing (VTC) devices and acts as a back-to-back agent for a VTC device in a conference call. Because a CVI bot is in the middle of the VTC and Microsoft Teams infrastructure as a VTC proxy, it has two media legs. One media leg is between the CVI bot and Teams infrastructure, such as Teams conference server or a Teams client. The other media leg is between the CVI bot and the VTC device. The third-party partners own the VTC media leg and the Teams infrastructure cannot access the quality data of the third-party call leg. This method is only for the CVI partners to provide their media quality data. + Log video teleconferencing device quality data. The Cloud Video Interop (CVI) bot represents video teleconferencing (VTC) devices and acts as a back-to-back agent for a VTC device in a conference call. Because a CVI bot is in the middle of the VTC and Microsoft Teams infrastructure as a VTC proxy, it has two media legs. One media leg is between the CVI bot and Teams infrastructure, such as Teams conference server or a Teams client. The other media leg is between the CVI bot and the VTC device. The third-party partners own the VTC media leg and the Teams infrastructure cannot access the quality data of the third-party call leg. This method is only for the CVI partners to provide their media quality data. This API is available in the following national cloud deployments. 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[LogTeleconferenceDeviceQualityPostRequestBody def to_post_request_information(self,body: Optional[LogTeleconferenceDeviceQualityPostRequestBody] = None, request_configuration: Optional[LogTeleconferenceDeviceQualityRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Log video teleconferencing device quality data. The Cloud Video Interop (CVI) bot represents video teleconferencing (VTC) devices and acts as a back-to-back agent for a VTC device in a conference call. Because a CVI bot is in the middle of the VTC and Microsoft Teams infrastructure as a VTC proxy, it has two media legs. One media leg is between the CVI bot and Teams infrastructure, such as Teams conference server or a Teams client. The other media leg is between the CVI bot and the VTC device. The third-party partners own the VTC media leg and the Teams infrastructure cannot access the quality data of the third-party call leg. This method is only for the CVI partners to provide their media quality data. + Log video teleconferencing device quality data. The Cloud Video Interop (CVI) bot represents video teleconferencing (VTC) devices and acts as a back-to-back agent for a VTC device in a conference call. Because a CVI bot is in the middle of the VTC and Microsoft Teams infrastructure as a VTC proxy, it has two media legs. One media leg is between the CVI bot and Teams infrastructure, such as Teams conference server or a Teams client. The other media leg is between the CVI bot and the VTC device. The third-party partners own the VTC media leg and the Teams infrastructure cannot access the quality data of the third-party call leg. This method is only for the CVI partners to provide their media quality data. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[LogTeleconferenceDeviceQuali if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/communications_request_builder.py b/msgraph/generated/communications/communications_request_builder.py index c6b1e2e0cda..b70d998ab1c 100644 --- a/msgraph/generated/communications/communications_request_builder.py +++ b/msgraph/generated/communications/communications_request_builder.py @@ -12,8 +12,8 @@ if TYPE_CHECKING: from ..models.cloud_communications import CloudCommunications from ..models.o_data_errors.o_data_error import ODataError - from .call_records.call_records_request_builder import CallRecordsRequestBuilder from .calls.calls_request_builder import CallsRequestBuilder + from .call_records.call_records_request_builder import CallRecordsRequestBuilder from .get_presences_by_user_id.get_presences_by_user_id_request_builder import GetPresencesByUserIdRequestBuilder from .online_meetings.online_meetings_request_builder import OnlineMeetingsRequestBuilder from .presences.presences_request_builder import PresencesRequestBuilder @@ -83,14 +83,14 @@ def to_get_request_information(self,request_configuration: Optional[Communicatio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CloudCommunications] = None, request_configuration: Optional[CommunicationsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -103,13 +103,13 @@ def to_patch_request_information(self,body: Optional[CloudCommunications] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_response.py b/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_post_response.py similarity index 90% rename from msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_response.py rename to msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_post_response.py index e0a2919990c..6dea6f337a6 100644 --- a/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_response.py +++ b/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetPresencesByUserIdResponse(BaseCollectionPaginationCountResponse): +class GetPresencesByUserIdPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Presence]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetPresencesByUserIdResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetPresencesByUserIdPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetPresencesByUserIdResponse + Returns: GetPresencesByUserIdPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetPresencesByUserIdResponse() + return GetPresencesByUserIdPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.py b/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.py index a66e19690ff..52f42b41aef 100644 --- a/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.py +++ b/msgraph/generated/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_presences_by_user_id_post_request_body import GetPresencesByUserIdPostRequestBody - from .get_presences_by_user_id_response import GetPresencesByUserIdResponse + from .get_presences_by_user_id_post_response import GetPresencesByUserIdPostResponse class GetPresencesByUserIdRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/communications/getPresencesByUserId", path_parameters) - async def post(self,body: Optional[GetPresencesByUserIdPostRequestBody] = None, request_configuration: Optional[GetPresencesByUserIdRequestBuilderPostRequestConfiguration] = None) -> Optional[GetPresencesByUserIdResponse]: + async def post(self,body: Optional[GetPresencesByUserIdPostRequestBody] = None, request_configuration: Optional[GetPresencesByUserIdRequestBuilderPostRequestConfiguration] = None) -> Optional[GetPresencesByUserIdPostResponse]: """ - Get the presence information for multiple users. + Get the presence information for multiple users. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetPresencesByUserIdResponse] + Returns: Optional[GetPresencesByUserIdPostResponse] Find more info here: https://learn.microsoft.com/graph/api/cloudcommunications-getpresencesbyuserid?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetPresencesByUserIdPostRequestBody] = None, } if not self.request_adapter: raise Exception("Http core is null") - from .get_presences_by_user_id_response import GetPresencesByUserIdResponse + from .get_presences_by_user_id_post_response import GetPresencesByUserIdPostResponse - return await self.request_adapter.send_async(request_info, GetPresencesByUserIdResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetPresencesByUserIdPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetPresencesByUserIdPostRequestBody] = None, request_configuration: Optional[GetPresencesByUserIdRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the presence information for multiple users. + Get the presence information for multiple users. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetPresencesByUserIdPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/online_meetings/count/count_request_builder.py b/msgraph/generated/communications/online_meetings/count/count_request_builder.py index 7decfc7bb9c..b00ac46b0f9 100644 --- a/msgraph/generated/communications/online_meetings/count/count_request_builder.py +++ b/msgraph/generated/communications/online_meetings/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/online_meetings/create_or_get/create_or_get_request_builder.py b/msgraph/generated/communications/online_meetings/create_or_get/create_or_get_request_builder.py index 729f2c9f164..d461103950b 100644 --- a/msgraph/generated/communications/online_meetings/create_or_get/create_or_get_request_builder.py +++ b/msgraph/generated/communications/online_meetings/create_or_get/create_or_get_request_builder.py @@ -10,8 +10,8 @@ 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.online_meeting import OnlineMeeting + from ....models.o_data_errors.o_data_error import ODataError from .create_or_get_post_request_body import CreateOrGetPostRequestBody class CreateOrGetRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateOrGetPostRequestBody] = None, request_configuration: Optional[CreateOrGetRequestBuilderPostRequestConfiguration] = None) -> Optional[OnlineMeeting]: """ - Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. + Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeeting] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateOrGetPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[CreateOrGetPostRequestBody] = None, request_configuration: Optional[CreateOrGetRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. + Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateOrGetPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.py index 59ca5eb0bda..b3eb0546411 100644 --- a/msgraph/generated/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.py @@ -45,7 +45,7 @@ def by_meeting_attendance_report_id(self,meeting_attendance_report_id: str) -> M async def get(self,request_configuration: Optional[AttendanceReportsRequestBuilderGetRequestConfiguration] = None) -> Optional[MeetingAttendanceReportCollectionResponse]: """ - Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MeetingAttendanceReportCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/meetingattendancereport-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[MeetingAttendanceReport] = None, request_conf def to_get_request_information(self,request_configuration: Optional[AttendanceReportsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MeetingAttendanceReport] = None, request_configuration: Optional[AttendanceReportsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[MeetingAttendanceReport] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AttendanceReportsRequestBuilderGetQueryParameters(): """ - Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/online_meetings/item/attendance_reports/count/count_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendance_reports/count/count_request_builder.py index 01adc5459f2..0a8b39cce97 100644 --- a/msgraph/generated/communications/online_meetings/item/attendance_reports/count/count_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendance_reports/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py index 7f58df71d73..8225be1ae84 100644 --- a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py @@ -45,7 +45,7 @@ def by_attendance_record_id(self,attendance_record_id: str) -> AttendanceRecordI async def get(self,request_configuration: Optional[AttendanceRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttendanceRecordCollectionResponse]: """ - Get a list of attendanceRecord objects and their properties. + Get a list of attendanceRecord objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttendanceRecordCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/attendancerecord-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AttendanceRecord] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[AttendanceRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of attendanceRecord objects and their properties. + Get a list of attendanceRecord objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttendanceRecord] = None, request_configuration: Optional[AttendanceRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AttendanceRecord] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AttendanceRecordsRequestBuilderGetQueryParameters(): """ - Get a list of attendanceRecord objects and their properties. + Get a list of attendanceRecord objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py index ab5b9caa845..9429d0457a7 100644 --- a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py index 75617851786..a6fb61e0867 100644 --- a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attendanc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttendanceRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AttendanceRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttendanceRecord] = None, request_configuration: Optional[AttendanceRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AttendanceRecord] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py index add1e85fd52..d1d0453d9f6 100644 --- a/msgraph/generated/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MeetingAttendanceReportIte async def get(self,request_configuration: Optional[MeetingAttendanceReportItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MeetingAttendanceReport]: """ - Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MeetingAttendanceReport] Find more info here: https://learn.microsoft.com/graph/api/meetingattendancereport-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[MeetingAt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MeetingAttendanceReportItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MeetingAttendanceReport] = None, request_configuration: Optional[MeetingAttendanceReportItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[MeetingAttendanceReport] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class MeetingAttendanceReportItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class MeetingAttendanceReportItemRequestBuilderGetQueryParameters(): """ - Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/online_meetings/item/attendee_report/attendee_report_request_builder.py b/msgraph/generated/communications/online_meetings/item/attendee_report/attendee_report_request_builder.py index ccdb1dd6cf2..a97fd0d77a4 100644 --- a/msgraph/generated/communications/online_meetings/item/attendee_report/attendee_report_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/attendee_report/attendee_report_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AttendeeReportRequestBuilderGetRequestConfiguration] = None) -> bytes: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Get attendeeReport for the navigation property onlineMeetings from communications 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/onlinemeeting-get?view=graph-rest-1.0 @@ -47,7 +47,7 @@ async def get(self,request_configuration: Optional[AttendeeReportRequestBuilderG async def put(self,body: bytes, request_configuration: Optional[AttendeeReportRequestBuilderPutRequestConfiguration] = None) -> bytes: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Update attendeeReport for the navigation property onlineMeetings in communications param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes @@ -69,22 +69,22 @@ async def put(self,body: bytes, request_configuration: Optional[AttendeeReportRe def to_get_request_information(self,request_configuration: Optional[AttendeeReportRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Get attendeeReport for the navigation property onlineMeetings from communications 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[AttendeeReportRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Update attendeeReport for the navigation property onlineMeetings in communications param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py b/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.py similarity index 87% rename from msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py rename to msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.py index 4e443c1cc72..41f3bc0a40b 100644 --- a/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py +++ b/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class GetVirtualAppointmentJoinWebUrlResponse(AdditionalDataHolder, BackedModel, Parsable): +class GetVirtualAppointmentJoinWebUrlGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class GetVirtualAppointmentJoinWebUrlResponse(AdditionalDataHolder, BackedModel, value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetVirtualAppointmentJoinWebUrlResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetVirtualAppointmentJoinWebUrlGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetVirtualAppointmentJoinWebUrlResponse + Returns: GetVirtualAppointmentJoinWebUrlGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetVirtualAppointmentJoinWebUrlResponse() + return GetVirtualAppointmentJoinWebUrlGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py b/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py index 8e77f04c4a1..c6c044f60f7 100644 --- a/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_virtual_appointment_join_web_url_response import GetVirtualAppointmentJoinWebUrlResponse + from .get_virtual_appointment_join_web_url_get_response import GetVirtualAppointmentJoinWebUrlGetResponse class GetVirtualAppointmentJoinWebUrlRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/getVirtualAppointmentJoinWebUrl()", path_parameters) - async def get(self,request_configuration: Optional[GetVirtualAppointmentJoinWebUrlRequestBuilderGetRequestConfiguration] = None) -> Optional[GetVirtualAppointmentJoinWebUrlResponse]: + async def get(self,request_configuration: Optional[GetVirtualAppointmentJoinWebUrlRequestBuilderGetRequestConfiguration] = None) -> Optional[GetVirtualAppointmentJoinWebUrlGetResponse]: """ Invoke function getVirtualAppointmentJoinWebUrl param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetVirtualAppointmentJoinWebUrlResponse] + Returns: Optional[GetVirtualAppointmentJoinWebUrlGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetVirtualAppointmentJoinWebU } if not self.request_adapter: raise Exception("Http core is null") - from .get_virtual_appointment_join_web_url_response import GetVirtualAppointmentJoinWebUrlResponse + from .get_virtual_appointment_join_web_url_get_response import GetVirtualAppointmentJoinWebUrlGetResponse - return await self.request_adapter.send_async(request_info, GetVirtualAppointmentJoinWebUrlResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetVirtualAppointmentJoinWebUrlGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetVirtualAppointmentJoinWebUrlRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[GetVirtualAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetVirtualAppointmentJoinWebUrlRequestBuilder: diff --git a/msgraph/generated/communications/online_meetings/item/online_meeting_item_request_builder.py b/msgraph/generated/communications/online_meetings/item/online_meeting_item_request_builder.py index c04340ce955..27953253f60 100644 --- a/msgraph/generated/communications/online_meetings/item/online_meeting_item_request_builder.py +++ b/msgraph/generated/communications/online_meetings/item/online_meeting_item_request_builder.py @@ -10,11 +10,12 @@ 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.online_meeting import OnlineMeeting + from ....models.o_data_errors.o_data_error import ODataError from .attendance_reports.attendance_reports_request_builder import AttendanceReportsRequestBuilder from .attendee_report.attendee_report_request_builder import AttendeeReportRequestBuilder from .get_virtual_appointment_join_web_url.get_virtual_appointment_join_web_url_request_builder import GetVirtualAppointmentJoinWebUrlRequestBuilder + from .transcripts.transcripts_request_builder import TranscriptsRequestBuilder class OnlineMeetingItemRequestBuilder(BaseRequestBuilder): """ @@ -100,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnlineMee Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnlineMeetingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[OnlineMeetin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnlineMeeting] = None, request_configuration: Optional[OnlineMeetingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +136,13 @@ def to_patch_request_information(self,body: Optional[OnlineMeeting] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -182,6 +183,15 @@ def get_virtual_appointment_join_web_url(self) -> GetVirtualAppointmentJoinWebUr return GetVirtualAppointmentJoinWebUrlRequestBuilder(self.request_adapter, self.path_parameters) + @property + def transcripts(self) -> TranscriptsRequestBuilder: + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + """ + from .transcripts.transcripts_request_builder import TranscriptsRequestBuilder + + return TranscriptsRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/communications/online_meetings/item/transcripts/count/count_request_builder.py b/msgraph/generated/communications/online_meetings/item/transcripts/count/count_request_builder.py new file mode 100644 index 00000000000..01fd9390c70 --- /dev/null +++ b/msgraph/generated/communications/online_meetings/item/transcripts/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py b/msgraph/generated/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py new file mode 100644 index 00000000000..58a576b210d --- /dev/null +++ b/msgraph/generated/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py @@ -0,0 +1,235 @@ +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.call_transcript import CallTranscript + from ......models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + from .metadata_content.metadata_content_request_builder import MetadataContentRequestBuilder + +class CallTranscriptItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CallTranscriptItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[CallTranscriptItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property transcripts for communications + 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[CallTranscriptItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + Find more info here: https://learn.microsoft.com/graph/api/calltranscript-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.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + async def patch(self,body: Optional[CallTranscript] = None, request_configuration: Optional[CallTranscriptItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + Update the navigation property transcripts in communications + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + """ + 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.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[CallTranscriptItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property transcripts for communications + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[CallTranscriptItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. This API is available in the following national cloud deployments. + 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(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[CallTranscript] = None, request_configuration: Optional[CallTranscriptItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property transcripts in communications + param body: The request body + param request_configuration: Configuration for 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(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) -> CallTranscriptItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CallTranscriptItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CallTranscriptItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the cloudCommunications entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def metadata_content(self) -> MetadataContentRequestBuilder: + """ + Provides operations to manage the media for the cloudCommunications entity. + """ + from .metadata_content.metadata_content_request_builder import MetadataContentRequestBuilder + + return MetadataContentRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CallTranscriptItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class CallTranscriptItemRequestBuilderGetQueryParameters(): + """ + Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. This API is available in the following national cloud deployments. + """ + 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 CallTranscriptItemRequestBuilderGetRequestConfiguration(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[CallTranscriptItemRequestBuilder.CallTranscriptItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CallTranscriptItemRequestBuilderPatchRequestConfiguration(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/communications/online_meetings/item/transcripts/item/content/content_request_builder.py b/msgraph/generated/communications/online_meetings/item/transcripts/item/content/content_request_builder.py new file mode 100644 index 00000000000..1f58f8a07e9 --- /dev/null +++ b/msgraph/generated/communications/online_meetings/item/transcripts/item/content/content_request_builder.py @@ -0,0 +1,138 @@ +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.call_transcript import CallTranscript + from .......models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the cloudCommunications entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/content", path_parameters) + + async def get(self,request_configuration: Optional[ContentRequestBuilderGetRequestConfiguration] = None) -> bytes: + """ + The content of the transcript. Read-only. + 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/onlinemeeting-list-transcripts?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") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + The content of the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The content of the transcript. 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(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 + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: + """ + The content of the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(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/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py b/msgraph/generated/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py new file mode 100644 index 00000000000..148b72b4bc5 --- /dev/null +++ b/msgraph/generated/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py @@ -0,0 +1,134 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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 MetadataContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the cloudCommunications entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MetadataContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/metadataContent", path_parameters) + + async def get(self,request_configuration: Optional[MetadataContentRequestBuilderGetRequestConfiguration] = None) -> bytes: + """ + The time-aligned metadata of the utterances in the transcript. Read-only. + 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/onlinemeeting-list-transcripts?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") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[MetadataContentRequestBuilderPutRequestConfiguration] = None) -> bytes: + """ + The time-aligned metadata of the utterances in the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MetadataContentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The time-aligned metadata of the utterances in the transcript. 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(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 + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[MetadataContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: + """ + The time-aligned metadata of the utterances in the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT + request_info.set_stream_content(body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> MetadataContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MetadataContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MetadataContentRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MetadataContentRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MetadataContentRequestBuilderPutRequestConfiguration(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/communications/online_meetings/item/transcripts/transcripts_request_builder.py b/msgraph/generated/communications/online_meetings/item/transcripts/transcripts_request_builder.py new file mode 100644 index 00000000000..b41092f0a43 --- /dev/null +++ b/msgraph/generated/communications/online_meetings/item/transcripts/transcripts_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.call_transcript import CallTranscript + from .....models.call_transcript_collection_response import CallTranscriptCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.call_transcript_item_request_builder import CallTranscriptItemRequestBuilder + +class TranscriptsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TranscriptsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_call_transcript_id(self,call_transcript_id: str) -> CallTranscriptItemRequestBuilder: + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + param call_transcript_id: The unique identifier of callTranscript + Returns: CallTranscriptItemRequestBuilder + """ + if not call_transcript_id: + raise TypeError("call_transcript_id cannot be null.") + from .item.call_transcript_item_request_builder import CallTranscriptItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["callTranscript%2Did"] = call_transcript_id + return CallTranscriptItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[TranscriptsRequestBuilderGetRequestConfiguration] = None) -> Optional[CallTranscriptCollectionResponse]: + """ + Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscriptCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/onlinemeeting-list-transcripts?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.call_transcript_collection_response import CallTranscriptCollectionResponse + + return await self.request_adapter.send_async(request_info, CallTranscriptCollectionResponse, error_mapping) + + async def post(self,body: Optional[CallTranscript] = None, request_configuration: Optional[TranscriptsRequestBuilderPostRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + Create new navigation property to transcripts for communications + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TranscriptsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. This API is available in the following national cloud deployments. + 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(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[CallTranscript] = None, request_configuration: Optional[TranscriptsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to transcripts for communications + param body: The request body + param request_configuration: Configuration for 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(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) -> TranscriptsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TranscriptsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TranscriptsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TranscriptsRequestBuilderGetQueryParameters(): + """ + Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. This API is available in the following national cloud deployments. + """ + 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 TranscriptsRequestBuilderGetRequestConfiguration(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[TranscriptsRequestBuilder.TranscriptsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TranscriptsRequestBuilderPostRequestConfiguration(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/communications/online_meetings/online_meetings_request_builder.py b/msgraph/generated/communications/online_meetings/online_meetings_request_builder.py index 96e5c7cbfdf..32a85f0b9ea 100644 --- a/msgraph/generated/communications/online_meetings/online_meetings_request_builder.py +++ b/msgraph/generated/communications/online_meetings/online_meetings_request_builder.py @@ -10,9 +10,9 @@ 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.online_meeting import OnlineMeeting from ...models.online_meeting_collection_response import OnlineMeetingCollectionResponse + from ...models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .create_or_get.create_or_get_request_builder import CreateOrGetRequestBuilder from .item.online_meeting_item_request_builder import OnlineMeetingItemRequestBuilder @@ -46,7 +46,7 @@ def by_online_meeting_id(self,online_meeting_id: str) -> OnlineMeetingItemReques async def get(self,request_configuration: Optional[OnlineMeetingsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnlineMeetingCollectionResponse]: """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeetingCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onlinemeeting-get?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[OnlineMeeting] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[OnlineMeetingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnlineMeeting] = None, request_configuration: Optional[OnlineMeetingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnlineMeeting] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def create_or_get(self) -> CreateOrGetRequestBuilder: @dataclass class OnlineMeetingsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/presences/count/count_request_builder.py b/msgraph/generated/communications/presences/count/count_request_builder.py index 9212f22907b..988edb0cc94 100644 --- a/msgraph/generated/communications/presences/count/count_request_builder.py +++ b/msgraph/generated/communications/presences/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/communications/presences/item/clear_presence/clear_presence_request_builder.py b/msgraph/generated/communications/presences/item/clear_presence/clear_presence_request_builder.py index f5ee5689b9d..33e7f8dbd83 100644 --- a/msgraph/generated/communications/presences/item/clear_presence/clear_presence_request_builder.py +++ b/msgraph/generated/communications/presences/item/clear_presence/clear_presence_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ClearPresencePostRequestBody] = None, request_configuration: Optional[ClearPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. + Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. This API is available in the following national cloud deployments. 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[ClearPresencePostRequestBody] = None, request def to_post_request_information(self,body: Optional[ClearPresencePostRequestBody] = None, request_configuration: Optional[ClearPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. + Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ClearPresencePostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py b/msgraph/generated/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py index ece53e6b000..e3660a63218 100644 --- a/msgraph/generated/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py +++ b/msgraph/generated/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the preferred availability and activity status for a user. + Clear the preferred availability and activity status for a user. This API is available in the following national cloud deployments. 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/presence-clearuserpreferredpresence?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearUserPreferredPresenceRe def to_post_request_information(self,request_configuration: Optional[ClearUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the preferred availability and activity status for a user. + Clear the preferred availability and activity status for a user. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearUserPreferredPresenceRequestBuilder: diff --git a/msgraph/generated/communications/presences/item/presence_item_request_builder.py b/msgraph/generated/communications/presences/item/presence_item_request_builder.py index 2c2c0256b1b..c91e4e08a39 100644 --- a/msgraph/generated/communications/presences/item/presence_item_request_builder.py +++ b/msgraph/generated/communications/presences/item/presence_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[PresenceItemRequestBuilder async def get(self,request_configuration: Optional[PresenceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Presence]: """ - Get a user's presence information. + Get a user's presence information. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[PresenceI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PresenceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a user's presence information. + Get a user's presence information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Presence] = None, request_configuration: Optional[PresenceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Presence] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class PresenceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class PresenceItemRequestBuilderGetQueryParameters(): """ - Get a user's presence information. + Get a user's presence information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/communications/presences/item/set_presence/set_presence_request_builder.py b/msgraph/generated/communications/presences/item/set_presence/set_presence_request_builder.py index 4e1595c99a5..8f5a0c90a36 100644 --- a/msgraph/generated/communications/presences/item/set_presence/set_presence_request_builder.py +++ b/msgraph/generated/communications/presences/item/set_presence/set_presence_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetPresencePostRequestBody] = None, request_configuration: Optional[SetPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Set the state of a user's presence session as an application. + Set the state of a user's presence session as an application. This API is available in the following national cloud deployments. 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[SetPresencePostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[SetPresencePostRequestBody] = None, request_configuration: Optional[SetPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set the state of a user's presence session as an application. + Set the state of a user's presence session as an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetPresencePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/presences/item/set_status_message/set_status_message_request_builder.py b/msgraph/generated/communications/presences/item/set_status_message/set_status_message_request_builder.py index 99bccf0f86d..643b9ed7bcf 100644 --- a/msgraph/generated/communications/presences/item/set_status_message/set_status_message_request_builder.py +++ b/msgraph/generated/communications/presences/item/set_status_message/set_status_message_request_builder.py @@ -28,10 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetStatusMessagePostRequestBody] = None, request_configuration: Optional[SetStatusMessageRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action setStatusMessage + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. 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/presence-setstatusmessage?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -50,7 +51,7 @@ async def post(self,body: Optional[SetStatusMessagePostRequestBody] = None, requ def to_post_request_information(self,body: Optional[SetStatusMessagePostRequestBody] = None, request_configuration: Optional[SetStatusMessageRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action setStatusMessage + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -58,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetStatusMessagePostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.py b/msgraph/generated/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.py index 4f975da4723..f43e577b3eb 100644 --- a/msgraph/generated/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.py +++ b/msgraph/generated/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetUserPreferredPresencePostRequestBody] = None, request_configuration: Optional[SetUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. + Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. This API is available in the following national cloud deployments. 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[SetUserPreferredPresencePostRequestBody] = No def to_post_request_information(self,body: Optional[SetUserPreferredPresencePostRequestBody] = None, request_configuration: Optional[SetUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. + Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetUserPreferredPresencePost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/communications/presences/presences_request_builder.py b/msgraph/generated/communications/presences/presences_request_builder.py index 6ae6008ebee..11e09a13877 100644 --- a/msgraph/generated/communications/presences/presences_request_builder.py +++ b/msgraph/generated/communications/presences/presences_request_builder.py @@ -45,7 +45,7 @@ def by_presence_id(self,presence_id: str) -> PresenceItemRequestBuilder: async def get(self,request_configuration: Optional[PresencesRequestBuilderGetRequestConfiguration] = None) -> Optional[PresenceCollectionResponse]: """ - Get a user's presence information. + Get a user's presence information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PresenceCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Presence] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[PresencesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a user's presence information. + Get a user's presence information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Presence] = None, request_configuration: Optional[PresencesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Presence] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PresencesRequestBuilderGetQueryParameters(): """ - Get a user's presence information. + Get a user's presence information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/compliance/compliance_request_builder.py b/msgraph/generated/compliance/compliance_request_builder.py index 4e890bb37b5..8544a453396 100644 --- a/msgraph/generated/compliance/compliance_request_builder.py +++ b/msgraph/generated/compliance/compliance_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[ComplianceRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Compliance] = None, request_configuration: Optional[ComplianceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[Compliance] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/connections_request_builder.py b/msgraph/generated/connections/connections_request_builder.py index ad4fb091e00..840033ea04c 100644 --- a/msgraph/generated/connections/connections_request_builder.py +++ b/msgraph/generated/connections/connections_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ConnectionsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalConnection] = None, request_configuration: Optional[ConnectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ExternalConnection] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/count/count_request_builder.py b/msgraph/generated/connections/count/count_request_builder.py index b533c74f6bd..7457d4e1efc 100644 --- a/msgraph/generated/connections/count/count_request_builder.py +++ b/msgraph/generated/connections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/connections/item/external_connection_item_request_builder.py b/msgraph/generated/connections/item/external_connection_item_request_builder.py index c9c6c08eb9a..7f555cf465a 100644 --- a/msgraph/generated/connections/item/external_connection_item_request_builder.py +++ b/msgraph/generated/connections/item/external_connection_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[ExternalC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalConnectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[ExternalConn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalConnection] = None, request_configuration: Optional[ExternalConnectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ExternalConnection] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/item/groups/count/count_request_builder.py b/msgraph/generated/connections/item/groups/count/count_request_builder.py index ce295612dbe..42a434c6a58 100644 --- a/msgraph/generated/connections/item/groups/count/count_request_builder.py +++ b/msgraph/generated/connections/item/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/connections/item/groups/groups_request_builder.py b/msgraph/generated/connections/item/groups/groups_request_builder.py index 106fce11bf1..a484327d047 100644 --- a/msgraph/generated/connections/item/groups/groups_request_builder.py +++ b/msgraph/generated/connections/item/groups/groups_request_builder.py @@ -45,7 +45,7 @@ def by_external_group_id(self,external_group_id: str) -> ExternalGroupItemReques async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalGroupCollectionResponse]: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroupCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[ExternalGroup] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[ExternalGroup]: """ - Create a new externalGroup object. + Create a new externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroup] @@ -91,24 +91,24 @@ async def post(self,body: Optional[ExternalGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalGroup] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new externalGroup object. + Create a new externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ExternalGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/connections/item/groups/item/external_group_item_request_builder.py b/msgraph/generated/connections/item/groups/item/external_group_item_request_builder.py index 72988ad6088..c3dd6223923 100644 --- a/msgraph/generated/connections/item/groups/item/external_group_item_request_builder.py +++ b/msgraph/generated/connections/item/groups/item/external_group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExternalGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an externalGroup object. + Delete an externalGroup object. This API is available in the following national cloud deployments. 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/externalconnectors-externalgroup-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ExternalGroupItemRequestBu async def get(self,request_configuration: Optional[ExternalGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalGroup]: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroup] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalgroup-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ExternalGroupItemRequestBuild async def patch(self,body: Optional[ExternalGroup] = None, request_configuration: Optional[ExternalGroupItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ExternalGroup]: """ - Update the properties of an externalGroup object. + Update the properties of an externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroup] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ExternalGroup] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[ExternalGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an externalGroup object. + Delete an externalGroup object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalGroup] = None, request_configuration: Optional[ExternalGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an externalGroup object. + Update the properties of an externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ExternalGroup] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ExternalGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ExternalGroupItemRequestBuilderGetQueryParameters(): """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/connections/item/groups/item/members/count/count_request_builder.py b/msgraph/generated/connections/item/groups/item/members/count/count_request_builder.py index 7774fbbfdf8..d788757931e 100644 --- a/msgraph/generated/connections/item/groups/item/members/count/count_request_builder.py +++ b/msgraph/generated/connections/item/groups/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/connections/item/groups/item/members/item/identity_item_request_builder.py b/msgraph/generated/connections/item/groups/item/members/item/identity_item_request_builder.py index b1cf5fa9179..ea3ecdf5b06 100644 --- a/msgraph/generated/connections/item/groups/item/members/item/identity_item_request_builder.py +++ b/msgraph/generated/connections/item/groups/item/members/item/identity_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[IdentityItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an identity resource to remove the corresponding member from an externalGroup. + Delete an identity resource to remove the corresponding member from an externalGroup. This API is available in the following national cloud deployments. 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/externalconnectors-identity-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalgroupmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -93,17 +93,17 @@ async def patch(self,body: Optional[Identity] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[IdentityItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an identity resource to remove the corresponding member from an externalGroup. + Delete an identity resource to remove the corresponding member from an externalGroup. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Identity] = None, request_configuration: Optional[IdentityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Identity] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/item/groups/item/members/members_request_builder.py b/msgraph/generated/connections/item/groups/item/members/members_request_builder.py index 070ef8e32a6..d7c6ad7b61b 100644 --- a/msgraph/generated/connections/item/groups/item/members/members_request_builder.py +++ b/msgraph/generated/connections/item/groups/item/members/members_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[Identity] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[Identity]: """ - Create an identity resource for a new member in an externalGroup. + Create an identity resource for a new member in an externalGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Identity] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[MembersReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Identity] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an identity resource for a new member in an externalGroup. + Create an identity resource for a new member in an externalGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Identity] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/item/items/count/count_request_builder.py b/msgraph/generated/connections/item/items/count/count_request_builder.py index cd52a8e4df9..62cad110d5e 100644 --- a/msgraph/generated/connections/item/items/count/count_request_builder.py +++ b/msgraph/generated/connections/item/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/connections/item/items/item/activities/activities_request_builder.py b/msgraph/generated/connections/item/items/item/activities/activities_request_builder.py index b173ccb8ef2..c65dba33c1a 100644 --- a/msgraph/generated/connections/item/items/item/activities/activities_request_builder.py +++ b/msgraph/generated/connections/item/items/item/activities/activities_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivitiesRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalActivity] = None, request_configuration: Optional[ActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ExternalActivity] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/item/items/item/activities/count/count_request_builder.py b/msgraph/generated/connections/item/items/item/activities/count/count_request_builder.py index 26fbe522e66..3aeae686b3f 100644 --- a/msgraph/generated/connections/item/items/item/activities/count/count_request_builder.py +++ b/msgraph/generated/connections/item/items/item/activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/connections/item/items/item/activities/item/external_activity_item_request_builder.py b/msgraph/generated/connections/item/items/item/activities/item/external_activity_item_request_builder.py index b77cc61a583..d886b8696a3 100644 --- a/msgraph/generated/connections/item/items/item/activities/item/external_activity_item_request_builder.py +++ b/msgraph/generated/connections/item/items/item/activities/item/external_activity_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ExternalA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ExternalActi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalActivity] = None, request_configuration: Optional[ExternalActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ExternalActivity] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py b/msgraph/generated/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py index c3f5a0eecf8..ff0ab03420a 100644 --- a/msgraph/generated/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py +++ b/msgraph/generated/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PerformedByR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PerformedByRequestBuilder: diff --git a/msgraph/generated/connections/item/items/item/external_item_item_request_builder.py b/msgraph/generated/connections/item/items/item/external_item_item_request_builder.py index 74f1818d21c..6aca8a1f978 100644 --- a/msgraph/generated/connections/item/items/item/external_item_item_request_builder.py +++ b/msgraph/generated/connections/item/items/item/external_item_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExternalItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an externalItem object. + Delete an externalItem object. This API is available in the following national cloud deployments. 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/externalconnectors-externalitem-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[ExternalItemItemRequestBui async def get(self,request_configuration: Optional[ExternalItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalItem]: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalItem] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalitem-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def put(self,body: Optional[ExternalItem] = None, request_configuration: O def to_delete_request_information(self,request_configuration: Optional[ExternalItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an externalItem object. + Delete an externalItem object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[ExternalItem] = None, request_configuration: Optional[ExternalItemItemRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_put_request_information(self,body: Optional[ExternalItem] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class ExternalItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class ExternalItemItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.py b/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.py similarity index 92% rename from msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.py rename to msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.py index 75273558e22..1ae8f1c5e2e 100644 --- a/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.py +++ b/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddActivitiesResponse(BaseCollectionPaginationCountResponse): +class AddActivitiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExternalActivityResult]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddActivitiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddActivitiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddActivitiesResponse + Returns: AddActivitiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddActivitiesResponse() + return AddActivitiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py b/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py index 2e25d9428ff..b383b792bd6 100644 --- a/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py +++ b/msgraph/generated/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .add_activities_post_request_body import AddActivitiesPostRequestBody - from .add_activities_response import AddActivitiesResponse + from .add_activities_post_response import AddActivitiesPostResponse class MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/microsoft.graph.externalConnectors.addActivities", path_parameters) - async def post(self,body: Optional[AddActivitiesPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilderPostRequestConfiguration] = None) -> Optional[AddActivitiesResponse]: + async def post(self,body: Optional[AddActivitiesPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilderPostRequestConfiguration] = None) -> Optional[AddActivitiesPostResponse]: """ Invoke action addActivities param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddActivitiesResponse] + Returns: Optional[AddActivitiesPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[AddActivitiesPostRequestBody] = None, request } if not self.request_adapter: raise Exception("Http core is null") - from .add_activities_response import AddActivitiesResponse + from .add_activities_post_response import AddActivitiesPostResponse - return await self.request_adapter.send_async(request_info, AddActivitiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddActivitiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddActivitiesPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AddActivitiesPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/connections/item/items/items_request_builder.py b/msgraph/generated/connections/item/items/items_request_builder.py index 408a9da3df7..7d9758a8c51 100644 --- a/msgraph/generated/connections/item/items/items_request_builder.py +++ b/msgraph/generated/connections/item/items/items_request_builder.py @@ -45,7 +45,7 @@ def by_external_item_id(self,external_item_id: str) -> ExternalItemItemRequestBu async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalItemCollectionResponse]: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalItemCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[ExternalItem] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ExternalItem] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ItemsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/connections/item/operations/count/count_request_builder.py b/msgraph/generated/connections/item/operations/count/count_request_builder.py index ef21dfaaa9d..1d334ce2cc6 100644 --- a/msgraph/generated/connections/item/operations/count/count_request_builder.py +++ b/msgraph/generated/connections/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/connections/item/operations/item/connection_operation_item_request_builder.py b/msgraph/generated/connections/item/operations/item/connection_operation_item_request_builder.py index 70a26c083e5..10d1d82c44d 100644 --- a/msgraph/generated/connections/item/operations/item/connection_operation_item_request_builder.py +++ b/msgraph/generated/connections/item/operations/item/connection_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ConnectionOperationItemReq async def get(self,request_configuration: Optional[ConnectionOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConnectionOperation]: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectionOperation] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-connectionoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Connectio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConnectionOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConnectionOperation] = None, request_configuration: Optional[ConnectionOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ConnectionOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ConnectionOperationItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ConnectionOperationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/connections/item/operations/operations_request_builder.py b/msgraph/generated/connections/item/operations/operations_request_builder.py index 68eac521625..6a0ce490c85 100644 --- a/msgraph/generated/connections/item/operations/operations_request_builder.py +++ b/msgraph/generated/connections/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_connection_operation_id(self,connection_operation_id: str) -> ConnectionO async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ConnectionOperationCollectionResponse]: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectionOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[ConnectionOperation] = None, request_configur def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConnectionOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ConnectionOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/connections/item/schema/schema_request_builder.py b/msgraph/generated/connections/item/schema/schema_request_builder.py index b8fb54c9d6f..fe578faa51e 100644 --- a/msgraph/generated/connections/item/schema/schema_request_builder.py +++ b/msgraph/generated/connections/item/schema/schema_request_builder.py @@ -26,28 +26,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/schema{?%24select,%24expand}", path_parameters) - async def delete(self,request_configuration: Optional[SchemaRequestBuilderDeleteRequestConfiguration] = None) -> None: - """ - Delete navigation property schema for connections - 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[SchemaRequestBuilderGetRequestConfiguration] = None) -> Optional[Schema]: """ - Read the properties and relationships of a schema object. + Read the properties and relationships of a schema object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schema] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-schema-get?view=graph-rest-1.0 @@ -69,10 +50,11 @@ async def get(self,request_configuration: Optional[SchemaRequestBuilderGetReques async def patch(self,body: Optional[Schema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> Optional[Schema]: """ - Update the navigation property schema in connections + Create a new schema object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schema] + Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-patch-schema?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -91,41 +73,26 @@ async def patch(self,body: Optional[Schema] = None, request_configuration: Optio return await self.request_adapter.send_async(request_info, Schema, error_mapping) - def to_delete_request_information(self,request_configuration: Optional[SchemaRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Delete navigation property schema for connections + Read the properties and relationships of a schema object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) - return request_info - - def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: - """ - Read the properties and relationships of a schema object. - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - request_info = RequestInformation() request_info.url_template = self.url_template request_info.path_parameters = self.path_parameters request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(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.headers.try_add("Accept", "application/json") return request_info def to_patch_request_information(self,body: Optional[Schema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the navigation property schema in connections + Create a new schema object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +100,13 @@ def to_patch_request_information(self,body: Optional[Schema] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -153,20 +120,10 @@ def with_url(self,raw_url: Optional[str] = None) -> SchemaRequestBuilder: raise TypeError("raw_url cannot be null.") return SchemaRequestBuilder(self.request_adapter, raw_url) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class SchemaRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - """ - Configuration for the request such as headers, query parameters, and middleware options. - """ - @dataclass class SchemaRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a schema object. + Read the properties and relationships of a schema object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/contacts/contacts_request_builder.py b/msgraph/generated/contacts/contacts_request_builder.py index d84a9af8539..b51e074fe5d 100644 --- a/msgraph/generated/contacts/contacts_request_builder.py +++ b/msgraph/generated/contacts/contacts_request_builder.py @@ -10,9 +10,9 @@ 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.org_contact import OrgContact from ..models.org_contact_collection_response import OrgContactCollectionResponse + from ..models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .delta.delta_request_builder import DeltaRequestBuilder from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder @@ -49,7 +49,7 @@ def by_org_contact_id(self,org_contact_id: str) -> OrgContactItemRequestBuilder: async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> Optional[OrgContactCollectionResponse]: """ - Get the list of organizational contacts for this organization. + Get the list of organizational contacts for this organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrgContactCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/orgcontact-list?view=graph-rest-1.0 @@ -95,19 +95,19 @@ async def post(self,body: Optional[OrgContact] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of organizational contacts for this organization. + Get the list of organizational contacts for this organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OrgContact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[OrgContact] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class ContactsRequestBuilderGetQueryParameters(): """ - Get the list of organizational contacts for this organization. + Get the list of organizational contacts for this organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/contacts/count/count_request_builder.py b/msgraph/generated/contacts/count/count_request_builder.py index 1a879778d14..4d44be0eea4 100644 --- a/msgraph/generated/contacts/count/count_request_builder.py +++ b/msgraph/generated/contacts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/delta/delta_response.py b/msgraph/generated/contacts/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/contacts/delta/delta_response.py rename to msgraph/generated/contacts/delta/delta_get_response.py index 35307d50a67..de8f0faefd8 100644 --- a/msgraph/generated/contacts/delta/delta_response.py +++ b/msgraph/generated/contacts/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[OrgContact]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contacts/delta/delta_request_builder.py b/msgraph/generated/contacts/delta/delta_request_builder.py index bcdb6b3091d..4bc04021b6b 100644 --- a/msgraph/generated/contacts/delta/delta_request_builder.py +++ b/msgraph/generated/contacts/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_post_response.py similarity index 89% rename from msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_response.py rename to msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_post_response.py index bbc810c760f..4811ce7ed9a 100644 --- a/msgraph/generated/applications/get_available_extension_properties/get_available_extension_properties_response.py +++ b/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExtensionProperty]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse + Returns: GetAvailableExtensionPropertiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() + return GetAvailableExtensionPropertiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.py index 2886ec2e3b7..13ed2b1ddfd 100644 --- a/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contacts/get_by_ids/get_by_ids_response.py b/msgraph/generated/contacts/get_by_ids/get_by_ids_post_response.py similarity index 92% rename from msgraph/generated/contacts/get_by_ids/get_by_ids_response.py rename to msgraph/generated/contacts/get_by_ids/get_by_ids_post_response.py index 3628311761a..11bb9a8ae29 100644 --- a/msgraph/generated/contacts/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/contacts/get_by_ids/get_by_ids_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: GetByIdsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return GetByIdsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contacts/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/contacts/get_by_ids/get_by_ids_request_builder.py index 0528f5518a7..7a705e600be 100644 --- a/msgraph/generated/contacts/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/contacts/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contacts/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/contacts/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/contacts/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/contacts/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/contacts/item/check_member_groups/check_member_groups_request_builder.py index 626c4c98ef4..847e1e5fcfa 100644 --- a/msgraph/generated/contacts/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/contacts/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contacts/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/contacts/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/contacts/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_response.py b/msgraph/generated/contacts/item/check_member_objects/check_member_objects_post_response.py similarity index 90% rename from msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_response.py rename to msgraph/generated/contacts/item/check_member_objects/check_member_objects_post_response.py index c669566391f..f7859b2118e 100644 --- a/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_response.py +++ b/msgraph/generated/contacts/item/check_member_objects/check_member_objects_post_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AvailableProviderTypesResponse(BaseCollectionPaginationCountResponse): +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AvailableProviderTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AvailableProviderTypesResponse + Returns: CheckMemberObjectsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AvailableProviderTypesResponse() + return CheckMemberObjectsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contacts/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/contacts/item/check_member_objects/check_member_objects_request_builder.py index e9a0b28a659..49a51247a6c 100644 --- a/msgraph/generated/contacts/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/contacts/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contacts/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/contacts/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/contacts/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contacts/item/direct_reports/count/count_request_builder.py b/msgraph/generated/contacts/item/direct_reports/count/count_request_builder.py index eef0a95a53e..9844c910961 100644 --- a/msgraph/generated/contacts/item/direct_reports/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/direct_reports_request_builder.py b/msgraph/generated/contacts/item/direct_reports/direct_reports_request_builder.py index 5404d0907fa..7e7f754a6b6 100644 --- a/msgraph/generated/contacts/item/direct_reports/direct_reports_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/direct_reports_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectReport Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectReportsRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.py b/msgraph/generated/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.py index 105efd95578..c7af2fccd2a 100644 --- a/msgraph/generated/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py index 9d21f5d7f50..76f1a5d6fda 100644 --- a/msgraph/generated/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/graph_user/count/count_request_builder.py b/msgraph/generated/contacts/item/direct_reports/graph_user/count/count_request_builder.py index 238611d1443..f7282e4c6ab 100644 --- a/msgraph/generated/contacts/item/direct_reports/graph_user/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/graph_user/graph_user_request_builder.py b/msgraph/generated/contacts/item/direct_reports/graph_user/graph_user_request_builder.py index 3bc3a641afb..52433936c75 100644 --- a/msgraph/generated/contacts/item/direct_reports/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/item/directory_object_item_request_builder.py b/msgraph/generated/contacts/item/direct_reports/item/directory_object_item_request_builder.py index 61914e90477..0fd49265429 100644 --- a/msgraph/generated/contacts/item/direct_reports/item/directory_object_item_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py index 92d586ffb3e..9c407019f9a 100644 --- a/msgraph/generated/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.py b/msgraph/generated/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.py index 6537e08e1b3..68c8152b500 100644 --- a/msgraph/generated/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/applications/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/contacts/item/get_member_groups/get_member_groups_post_response.py similarity index 90% rename from msgraph/generated/applications/item/check_member_objects/check_member_objects_response.py rename to msgraph/generated/contacts/item/get_member_groups/get_member_groups_post_response.py index f3e7e2bcabf..cfbe18b3b1a 100644 --- a/msgraph/generated/applications/item/check_member_objects/check_member_objects_response.py +++ b/msgraph/generated/contacts/item/get_member_groups/get_member_groups_post_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse + Returns: GetMemberGroupsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() + return GetMemberGroupsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contacts/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/contacts/item/get_member_groups/get_member_groups_request_builder.py index 8aa5af5c915..c1d6754f0b3 100644 --- a/msgraph/generated/contacts/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/contacts/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contacts/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/contacts/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/contacts/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contacts/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/contacts/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/contacts/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/contacts/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/contacts/item/get_member_objects/get_member_objects_request_builder.py index 544e6204b31..324cbd07793 100644 --- a/msgraph/generated/contacts/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/contacts/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contacts/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/contacts/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/contacts/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contacts/item/manager/manager_request_builder.py b/msgraph/generated/contacts/item/manager/manager_request_builder.py index 09a3319432e..6ed86bf6cc9 100644 --- a/msgraph/generated/contacts/item/manager/manager_request_builder.py +++ b/msgraph/generated/contacts/item/manager/manager_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[ManagerRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Get this organizational contact's manager. + Get this organizational contact's manager. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/orgcontact-get-manager?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[ManagerRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[ManagerRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get this organizational contact's manager. + Get this organizational contact's manager. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagerRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> ManagerRequestBuilder: @dataclass class ManagerRequestBuilderGetQueryParameters(): """ - Get this organizational contact's manager. + Get this organizational contact's manager. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/contacts/item/member_of/count/count_request_builder.py b/msgraph/generated/contacts/item/member_of/count/count_request_builder.py index 23bc25a123c..8b8d5d88e97 100644 --- a/msgraph/generated/contacts/item/member_of/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.py index 440da2f3ae3..52e53480061 100644 --- a/msgraph/generated/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index e2d059382d4..022777d08d9 100644 --- a/msgraph/generated/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/graph_group/count/count_request_builder.py b/msgraph/generated/contacts/item/member_of/graph_group/count/count_request_builder.py index 5eed0802e86..1a728b793e7 100644 --- a/msgraph/generated/contacts/item/member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/contacts/item/member_of/graph_group/graph_group_request_builder.py index 5b9775b640e..4b257637ca6 100644 --- a/msgraph/generated/contacts/item/member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/item/directory_object_item_request_builder.py b/msgraph/generated/contacts/item/member_of/item/directory_object_item_request_builder.py index 8ee5c555959..0b17a80d168 100644 --- a/msgraph/generated/contacts/item/member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index 0109d3ecd35..4aecc97a859 100644 --- a/msgraph/generated/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/contacts/item/member_of/item/graph_group/graph_group_request_builder.py index 6c2651d0558..8c1532ab82f 100644 --- a/msgraph/generated/contacts/item/member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/contacts/item/member_of/member_of_request_builder.py b/msgraph/generated/contacts/item/member_of/member_of_request_builder.py index dfe8aa984ae..9042ff1d0a0 100644 --- a/msgraph/generated/contacts/item/member_of/member_of_request_builder.py +++ b/msgraph/generated/contacts/item/member_of/member_of_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[MemberOfRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MemberOfRequestBuilder: diff --git a/msgraph/generated/contacts/item/org_contact_item_request_builder.py b/msgraph/generated/contacts/item/org_contact_item_request_builder.py index d63ddc1550d..3c3082b1ab4 100644 --- a/msgraph/generated/contacts/item/org_contact_item_request_builder.py +++ b/msgraph/generated/contacts/item/org_contact_item_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ...models.o_data_errors.o_data_error import ODataError from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder from .direct_reports.direct_reports_request_builder import DirectReportsRequestBuilder @@ -21,6 +21,7 @@ from .member_of.member_of_request_builder import MemberOfRequestBuilder from .restore.restore_request_builder import RestoreRequestBuilder from .retry_service_provisioning.retry_service_provisioning_request_builder import RetryServiceProvisioningRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder from .transitive_member_of.transitive_member_of_request_builder import TransitiveMemberOfRequestBuilder class OrgContactItemRequestBuilder(BaseRequestBuilder): @@ -57,7 +58,7 @@ async def delete(self,request_configuration: Optional[OrgContactItemRequestBuild async def get(self,request_configuration: Optional[OrgContactItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OrgContact]: """ - Get the properties and relationships of an organizational contact. + Get the properties and relationships of an organizational contact. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrgContact] Find more info here: https://learn.microsoft.com/graph/api/orgcontact-get?view=graph-rest-1.0 @@ -108,29 +109,29 @@ def to_delete_request_information(self,request_configuration: Optional[OrgContac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OrgContactItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of an organizational contact. + Get the properties and relationships of an organizational contact. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OrgContact] = None, request_configuration: Optional[OrgContactItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +144,13 @@ def to_patch_request_information(self,body: Optional[OrgContact] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -244,6 +245,15 @@ def retry_service_provisioning(self) -> RetryServiceProvisioningRequestBuilder: return RetryServiceProvisioningRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @property def transitive_member_of(self) -> TransitiveMemberOfRequestBuilder: """ @@ -266,7 +276,7 @@ class OrgContactItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class OrgContactItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of an organizational contact. + Get the properties and relationships of an organizational contact. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/contacts/item/restore/restore_request_builder.py b/msgraph/generated/contacts/item/restore/restore_request_builder.py index eaaf5d2df49..6bb55badf03 100644 --- a/msgraph/generated/contacts/item/restore/restore_request_builder.py +++ b/msgraph/generated/contacts/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.py b/msgraph/generated/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.py index 1c1bfd2b121..24c446f31be 100644 --- a/msgraph/generated/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.py +++ b/msgraph/generated/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.py @@ -51,12 +51,12 @@ def to_post_request_information(self,request_configuration: Optional[RetryServic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RetryServiceProvisioningRequestBuilder: diff --git a/msgraph/generated/contacts/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/contacts/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..7d578f82864 --- /dev/null +++ b/msgraph/generated/contacts/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..66deceb8e2c --- /dev/null +++ b/msgraph/generated/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /contacts/{orgContact-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/contacts/item/transitive_member_of/count/count_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/count/count_request_builder.py index fe6123df6ae..2fdc37a81d1 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py index 09b1163fe07..c8cdc9b621c 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index f1476b572c6..0a5eef22fc6 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/graph_group/count/count_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/graph_group/count/count_request_builder.py index aadc49a8080..04f821832a4 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.py index 9ed561af0a0..9c20b4b7541 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/item/directory_object_item_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/item/directory_object_item_request_builder.py index 9c4c5460227..ef625e72ff9 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index 05d207a53e9..13019fcc55b 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.py index a08e73cb898..85212d26f71 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/contacts/item/transitive_member_of/transitive_member_of_request_builder.py b/msgraph/generated/contacts/item/transitive_member_of/transitive_member_of_request_builder.py index 1e901f067f8..7292c66b562 100644 --- a/msgraph/generated/contacts/item/transitive_member_of/transitive_member_of_request_builder.py +++ b/msgraph/generated/contacts/item/transitive_member_of/transitive_member_of_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[TransitiveMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TransitiveMemberOfRequestBuilder: diff --git a/msgraph/generated/contacts/validate_properties/validate_properties_request_builder.py b/msgraph/generated/contacts/validate_properties/validate_properties_request_builder.py index 349a1b4445a..ec954707ea5 100644 --- a/msgraph/generated/contacts/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/contacts/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/contracts_request_builder.py b/msgraph/generated/contracts/contracts_request_builder.py index 2020c0d1b65..30ec8c1d969 100644 --- a/msgraph/generated/contracts/contracts_request_builder.py +++ b/msgraph/generated/contracts/contracts_request_builder.py @@ -49,7 +49,7 @@ def by_contract_id(self,contract_id: str) -> ContractItemRequestBuilder: async def get(self,request_configuration: Optional[ContractsRequestBuilderGetRequestConfiguration] = None) -> Optional[ContractCollectionResponse]: """ - Retrieve a list of contract objects associated to a partner tenant. + Retrieve a list of contract objects associated to a partner tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContractCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/contract-list?view=graph-rest-1.0 @@ -95,19 +95,19 @@ async def post(self,body: Optional[Contract] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[ContractsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of contract objects associated to a partner tenant. + Retrieve a list of contract objects associated to a partner tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contract] = None, request_configuration: Optional[ContractsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[Contract] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class ContractsRequestBuilderGetQueryParameters(): """ - Retrieve a list of contract objects associated to a partner tenant. + Retrieve a list of contract objects associated to a partner tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/contracts/count/count_request_builder.py b/msgraph/generated/contracts/count/count_request_builder.py index 92137059e8d..57581ce54c4 100644 --- a/msgraph/generated/contracts/count/count_request_builder.py +++ b/msgraph/generated/contracts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_objects/delta/delta_response.py b/msgraph/generated/contracts/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/directory_objects/delta/delta_response.py rename to msgraph/generated/contracts/delta/delta_get_response.py index 41ac4f7e1c6..9896959749d 100644 --- a/msgraph/generated/directory_objects/delta/delta_response.py +++ b/msgraph/generated/contracts/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contracts/delta/delta_request_builder.py b/msgraph/generated/contracts/delta/delta_request_builder.py index 3ef8cd96667..4857f0e292b 100644 --- a/msgraph/generated/contracts/delta/delta_request_builder.py +++ b/msgraph/generated/contracts/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_post_response.py similarity index 89% rename from msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_response.py rename to msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_post_response.py index bbc810c760f..4811ce7ed9a 100644 --- a/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_response.py +++ b/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExtensionProperty]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse + Returns: GetAvailableExtensionPropertiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() + return GetAvailableExtensionPropertiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.py index a0962ae14e7..26332adc9a5 100644 --- a/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/get_by_ids/get_by_ids_response.py b/msgraph/generated/contracts/get_by_ids/get_by_ids_post_response.py similarity index 92% rename from msgraph/generated/applications/get_by_ids/get_by_ids_response.py rename to msgraph/generated/contracts/get_by_ids/get_by_ids_post_response.py index 3628311761a..11bb9a8ae29 100644 --- a/msgraph/generated/applications/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/contracts/get_by_ids/get_by_ids_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: GetByIdsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return GetByIdsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contracts/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/contracts/get_by_ids/get_by_ids_request_builder.py index fb67eb3dfd5..c65058f70ce 100644 --- a/msgraph/generated/contracts/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/contracts/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/contracts/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/contracts/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/contracts/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/contracts/item/check_member_groups/check_member_groups_request_builder.py index 4474a712d2b..fca38d1f78c 100644 --- a/msgraph/generated/contracts/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/contracts/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/{contract%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/contracts/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/contracts/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contracts/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/contracts/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/contracts/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/contracts/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/contracts/item/check_member_objects/check_member_objects_request_builder.py index 105c9f9a9ba..a28da478776 100644 --- a/msgraph/generated/contracts/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/contracts/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/{contract%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/contracts/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/contracts/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contracts/item/contract_item_request_builder.py b/msgraph/generated/contracts/item/contract_item_request_builder.py index 80d527ec113..6800b96597a 100644 --- a/msgraph/generated/contracts/item/contract_item_request_builder.py +++ b/msgraph/generated/contracts/item/contract_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ContractItemRequestBuilder async def get(self,request_configuration: Optional[ContractItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Contract]: """ - Retrieve the properties and relationships of contract object. + Retrieve the properties and relationships of contract object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Contract] Find more info here: https://learn.microsoft.com/graph/api/contract-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ContractI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContractItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of contract object. + Retrieve the properties and relationships of contract object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contract] = None, request_configuration: Optional[ContractItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Contract] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ContractItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class ContractItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of contract object. + Retrieve the properties and relationships of contract object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/applications/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/contracts/item/get_member_groups/get_member_groups_post_response.py similarity index 90% rename from msgraph/generated/applications/item/get_member_groups/get_member_groups_response.py rename to msgraph/generated/contracts/item/get_member_groups/get_member_groups_post_response.py index 172f7037f68..cfbe18b3b1a 100644 --- a/msgraph/generated/applications/item/get_member_groups/get_member_groups_response.py +++ b/msgraph/generated/contracts/item/get_member_groups/get_member_groups_post_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse + Returns: GetMemberGroupsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() + return GetMemberGroupsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/contracts/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/contracts/item/get_member_groups/get_member_groups_request_builder.py index 3b8eb67a8a9..75726f9f570 100644 --- a/msgraph/generated/contracts/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/contracts/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/{contract%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/contracts/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/contracts/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contracts/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/contracts/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/contracts/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/contracts/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/contracts/item/get_member_objects/get_member_objects_request_builder.py index a560bf5ab93..25f050763b2 100644 --- a/msgraph/generated/contracts/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/contracts/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/contracts/{contract%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/contracts/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/contracts/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/contracts/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/contracts/item/restore/restore_request_builder.py b/msgraph/generated/contracts/item/restore/restore_request_builder.py index 5868acc9a2d..be5670bdfde 100644 --- a/msgraph/generated/contracts/item/restore/restore_request_builder.py +++ b/msgraph/generated/contracts/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/contracts/validate_properties/validate_properties_request_builder.py b/msgraph/generated/contracts/validate_properties/validate_properties_request_builder.py index ce588afe277..2e4141c6821 100644 --- a/msgraph/generated/contracts/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/contracts/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/data_policy_operations/count/count_request_builder.py b/msgraph/generated/data_policy_operations/count/count_request_builder.py index 5cbe70bed17..f3e34bf1808 100644 --- a/msgraph/generated/data_policy_operations/count/count_request_builder.py +++ b/msgraph/generated/data_policy_operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/data_policy_operations/data_policy_operations_request_builder.py b/msgraph/generated/data_policy_operations/data_policy_operations_request_builder.py index 079a37e9fe9..89080631037 100644 --- a/msgraph/generated/data_policy_operations/data_policy_operations_request_builder.py +++ b/msgraph/generated/data_policy_operations/data_policy_operations_request_builder.py @@ -45,7 +45,7 @@ def by_data_policy_operation_id(self,data_policy_operation_id: str) -> DataPolic async def get(self,request_configuration: Optional[DataPolicyOperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[DataPolicyOperationCollectionResponse]: """ - Retrieve the properties of a dataPolicyOperation object. + Retrieve the properties of a dataPolicyOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DataPolicyOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[DataPolicyOperation] = None, request_configur def to_get_request_information(self,request_configuration: Optional[DataPolicyOperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a dataPolicyOperation object. + Retrieve the properties of a dataPolicyOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DataPolicyOperation] = None, request_configuration: Optional[DataPolicyOperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DataPolicyOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DataPolicyOperationsRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a dataPolicyOperation object. + Retrieve the properties of a dataPolicyOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/data_policy_operations/item/data_policy_operation_item_request_builder.py b/msgraph/generated/data_policy_operations/item/data_policy_operation_item_request_builder.py index f4e534806a2..4c31ac02ee5 100644 --- a/msgraph/generated/data_policy_operations/item/data_policy_operation_item_request_builder.py +++ b/msgraph/generated/data_policy_operations/item/data_policy_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DataPolicyOperationItemReq async def get(self,request_configuration: Optional[DataPolicyOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DataPolicyOperation]: """ - Retrieve the properties of a dataPolicyOperation object. + Retrieve the properties of a dataPolicyOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DataPolicyOperation] Find more info here: https://learn.microsoft.com/graph/api/datapolicyoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[DataPolic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DataPolicyOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a dataPolicyOperation object. + Retrieve the properties of a dataPolicyOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DataPolicyOperation] = None, request_configuration: Optional[DataPolicyOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DataPolicyOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class DataPolicyOperationItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class DataPolicyOperationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a dataPolicyOperation object. + Retrieve the properties of a dataPolicyOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.py index b723f11b2a9..606b2a14371 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AndroidManag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AndroidManagedAppProtection] = None, request_configuration: Optional[AndroidManagedAppProtectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AndroidManagedAppProtection] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/count/count_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/count/count_request_builder.py index 5bea9e8eb50..abcbd03a4db 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.py index ed817deff72..50d315e4230 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[AndroidMa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AndroidManagedAppProtectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[AndroidManag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AndroidManagedAppProtection] = None, request_configuration: Optional[AndroidManagedAppProtectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[AndroidManagedAppProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.py index a36aafba1b8..8d275e8a211 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AppsRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[AppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ManagedMobileApp] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.py index e6b38902f18..5158479a4d3 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py index c61ea10c9cf..12afe3715b9 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedMo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedMobileAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedMobil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[ManagedMobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ManagedMobileApp] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.py index be986b907df..65ea6e79935 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TargetedManagedAppPolicyAssi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.py index 815d60de263..ff4c7f2b26d 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py index f74976afc50..f38e09f88bd 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TargetedM Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TargetedManagedAppPolicyAss if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py b/msgraph/generated/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py index 276cbd0d618..0602f12abc2 100644 --- a/msgraph/generated/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py +++ b/msgraph/generated/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Deploymen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeploymentSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeploymentSu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicyDeploymentSummary] = None, request_configuration: Optional[DeploymentSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicyDeploymentS if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/count/count_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/count/count_request_builder.py index 6b23b516838..1589b44fc10 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.py index dcfc663e885..a34bde9178a 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DefaultManag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DefaultManagedAppProtection] = None, request_configuration: Optional[DefaultManagedAppProtectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DefaultManagedAppProtection] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.py index a512181bf6e..c0f54704650 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AppsRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[AppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ManagedMobileApp] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.py index 420e3d7789f..5004934a924 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py index 02f9a626207..c98a4e25262 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedMo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedMobileAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedMobil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[ManagedMobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ManagedMobileApp] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.py index df0991b664d..4c3a9fe31f1 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[DefaultMa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DefaultManagedAppProtectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[DefaultManag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DefaultManagedAppProtection] = None, request_configuration: Optional[DefaultManagedAppProtectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[DefaultManagedAppProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py b/msgraph/generated/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py index 8de2f87c1ac..0b757e930a2 100644 --- a/msgraph/generated/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py +++ b/msgraph/generated/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Deploymen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeploymentSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeploymentSu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicyDeploymentSummary] = None, request_configuration: Optional[DeploymentSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicyDeploymentS if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 7388480d637..92a1ba42138 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 @@ -20,9 +20,9 @@ from .managed_app_statuses.managed_app_statuses_request_builder import ManagedAppStatusesRequestBuilder from .managed_e_books.managed_e_books_request_builder import ManagedEBooksRequestBuilder from .mdm_windows_information_protection_policies.mdm_windows_information_protection_policies_request_builder import MdmWindowsInformationProtectionPoliciesRequestBuilder + from .mobile_apps.mobile_apps_request_builder import MobileAppsRequestBuilder from .mobile_app_categories.mobile_app_categories_request_builder import MobileAppCategoriesRequestBuilder from .mobile_app_configurations.mobile_app_configurations_request_builder import MobileAppConfigurationsRequestBuilder - from .mobile_apps.mobile_apps_request_builder import MobileAppsRequestBuilder from .sync_microsoft_store_for_business_apps.sync_microsoft_store_for_business_apps_request_builder import SyncMicrosoftStoreForBusinessAppsRequestBuilder from .targeted_managed_app_configurations.targeted_managed_app_configurations_request_builder import TargetedManagedAppConfigurationsRequestBuilder from .vpp_tokens.vpp_tokens_request_builder import VppTokensRequestBuilder @@ -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-books-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-partnerintegration-deviceappmanagement-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceAppMan Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceAppManagement] = None, request_configuration: Optional[DeviceAppManagementRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_patch_request_information(self,body: Optional[DeviceAppManagement] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/count/count_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/count/count_request_builder.py index be0227cbbfe..d4f8590d3ca 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.py index 05e067e693c..9a675ef0aef 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[IosManagedAp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IosManagedAppProtection] = None, request_configuration: Optional[IosManagedAppProtectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[IosManagedAppProtection] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.py index a5cddd09290..db2fc67cca1 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AppsRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[AppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedMobileApp] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.py index f3081b26930..b3ca96f5f9e 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py index c5870e8e0ed..6e292a994e1 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedMo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedMobileAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedMobil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[ManagedMobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ManagedMobileApp] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.py index 05792c1e99e..738f86cd658 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TargetedManagedAppPolicyAssi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.py index 674e25bd4cd..0adc2b40d9c 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py index 1eec9af8eba..650d03ea6b9 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TargetedM Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TargetedManagedAppPolicyAss if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py index f7f16402815..c30b198d55d 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[Deploymen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeploymentSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeploymentSu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicyDeploymentSummary] = None, request_configuration: Optional[DeploymentSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicyDeploymentS if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.py b/msgraph/generated/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.py index afecc770b57..2e0ad563001 100644 --- a/msgraph/generated/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.py +++ b/msgraph/generated/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[IosManage Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IosManagedAppProtectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[IosManagedAp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IosManagedAppProtection] = None, request_configuration: Optional[IosManagedAppProtectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[IosManagedAppProtection] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_policies/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_app_policies/count/count_request_builder.py index 7049ce7d370..c8852bb07f7 100644 --- a/msgraph/generated/device_app_management/managed_app_policies/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 9a5f72b42f2..f6184b87416 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 managedAppProtection object. + Read properties and relationships of the managedAppPolicy 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-managedappprotection-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedAppPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the managedAppProtection object. + Read properties and relationships of the managedAppPolicy object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicy] = None, request_configuration: Optional[ManagedAppPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicy] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ManagedAppPolicyItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the managedAppProtection object. + Read properties and relationships of the managedAppPolicy 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 f12b63865ba..da7f3661595 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-targetedmanagedappprotection-targetapps?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TargetAppsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 a48bfe5e402..aa4f18b4897 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 @@ -96,14 +96,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppPo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicy] = None, request_configuration: Optional[ManagedAppPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ManagedAppPolicy] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_registrations/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/count/count_request_builder.py index e20fc302648..003fcd178c6 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.py b/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.py new file mode 100644 index 00000000000..5662da75e80 --- /dev/null +++ b/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetUserIdsWithFlaggedAppRegistrationGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetUserIdsWithFlaggedAppRegistrationGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetUserIdsWithFlaggedAppRegistrationGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetUserIdsWithFlaggedAppRegistrationGetResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.py index 8064224b035..af06ffb0740 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_user_ids_with_flagged_app_registration_response import GetUserIdsWithFlaggedAppRegistrationResponse + from .get_user_ids_with_flagged_app_registration_get_response import GetUserIdsWithFlaggedAppRegistrationGetResponse class GetUserIdsWithFlaggedAppRegistrationRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/getUserIdsWithFlaggedAppRegistration(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetUserIdsWithFlaggedAppRegistrationRequestBuilderGetRequestConfiguration] = None) -> Optional[GetUserIdsWithFlaggedAppRegistrationResponse]: + async def get(self,request_configuration: Optional[GetUserIdsWithFlaggedAppRegistrationRequestBuilderGetRequestConfiguration] = None) -> Optional[GetUserIdsWithFlaggedAppRegistrationGetResponse]: """ Invoke function getUserIdsWithFlaggedAppRegistration param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetUserIdsWithFlaggedAppRegistrationResponse] + Returns: Optional[GetUserIdsWithFlaggedAppRegistrationGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetUserIdsWithFlaggedAppRegis } if not self.request_adapter: raise Exception("Http core is null") - from .get_user_ids_with_flagged_app_registration_response import GetUserIdsWithFlaggedAppRegistrationResponse + from .get_user_ids_with_flagged_app_registration_get_response import GetUserIdsWithFlaggedAppRegistrationGetResponse - return await self.request_adapter.send_async(request_info, GetUserIdsWithFlaggedAppRegistrationResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetUserIdsWithFlaggedAppRegistrationGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetUserIdsWithFlaggedAppRegistrationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetUserIdsWi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetUserIdsWithFlaggedAppRegistrationRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.py index 8e4233c7da9..e7d18ef5ced 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AppliedPolic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicy] = None, request_configuration: Optional[AppliedPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ManagedAppPolicy] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.py index dc1f23182df..696af097984 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.py index ba1c018b1d1..271ab88cb20 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedAppPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppPo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicy] = None, request_configuration: Optional[ManagedAppPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicy] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 058b6b6b7c3..881349bd65b 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-targetedmanagedappprotection-targetapps?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TargetAppsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.py index 60298ba88fc..f3b749cc603 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.py index e317f18cb5a..a94098dcac3 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[IntendedPoli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicy] = None, request_configuration: Optional[IntendedPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ManagedAppPolicy] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.py index 3a9dc492b0c..38424ea52cf 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedAppPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppPo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicy] = None, request_configuration: Optional[ManagedAppPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicy] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 9f68425f424..4f656c89a5d 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-targetedmanagedappprotection-targetapps?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TargetAppsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 db493a0313f..b1330252b2b 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 @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedAppRegistrationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppRegistration] = None, request_configuration: Optional[ManagedAppRegistrationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppRegistration] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.py index 67acd317e04..f2100099b59 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.py index 5cb9511b628..48a94f3858e 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedAppOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppOp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppOperation] = None, request_configuration: Optional[ManagedAppOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/operations/operations_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/operations/operations_request_builder.py index a6575a3ac84..a35d211fc44 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/operations/operations_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/operations/operations_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedAppOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 a519cd82daf..bbf56d79dbf 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 managedAppRegistration 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-managedappregistration-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,19 +93,19 @@ 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 managedAppRegistration 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 """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppRegistration] = None, request_configuration: Optional[ManagedAppRegistrationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ManagedAppRegistration] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def get_user_ids_with_flagged_app_registration(self) -> GetUserIdsWithFlaggedApp @dataclass class ManagedAppRegistrationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedAppRegistration 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/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_app_statuses/count/count_request_builder.py index d7bd5a71818..1969acf7ba7 100644 --- a/msgraph/generated/device_app_management/managed_app_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 5b99bb25ab7..79cf5b56659 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 @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedAppStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppSt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppStatus] = None, request_configuration: Optional[ManagedAppStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppStatus] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.py b/msgraph/generated/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.py index 34f7a822d1b..d9b5d260648 100644 --- a/msgraph/generated/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.py @@ -45,10 +45,10 @@ def by_managed_app_status_id(self,managed_app_status_id: str) -> ManagedAppStatu async def get(self,request_configuration: Optional[ManagedAppStatusesRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedAppStatusCollectionResponse]: """ - List properties and relationships of the managedAppStatusRaw objects. + List properties and relationships of the managedAppStatus objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedAppStatusCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappstatusraw-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappstatus-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -91,19 +91,19 @@ async def post(self,body: Optional[ManagedAppStatus] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ManagedAppStatusesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the managedAppStatusRaw objects. + List properties and relationships of the managedAppStatus objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppStatus] = None, request_configuration: Optional[ManagedAppStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ManagedAppStatus] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ManagedAppStatusesRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedAppStatusRaw objects. + List properties and relationships of the managedAppStatus objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_e_books/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/count/count_request_builder.py index c9dabde5718..8433bff6db1 100644 --- a/msgraph/generated/device_app_management/managed_e_books/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_e_books/item/assign/assign_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/assign/assign_request_builder.py index b093697dadc..6825b47489f 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/assign/assign_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 05a3348f777..168cdf4c70d 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 @@ -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.") @@ -97,19 +97,19 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedEBookAssignment] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/assignments/count/count_request_builder.py index c9bc985f4e8..82a2fe41a41 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 755497c628f..48c18703101 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 @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedEB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedEBookAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedEBook Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedEBookAssignment] = None, request_configuration: Optional[ManagedEBookAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ManagedEBookAssignment] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/device_states/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/device_states/count/count_request_builder.py index eb67b7f956f..fb273cb4039 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/device_states/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/device_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_e_books/item/device_states/device_states_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/device_states/device_states_request_builder.py index 438a09c2341..2d91ed7a767 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/device_states/device_states_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/device_states/device_states_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStates Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceInstallState] = None, request_configuration: Optional[DeviceStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceInstallState] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.py index ec29bb91f83..c9d68482722 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceIns Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceInstallStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceInstal Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceInstallState] = None, request_configuration: Optional[DeviceInstallStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceInstallState] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.py index 5a46361b13a..fed03cc761d 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[InstallSu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[InstallSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[InstallSumma Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EBookInstallSummary] = None, request_configuration: Optional[InstallSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EBookInstallSummary] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py index 6f9b8468e66..760c1f092cf 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py @@ -53,10 +53,10 @@ async def delete(self,request_configuration: Optional[ManagedEBookItemRequestBui async def get(self,request_configuration: Optional[ManagedEBookItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedEBook]: """ - Read properties and relationships of the iosVppEBook object. + Read properties and relationships of the managedEBook object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedEBook] - Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebook-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebook-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -105,29 +105,29 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedEB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedEBookItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the iosVppEBook object. + Read properties and relationships of the managedEBook object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedEBook] = None, request_configuration: Optional[ManagedEBookItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ManagedEBook] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -218,7 +218,7 @@ class ManagedEBookItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class ManagedEBookItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the iosVppEBook object. + Read properties and relationships of the managedEBook object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.py index 1b5f8a74b1e..447769b475f 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.py index 49e76bfd4c4..580de086b5e 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.py index 624863b49c1..ccef5bc9eae 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStates Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceInstallState] = None, request_configuration: Optional[DeviceStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceInstallState] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.py index 5244dc0e1aa..100e3c3b8ac 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceIns Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceInstallStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceInstal Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceInstallState] = None, request_configuration: Optional[DeviceInstallStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceInstallState] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.py index f31e2f70a7f..d3d66ccd13c 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserInsta Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserInstallStateSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[UserInstallS Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserInstallStateSummary] = None, request_configuration: Optional[UserInstallStateSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[UserInstallStateSummary] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.py index c9a35497fbd..8c143b2f98a 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStateSum Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserInstallStateSummary] = None, request_configuration: Optional[UserStateSummaryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UserInstallStateSummary] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/managed_e_books/managed_e_books_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/managed_e_books_request_builder.py index e8b6162f0e2..0636b9a2582 100644 --- a/msgraph/generated/device_app_management/managed_e_books/managed_e_books_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/managed_e_books_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedEBook Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedEBook] = None, request_configuration: Optional[ManagedEBooksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedEBook] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.py index 642ca5b3de4..a071fda831e 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.py index 290e0e152f3..de9702fd608 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TargetedManagedAppPolicyAssi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.py index cd7779633f7..0bf1268a7ea 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py index 33c2ef9b3a2..3c499f77378 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TargetedM Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TargetedManagedAppPolicyAss if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py index 8cfe9e3ab60..66a946e46cd 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py index 55d0489185c..3e6e6cd0aad 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExemptAppLoc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[ExemptAppLockerFilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py index d03e94ef2b5..1771c23b894 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.py index 5c80afca1e8..7dce13ea3ae 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[MdmWindow Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MdmWindowsInformationProtectionPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[MdmWindowsIn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MdmWindowsInformationProtectionPolicy] = None, request_configuration: Optional[MdmWindowsInformationProtectionPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[MdmWindowsInformationProtec if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py index 32b903eb6f1..ed6057174d5 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py index 4df387e395a..020fcd346b9 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py index 273f3fdfeb1..82fea34f79c 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ProtectedApp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.py b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.py index 099a8bc352e..cdd680fdadc 100644 --- a/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.py +++ b/msgraph/generated/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[MdmWindowsIn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MdmWindowsInformationProtectionPolicy] = None, request_configuration: Optional[MdmWindowsInformationProtectionPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MdmWindowsInformationProtect if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_app_categories/count/count_request_builder.py index 84cb068baa2..de44b03ee60 100644 --- a/msgraph/generated/device_app_management/mobile_app_categories/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.py index 2ce1bafca46..62413a4e234 100644 --- a/msgraph/generated/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[MobileApp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppCat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileAppCategory] = None, request_configuration: Optional[MobileAppCategoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[MobileAppCategory] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.py b/msgraph/generated/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.py index 293809e3971..834d36fdcaf 100644 --- a/msgraph/generated/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppCat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileAppCategory] = None, request_configuration: Optional[MobileAppCategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MobileAppCategory] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/count/count_request_builder.py index 01731e02230..8716e921e5e 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.py index f91aa9229a2..7dfda59bbac 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.py index 7385d838408..311cb118d79 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedDeviceMobileAppConfig if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.py index fa4b6b6eec3..013d5f16b5c 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.py index d0123efd004..cbbdd7ee8cb 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationAssignment] = None, request_configuration: Optional[ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ManagedDeviceMobileAppConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.py index 7c88329ccf6..bf45952bc6c 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceSta Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceStatusSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStatus Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationDeviceSummary] = None, request_configuration: Optional[DeviceStatusSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ManagedDeviceMobileAppConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.py index f84273b91b9..c6aa471bfa1 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.py index 5bbdc529a8f..6322fc3e1fb 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStatus Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationDeviceStatus] = None, request_configuration: Optional[DeviceStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedDeviceMobileAppConfig if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.py index 8f1bd374daa..882ab85e200 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationDeviceStatus] = None, request_configuration: Optional[ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ManagedDeviceMobileAppConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 6570241e009..b7fb1d49fbb 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 iosMobileAppConfiguration object. + Read properties and relationships of the managedDeviceMobileAppConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedDeviceMobileAppConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-iosmobileappconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-manageddevicemobileappconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -106,29 +106,29 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedDeviceMobileAppConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the iosMobileAppConfiguration object. + Read properties and relationships of the managedDeviceMobileAppConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfiguration] = None, request_configuration: Optional[ManagedDeviceMobileAppConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[ManagedDeviceMobileAppConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -179,15 +179,6 @@ def assignments(self) -> AssignmentsRequestBuilder: return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) - @property - def device_statuses(self) -> DeviceStatusesRequestBuilder: - """ - Provides operations to manage the deviceStatuses property of the microsoft.graph.managedDeviceMobileAppConfiguration entity. - """ - from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder - - return DeviceStatusesRequestBuilder(self.request_adapter, self.path_parameters) - @property def device_status_summary(self) -> DeviceStatusSummaryRequestBuilder: """ @@ -198,13 +189,13 @@ def device_status_summary(self) -> DeviceStatusSummaryRequestBuilder: return DeviceStatusSummaryRequestBuilder(self.request_adapter, self.path_parameters) @property - def user_statuses(self) -> UserStatusesRequestBuilder: + def device_statuses(self) -> DeviceStatusesRequestBuilder: """ - Provides operations to manage the userStatuses property of the microsoft.graph.managedDeviceMobileAppConfiguration entity. + Provides operations to manage the deviceStatuses property of the microsoft.graph.managedDeviceMobileAppConfiguration entity. """ - from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder + from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder - return UserStatusesRequestBuilder(self.request_adapter, self.path_parameters) + return DeviceStatusesRequestBuilder(self.request_adapter, self.path_parameters) @property def user_status_summary(self) -> UserStatusSummaryRequestBuilder: @@ -215,6 +206,15 @@ def user_status_summary(self) -> UserStatusSummaryRequestBuilder: return UserStatusSummaryRequestBuilder(self.request_adapter, self.path_parameters) + @property + def user_statuses(self) -> UserStatusesRequestBuilder: + """ + Provides operations to manage the userStatuses property of the microsoft.graph.managedDeviceMobileAppConfiguration entity. + """ + from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder + + return UserStatusesRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass @@ -228,7 +228,7 @@ class ManagedDeviceMobileAppConfigurationItemRequestBuilderDeleteRequestConfigur @dataclass class ManagedDeviceMobileAppConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the iosMobileAppConfiguration object. + Read properties and relationships of the managedDeviceMobileAppConfiguration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.py index 0284ae26c52..efea1219229 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserStatu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserStatusSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStatusSu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationUserSummary] = None, request_configuration: Optional[UserStatusSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ManagedDeviceMobileAppConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.py index b8b5f8c2a30..23751e0f7eb 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.py index 9cc9c94ddf6..95737855e72 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationUserStatus] = None, request_configuration: Optional[ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ManagedDeviceMobileAppConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.py index 1b54c570c49..b1d47addee8 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStatuses Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfigurationUserStatus] = None, request_configuration: Optional[UserStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedDeviceMobileAppConfig if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 7307e4c2db8..ee4dd97752a 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 managedDeviceMobileAppConfiguration objects. + List properties and relationships of the iosMobileAppConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedDeviceMobileAppConfigurationCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-manageddevicemobileappconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-iosmobileappconfiguration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -92,19 +92,19 @@ 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 managedDeviceMobileAppConfiguration objects. + List properties and relationships of the iosMobileAppConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDeviceMobileAppConfiguration] = None, request_configuration: Optional[MobileAppConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedDeviceMobileAppConfig if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MobileAppConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedDeviceMobileAppConfiguration objects. + List properties and relationships of the iosMobileAppConfiguration objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/mobile_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/count/count_request_builder.py index 43fa9cd9ed2..bba94a112e8 100644 --- a/msgraph/generated/device_app_management/mobile_apps/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.py index b8f593c2b09..c43833865b0 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.py index 20e2c9a2303..a78d126ee36 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAndroid Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAndroidLobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.py index add1a65085a..516035fb731 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.py index 287a10aa90f..682b3988260 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAndroid Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAndroidStoreAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.py index 81596d67db1..314f2382a4a 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.py index 3d888e94225..415450c0908 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphIosLobA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphIosLobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.py index fb7edf2cbb5..51c52367b35 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.py index 1555f4dbfbd..591f3d57418 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphIosStor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphIosStoreAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.py index 7ba9bc16fbe..9416f6cc9f8 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py index 989e80d2941..02b4db7a917 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphIosVppA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphIosVppAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.py index 22b42556ded..31161764ccc 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py index 4ec0d250c1c..800ce069313 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphMacOSDm Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphMacOSDmgAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.py index 41632726f18..644cfeb004e 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py index 9d45a4b9ce0..287eb6a0c29 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphMacOSLo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphMacOSLobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.py index 32a55820877..118dc2c9320 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py index 83ea0d6a65a..d91b9ba88ae 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphManaged Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphManagedAndroidLobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.py index 61acefeb0da..d5870b6d66f 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py index 830581f8fe9..bd3d042654c 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphManaged Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphManagedIOSLobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.py index a8751e5cbe9..84ed475fbdb 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py index 4dcbc091c61..00c5e85736e 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphManaged Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphManagedMobileLobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.py index 7ee5b0c74f8..90f18690a7d 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py index 44dab60efab..97a15dfc72c 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphMicroso Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphMicrosoftStoreForBusinessAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.py index cfdc3b1c0aa..ce1b430c690 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.py index d839af38427..81e90417df3 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWin32Lo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWin32LobAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.py index c3e0f2aa31b..16d7da39573 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.py index 5f9dcdf53f5..b67e2d2f9ec 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsAppXRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.py index dc09552a879..a533c6bcca5 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py index 96cde27a5a9..cfa308bd311 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsMobileMSIRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.py index e3088857d8d..ccb30f157ec 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py index bf543aa7740..7145850daff 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsUniversalAppXRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.py index 9d104341bf8..d535e0a0d11 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.py index dbd34f48643..fa7d23d766f 100644 --- a/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsWebAppRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/item/assign/assign_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/assign/assign_request_builder.py index 38aded1c458..3d29c02e2f6 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/assign/assign_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_apps/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/assignments/assignments_request_builder.py index 8d1d4abda85..f82e24d0360 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/assignments/assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MobileAppAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_apps/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/assignments/count/count_request_builder.py index 7f135d759ad..4381cf99c59 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.py index 2a7c480bd1f..95899cc651d 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[MobileApp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppAss Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[MobileAppAssignment] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/mobile_apps/item/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/categories/categories_request_builder.py index 547694dafb6..728504c0b25 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/categories/categories_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/categories/categories_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[CategoriesRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CategoriesRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/item/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/categories/count/count_request_builder.py index 029161106ca..ac4dc78081a 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/categories/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.py index 5127e05c3b3..d481792f569 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppCat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MobileAppCategoryItemRequestBuilder: diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..74a0937f810 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..43a65aa0ce6 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..675daad0603 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..9c10d8c281b --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..835a96ea1de --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..e89f51de9dc --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..0d3c1a7f226 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..fba59141352 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..41836e3e6bf --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..71110bf4a33 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..370a1b494e8 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..e4a96db3690 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..596a2c1023c --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_response.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py similarity index 71% rename from msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_response.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py index 7b4674fd6c3..3ba5b87202a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_response.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -4,34 +4,41 @@ from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + @dataclass -class ImageWithWidthWithHeightWithFittingModeResponse(AdditionalDataHolder, BackedModel, Parsable): +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) # Stores additional data not described 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 + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ImageWithWidthWithHeightWithFittingModeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ImageWithWidthWithHeightWithFittingModeResponse + Returns: CommitPostRequestBody """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ImageWithWidthWithHeightWithFittingModeResponse() + return CommitPostRequestBody() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_str_value()), + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), } return fields @@ -43,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("value", self.value) + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py similarity index 61% rename from msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py index 659ece642c1..f10ac45ba86 100644 --- a/msgraph/generated/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -10,36 +10,35 @@ 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 .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .commit_post_request_body import CommitPostRequestBody -class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): +class CommitRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the checkMemberObjects method. + Provides operations to call the commit method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. + Instantiates a new CommitRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: None """ if not body: raise TypeError("body cannot be null.") request_info = self.to_post_request_information( body, request_configuration ) - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -47,13 +46,11 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -61,30 +58,29 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberObjectsRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberObjectsRequestBuilder + Returns: CommitRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return CheckMemberObjectsRequestBuilder(self.request_adapter, raw_url) + return CommitRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class CheckMemberObjectsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class CommitRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..f4c29a1c642 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/teams/item/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py similarity index 54% rename from msgraph/generated/teams/item/permission_grants/item/restore/restore_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py index e22bf95829c..870837b713c 100644 --- a/msgraph/generated/teams/item/permission_grants/item/restore/restore_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -10,33 +10,31 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.directory_object import DirectoryObject - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError -class RestoreRequestBuilder(BaseRequestBuilder): +class RenewUploadRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the restore method. + Provides operations to call the renewUpload method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new RestoreRequestBuilder and sets the default values. + Instantiates a new RenewUploadRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) - async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Renews the SAS URI for an application file upload. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 + Returns: None """ request_info = self.to_post_request_information( request_configuration ) - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -44,40 +42,37 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq } if not self.request_adapter: raise Exception("Http core is null") - from ......models.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Renews the SAS URI for an application file upload. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info - def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: RestoreRequestBuilder + Returns: RenewUploadRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return RestoreRequestBuilder(self.request_adapter, raw_url) + return RenewUploadRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class RestoreRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class RenewUploadRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..ad8dad5af35 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.py index 024dc063100..d7cc7085d47 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.android_lob_app import AndroidLobApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphAndroidLobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAndroid Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAndroidLobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphAndroidLobAppRequestBui raise TypeError("raw_url cannot be null.") return GraphAndroidLobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphAndroidLobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..0416b474771 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..8210239fe37 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..43233ac09f0 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..cce793e05ab --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..bd3c6fee8ed --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..77b025f8de1 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.py index 98d3951de46..ece7c32aa57 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from .....models.android_store_app import AndroidStoreApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder class GraphAndroidStoreAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAndroid Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAndroidStoreAppRequestBuilder: @@ -74,6 +76,24 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphAndroidStoreAppRequestB raise TypeError("raw_url cannot be null.") return GraphAndroidStoreAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphAndroidStoreAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..da650a21f14 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..fb0b01dc0b5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..a59a9c33ae7 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..b9e4d5b87f8 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..e95f35398ae --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..01ad5b455e6 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..202e40540ff --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..32ed20bd03b --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..8ae4cf66b83 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..92196815064 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..186419c19c0 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..bff3cac6d93 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..ea0d46ae3e2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.py similarity index 61% rename from msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.py index 65eed79a751..94f15fe6c1e 100644 --- a/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -10,36 +10,35 @@ 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 .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .commit_post_request_body import CommitPostRequestBody -class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): +class CommitRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the checkMemberObjects method. + Provides operations to call the commit method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. + Instantiates a new CommitRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: None """ if not body: raise TypeError("body cannot be null.") request_info = self.to_post_request_information( body, request_configuration ) - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -47,13 +46,11 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -61,30 +58,29 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberObjectsRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberObjectsRequestBuilder + Returns: CommitRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return CheckMemberObjectsRequestBuilder(self.request_adapter, raw_url) + return CommitRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class CheckMemberObjectsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class CommitRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..946b323c426 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/chats/item/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py similarity index 54% rename from msgraph/generated/chats/item/permission_grants/item/restore/restore_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py index 82a3d39eb88..68bfbb2cf04 100644 --- a/msgraph/generated/chats/item/permission_grants/item/restore/restore_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -10,33 +10,31 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.directory_object import DirectoryObject - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError -class RestoreRequestBuilder(BaseRequestBuilder): +class RenewUploadRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the restore method. + Provides operations to call the renewUpload method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new RestoreRequestBuilder and sets the default values. + Instantiates a new RenewUploadRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) - async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Renews the SAS URI for an application file upload. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 + Returns: None """ request_info = self.to_post_request_information( request_configuration ) - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -44,40 +42,37 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq } if not self.request_adapter: raise Exception("Http core is null") - from ......models.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Renews the SAS URI for an application file upload. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info - def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: RestoreRequestBuilder + Returns: RenewUploadRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return RestoreRequestBuilder(self.request_adapter, raw_url) + return RenewUploadRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class RestoreRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class RenewUploadRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..335445044de --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.py index 9172582823e..4e231e95b48 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.ios_lob_app import IosLobApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphIosLobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphIosLobA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphIosLobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphIosLobAppRequestBuilder raise TypeError("raw_url cannot be null.") return GraphIosLobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphIosLobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..81eba58dda4 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..0f4fa2e21af --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..a535d7fb601 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..83f456fd0aa --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..bb39f51007d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..1a2e82b8c65 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.py index 03f7c9dd9f2..c59c8756056 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from .....models.ios_store_app import IosStoreApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder class GraphIosStoreAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphIosStor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphIosStoreAppRequestBuilder: @@ -74,6 +76,24 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphIosStoreAppRequestBuild raise TypeError("raw_url cannot be null.") return GraphIosStoreAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphIosStoreAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..c4d57aea204 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..0988316635b --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..08d133617d5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..17a8c42e179 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..26d537d048f --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..487825209aa --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py index c572dad22c6..d7beadc658e 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from .....models.ios_vpp_app import IosVppApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder class GraphIosVppAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphIosVppA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphIosVppAppRequestBuilder: @@ -74,6 +76,24 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphIosVppAppRequestBuilder raise TypeError("raw_url cannot be null.") return GraphIosVppAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphIosVppAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..b491c1ab68a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..45df28e5d6d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..178fd29bb95 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..7f38e57e2a8 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..0b14a935774 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..0088b283edd --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..ca73750c60d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..652918fc468 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..3e8eb545af7 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..e29f17c9807 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..ca0f0e139d6 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..6edc2e28716 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..8be105259b8 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.py similarity index 60% rename from msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.py index ed33e500dc8..68e8df190dc 100644 --- a/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -10,36 +10,35 @@ 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 .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .commit_post_request_body import CommitPostRequestBody -class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): +class CommitRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the checkMemberObjects method. + Provides operations to call the commit method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. + Instantiates a new CommitRequestBuilder and sets the default values. param path_parameters: The raw url or the Url 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}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: None """ if not body: raise TypeError("body cannot be null.") request_info = self.to_post_request_information( body, request_configuration ) - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -47,13 +46,11 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -61,30 +58,29 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberObjectsRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberObjectsRequestBuilder + Returns: CommitRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return CheckMemberObjectsRequestBuilder(self.request_adapter, raw_url) + return CommitRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class CheckMemberObjectsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class CommitRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..a42ba6c81f7 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py similarity index 54% rename from msgraph/generated/groups/item/permission_grants/item/restore/restore_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py index 4558619d6e4..f7ea06a7e34 100644 --- a/msgraph/generated/groups/item/permission_grants/item/restore/restore_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -10,33 +10,31 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.directory_object import DirectoryObject - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError -class RestoreRequestBuilder(BaseRequestBuilder): +class RenewUploadRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the restore method. + Provides operations to call the renewUpload method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new RestoreRequestBuilder and sets the default values. + Instantiates a new RenewUploadRequestBuilder and sets the default values. param path_parameters: The raw url or the Url 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}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) - async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Renews the SAS URI for an application file upload. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 + Returns: None """ request_info = self.to_post_request_information( request_configuration ) - from ......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -44,40 +42,37 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq } if not self.request_adapter: raise Exception("Http core is null") - from ......models.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Renews the SAS URI for an application file upload. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info - def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: RestoreRequestBuilder + Returns: RenewUploadRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return RestoreRequestBuilder(self.request_adapter, raw_url) + return RenewUploadRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class RestoreRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class RenewUploadRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..128bea941cf --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py index c1a0dd4de76..2ba8aac9790 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.mac_o_s_dmg_app import MacOSDmgApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphMacOSDmgAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphMacOSDm Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphMacOSDmgAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphMacOSDmgAppRequestBuild raise TypeError("raw_url cannot be null.") return GraphMacOSDmgAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphMacOSDmgAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..9bb253ef5c9 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..5cfd3525781 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..3d6248814e5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..a34f2a077be --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..8eb8d263b85 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..7c8411691da --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..fed9e003782 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..977f35250fc --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..6207e2aefa7 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..d7f92af06a2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..4f27175b75c --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..df89efb5f9c --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..aa3a7c8b76e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py similarity index 60% rename from msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_request_builder.py rename to msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py index 0dd8ab073c4..3643b7d4699 100644 --- a/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -10,36 +10,35 @@ 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 .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .commit_post_request_body import CommitPostRequestBody -class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): +class CommitRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the checkMemberObjects method. + Provides operations to call the commit method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. + Instantiates a new CommitRequestBuilder and sets the default values. param path_parameters: The raw url or the Url 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}/team/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: None """ if not body: raise TypeError("body cannot be null.") request_info = self.to_post_request_information( body, request_configuration ) - from .......models.o_data_errors.o_data_error import ODataError + from ..........models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -47,13 +46,11 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action checkMemberObjects + Commits a file of a given app. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -61,30 +58,29 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberObjectsRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberObjectsRequestBuilder + Returns: CommitRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return CheckMemberObjectsRequestBuilder(self.request_adapter, raw_url) + return CommitRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class CheckMemberObjectsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class CommitRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..707acf02d76 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..60ae8ea860e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..dc117c78a02 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py index ac3f11bb087..3edb34503bc 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.mac_o_s_lob_app import MacOSLobApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphMacOSLobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphMacOSLo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphMacOSLobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphMacOSLobAppRequestBuild raise TypeError("raw_url cannot be null.") return GraphMacOSLobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphMacOSLobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..43411f153a4 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..5453319445a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..b7cb80a3ca0 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..d47f38d36b2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..d81b3990e25 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..95ee8e4a223 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..5e68b1f7f77 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..9c1e9cffba1 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..1a4b0ced689 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..dd1820c208d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..5d9c06be0fd --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..0e54618ba90 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..c7173608e0f --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..fe7e9c45605 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..bb8bb46e1a4 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..74adc849893 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..319a875b5ab --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py index 53c209b57fd..0569d54a6a3 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.managed_android_lob_app import ManagedAndroidLobApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphManagedAndroidLobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphManaged Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphManagedAndroidLobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphManagedAndroidLobAppReq raise TypeError("raw_url cannot be null.") return GraphManagedAndroidLobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphManagedAndroidLobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..a3474055b9d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..366f1143f6e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..17107e07797 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..3e1216e8f2e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..ae90b5b6632 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..abe47d717c6 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..3cbb75586ae --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..68081728570 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..723d7d3d1f5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..42c51c2d391 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..c8b335281c3 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..a98f0d1dd57 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..db1b6519b88 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..770424eac3b --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..90dbab2d9e0 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..b92b7fbeff2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..b9916fd5a9a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py index 1a4bcbb39e4..e1d3f868d47 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.managed_i_o_s_lob_app import ManagedIOSLobApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphManagedIOSLobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphManaged Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphManagedIOSLobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphManagedIOSLobAppRequest raise TypeError("raw_url cannot be null.") return GraphManagedIOSLobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphManagedIOSLobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..9d6c34ff9ef --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..b866104cac8 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..7f473d63e18 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..4598938e5d8 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..0b928ff90d2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..a6329cadb4e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..ca2520897c0 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..7b961188fe4 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..62fbacecade --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..f9876ca9be2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..89c2fc00a33 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..e4386c4d07f --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..a5c74afc24e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..b77774f72ae --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..3e77808b246 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..a9990122dbf --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..167777c9264 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py index 293f46ed764..5dc802db62d 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.managed_mobile_lob_app import ManagedMobileLobApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphManagedMobileLobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphManaged Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphManagedMobileLobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphManagedMobileLobAppRequ raise TypeError("raw_url cannot be null.") return GraphManagedMobileLobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphManagedMobileLobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..1c2bfaf356e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..53065931afa --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..4b4f3d639a1 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..52b3df84cd9 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..1278a8ed996 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..f0fa8d26fff --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py index 2d57d492497..421a7226707 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from .....models.microsoft_store_for_business_app import MicrosoftStoreForBusinessApp from .....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder class GraphMicrosoftStoreForBusinessAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphMicroso Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphMicrosoftStoreForBusinessAppRequestBuilder: @@ -74,6 +76,24 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphMicrosoftStoreForBusine raise TypeError("raw_url cannot be null.") return GraphMicrosoftStoreForBusinessAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphMicrosoftStoreForBusinessAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..362710a3ed7 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..eec0d0b8b65 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..85a83353ab5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..3785ece3942 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..cd0688bb21b --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..c86bbb2dde3 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..0471c2d0c2d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..40dc15b5ce2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..391bb4dbcb7 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..503f1d7a7f2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..0b419e3bd74 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..0125cfc5762 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..127c2905f70 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..374e2100489 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..eb8c8471ac9 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..ebeeface029 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..263eb1b009f --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.py index 7178f3a6308..e9bde1a3473 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.win32_lob_app import Win32LobApp + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphWin32LobAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWin32Lo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWin32LobAppRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphWin32LobAppRequestBuild raise TypeError("raw_url cannot be null.") return GraphWin32LobAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphWin32LobAppRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..c4830f02652 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..e00d5561861 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..071d21c38a5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.py new file mode 100644 index 00000000000..2182ee8d900 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.py new file mode 100644 index 00000000000..e4822db21d0 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..29af9c68d65 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..8d4f8a10445 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..88d3ff46dd5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..29bf7f2d73c --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..7249864a1a5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..c81d2ee3b63 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..c6732f5c54b --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..6f6c2729f97 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..6bb2d4de37d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..ebf876c7eb6 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..75ccefc22cc --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..8abddc1990e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.py index d82d5d42eb0..b2c48289fe1 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.windows_app_x import WindowsAppX + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphWindowsAppXRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsAppXRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphWindowsAppXRequestBuild raise TypeError("raw_url cannot be null.") return GraphWindowsAppXRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphWindowsAppXRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..cdba6f8db31 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..c91a613b696 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..7d0eda73741 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.py new file mode 100644 index 00000000000..4387a0c86bd --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.py new file mode 100644 index 00000000000..f8b3d80c8b3 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..e516c022589 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..8a1ab5b77ba --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..45f9dc3c4e9 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..629c261a726 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..74063fd69e2 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..081152cbf57 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..ea9227cd027 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..9dc218a3a68 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..1d41a49227a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..295a13068b9 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..1feabdf0982 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..7478d6aafb5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py index 5a4978e49b0..49ed298d8b5 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.windows_mobile_m_s_i import WindowsMobileMSI + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphWindowsMobileMSIRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsMobileMSIRequestBuilder: @@ -74,6 +77,33 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphWindowsMobileMSIRequest raise TypeError("raw_url cannot be null.") return GraphWindowsMobileMSIRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphWindowsMobileMSIRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..2ad86682917 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..d7cd97d7de4 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..5a269887f62 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.py new file mode 100644 index 00000000000..d9a270f7d4d --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.py new file mode 100644 index 00000000000..03afa2f3589 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..c4a6f42f4ee --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.py new file mode 100644 index 00000000000..4888c2e45fe --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ......models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class CommittedContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommittedContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CommittedContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[CommittedContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to committedContainedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CommittedContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + 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(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[MobileContainedApp] = None, request_configuration: Optional[CommittedContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to committedContainedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> CommittedContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommittedContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommittedContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CommittedContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + """ + 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 CommittedContainedAppsRequestBuilderGetRequestConfiguration(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[CommittedContainedAppsRequestBuilder.CommittedContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommittedContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..ee3a4913a49 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..1a5868bafa4 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .......models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property committedContainedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property committedContainedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property committedContainedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property committedContainedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.py new file mode 100644 index 00000000000..3db760c87da --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content import MobileAppContent + from ......models.mobile_app_content_collection_response import MobileAppContentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + +class ContentVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_id(self,mobile_app_content_id: str) -> MobileAppContentItemRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + param mobile_app_content_id: The unique identifier of mobileAppContent + Returns: MobileAppContentItemRequestBuilder + """ + if not mobile_app_content_id: + raise TypeError("mobile_app_content_id cannot be null.") + from .item.mobile_app_content_item_request_builder import MobileAppContentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MobileAppContentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentCollectionResponse]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentCollectionResponse] + """ + 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.mobile_app_content_collection_response import MobileAppContentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[ContentVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to contentVersions for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContentVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentVersionsRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 ContentVersionsRequestBuilderGetRequestConfiguration(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[ContentVersionsRequestBuilder.ContentVersionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentVersionsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.py new file mode 100644 index 00000000000..a2502752385 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py new file mode 100644 index 00000000000..1e449d8efd3 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_contained_app import MobileContainedApp + from ........models.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + +class ContainedAppsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContainedAppsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_contained_app_id(self,mobile_contained_app_id: str) -> MobileContainedAppItemRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + param mobile_contained_app_id: The unique identifier of mobileContainedApp + Returns: MobileContainedAppItemRequestBuilder + """ + if not mobile_contained_app_id: + raise TypeError("mobile_contained_app_id cannot be null.") + from .item.mobile_contained_app_item_request_builder import MobileContainedAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MobileContainedAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedAppCollectionResponse]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedAppCollectionResponse] + """ + 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.mobile_contained_app_collection_response import MobileContainedAppCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileContainedAppCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContainedAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[ContainedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to containedApps for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> ContainedAppsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainedAppsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainedAppsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainedAppsRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 ContainedAppsRequestBuilderGetRequestConfiguration(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[ContainedAppsRequestBuilder.ContainedAppsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContainedAppsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.py new file mode 100644 index 00000000000..18d3b03211f --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py new file mode 100644 index 00000000000..2cd4b590361 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.py @@ -0,0 +1,214 @@ +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.mobile_contained_app import MobileContainedApp + from .........models.o_data_errors.o_data_error import ODataError + +class MobileContainedAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property containedApps for deviceAppManagement + 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[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + The collection of contained apps in a MobileLobApp acting as a package. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + async def patch(self,body: Optional[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileContainedApp]: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileContainedApp] + """ + 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.mobile_contained_app import MobileContainedApp + + return await self.request_adapter.send_async(request_info, MobileContainedApp, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property containedApps for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileContainedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of contained apps in a MobileLobApp acting as a package. + 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(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[MobileContainedApp] = None, request_configuration: Optional[MobileContainedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property containedApps in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileContainedAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileContainedAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileContainedAppItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileContainedAppItemRequestBuilderGetQueryParameters(): + """ + The collection of contained apps in a MobileLobApp acting as a package. + """ + 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(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[MobileContainedAppItemRequestBuilder.MobileContainedAppItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileContainedAppItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.py new file mode 100644 index 00000000000..a9fe5b2404e --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.py new file mode 100644 index 00000000000..34282624a60 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.py @@ -0,0 +1,226 @@ +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.mobile_app_content_file import MobileAppContentFile + from ........models.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + +class FilesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new FilesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_content_file_id(self,mobile_app_content_file_id: str) -> MobileAppContentFileItemRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + param mobile_app_content_file_id: The unique identifier of mobileAppContentFile + Returns: MobileAppContentFileItemRequestBuilder + """ + if not mobile_app_content_file_id: + raise TypeError("mobile_app_content_file_id cannot be null.") + from .item.mobile_app_content_file_item_request_builder import MobileAppContentFileItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MobileAppContentFileItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFileCollectionResponse]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFileCollectionResponse] + """ + 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.mobile_app_content_file_collection_response import MobileAppContentFileCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppContentFileCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to files for deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> FilesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilesRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 FilesRequestBuilderGetRequestConfiguration(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[FilesRequestBuilder.FilesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilesRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.py new file mode 100644 index 00000000000..3ba5b87202a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.file_encryption_info import FileEncryptionInfo + +@dataclass +class CommitPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileEncryptionInfo property + file_encryption_info: Optional[FileEncryptionInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommitPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommitPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommitPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.file_encryption_info import FileEncryptionInfo + + from ..........models.file_encryption_info import FileEncryptionInfo + + fields: Dict[str, Callable[[Any], None]] = { + "fileEncryptionInfo": lambda n : setattr(self, 'file_encryption_info', n.get_object_value(FileEncryptionInfo)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileEncryptionInfo", self.file_encryption_info) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.py new file mode 100644 index 00000000000..949509447bf --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.py @@ -0,0 +1,90 @@ +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 .commit_post_request_body import CommitPostRequestBody + +class CommitRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the commit method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CommitRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", path_parameters) + + async def post(self,body: Optional[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[CommitPostRequestBody] = None, request_configuration: Optional[CommitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Commits a file of a given app. + param body: The request body + param request_configuration: Configuration for 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(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.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CommitRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommitRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommitRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CommitRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py new file mode 100644 index 00000000000..fb12e6c396c --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content_file import MobileAppContentFile + from .........models.o_data_errors.o_data_error import ODataError + from .commit.commit_request_builder import CommitRequestBuilder + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + +class MobileAppContentFileItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property files for deviceAppManagement + 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[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + The list of files for this app content version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + async def patch(self,body: Optional[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContentFile]: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContentFile] + """ + 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.mobile_app_content_file import MobileAppContentFile + + return await self.request_adapter.send_async(request_info, MobileAppContentFile, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property files for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of files for this app content version. + 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(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[MobileAppContentFile] = None, request_configuration: Optional[MobileAppContentFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property files in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentFileItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentFileItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentFileItemRequestBuilder(self.request_adapter, raw_url) + + @property + def commit(self) -> CommitRequestBuilder: + """ + Provides operations to call the commit method. + """ + from .commit.commit_request_builder import CommitRequestBuilder + + return CommitRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def renew_upload(self) -> RenewUploadRequestBuilder: + """ + Provides operations to call the renewUpload method. + """ + from .renew_upload.renew_upload_request_builder import RenewUploadRequestBuilder + + return RenewUploadRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentFileItemRequestBuilderGetQueryParameters(): + """ + The list of files for this app content version. + """ + 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(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[MobileAppContentFileItemRequestBuilder.MobileAppContentFileItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py new file mode 100644 index 00000000000..1f2e7af023a --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.py @@ -0,0 +1,82 @@ +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 RenewUploadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the renewUpload method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RenewUploadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", path_parameters) + + async def post(self,request_configuration: Optional[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> None: + """ + Renews the SAS URI for an application file upload. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "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[RenewUploadRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Renews the SAS URI for an application file upload. + 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(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 + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> RenewUploadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RenewUploadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RenewUploadRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RenewUploadRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.py new file mode 100644 index 00000000000..f3a9c95bc87 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.py @@ -0,0 +1,234 @@ +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.mobile_app_content import MobileAppContent + from .......models.o_data_errors.o_data_error import ODataError + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + from .files.files_request_builder import FilesRequestBuilder + +class MobileAppContentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property contentVersions for deviceAppManagement + 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[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + The list of content versions for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + async def patch(self,body: Optional[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppContent]: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppContent] + """ + 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.mobile_app_content import MobileAppContent + + return await self.request_adapter.send_async(request_info, MobileAppContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property contentVersions for deviceAppManagement + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of content versions for this app. + 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(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[MobileAppContent] = None, request_configuration: Optional[MobileAppContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property contentVersions in deviceAppManagement + param body: The request body + param request_configuration: Configuration for 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(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) -> MobileAppContentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppContentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppContentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def contained_apps(self) -> ContainedAppsRequestBuilder: + """ + Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + """ + from .contained_apps.contained_apps_request_builder import ContainedAppsRequestBuilder + + return ContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def files(self) -> FilesRequestBuilder: + """ + Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + """ + from .files.files_request_builder import FilesRequestBuilder + + return FilesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppContentItemRequestBuilderGetQueryParameters(): + """ + The list of content versions for this app. + """ + 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(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[MobileAppContentItemRequestBuilder.MobileAppContentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppContentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py index 7e04d21e99d..369002c8723 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.py @@ -12,6 +12,10 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.windows_universal_app_x import WindowsUniversalAppX + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder + from .committed_contained_apps.committed_contained_apps_request_builder import CommittedContainedAppsRequestBuilder + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder class GraphWindowsUniversalAppXRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +58,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsUniversalAppXRequestBuilder: @@ -74,6 +78,42 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphWindowsUniversalAppXReq raise TypeError("raw_url cannot be null.") return GraphWindowsUniversalAppXRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def committed_contained_apps(self) -> CommittedContainedAppsRequestBuilder: + """ + Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + """ + from .committed_contained_apps.committed_contained_apps_request_builder import CommittedContainedAppsRequestBuilder + + return CommittedContainedAppsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_versions(self) -> ContentVersionsRequestBuilder: + """ + Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + """ + from .content_versions.content_versions_request_builder import ContentVersionsRequestBuilder + + return ContentVersionsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphWindowsUniversalAppXRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.py new file mode 100644 index 00000000000..f5b2df1fa75 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.py @@ -0,0 +1,228 @@ +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.mobile_app_assignment import MobileAppAssignment + from ......models.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + +class AssignmentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_assignment_id(self,mobile_app_assignment_id: str) -> MobileAppAssignmentItemRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + param mobile_app_assignment_id: The unique identifier of mobileAppAssignment + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not mobile_app_assignment_id: + raise TypeError("mobile_app_assignment_id cannot be null.") + from .item.mobile_app_assignment_item_request_builder import MobileAppAssignmentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignmentCollectionResponse]: + """ + List properties and relationships of the mobileAppAssignment objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignmentCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment_collection_response import MobileAppAssignmentCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppAssignmentCollectionResponse, error_mapping) + + async def post(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Create a new mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new mobileAppAssignment 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(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) -> AssignmentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentsRequestBuilderGetQueryParameters(): + """ + List properties and relationships of the mobileAppAssignment 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 AssignmentsRequestBuilderGetRequestConfiguration(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[AssignmentsRequestBuilder.AssignmentsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentsRequestBuilderPostRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.py new file mode 100644 index 00000000000..0ac808516d5 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.py new file mode 100644 index 00000000000..51bb8aa2196 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_assignment import MobileAppAssignment + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppAssignmentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Deletes a mobileAppAssignment. + 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-mobileappassignment-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[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Read properties and relationships of the mobileAppAssignment object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + async def patch(self,body: Optional[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileAppAssignment]: + """ + Update the properties of a mobileAppAssignment object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppAssignment] + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-mobileappassignment-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.mobile_app_assignment import MobileAppAssignment + + return await self.request_adapter.send_async(request_info, MobileAppAssignment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Deletes a mobileAppAssignment. + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[MobileAppAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read properties and relationships of the mobileAppAssignment 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(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[MobileAppAssignment] = None, request_configuration: Optional[MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a mobileAppAssignment 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(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) -> MobileAppAssignmentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppAssignmentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppAssignmentItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class MobileAppAssignmentItemRequestBuilderGetQueryParameters(): + """ + Read properties and relationships of the mobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(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[MobileAppAssignmentItemRequestBuilder.MobileAppAssignmentItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(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/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.py new file mode 100644 index 00000000000..c44dd728cf6 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.py @@ -0,0 +1,171 @@ +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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + +class CategoriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CategoriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_mobile_app_category_id(self,mobile_app_category_id: str) -> MobileAppCategoryItemRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + param mobile_app_category_id: The unique identifier of mobileAppCategory + Returns: MobileAppCategoryItemRequestBuilder + """ + if not mobile_app_category_id: + raise TypeError("mobile_app_category_id cannot be null.") + from .item.mobile_app_category_item_request_builder import MobileAppCategoryItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MobileAppCategoryItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategoryCollectionResponse]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategoryCollectionResponse] + """ + 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.mobile_app_category_collection_response import MobileAppCategoryCollectionResponse + + return await self.request_adapter.send_async(request_info, MobileAppCategoryCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> CategoriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoriesRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 CategoriesRequestBuilderGetRequestConfiguration(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[CategoriesRequestBuilder.CategoriesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.py new file mode 100644 index 00000000000..cb1ba64924f --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.py new file mode 100644 index 00000000000..b37a6cef398 --- /dev/null +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.mobile_app_category import MobileAppCategory + from .......models.o_data_errors.o_data_error import ODataError + +class MobileAppCategoryItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCategory]: + """ + The list of categories for this app. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MobileAppCategory] + """ + 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.mobile_app_category import MobileAppCategory + + return await self.request_adapter.send_async(request_info, MobileAppCategory, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MobileAppCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The list of categories for this app. + 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(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) -> MobileAppCategoryItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MobileAppCategoryItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MobileAppCategoryItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MobileAppCategoryItemRequestBuilderGetQueryParameters(): + """ + The list of categories for this app. + """ + 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(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[MobileAppCategoryItemRequestBuilder.MobileAppCategoryItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.py index 53a8c3eb43b..f48c0797ec9 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.windows_web_app import WindowsWebApp + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .categories.categories_request_builder import CategoriesRequestBuilder class GraphWindowsWebAppRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphWindows Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphWindowsWebAppRequestBuilder: @@ -74,6 +76,24 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphWindowsWebAppRequestBui raise TypeError("raw_url cannot be null.") return GraphWindowsWebAppRequestBuilder(self.request_adapter, raw_url) + @property + def assignments(self) -> AssignmentsRequestBuilder: + """ + Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + """ + from .assignments.assignments_request_builder import AssignmentsRequestBuilder + + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def categories(self) -> CategoriesRequestBuilder: + """ + Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + """ + from .categories.categories_request_builder import CategoriesRequestBuilder + + return CategoriesRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphWindowsWebAppRequestBuilderGetQueryParameters(): """ 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 a5779aaf35e..89d0027835b 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 managedIOSStoreApp. + Deletes a windowsUniversalAppX. 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-managediosstoreapp-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsuniversalappx-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 iosVppApp object. + Read properties and relationships of the windowsWebApp 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-iosvppapp-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowswebapp-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 managedIOSStoreApp object. + Update the properties of a windowsMicrosoftEdgeApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MobileApp] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-managediosstoreapp-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsmicrosoftedgeapp-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -114,39 +114,39 @@ 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 managedIOSStoreApp. + Deletes a windowsUniversalAppX. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MobileAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the iosVppApp object. + Read properties and relationships of the windowsWebApp object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileApp] = None, request_configuration: Optional[MobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a managedIOSStoreApp object. + Update the properties of a windowsMicrosoftEdgeApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -154,13 +154,13 @@ def to_patch_request_information(self,body: Optional[MobileApp] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -358,7 +358,7 @@ class MobileAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class MobileAppItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the iosVppApp object. + Read properties and relationships of the windowsWebApp 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 f5256f82437..e282dad6c83 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 managedIOSStoreApp objects. + List properties and relationships of the microsoftStoreForBusinessApp 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-managediosstoreapp-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-microsoftstoreforbusinessapp-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 iosVppApp 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-iosvppapp-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -108,24 +108,24 @@ 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 managedIOSStoreApp objects. + List properties and relationships of the microsoftStoreForBusinessApp objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileApp] = None, request_configuration: Optional[MobileAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new windowsUniversalAppX object. + Create a new iosVppApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +133,13 @@ def to_post_request_information(self,body: Optional[MobileApp] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -309,7 +309,7 @@ def graph_windows_web_app(self) -> GraphWindowsWebAppRequestBuilder: @dataclass class MobileAppsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedIOSStoreApp objects. + List properties and relationships of the microsoftStoreForBusinessApp objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.py b/msgraph/generated/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.py index 74b66d30529..262952a8d1d 100644 --- a/msgraph/generated/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.py +++ b/msgraph/generated/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[SyncMicroso Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SyncMicrosoftStoreForBusinessAppsRequestBuilder: diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/count/count_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/count/count_request_builder.py index 7761af49611..f0a64f5a016 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.py index 73c99bd48ae..21e27a831d9 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AppsRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[AppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ManagedMobileApp] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.py index 68606a1eef8..0defcf7cb83 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.py index eb29aa2f74c..40d4117f7ac 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedMo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedMobileAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedMobil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedMobileApp] = None, request_configuration: Optional[ManagedMobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ManagedMobileApp] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.py index a953a3ef36f..a000ed18146 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.py index c50b25c5f89..d848f6f85e8 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TargetedManagedAppPolicyAssi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.py index 0dd3465c915..5b67a444cc2 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py index 62ae943cbca..107a1d2b0ca 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TargetedM Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TargetedManagedAppPolicyAss if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.py index b1ff3383667..486e8f5b194 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Deploymen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeploymentSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeploymentSu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedAppPolicyDeploymentSummary] = None, request_configuration: Optional[DeploymentSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ManagedAppPolicyDeploymentS if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.py index 40f5c6a9ffa..f5bf2638189 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TargetAppsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.py index e86f9702cfc..fba0dc318aa 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.py @@ -105,12 +105,12 @@ def to_delete_request_information(self,request_configuration: Optional[TargetedM Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TargetedManagedAppConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -120,14 +120,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppConfiguration] = None, request_configuration: Optional[TargetedManagedAppConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[TargetedManagedAppConfigura if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.py b/msgraph/generated/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.py index d22e0d690ec..c2d20d734fe 100644 --- a/msgraph/generated/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.py +++ b/msgraph/generated/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppConfiguration] = None, request_configuration: Optional[TargetedManagedAppConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TargetedManagedAppConfigurat if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/vpp_tokens/count/count_request_builder.py b/msgraph/generated/device_app_management/vpp_tokens/count/count_request_builder.py index ab32ad5a69b..3d64760fc82 100644 --- a/msgraph/generated/device_app_management/vpp_tokens/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/vpp_tokens/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.py b/msgraph/generated/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.py index 8ef78bc3cab..576eff810d7 100644 --- a/msgraph/generated/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.py +++ b/msgraph/generated/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.py @@ -55,13 +55,13 @@ def to_post_request_information(self,request_configuration: Optional[SyncLicense Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SyncLicensesRequestBuilder: diff --git a/msgraph/generated/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.py b/msgraph/generated/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.py index 133e2f383c1..045b8d99524 100644 --- a/msgraph/generated/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.py +++ b/msgraph/generated/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[VppTokenI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[VppTokenItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[VppTokenItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[VppToken] = None, request_configuration: Optional[VppTokenItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[VppToken] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/vpp_tokens/vpp_tokens_request_builder.py b/msgraph/generated/device_app_management/vpp_tokens/vpp_tokens_request_builder.py index 70e9167fdec..723279f1dbd 100644 --- a/msgraph/generated/device_app_management/vpp_tokens/vpp_tokens_request_builder.py +++ b/msgraph/generated/device_app_management/vpp_tokens/vpp_tokens_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[VppTokensReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[VppToken] = None, request_configuration: Optional[VppTokensRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[VppToken] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/count/count_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/count/count_request_builder.py index e35e08fca43..2ed4a8de6d3 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.py index 8593cc6760a..e92bf8804f0 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TargetedManagedAppPolicyAssi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.py index b1c8692a319..c9bc6bc7f79 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py index 36fb588db27..dbc8fd7fe00 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TargetedM Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetedMana Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TargetedManagedAppPolicyAssignment] = None, request_configuration: Optional[TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TargetedManagedAppPolicyAss if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py index 25154db8ecf..7298ea58ef0 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py index ee8502ae95f..3118dc81873 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExemptAppLoc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[ExemptAppLockerFilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py index 01e235fd1db..b1403f6786f 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py index 1023014e876..27cad790f4f 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py index e1d5ee89932..211b8718e23 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py index 529b39a0989..d24dbd6a8f6 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ProtectedApp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLockerFile] = None, request_configuration: Optional[ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.py index 79a1ecf0ebf..61c33039a23 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionPolicy] = None, request_configuration: Optional[WindowsInformationProtectionPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.py b/msgraph/generated/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.py index a34e955228e..2ccc677a065 100644 --- a/msgraph/generated/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.py +++ b/msgraph/generated/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionPolicy] = None, request_configuration: Optional[WindowsInformationProtectionPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.py b/msgraph/generated/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.py index 8c541580f94..49b36c22a31 100644 --- a/msgraph/generated/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.py +++ b/msgraph/generated/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ApplePush Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApplePushNotificationCertificateRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ApplePushNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ApplePushNotificationCertificate] = None, request_configuration: Optional[ApplePushNotificationCertificateRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ApplePushNotificationCertif if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_response.py b/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_get_response.py similarity index 92% rename from msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_response.py rename to msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_get_response.py index 05b11cc9611..99a560cb7f6 100644 --- a/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_response.py +++ b/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class DownloadApplePushNotificationCertificateSigningRequestResponse(AdditionalDataHolder, BackedModel, Parsable): +class DownloadApplePushNotificationCertificateSigningRequestGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class DownloadApplePushNotificationCertificateSigningRequestResponse(AdditionalD value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DownloadApplePushNotificationCertificateSigningRequestResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DownloadApplePushNotificationCertificateSigningRequestGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DownloadApplePushNotificationCertificateSigningRequestResponse + Returns: DownloadApplePushNotificationCertificateSigningRequestGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DownloadApplePushNotificationCertificateSigningRequestResponse() + return DownloadApplePushNotificationCertificateSigningRequestGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.py b/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.py index e8971d738fa..633425ac43b 100644 --- a/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.py +++ b/msgraph/generated/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .download_apple_push_notification_certificate_signing_request_response import DownloadApplePushNotificationCertificateSigningRequestResponse + from .download_apple_push_notification_certificate_signing_request_get_response import DownloadApplePushNotificationCertificateSigningRequestGetResponse class DownloadApplePushNotificationCertificateSigningRequestRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceManagement/applePushNotificationCertificate/downloadApplePushNotificationCertificateSigningRequest()", path_parameters) - async def get(self,request_configuration: Optional[DownloadApplePushNotificationCertificateSigningRequestRequestBuilderGetRequestConfiguration] = None) -> Optional[DownloadApplePushNotificationCertificateSigningRequestResponse]: + async def get(self,request_configuration: Optional[DownloadApplePushNotificationCertificateSigningRequestRequestBuilderGetRequestConfiguration] = None) -> Optional[DownloadApplePushNotificationCertificateSigningRequestGetResponse]: """ Download Apple push notification certificate signing request param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DownloadApplePushNotificationCertificateSigningRequestResponse] + Returns: Optional[DownloadApplePushNotificationCertificateSigningRequestGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DownloadApplePushNotification } if not self.request_adapter: raise Exception("Http core is null") - from .download_apple_push_notification_certificate_signing_request_response import DownloadApplePushNotificationCertificateSigningRequestResponse + from .download_apple_push_notification_certificate_signing_request_get_response import DownloadApplePushNotificationCertificateSigningRequestGetResponse - return await self.request_adapter.send_async(request_info, DownloadApplePushNotificationCertificateSigningRequestResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DownloadApplePushNotificationCertificateSigningRequestGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DownloadApplePushNotificationCertificateSigningRequestRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[DownloadAppl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DownloadApplePushNotificationCertificateSigningRequestRequestBuilder: diff --git a/msgraph/generated/device_management/audit_events/audit_events_request_builder.py b/msgraph/generated/device_management/audit_events/audit_events_request_builder.py index f5637279bfb..0c84785336c 100644 --- a/msgraph/generated/device_management/audit_events/audit_events_request_builder.py +++ b/msgraph/generated/device_management/audit_events/audit_events_request_builder.py @@ -111,14 +111,14 @@ def to_get_request_information(self,request_configuration: Optional[AuditEventsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuditEvent] = None, request_configuration: Optional[AuditEventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[AuditEvent] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/audit_events/count/count_request_builder.py b/msgraph/generated/device_management/audit_events/count/count_request_builder.py index ea60a363316..b892ca66954 100644 --- a/msgraph/generated/device_management/audit_events/count/count_request_builder.py +++ b/msgraph/generated/device_management/audit_events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.py b/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.py similarity index 89% rename from msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.py rename to msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.py index c8b4ce845fe..9de73b85200 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.py +++ b/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetUserIdsWithFlaggedAppRegistrationResponse(BaseCollectionPaginationCountResponse): +class GetAuditActivityTypesWithCategoryGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetUserIdsWithFlaggedAppRegistrationResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAuditActivityTypesWithCategoryGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetUserIdsWithFlaggedAppRegistrationResponse + Returns: GetAuditActivityTypesWithCategoryGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetUserIdsWithFlaggedAppRegistrationResponse() + return GetAuditActivityTypesWithCategoryGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.py b/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.py index b5bdceee3bc..cb451748683 100644 --- a/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.py +++ b/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_audit_activity_types_with_category_response import GetAuditActivityTypesWithCategoryResponse + from .get_audit_activity_types_with_category_get_response import GetAuditActivityTypesWithCategoryGetResponse class GetAuditActivityTypesWithCategoryRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['category'] = str(category) super().__init__(request_adapter, "{+baseurl}/deviceManagement/auditEvents/getAuditActivityTypes(category='{category}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetAuditActivityTypesWithCategoryRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAuditActivityTypesWithCategoryResponse]: + async def get(self,request_configuration: Optional[GetAuditActivityTypesWithCategoryRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAuditActivityTypesWithCategoryGetResponse]: """ Invoke function getAuditActivityTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAuditActivityTypesWithCategoryResponse] + Returns: Optional[GetAuditActivityTypesWithCategoryGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetAuditActivityTypesWithCate } if not self.request_adapter: raise Exception("Http core is null") - from .get_audit_activity_types_with_category_response import GetAuditActivityTypesWithCategoryResponse + from .get_audit_activity_types_with_category_get_response import GetAuditActivityTypesWithCategoryGetResponse - return await self.request_adapter.send_async(request_info, GetAuditActivityTypesWithCategoryResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAuditActivityTypesWithCategoryGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAuditActivityTypesWithCategoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAuditActi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAuditActivityTypesWithCategoryRequestBuilder: diff --git a/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.py b/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.py deleted file mode 100644 index 53fb5d5c8c2..00000000000 --- a/msgraph/generated/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAuditActivityTypesWithCategoryResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAuditActivityTypesWithCategoryResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAuditActivityTypesWithCategoryResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAuditActivityTypesWithCategoryResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.py b/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.py new file mode 100644 index 00000000000..74794c87d22 --- /dev/null +++ b/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAuditCategoriesGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAuditCategoriesGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAuditCategoriesGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAuditCategoriesGetResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.py b/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.py index 9fe862ad406..fa8976ae714 100644 --- a/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.py +++ b/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_audit_categories_response import GetAuditCategoriesResponse + from .get_audit_categories_get_response import GetAuditCategoriesGetResponse class GetAuditCategoriesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceManagement/auditEvents/getAuditCategories(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetAuditCategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAuditCategoriesResponse]: + async def get(self,request_configuration: Optional[GetAuditCategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAuditCategoriesGetResponse]: """ Invoke function getAuditCategories param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAuditCategoriesResponse] + Returns: Optional[GetAuditCategoriesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAuditCategoriesRequestBuil } if not self.request_adapter: raise Exception("Http core is null") - from .get_audit_categories_response import GetAuditCategoriesResponse + from .get_audit_categories_get_response import GetAuditCategoriesGetResponse - return await self.request_adapter.send_async(request_info, GetAuditCategoriesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAuditCategoriesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAuditCategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAuditCate Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAuditCategoriesRequestBuilder: diff --git a/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_response.py b/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_response.py deleted file mode 100644 index 85da89edb52..00000000000 --- a/msgraph/generated/device_management/audit_events/get_audit_categories/get_audit_categories_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAuditCategoriesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAuditCategoriesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAuditCategoriesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAuditCategoriesResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/device_management/audit_events/item/audit_event_item_request_builder.py b/msgraph/generated/device_management/audit_events/item/audit_event_item_request_builder.py index 72df4d98efd..be735d2bde8 100644 --- a/msgraph/generated/device_management/audit_events/item/audit_event_item_request_builder.py +++ b/msgraph/generated/device_management/audit_events/item/audit_event_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[AuditEven Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuditEventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AuditEventIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuditEvent] = None, request_configuration: Optional[AuditEventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AuditEvent] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/compliance_management_partners/compliance_management_partners_request_builder.py b/msgraph/generated/device_management/compliance_management_partners/compliance_management_partners_request_builder.py index ee0b43efa63..6028b092f61 100644 --- a/msgraph/generated/device_management/compliance_management_partners/compliance_management_partners_request_builder.py +++ b/msgraph/generated/device_management/compliance_management_partners/compliance_management_partners_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ComplianceMa Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ComplianceManagementPartner] = None, request_configuration: Optional[ComplianceManagementPartnersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ComplianceManagementPartner] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/compliance_management_partners/count/count_request_builder.py b/msgraph/generated/device_management/compliance_management_partners/count/count_request_builder.py index 92cc7c469e8..f17085cdce5 100644 --- a/msgraph/generated/device_management/compliance_management_partners/count/count_request_builder.py +++ b/msgraph/generated/device_management/compliance_management_partners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.py b/msgraph/generated/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.py index c1bd7dc800a..e1db8e09065 100644 --- a/msgraph/generated/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.py +++ b/msgraph/generated/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Complianc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ComplianceManagementPartnerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ComplianceMa Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ComplianceManagementPartner] = None, request_configuration: Optional[ComplianceManagementPartnerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ComplianceManagementPartner if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/conditional_access_settings/conditional_access_settings_request_builder.py b/msgraph/generated/device_management/conditional_access_settings/conditional_access_settings_request_builder.py index 5cf21fdd718..21403c3f926 100644 --- a/msgraph/generated/device_management/conditional_access_settings/conditional_access_settings_request_builder.py +++ b/msgraph/generated/device_management/conditional_access_settings/conditional_access_settings_request_builder.py @@ -10,8 +10,8 @@ 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.on_premises_conditional_access_settings import OnPremisesConditionalAccessSettings + from ...models.o_data_errors.o_data_error import ODataError class ConditionalAccessSettingsRequestBuilder(BaseRequestBuilder): """ @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[Condition Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConditionalAccessSettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ConditionalA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnPremisesConditionalAccessSettings] = None, request_configuration: Optional[ConditionalAccessSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[OnPremisesConditionalAccess if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/detected_apps/count/count_request_builder.py b/msgraph/generated/device_management/detected_apps/count/count_request_builder.py index fe197e515ee..2d5d33767b3 100644 --- a/msgraph/generated/device_management/detected_apps/count/count_request_builder.py +++ b/msgraph/generated/device_management/detected_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/detected_apps/detected_apps_request_builder.py b/msgraph/generated/device_management/detected_apps/detected_apps_request_builder.py index f6c22f4d5e1..7341124aa21 100644 --- a/msgraph/generated/device_management/detected_apps/detected_apps_request_builder.py +++ b/msgraph/generated/device_management/detected_apps/detected_apps_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DetectedApps Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DetectedApp] = None, request_configuration: Optional[DetectedAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DetectedApp] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/detected_apps/item/detected_app_item_request_builder.py b/msgraph/generated/device_management/detected_apps/item/detected_app_item_request_builder.py index 682f7e257e1..fee41b4005b 100644 --- a/msgraph/generated/device_management/detected_apps/item/detected_app_item_request_builder.py +++ b/msgraph/generated/device_management/detected_apps/item/detected_app_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[DetectedA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetectedAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[DetectedAppI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DetectedApp] = None, request_configuration: Optional[DetectedAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DetectedApp] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/detected_apps/item/managed_devices/count/count_request_builder.py b/msgraph/generated/device_management/detected_apps/item/managed_devices/count/count_request_builder.py index 26822ef1736..a81ba976ced 100644 --- a/msgraph/generated/device_management/detected_apps/item/managed_devices/count/count_request_builder.py +++ b/msgraph/generated/device_management/detected_apps/item/managed_devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.py b/msgraph/generated/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.py index 8776345888c..d70f908abaf 100644 --- a/msgraph/generated/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.py +++ b/msgraph/generated/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagedDeviceItemRequestBuilder: diff --git a/msgraph/generated/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.py b/msgraph/generated/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.py index f3451f73168..1f476046a1b 100644 --- a/msgraph/generated/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.py +++ b/msgraph/generated/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagedDevicesRequestBuilder: diff --git a/msgraph/generated/device_management/device_categories/count/count_request_builder.py b/msgraph/generated/device_management/device_categories/count/count_request_builder.py index bd8c5955021..12d520d287b 100644 --- a/msgraph/generated/device_management/device_categories/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_categories/device_categories_request_builder.py b/msgraph/generated/device_management/device_categories/device_categories_request_builder.py index 5828bdbdab0..e1feec6f80d 100644 --- a/msgraph/generated/device_management/device_categories/device_categories_request_builder.py +++ b/msgraph/generated/device_management/device_categories/device_categories_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCatego Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCategory] = None, request_configuration: Optional[DeviceCategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceCategory] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_categories/item/device_category_item_request_builder.py b/msgraph/generated/device_management/device_categories/item/device_category_item_request_builder.py index a0160c3ef22..918d4ef9986 100644 --- a/msgraph/generated/device_management/device_categories/item/device_category_item_request_builder.py +++ b/msgraph/generated/device_management/device_categories/item/device_category_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCat Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCatego Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCategory] = None, request_configuration: Optional[DeviceCategoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceCategory] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/count/count_request_builder.py index e706d35c231..058862da4b0 100644 --- a/msgraph/generated/device_management/device_compliance_policies/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 0fb1a5a1993..24139ac39e2 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 @@ -45,10 +45,10 @@ def by_device_compliance_policy_id(self,device_compliance_policy_id: str) -> Dev async def get(self,request_configuration: Optional[DeviceCompliancePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceCompliancePolicyCollectionResponse]: """ - List properties and relationships of the deviceCompliancePolicy objects. + List properties and relationships of the windowsPhone81CompliancePolicy objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceCompliancePolicyCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-devicecompliancepolicy-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsphone81compliancepolicy-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[DeviceCompliancePoliciesReque async def post(self,body: Optional[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[DeviceCompliancePolicy]: """ - Create a new androidWorkProfileCompliancePolicy object. + Create a new iosCompliancePolicy 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-ioscompliancepolicy-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -92,24 +92,24 @@ async def post(self,body: Optional[DeviceCompliancePolicy] = None, request_confi def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the deviceCompliancePolicy objects. + List properties and relationships of the windowsPhone81CompliancePolicy objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new androidWorkProfileCompliancePolicy object. + Create a new iosCompliancePolicy object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceCompliancePolicy] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceCompliancePoliciesRequestBuilderGetQueryParameters(): """ - List properties and relationships of the deviceCompliancePolicy objects. + List properties and relationships of the windowsPhone81CompliancePolicy objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_response.py b/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_post_response.py similarity index 93% rename from msgraph/generated/device_management/device_compliance_policies/item/assign/assign_response.py rename to msgraph/generated/device_management/device_compliance_policies/item/assign/assign_post_response.py index 9f38ecd8015..4523d678687 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_response.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AssignResponse(BaseCollectionPaginationCountResponse): +class AssignPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DeviceCompliancePolicyAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AssignResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AssignPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AssignResponse + Returns: AssignPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AssignResponse() + return AssignPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_request_builder.py index 3e47a6e5d9e..ac727fe659b 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/assign/assign_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .assign_post_request_body import AssignPostRequestBody - from .assign_response import AssignResponse + from .assign_post_response import AssignPostResponse class AssignRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assign", path_parameters) - async def post(self,body: Optional[AssignPostRequestBody] = None, request_configuration: Optional[AssignRequestBuilderPostRequestConfiguration] = None) -> Optional[AssignResponse]: + async def post(self,body: Optional[AssignPostRequestBody] = None, request_configuration: Optional[AssignRequestBuilderPostRequestConfiguration] = None) -> Optional[AssignPostResponse]: """ Not yet documented param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AssignResponse] + Returns: Optional[AssignPostResponse] Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-devicecompliancepolicy-assign?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[AssignPostRequestBody] = None, request_config } if not self.request_adapter: raise Exception("Http core is null") - from .assign_response import AssignResponse + from .assign_post_response import AssignPostResponse - return await self.request_adapter.send_async(request_info, AssignResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AssignPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AssignPostRequestBody] = None, request_configuration: Optional[AssignRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/assignments/assignments_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/assignments/assignments_request_builder.py index b9722d528e1..a43995a6087 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/assignments/assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceCompliancePolicyAssign if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/assignments/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/assignments/count/count_request_builder.py index 5c6ffd76f95..9a3d49a3118 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.py index 60f88eea05c..4f2b12746e9 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyAssignment] = None, request_configuration: Optional[DeviceCompliancePolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceCompliancePolicyAssig if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 3e8a6172451..9871ef77d0c 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 @@ -17,8 +17,8 @@ from .device_setting_state_summaries.device_setting_state_summaries_request_builder import DeviceSettingStateSummariesRequestBuilder from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder from .device_status_overview.device_status_overview_request_builder import DeviceStatusOverviewRequestBuilder - from .schedule_actions_for_rules.schedule_actions_for_rules_request_builder import ScheduleActionsForRulesRequestBuilder from .scheduled_actions_for_rule.scheduled_actions_for_rule_request_builder import ScheduledActionsForRuleRequestBuilder + from .schedule_actions_for_rules.schedule_actions_for_rules_request_builder import ScheduleActionsForRulesRequestBuilder from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder from .user_status_overview.user_status_overview_request_builder import UserStatusOverviewRequestBuilder @@ -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 macOSCompliancePolicy. + Deletes a androidCompliancePolicy. 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-macoscompliancepolicy-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidcompliancepolicy-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 androidWorkProfileCompliancePolicy object. + Read properties and relationships of the macOSCompliancePolicy 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-androidworkprofilecompliancepolicy-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-macoscompliancepolicy-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -104,34 +104,34 @@ async def patch(self,body: Optional[DeviceCompliancePolicy] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a macOSCompliancePolicy. + Deletes a androidCompliancePolicy. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the androidWorkProfileCompliancePolicy object. + Read properties and relationships of the macOSCompliancePolicy object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[DeviceCompliancePolicy] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -192,22 +192,22 @@ def device_setting_state_summaries(self) -> DeviceSettingStateSummariesRequestBu return DeviceSettingStateSummariesRequestBuilder(self.request_adapter, self.path_parameters) @property - def device_statuses(self) -> DeviceStatusesRequestBuilder: + def device_status_overview(self) -> DeviceStatusOverviewRequestBuilder: """ - Provides operations to manage the deviceStatuses property of the microsoft.graph.deviceCompliancePolicy entity. + Provides operations to manage the deviceStatusOverview property of the microsoft.graph.deviceCompliancePolicy entity. """ - from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder + from .device_status_overview.device_status_overview_request_builder import DeviceStatusOverviewRequestBuilder - return DeviceStatusesRequestBuilder(self.request_adapter, self.path_parameters) + return DeviceStatusOverviewRequestBuilder(self.request_adapter, self.path_parameters) @property - def device_status_overview(self) -> DeviceStatusOverviewRequestBuilder: + def device_statuses(self) -> DeviceStatusesRequestBuilder: """ - Provides operations to manage the deviceStatusOverview property of the microsoft.graph.deviceCompliancePolicy entity. + Provides operations to manage the deviceStatuses property of the microsoft.graph.deviceCompliancePolicy entity. """ - from .device_status_overview.device_status_overview_request_builder import DeviceStatusOverviewRequestBuilder + from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder - return DeviceStatusOverviewRequestBuilder(self.request_adapter, self.path_parameters) + return DeviceStatusesRequestBuilder(self.request_adapter, self.path_parameters) @property def schedule_actions_for_rules(self) -> ScheduleActionsForRulesRequestBuilder: @@ -228,22 +228,22 @@ def scheduled_actions_for_rule(self) -> ScheduledActionsForRuleRequestBuilder: return ScheduledActionsForRuleRequestBuilder(self.request_adapter, self.path_parameters) @property - def user_statuses(self) -> UserStatusesRequestBuilder: + def user_status_overview(self) -> UserStatusOverviewRequestBuilder: """ - Provides operations to manage the userStatuses property of the microsoft.graph.deviceCompliancePolicy entity. + Provides operations to manage the userStatusOverview property of the microsoft.graph.deviceCompliancePolicy entity. """ - from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder + from .user_status_overview.user_status_overview_request_builder import UserStatusOverviewRequestBuilder - return UserStatusesRequestBuilder(self.request_adapter, self.path_parameters) + return UserStatusOverviewRequestBuilder(self.request_adapter, self.path_parameters) @property - def user_status_overview(self) -> UserStatusOverviewRequestBuilder: + def user_statuses(self) -> UserStatusesRequestBuilder: """ - Provides operations to manage the userStatusOverview property of the microsoft.graph.deviceCompliancePolicy entity. + Provides operations to manage the userStatuses property of the microsoft.graph.deviceCompliancePolicy entity. """ - from .user_status_overview.user_status_overview_request_builder import UserStatusOverviewRequestBuilder + from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder - return UserStatusOverviewRequestBuilder(self.request_adapter, self.path_parameters) + return UserStatusesRequestBuilder(self.request_adapter, self.path_parameters) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @@ -258,7 +258,7 @@ class DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class DeviceCompliancePolicyItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the androidWorkProfileCompliancePolicy object. + Read properties and relationships of the macOSCompliancePolicy object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.py index 88b1f30c886..b5c86145d52 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py index 3378e6b04cf..1decf9cf9a4 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceSettin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SettingStateDeviceSummary] = None, request_configuration: Optional[DeviceSettingStateSummariesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[SettingStateDeviceSummary] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py index ca2d26782f7..bd4b32f9d08 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[SettingSt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SettingStateDeviceSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[SettingState Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SettingStateDeviceSummary] = None, request_configuration: Optional[SettingStateDeviceSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[SettingStateDeviceSummary] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.py index 1a14c9a0038..6c347f3a24e 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceSta Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceStatusOverviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStatus Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceDeviceOverview] = None, request_configuration: Optional[DeviceStatusOverviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceDeviceOverv if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.py index 9a3dfc9322a..3b84c0490f1 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.py index df511de55d4..4887fc3e80c 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStatus Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceDeviceStatus] = None, request_configuration: Optional[DeviceStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceComplianceDeviceStatus if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.py index e691c9afe7a..b76d05074c8 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceComplianceDeviceStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceDeviceStatus] = None, request_configuration: Optional[DeviceComplianceDeviceStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceDeviceStatu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.py index c80d4cf1c27..f920db66a05 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ScheduleActionsForRulesPostR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.py index a37cde018a8..992dd808fd2 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.py index df7a0c64f60..23322ab37be 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceComplianceScheduledActionForRuleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceScheduledActionForRule] = None, request_configuration: Optional[DeviceComplianceScheduledActionForRuleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceScheduledAc if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.py index d1f559bcdc9..583acda087e 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.py index 91cc4d8ee05..f9003abcd50 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceComplianceActionItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceActionItem] = None, request_configuration: Optional[DeviceComplianceActionItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceActionItem] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.py index ffa312e3cfd..66316fb3620 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ScheduledAct Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceActionItem] = None, request_configuration: Optional[ScheduledActionConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceComplianceActionItem] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.py index 798b7fd300c..2cb72444bb4 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ScheduledAct Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceScheduledActionForRule] = None, request_configuration: Optional[ScheduledActionsForRuleRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceComplianceScheduledAct if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.py index d84b548d929..6fe48ab0395 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserStatu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserStatusOverviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStatusOv Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceUserOverview] = None, request_configuration: Optional[UserStatusOverviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceUserOvervie if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.py index 7a4387c9e64..b60e48f5c70 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.py index f77e8bc2377..c9eda9b8aa0 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceComplianceUserStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceUserStatus] = None, request_configuration: Optional[DeviceComplianceUserStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceUserStatus] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.py index ab5b34c5a5f..3c2d02d2c44 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStatuses Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceUserStatus] = None, request_configuration: Optional[UserStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceComplianceUserStatus] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.py index 06796352e7b..8c3567e8b46 100644 --- a/msgraph/generated/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicyDeviceStateSummaryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyDeviceStateSummary] = None, request_configuration: Optional[DeviceCompliancePolicyDeviceStateSummaryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceCompliancePolicyDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.py index cbbba9a272d..53201fb47f3 100644 --- a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.py index 7b3884bbc59..1d90b9b552d 100644 --- a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicySettingStateSummary] = None, request_configuration: Optional[DeviceCompliancePolicySettingStateSummariesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceCompliancePolicySettin if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.py index 6bff159c993..e38bcbb7991 100644 --- a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicySettingStateSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicySettingStateSummary] = None, request_configuration: Optional[DeviceCompliancePolicySettingStateSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DeviceCompliancePolicySetti if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.py index 2faa01f5b41..bb597ae7735 100644 --- a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.py index 5fb622d7292..a40e00edd80 100644 --- a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceSettingState] = None, request_configuration: Optional[DeviceComplianceSettingStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceComplianceSettingState if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.py index c9a508f1db1..c76b89caf02 100644 --- a/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceComplianceSettingStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceComplianceSettingState] = None, request_configuration: Optional[DeviceComplianceSettingStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceComplianceSettingStat if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.py b/msgraph/generated/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.py index 0702af7d2cd..846b35fc733 100644 --- a/msgraph/generated/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.py +++ b/msgraph/generated/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationDeviceStateSummariesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationDeviceStateSummary] = None, request_configuration: Optional[DeviceConfigurationDeviceStateSummariesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationDeviceSt if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/count/count_request_builder.py b/msgraph/generated/device_management/device_configurations/count/count_request_builder.py index 2e453bf850e..acfe916f54e 100644 --- a/msgraph/generated/device_management/device_configurations/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 a10e28bd006..90c5dfccd03 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 windows10EnterpriseModernAppManagementConfiguration objects. + List properties and relationships of the windowsUpdateForBusinessConfiguration 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-windows10enterprisemodernappmanagementconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsupdateforbusinessconfiguration-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 editionUpgradeConfiguration object. + Create a new windows10EndpointProtectionConfiguration 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-editionupgradeconfiguration-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10endpointprotectionconfiguration-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -92,24 +92,24 @@ 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 windows10EnterpriseModernAppManagementConfiguration objects. + List properties and relationships of the windowsUpdateForBusinessConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfiguration] = None, request_configuration: Optional[DeviceConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new editionUpgradeConfiguration object. + Create a new windows10EndpointProtectionConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceConfiguration] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the windows10EnterpriseModernAppManagementConfiguration objects. + List properties and relationships of the windowsUpdateForBusinessConfiguration objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_management/device_configurations/item/assign/assign_response.py b/msgraph/generated/device_management/device_configurations/item/assign/assign_post_response.py similarity index 93% rename from msgraph/generated/device_management/device_configurations/item/assign/assign_response.py rename to msgraph/generated/device_management/device_configurations/item/assign/assign_post_response.py index 2d3508f4774..043f3ac52bd 100644 --- a/msgraph/generated/device_management/device_configurations/item/assign/assign_response.py +++ b/msgraph/generated/device_management/device_configurations/item/assign/assign_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AssignResponse(BaseCollectionPaginationCountResponse): +class AssignPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DeviceConfigurationAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AssignResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AssignPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AssignResponse + Returns: AssignPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AssignResponse() + return AssignPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/device_configurations/item/assign/assign_request_builder.py b/msgraph/generated/device_management/device_configurations/item/assign/assign_request_builder.py index 197ea3f6e93..6c9e393825c 100644 --- a/msgraph/generated/device_management/device_configurations/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/assign/assign_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .assign_post_request_body import AssignPostRequestBody - from .assign_response import AssignResponse + from .assign_post_response import AssignPostResponse class AssignRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assign", path_parameters) - async def post(self,body: Optional[AssignPostRequestBody] = None, request_configuration: Optional[AssignRequestBuilderPostRequestConfiguration] = None) -> Optional[AssignResponse]: + async def post(self,body: Optional[AssignPostRequestBody] = None, request_configuration: Optional[AssignRequestBuilderPostRequestConfiguration] = None) -> Optional[AssignPostResponse]: """ Not yet documented param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AssignResponse] + Returns: Optional[AssignPostResponse] Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-deviceconfiguration-assign?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[AssignPostRequestBody] = None, request_config } if not self.request_adapter: raise Exception("Http core is null") - from .assign_response import AssignResponse + from .assign_post_response import AssignPostResponse - return await self.request_adapter.send_async(request_info, AssignResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AssignPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AssignPostRequestBody] = None, request_configuration: Optional[AssignRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/assignments/assignments_request_builder.py b/msgraph/generated/device_management/device_configurations/item/assignments/assignments_request_builder.py index 3e91b4c2eec..f947eeaa6fd 100644 --- a/msgraph/generated/device_management/device_configurations/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/assignments/assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceConfigurationAssignmen if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/assignments/count/count_request_builder.py b/msgraph/generated/device_management/device_configurations/item/assignments/count/count_request_builder.py index 7c85bf27351..aca64131a36 100644 --- a/msgraph/generated/device_management/device_configurations/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.py b/msgraph/generated/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.py index afa205b8d30..9643a724089 100644 --- a/msgraph/generated/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationAssignment] = None, request_configuration: Optional[DeviceConfigurationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationAssignme if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 206dc04e769..e3b8145120d 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 windowsDefenderAdvancedThreatProtectionConfiguration. + Deletes a androidGeneralDeviceConfiguration. 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-windowsdefenderadvancedthreatprotectionconfiguration-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidgeneraldeviceconfiguration-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 appleDeviceFeaturesConfigurationBase object. + Read properties and relationships of the windows10TeamGeneralConfiguration 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-appledevicefeaturesconfigurationbase-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10teamgeneralconfiguration-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 windows10EnterpriseModernAppManagementConfiguration object. + Update the properties of a windowsUpdateForBusinessConfiguration 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-windows10enterprisemodernappmanagementconfiguration-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsupdateforbusinessconfiguration-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -115,39 +115,39 @@ async def patch(self,body: Optional[DeviceConfiguration] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a windowsDefenderAdvancedThreatProtectionConfiguration. + Deletes a androidGeneralDeviceConfiguration. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the appleDeviceFeaturesConfigurationBase object. + Read properties and relationships of the windows10TeamGeneralConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfiguration] = None, request_configuration: Optional[DeviceConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a windows10EnterpriseModernAppManagementConfiguration object. + Update the properties of a windowsUpdateForBusinessConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -155,13 +155,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfiguration] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -202,15 +202,6 @@ def device_setting_state_summaries(self) -> DeviceSettingStateSummariesRequestBu return DeviceSettingStateSummariesRequestBuilder(self.request_adapter, self.path_parameters) - @property - def device_statuses(self) -> DeviceStatusesRequestBuilder: - """ - Provides operations to manage the deviceStatuses property of the microsoft.graph.deviceConfiguration entity. - """ - from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder - - return DeviceStatusesRequestBuilder(self.request_adapter, self.path_parameters) - @property def device_status_overview(self) -> DeviceStatusOverviewRequestBuilder: """ @@ -221,13 +212,13 @@ def device_status_overview(self) -> DeviceStatusOverviewRequestBuilder: return DeviceStatusOverviewRequestBuilder(self.request_adapter, self.path_parameters) @property - def user_statuses(self) -> UserStatusesRequestBuilder: + def device_statuses(self) -> DeviceStatusesRequestBuilder: """ - Provides operations to manage the userStatuses property of the microsoft.graph.deviceConfiguration entity. + Provides operations to manage the deviceStatuses property of the microsoft.graph.deviceConfiguration entity. """ - from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder + from .device_statuses.device_statuses_request_builder import DeviceStatusesRequestBuilder - return UserStatusesRequestBuilder(self.request_adapter, self.path_parameters) + return DeviceStatusesRequestBuilder(self.request_adapter, self.path_parameters) @property def user_status_overview(self) -> UserStatusOverviewRequestBuilder: @@ -238,6 +229,15 @@ def user_status_overview(self) -> UserStatusOverviewRequestBuilder: return UserStatusOverviewRequestBuilder(self.request_adapter, self.path_parameters) + @property + def user_statuses(self) -> UserStatusesRequestBuilder: + """ + Provides operations to manage the userStatuses property of the microsoft.graph.deviceConfiguration entity. + """ + from .user_statuses.user_statuses_request_builder import UserStatusesRequestBuilder + + return UserStatusesRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass @@ -251,7 +251,7 @@ class DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class DeviceConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the appleDeviceFeaturesConfigurationBase object. + Read properties and relationships of the windows10TeamGeneralConfiguration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.py index 59c195fdfaf..e55ee2437b5 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py index 47796563422..97a5f7e146b 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceSettin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SettingStateDeviceSummary] = None, request_configuration: Optional[DeviceSettingStateSummariesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SettingStateDeviceSummary] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py index 19e6f88f1be..5cc677d21d5 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[SettingSt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SettingStateDeviceSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[SettingState Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SettingStateDeviceSummary] = None, request_configuration: Optional[SettingStateDeviceSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[SettingStateDeviceSummary] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.py index 8363bf4b438..da11a22a0bf 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceSta Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceStatusOverviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStatus Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationDeviceOverview] = None, request_configuration: Optional[DeviceStatusOverviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationDeviceOv if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/device_statuses/count/count_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_statuses/count/count_request_builder.py index 98ef774be3a..7d4c8e71b37 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.py index ccb944f4200..0779c2cb9dd 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceStatus Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationDeviceStatus] = None, request_configuration: Optional[DeviceStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceConfigurationDeviceSta if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.py index 42eaa23e62d..15bb3001fef 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationDeviceStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationDeviceStatus] = None, request_configuration: Optional[DeviceConfigurationDeviceStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationDeviceSt if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_response.py b/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.py similarity index 92% rename from msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_response.py rename to msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.py index 684e65e8820..0e8b79e77c3 100644 --- a/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_response.py +++ b/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse(AdditionalDataHolder, BackedModel, Parsable): +class GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse(AdditionalDa value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse + Returns: GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse() + return GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.py b/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.py index 0b568d28a64..a99c85730cb 100644 --- a/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_oma_setting_plain_text_value_with_secret_reference_value_id_response import GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse + from .get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response import GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse class GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param secret_reference_value_id: Usage: secretReferenceValueId='{secretReferenceValueId}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['secret_reference_value_id'] = str(secret_reference_value_id) super().__init__(request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/getOmaSettingPlainTextValue(secretReferenceValueId='{secretReferenceValueId}')", path_parameters) - async def get(self,request_configuration: Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilderGetRequestConfiguration] = None) -> Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse]: + async def get(self,request_configuration: Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilderGetRequestConfiguration] = None) -> Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse]: """ Invoke function getOmaSettingPlainTextValue param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse] + Returns: Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetOmaSettingPlainTextValueWi } if not self.request_adapter: raise Exception("Http core is null") - from .get_oma_setting_plain_text_value_with_secret_reference_value_id_response import GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse + from .get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response import GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse - return await self.request_adapter.send_async(request_info, GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[GetOmaSettin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder: diff --git a/msgraph/generated/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.py b/msgraph/generated/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.py index 8772abb53e0..7128c4573d1 100644 --- a/msgraph/generated/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserStatu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserStatusOverviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStatusOv Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationUserOverview] = None, request_configuration: Optional[UserStatusOverviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationUserOver if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/user_statuses/count/count_request_builder.py b/msgraph/generated/device_management/device_configurations/item/user_statuses/count/count_request_builder.py index c21dd4a3e17..e4351cfd327 100644 --- a/msgraph/generated/device_management/device_configurations/item/user_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/user_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.py b/msgraph/generated/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.py index d13f620533d..137d6af71bc 100644 --- a/msgraph/generated/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationUserStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationUserStatus] = None, request_configuration: Optional[DeviceConfigurationUserStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationUserStat if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.py b/msgraph/generated/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.py index 3f001f0ca0f..583d33acaaf 100644 --- a/msgraph/generated/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[UserStatuses Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationUserStatus] = None, request_configuration: Optional[UserStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceConfigurationUserStatu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_enrollment_configurations/count/count_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/count/count_request_builder.py index 554e909d144..e0098b635a3 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 370743b2330..215e8111af5 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 @@ -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.") @@ -97,19 +97,19 @@ def to_get_request_information(self,request_configuration: Optional[DeviceEnroll Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceEnrollmentConfiguratio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_enrollment_configurations/item/assign/assign_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/item/assign/assign_request_builder.py index 2231a0d9356..95a58b23f39 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/item/assign/assign_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/item/assign/assign_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssignPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.py index 004e21a617a..8149b3f977e 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EnrollmentConfigurationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EnrollmentConfigurationAssig if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.py index 53db9c9f302..37cd7a36b70 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.py index ac4e94d9589..ce5111e367b 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Enrollmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EnrollmentConfigurationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[EnrollmentCo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EnrollmentConfigurationAssignment] = None, request_configuration: Optional[EnrollmentConfigurationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[EnrollmentConfigurationAssi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 6ba7ccdbeeb..2391788b441 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 deviceEnrollmentPlatformRestrictionsConfiguration. + Deletes a deviceEnrollmentLimitConfiguration. 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-deviceenrollmentplatformrestrictionsconfiguration-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-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 deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Read properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceEnrollmentConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentwindowshelloforbusinessconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentplatformrestrictionsconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -73,11 +73,11 @@ async def get(self,request_configuration: Optional[DeviceEnrollmentConfiguration async def patch(self,body: Optional[DeviceEnrollmentConfiguration] = None, request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DeviceEnrollmentConfiguration]: """ - Update the properties of a deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Update the properties of a 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-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -98,39 +98,39 @@ async def patch(self,body: Optional[DeviceEnrollmentConfiguration] = None, reque def to_delete_request_information(self,request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a deviceEnrollmentPlatformRestrictionsConfiguration. + Deletes a deviceEnrollmentLimitConfiguration. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Read properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceEnrollmentConfiguration] = None, request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Update the properties of a deviceEnrollmentLimitConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[DeviceEnrollmentConfigurati if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration( @dataclass class DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Read properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.py index 4d3967c2a10..ac49bc83d94 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetPriorityPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_management_partners/count/count_request_builder.py b/msgraph/generated/device_management/device_management_partners/count/count_request_builder.py index 07982dc31e8..633c5153b07 100644 --- a/msgraph/generated/device_management/device_management_partners/count/count_request_builder.py +++ b/msgraph/generated/device_management/device_management_partners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/device_management_partners/device_management_partners_request_builder.py b/msgraph/generated/device_management/device_management_partners/device_management_partners_request_builder.py index 3da664f7caf..df703ec0a3a 100644 --- a/msgraph/generated/device_management/device_management_partners/device_management_partners_request_builder.py +++ b/msgraph/generated/device_management/device_management_partners/device_management_partners_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementPartner] = None, request_configuration: Optional[DeviceManagementPartnersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceManagementPartner] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_management_partners/item/device_management_partner_item_request_builder.py b/msgraph/generated/device_management/device_management_partners/item/device_management_partner_item_request_builder.py index 8612bbfe147..e4396c5cf08 100644 --- a/msgraph/generated/device_management/device_management_partners/item/device_management_partner_item_request_builder.py +++ b/msgraph/generated/device_management/device_management_partners/item/device_management_partner_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceMan Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceManagementPartnerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementPartner] = None, request_configuration: Optional[DeviceManagementPartnerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagementPartner] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/device_management_partners/item/terminate/terminate_request_builder.py b/msgraph/generated/device_management/device_management_partners/item/terminate/terminate_request_builder.py index 508e069a594..b655433ea42 100644 --- a/msgraph/generated/device_management/device_management_partners/item/terminate/terminate_request_builder.py +++ b/msgraph/generated/device_management/device_management_partners/item/terminate/terminate_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[TerminateRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> TerminateRequestBuilder: diff --git a/msgraph/generated/device_management/device_management_request_builder.py b/msgraph/generated/device_management/device_management_request_builder.py index 529f1cea18e..8eb52ce9a5b 100644 --- a/msgraph/generated/device_management/device_management_request_builder.py +++ b/msgraph/generated/device_management/device_management_request_builder.py @@ -21,16 +21,16 @@ from .device_compliance_policies.device_compliance_policies_request_builder import DeviceCompliancePoliciesRequestBuilder from .device_compliance_policy_device_state_summary.device_compliance_policy_device_state_summary_request_builder import DeviceCompliancePolicyDeviceStateSummaryRequestBuilder from .device_compliance_policy_setting_state_summaries.device_compliance_policy_setting_state_summaries_request_builder import DeviceCompliancePolicySettingStateSummariesRequestBuilder - from .device_configuration_device_state_summaries.device_configuration_device_state_summaries_request_builder import DeviceConfigurationDeviceStateSummariesRequestBuilder from .device_configurations.device_configurations_request_builder import DeviceConfigurationsRequestBuilder + from .device_configuration_device_state_summaries.device_configuration_device_state_summaries_request_builder import DeviceConfigurationDeviceStateSummariesRequestBuilder from .device_enrollment_configurations.device_enrollment_configurations_request_builder import DeviceEnrollmentConfigurationsRequestBuilder from .device_management_partners.device_management_partners_request_builder import DeviceManagementPartnersRequestBuilder from .exchange_connectors.exchange_connectors_request_builder import ExchangeConnectorsRequestBuilder from .get_effective_permissions_with_scope.get_effective_permissions_with_scope_request_builder import GetEffectivePermissionsWithScopeRequestBuilder from .imported_windows_autopilot_device_identities.imported_windows_autopilot_device_identities_request_builder import ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder from .ios_update_statuses.ios_update_statuses_request_builder import IosUpdateStatusesRequestBuilder - from .managed_device_overview.managed_device_overview_request_builder import ManagedDeviceOverviewRequestBuilder from .managed_devices.managed_devices_request_builder import ManagedDevicesRequestBuilder + from .managed_device_overview.managed_device_overview_request_builder import ManagedDeviceOverviewRequestBuilder from .mobile_app_troubleshooting_events.mobile_app_troubleshooting_events_request_builder import MobileAppTroubleshootingEventsRequestBuilder from .mobile_threat_defense_connectors.mobile_threat_defense_connectors_request_builder import MobileThreatDefenseConnectorsRequestBuilder from .notification_message_templates.notification_message_templates_request_builder import NotificationMessageTemplatesRequestBuilder @@ -50,8 +50,8 @@ from .user_experience_analytics_app_health_device_model_performance.user_experience_analytics_app_health_device_model_performance_request_builder import UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder from .user_experience_analytics_app_health_device_performance.user_experience_analytics_app_health_device_performance_request_builder import UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder from .user_experience_analytics_app_health_device_performance_details.user_experience_analytics_app_health_device_performance_details_request_builder import UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder - from .user_experience_analytics_app_health_o_s_version_performance.user_experience_analytics_app_health_o_s_version_performance_request_builder import UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder from .user_experience_analytics_app_health_overview.user_experience_analytics_app_health_overview_request_builder import UserExperienceAnalyticsAppHealthOverviewRequestBuilder + from .user_experience_analytics_app_health_o_s_version_performance.user_experience_analytics_app_health_o_s_version_performance_request_builder import UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder from .user_experience_analytics_baselines.user_experience_analytics_baselines_request_builder import UserExperienceAnalyticsBaselinesRequestBuilder from .user_experience_analytics_categories.user_experience_analytics_categories_request_builder import UserExperienceAnalyticsCategoriesRequestBuilder from .user_experience_analytics_device_performance.user_experience_analytics_device_performance_request_builder import UserExperienceAnalyticsDevicePerformanceRequestBuilder @@ -91,7 +91,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-mstunnel-devicemanagement-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -126,7 +126,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-notification-devicemanagement-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-wip-devicemanagement-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -152,14 +152,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagement] = None, request_configuration: Optional[DeviceManagementRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -172,13 +172,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagement] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -601,22 +601,22 @@ def user_experience_analytics_device_startup_history(self) -> UserExperienceAnal return UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder(self.request_adapter, self.path_parameters) @property - def user_experience_analytics_device_startup_processes(self) -> UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder: + def user_experience_analytics_device_startup_process_performance(self) -> UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder: """ - Provides operations to manage the userExperienceAnalyticsDeviceStartupProcesses property of the microsoft.graph.deviceManagement entity. + Provides operations to manage the userExperienceAnalyticsDeviceStartupProcessPerformance property of the microsoft.graph.deviceManagement entity. """ - from .user_experience_analytics_device_startup_processes.user_experience_analytics_device_startup_processes_request_builder import UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder + from .user_experience_analytics_device_startup_process_performance.user_experience_analytics_device_startup_process_performance_request_builder import UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder - return UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder(self.request_adapter, self.path_parameters) + return UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder(self.request_adapter, self.path_parameters) @property - def user_experience_analytics_device_startup_process_performance(self) -> UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder: + def user_experience_analytics_device_startup_processes(self) -> UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder: """ - Provides operations to manage the userExperienceAnalyticsDeviceStartupProcessPerformance property of the microsoft.graph.deviceManagement entity. + Provides operations to manage the userExperienceAnalyticsDeviceStartupProcesses property of the microsoft.graph.deviceManagement entity. """ - from .user_experience_analytics_device_startup_process_performance.user_experience_analytics_device_startup_process_performance_request_builder import UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder + from .user_experience_analytics_device_startup_processes.user_experience_analytics_device_startup_processes_request_builder import UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder - return UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder(self.request_adapter, self.path_parameters) + return UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder(self.request_adapter, self.path_parameters) @property def user_experience_analytics_metric_history(self) -> UserExperienceAnalyticsMetricHistoryRequestBuilder: diff --git a/msgraph/generated/device_management/exchange_connectors/count/count_request_builder.py b/msgraph/generated/device_management/exchange_connectors/count/count_request_builder.py index b90a5ed4731..46475eb5121 100644 --- a/msgraph/generated/device_management/exchange_connectors/count/count_request_builder.py +++ b/msgraph/generated/device_management/exchange_connectors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/exchange_connectors/exchange_connectors_request_builder.py b/msgraph/generated/device_management/exchange_connectors/exchange_connectors_request_builder.py index cbeba6d54e7..3ad50775c0f 100644 --- a/msgraph/generated/device_management/exchange_connectors/exchange_connectors_request_builder.py +++ b/msgraph/generated/device_management/exchange_connectors/exchange_connectors_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ExchangeConn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementExchangeConnector] = None, request_configuration: Optional[ExchangeConnectorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceManagementExchangeConn if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.py b/msgraph/generated/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.py index 4ecacdda11c..45e97768e82 100644 --- a/msgraph/generated/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.py +++ b/msgraph/generated/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceMan Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceManagementExchangeConnectorItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementExchangeConnector] = None, request_configuration: Optional[DeviceManagementExchangeConnectorItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagementExchangeCon if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/exchange_connectors/item/sync/sync_request_builder.py b/msgraph/generated/device_management/exchange_connectors/item/sync/sync_request_builder.py index 7a98bf8589e..54f7917ef7a 100644 --- a/msgraph/generated/device_management/exchange_connectors/item/sync/sync_request_builder.py +++ b/msgraph/generated/device_management/exchange_connectors/item/sync/sync_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SyncPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_response.py b/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_get_response.py similarity index 89% rename from msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_response.py rename to msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_get_response.py index 2be2d857c2f..1d10dfd2d7e 100644 --- a/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_response.py +++ b/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetEffectivePermissionsWithScopeResponse(BaseCollectionPaginationCountResponse): +class GetEffectivePermissionsWithScopeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[RolePermission]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetEffectivePermissionsWithScopeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetEffectivePermissionsWithScopeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetEffectivePermissionsWithScopeResponse + Returns: GetEffectivePermissionsWithScopeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetEffectivePermissionsWithScopeResponse() + return GetEffectivePermissionsWithScopeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.py b/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.py index c4ef83af5ea..713c1e8754a 100644 --- a/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.py +++ b/msgraph/generated/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_effective_permissions_with_scope_response import GetEffectivePermissionsWithScopeResponse + from .get_effective_permissions_with_scope_get_response import GetEffectivePermissionsWithScopeGetResponse class GetEffectivePermissionsWithScopeRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param scope: Usage: scope='{scope}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['scope'] = str(scope) super().__init__(request_adapter, "{+baseurl}/deviceManagement/getEffectivePermissions(scope='{scope}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetEffectivePermissionsWithScopeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetEffectivePermissionsWithScopeResponse]: + async def get(self,request_configuration: Optional[GetEffectivePermissionsWithScopeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetEffectivePermissionsWithScopeGetResponse]: """ Retrieves the effective permissions of the currently authenticated user param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetEffectivePermissionsWithScopeResponse] + Returns: Optional[GetEffectivePermissionsWithScopeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetEffectivePermissionsWithSc } if not self.request_adapter: raise Exception("Http core is null") - from .get_effective_permissions_with_scope_response import GetEffectivePermissionsWithScopeResponse + from .get_effective_permissions_with_scope_get_response import GetEffectivePermissionsWithScopeGetResponse - return await self.request_adapter.send_async(request_info, GetEffectivePermissionsWithScopeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetEffectivePermissionsWithScopeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetEffectivePermissionsWithScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetEffective Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetEffectivePermissionsWithScopeRequestBuilder: diff --git a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.py b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.py index d6e9a72a65f..57ba9609590 100644 --- a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.py +++ b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_response.py b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_post_response.py similarity index 93% rename from msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_response.py rename to msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_post_response.py index ce28d86863d..d2d189b1bd1 100644 --- a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_response.py +++ b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_post_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class ImportResponse(BaseCollectionPaginationCountResponse): +class ImportPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ImportedWindowsAutopilotDeviceIdentity]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ImportResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ImportPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ImportResponse + Returns: ImportPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ImportResponse() + return ImportPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_request_builder.py b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_request_builder.py index bef243581a2..1f007719856 100644 --- a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_request_builder.py +++ b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/import_/import_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .import_post_request_body import ImportPostRequestBody - from .import_response import ImportResponse + from .import_post_response import ImportPostResponse class ImportRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities/import", path_parameters) - async def post(self,body: Optional[ImportPostRequestBody] = None, request_configuration: Optional[ImportRequestBuilderPostRequestConfiguration] = None) -> Optional[ImportResponse]: + async def post(self,body: Optional[ImportPostRequestBody] = None, request_configuration: Optional[ImportRequestBuilderPostRequestConfiguration] = None) -> Optional[ImportPostResponse]: """ Not yet documented param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[ImportResponse] + Returns: Optional[ImportPostResponse] Find more info here: https://learn.microsoft.com/graph/api/intune-enrollment-importedwindowsautopilotdeviceidentity-import?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[ImportPostRequestBody] = None, request_config } if not self.request_adapter: raise Exception("Http core is null") - from .import_response import ImportResponse + from .import_post_response import ImportPostResponse - return await self.request_adapter.send_async(request_info, ImportResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ImportPostResponse, error_mapping) def to_post_request_information(self,body: Optional[ImportPostRequestBody] = None, request_configuration: Optional[ImportRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ImportPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.py b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.py index d2cc9430548..75f70fdd017 100644 --- a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.py +++ b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.py @@ -98,14 +98,14 @@ def to_get_request_information(self,request_configuration: Optional[ImportedWind Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ImportedWindowsAutopilotDeviceIdentity] = None, request_configuration: Optional[ImportedWindowsAutopilotDeviceIdentitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ImportedWindowsAutopilotDevi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.py b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.py index 219daf8048a..b36d6d162a1 100644 --- a/msgraph/generated/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.py +++ b/msgraph/generated/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ImportedW Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ImportedWindowsAutopilotDeviceIdentityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ImportedWind Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ImportedWindowsAutopilotDeviceIdentity] = None, request_configuration: Optional[ImportedWindowsAutopilotDeviceIdentityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ImportedWindowsAutopilotDev if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/ios_update_statuses/count/count_request_builder.py b/msgraph/generated/device_management/ios_update_statuses/count/count_request_builder.py index 955454a7fb0..f511d4bb62b 100644 --- a/msgraph/generated/device_management/ios_update_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_management/ios_update_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/ios_update_statuses/ios_update_statuses_request_builder.py b/msgraph/generated/device_management/ios_update_statuses/ios_update_statuses_request_builder.py index 8991ffa9915..4cf0f60f2ca 100644 --- a/msgraph/generated/device_management/ios_update_statuses/ios_update_statuses_request_builder.py +++ b/msgraph/generated/device_management/ios_update_statuses/ios_update_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[IosUpdateSta Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IosUpdateDeviceStatus] = None, request_configuration: Optional[IosUpdateStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[IosUpdateDeviceStatus] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.py b/msgraph/generated/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.py index 2486febd8e3..6878c487a4f 100644 --- a/msgraph/generated/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.py +++ b/msgraph/generated/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[IosUpdate Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IosUpdateDeviceStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[IosUpdateDev Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IosUpdateDeviceStatus] = None, request_configuration: Optional[IosUpdateDeviceStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[IosUpdateDeviceStatus] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_device_overview/managed_device_overview_request_builder.py b/msgraph/generated/device_management/managed_device_overview/managed_device_overview_request_builder.py index f4795f51492..7f0ff83f173 100644 --- a/msgraph/generated/device_management/managed_device_overview/managed_device_overview_request_builder.py +++ b/msgraph/generated/device_management/managed_device_overview/managed_device_overview_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagedDeviceOverviewRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/count/count_request_builder.py b/msgraph/generated/device_management/managed_devices/count/count_request_builder.py index 11f2977bea1..fc84fe1bf0a 100644 --- a/msgraph/generated/device_management/managed_devices/count/count_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py b/msgraph/generated/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py index 43d30155be1..2b8206db052 100644 --- a/msgraph/generated/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[BypassActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> BypassActivationLockRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py b/msgraph/generated/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py index 6629dbb4d01..1e62bcb228b 100644 --- a/msgraph/generated/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CleanWindowsDevicePostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py b/msgraph/generated/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py index 9aa267b6869..e1f00c0674d 100644 --- a/msgraph/generated/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeleteUserFromSharedAppleDev if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/device_category/device_category_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_category/device_category_request_builder.py index 9da089f03dd..246de04c4ab 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_category/device_category_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_category/device_category_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCat Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCategoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCatego Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCategory] = None, request_configuration: Optional[DeviceCategoryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceCategory] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py index e24e3641e0d..5eae95fe07b 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py index 549b56c742d..0b55d8483b6 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyState] = None, request_configuration: Optional[DeviceCompliancePolicyStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceCompliancePolicyState] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py index 4dbc03bcaa8..a09fa527e38 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicyStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyState] = None, request_configuration: Optional[DeviceCompliancePolicyStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceCompliancePolicyState if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.py index edc1b8f9922..e2e08bae5e0 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py index 8ec02b469cb..61e86fb36dc 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationState] = None, request_configuration: Optional[DeviceConfigurationStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceConfigurationState] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py b/msgraph/generated/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py index 23d8f936579..9258de27751 100644 --- a/msgraph/generated/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationState] = None, request_configuration: Optional[DeviceConfigurationStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationState] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py b/msgraph/generated/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py index 920fbb97a48..ee360864ced 100644 --- a/msgraph/generated/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[DisableLost Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DisableLostModeRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/locate_device/locate_device_request_builder.py b/msgraph/generated/device_management/managed_devices/item/locate_device/locate_device_request_builder.py index 28ea0f1bcea..e991c8def53 100644 --- a/msgraph/generated/device_management/managed_devices/item/locate_device/locate_device_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/locate_device/locate_device_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[LocateDevic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> LocateDeviceRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.py b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.py index 5a1d8d1e5b7..1a63f2759ad 100644 --- a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_response.py b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py similarity index 90% rename from msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_response.py rename to msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py index e73be8f395e..4b14fd88984 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_response.py +++ b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class ImageWithWidthResponse(AdditionalDataHolder, BackedModel, Parsable): +class CreateDownloadUrlPostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class ImageWithWidthResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ImageWithWidthResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CreateDownloadUrlPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ImageWithWidthResponse + Returns: CreateDownloadUrlPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ImageWithWidthResponse() + return CreateDownloadUrlPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py index 31eaefb34a1..7f1e60ff0d2 100644 --- a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .create_download_url_response import CreateDownloadUrlResponse + from .create_download_url_post_response import CreateDownloadUrlPostResponse class CreateDownloadUrlRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", path_parameters) - async def post(self,request_configuration: Optional[CreateDownloadUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CreateDownloadUrlResponse]: + async def post(self,request_configuration: Optional[CreateDownloadUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CreateDownloadUrlPostResponse]: """ Invoke action createDownloadUrl param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CreateDownloadUrlResponse] + Returns: Optional[CreateDownloadUrlPostResponse] """ request_info = self.to_post_request_information( request_configuration @@ -43,9 +43,9 @@ async def post(self,request_configuration: Optional[CreateDownloadUrlRequestBuil } if not self.request_adapter: raise Exception("Http core is null") - from .create_download_url_response import CreateDownloadUrlResponse + from .create_download_url_post_response import CreateDownloadUrlPostResponse - return await self.request_adapter.send_async(request_info, CreateDownloadUrlResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CreateDownloadUrlPostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[CreateDownloadUrlRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[CreateDownl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CreateDownloadUrlRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py index 2f98e48337c..f0c920611bf 100644 --- a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceLog Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceLogCol Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceLogCollectionResponse] = None, request_configuration: Optional[DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DeviceLogCollectionResponse if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py index 8d4308257d3..6d27cdb28ff 100644 --- a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[LogCollectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceLogCollectionResponse] = None, request_configuration: Optional[LogCollectionRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceLogCollectionResponse] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py b/msgraph/generated/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py index 9cb3546ebad..aa35dfe6d1e 100644 --- a/msgraph/generated/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[LogoutShare Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> LogoutSharedAppleDeviceActiveUserRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/managed_device_item_request_builder.py b/msgraph/generated/device_management/managed_devices/item/managed_device_item_request_builder.py index 155084ca66a..dd820b0d76f 100644 --- a/msgraph/generated/device_management/managed_devices/item/managed_device_item_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/managed_device_item_request_builder.py @@ -20,8 +20,8 @@ from .device_configuration_states.device_configuration_states_request_builder import DeviceConfigurationStatesRequestBuilder from .disable_lost_mode.disable_lost_mode_request_builder import DisableLostModeRequestBuilder from .locate_device.locate_device_request_builder import LocateDeviceRequestBuilder - from .log_collection_requests.log_collection_requests_request_builder import LogCollectionRequestsRequestBuilder from .logout_shared_apple_device_active_user.logout_shared_apple_device_active_user_request_builder import LogoutSharedAppleDeviceActiveUserRequestBuilder + from .log_collection_requests.log_collection_requests_request_builder import LogCollectionRequestsRequestBuilder from .reboot_now.reboot_now_request_builder import RebootNowRequestBuilder from .recover_passcode.recover_passcode_request_builder import RecoverPasscodeRequestBuilder from .remote_lock.remote_lock_request_builder import RemoteLockRequestBuilder @@ -124,12 +124,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedDeviceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -139,14 +139,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDevice] = None, request_configuration: Optional[ManagedDeviceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -159,13 +159,13 @@ def to_patch_request_information(self,body: Optional[ManagedDevice] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.py b/msgraph/generated/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.py index 234d82348f0..0d978f864d3 100644 --- a/msgraph/generated/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RebootNowRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RebootNowRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.py b/msgraph/generated/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.py index 4c1d5a25088..d69161eddb8 100644 --- a/msgraph/generated/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RecoverPass Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RecoverPasscodeRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.py b/msgraph/generated/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.py index a4dafcdc9d4..95d66a4df42 100644 --- a/msgraph/generated/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RemoteLockR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoteLockRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py b/msgraph/generated/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py index e626c30ed06..bb2999cddc0 100644 --- a/msgraph/generated/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RequestRemo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RequestRemoteAssistanceRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.py b/msgraph/generated/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.py index 15e16f70c30..6a581a4b6f7 100644 --- a/msgraph/generated/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[ResetPassco Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ResetPasscodeRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/retire/retire_request_builder.py b/msgraph/generated/device_management/managed_devices/item/retire/retire_request_builder.py index 5bf75b8f3cf..e4825b5292b 100644 --- a/msgraph/generated/device_management/managed_devices/item/retire/retire_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/retire/retire_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RetireReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RetireRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/shut_down/shut_down_request_builder.py b/msgraph/generated/device_management/managed_devices/item/shut_down/shut_down_request_builder.py index a61b5755791..48cc790f469 100644 --- a/msgraph/generated/device_management/managed_devices/item/shut_down/shut_down_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/shut_down/shut_down_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[ShutDownReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ShutDownRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/sync_device/sync_device_request_builder.py b/msgraph/generated/device_management/managed_devices/item/sync_device/sync_device_request_builder.py index 566071a8bc5..d17673e96cf 100644 --- a/msgraph/generated/device_management/managed_devices/item/sync_device/sync_device_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/sync_device/sync_device_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[SyncDeviceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SyncDeviceRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py b/msgraph/generated/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py index dd5b2cf8a78..9282b703ac0 100644 --- a/msgraph/generated/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpdateWindowsDeviceAccountPo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/users/users_request_builder.py b/msgraph/generated/device_management/managed_devices/item/users/users_request_builder.py index 8ae4044c4de..1b39254c983 100644 --- a/msgraph/generated/device_management/managed_devices/item/users/users_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/users/users_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[UsersRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UsersRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py b/msgraph/generated/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py index caa1ad877ff..43d224f88be 100644 --- a/msgraph/generated/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[WindowsDefenderScanPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py b/msgraph/generated/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py index e5e7ef2ea7e..9f9364dedbb 100644 --- a/msgraph/generated/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[WindowsDefe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> WindowsDefenderUpdateSignaturesRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py index d3597977aa5..a9d4212cecf 100644 --- a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py index da0b3e78f4b..727e1d0fe7e 100644 --- a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DetectedMalw Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsDeviceMalwareState] = None, request_configuration: Optional[DetectedMalwareStateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsDeviceMalwareState] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py index 98b4c04d30b..581e77fca7d 100644 --- a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsDeviceMalwareState] = None, request_configuration: Optional[WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WindowsDeviceMalwareState] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py index d382cb6d231..c8698e9f950 100644 --- a/msgraph/generated/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsPr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsProtectionStateRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsProte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsProtectionState] = None, request_configuration: Optional[WindowsProtectionStateRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WindowsProtectionState] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/item/wipe/wipe_request_builder.py b/msgraph/generated/device_management/managed_devices/item/wipe/wipe_request_builder.py index 35403406740..f234cb2f8f3 100644 --- a/msgraph/generated/device_management/managed_devices/item/wipe/wipe_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/item/wipe/wipe_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[WipePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/managed_devices/managed_devices_request_builder.py b/msgraph/generated/device_management/managed_devices/managed_devices_request_builder.py index bc7023f59d2..c3cec2773cb 100644 --- a/msgraph/generated/device_management/managed_devices/managed_devices_request_builder.py +++ b/msgraph/generated/device_management/managed_devices/managed_devices_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDevice] = None, request_configuration: Optional[ManagedDevicesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ManagedDevice] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/count/count_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/count/count_request_builder.py index 6bc8b26a8fe..afb3712034e 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/count/count_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.py index 596803d3c3b..a52cecd8e13 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AppLogCollec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppLogCollectionRequest] = None, request_configuration: Optional[AppLogCollectionRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AppLogCollectionRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.py index f263fbc0f9f..c5cb25e4658 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.py index 60275a9c8cb..e65e75f533b 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[AppLogCol Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppLogCollectionRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[AppLogCollec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppLogCollectionRequest] = None, request_configuration: Optional[AppLogCollectionRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[AppLogCollectionRequest] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.py index 0e990580d51..ef411961c9f 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.py @@ -55,13 +55,13 @@ def to_post_request_information(self,request_configuration: Optional[CreateDownl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CreateDownloadUrlRequestBuilder: diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.py index 5cb6a5cce9e..5e90d95d140 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[MobileApp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MobileAppTroubleshootingEventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppTro Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileAppTroubleshootingEvent] = None, request_configuration: Optional[MobileAppTroubleshootingEventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[MobileAppTroubleshootingEve if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.py b/msgraph/generated/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.py index a94d79d75bb..b69602fa1d8 100644 --- a/msgraph/generated/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.py +++ b/msgraph/generated/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppTro Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileAppTroubleshootingEvent] = None, request_configuration: Optional[MobileAppTroubleshootingEventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MobileAppTroubleshootingEven if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/mobile_threat_defense_connectors/count/count_request_builder.py b/msgraph/generated/device_management/mobile_threat_defense_connectors/count/count_request_builder.py index 1af435cd07a..272a55797dd 100644 --- a/msgraph/generated/device_management/mobile_threat_defense_connectors/count/count_request_builder.py +++ b/msgraph/generated/device_management/mobile_threat_defense_connectors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.py b/msgraph/generated/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.py index 2a17ff92838..dd8a5d15341 100644 --- a/msgraph/generated/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.py +++ b/msgraph/generated/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[MobileThr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MobileThreatDefenseConnectorItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileThreat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileThreatDefenseConnector] = None, request_configuration: Optional[MobileThreatDefenseConnectorItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[MobileThreatDefenseConnecto if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.py b/msgraph/generated/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.py index ae03978a136..0822b86d3ce 100644 --- a/msgraph/generated/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.py +++ b/msgraph/generated/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[MobileThreat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MobileThreatDefenseConnector] = None, request_configuration: Optional[MobileThreatDefenseConnectorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MobileThreatDefenseConnector if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/notification_message_templates/count/count_request_builder.py b/msgraph/generated/device_management/notification_message_templates/count/count_request_builder.py index 8250d74b35e..c49910ee6ac 100644 --- a/msgraph/generated/device_management/notification_message_templates/count/count_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.py b/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.py index 7d15b31ed50..5defbb7cba4 100644 --- a/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.py b/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.py index dbc24234efe..aac7cebd8f6 100644 --- a/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Localized Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LocalizedNotificationMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[LocalizedNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LocalizedNotificationMessage] = None, request_configuration: Optional[LocalizedNotificationMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[LocalizedNotificationMessag if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.py b/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.py index 159742ee98b..09dd365d6ce 100644 --- a/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[LocalizedNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LocalizedNotificationMessage] = None, request_configuration: Optional[LocalizedNotificationMessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[LocalizedNotificationMessage if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/notification_message_templates/item/notification_message_template_item_request_builder.py b/msgraph/generated/device_management/notification_message_templates/item/notification_message_template_item_request_builder.py index 466ab4a25e3..22cc4e5c5ae 100644 --- a/msgraph/generated/device_management/notification_message_templates/item/notification_message_template_item_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/item/notification_message_template_item_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[Notificat Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[NotificationMessageTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[Notification Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[NotificationMessageTemplate] = None, request_configuration: Optional[NotificationMessageTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[NotificationMessageTemplate if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.py b/msgraph/generated/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.py index ad7765362ae..90d9f11d528 100644 --- a/msgraph/generated/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[SendTestMes Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SendTestMessageRequestBuilder: diff --git a/msgraph/generated/device_management/notification_message_templates/notification_message_templates_request_builder.py b/msgraph/generated/device_management/notification_message_templates/notification_message_templates_request_builder.py index 5dd1b24e4b2..72edd196c47 100644 --- a/msgraph/generated/device_management/notification_message_templates/notification_message_templates_request_builder.py +++ b/msgraph/generated/device_management/notification_message_templates/notification_message_templates_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[Notification Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[NotificationMessageTemplate] = None, request_configuration: Optional[NotificationMessageTemplatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[NotificationMessageTemplate] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/remote_assistance_partners/count/count_request_builder.py b/msgraph/generated/device_management/remote_assistance_partners/count/count_request_builder.py index a9579ff9eb6..3fd6a3de3a5 100644 --- a/msgraph/generated/device_management/remote_assistance_partners/count/count_request_builder.py +++ b/msgraph/generated/device_management/remote_assistance_partners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.py b/msgraph/generated/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.py index e99f3896381..f91b0632324 100644 --- a/msgraph/generated/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.py +++ b/msgraph/generated/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[BeginOnboar Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> BeginOnboardingRequestBuilder: diff --git a/msgraph/generated/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.py b/msgraph/generated/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.py index 4f87131cd43..4d398e4f67b 100644 --- a/msgraph/generated/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.py +++ b/msgraph/generated/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[DisconnectR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DisconnectRequestBuilder: diff --git a/msgraph/generated/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.py b/msgraph/generated/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.py index a921beb7ce1..660facc567b 100644 --- a/msgraph/generated/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.py +++ b/msgraph/generated/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[RemoteAss Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RemoteAssistancePartnerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[RemoteAssist Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RemoteAssistancePartner] = None, request_configuration: Optional[RemoteAssistancePartnerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[RemoteAssistancePartner] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.py b/msgraph/generated/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.py index 08907b78b1c..251841a65c0 100644 --- a/msgraph/generated/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.py +++ b/msgraph/generated/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[RemoteAssist Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RemoteAssistancePartner] = None, request_configuration: Optional[RemoteAssistancePartnersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[RemoteAssistancePartner] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/export_jobs/count/count_request_builder.py b/msgraph/generated/device_management/reports/export_jobs/count/count_request_builder.py index db501e181d5..50353902f0d 100644 --- a/msgraph/generated/device_management/reports/export_jobs/count/count_request_builder.py +++ b/msgraph/generated/device_management/reports/export_jobs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/reports/export_jobs/export_jobs_request_builder.py b/msgraph/generated/device_management/reports/export_jobs/export_jobs_request_builder.py index c87d86ab20e..32ab2d92862 100644 --- a/msgraph/generated/device_management/reports/export_jobs/export_jobs_request_builder.py +++ b/msgraph/generated/device_management/reports/export_jobs/export_jobs_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ExportJobsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementExportJob] = None, request_configuration: Optional[ExportJobsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceManagementExportJob] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.py b/msgraph/generated/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.py index 7845dce445d..5a47ed22cd5 100644 --- a/msgraph/generated/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.py +++ b/msgraph/generated/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceMan Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceManagementExportJobItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementExportJob] = None, request_configuration: Optional[DeviceManagementExportJobItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagementExportJob] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_cached_report/get_cached_report_request_builder.py b/msgraph/generated/device_management/reports/get_cached_report/get_cached_report_request_builder.py index 4614711e034..1a37cced62e 100644 --- a/msgraph/generated/device_management/reports/get_cached_report/get_cached_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_cached_report/get_cached_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetCachedReportPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.py index 23d450d6e69..cd8d82980df 100644 --- a/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetCompliancePolicyNonCompli if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.py b/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.py index 2e6207d0705..453fb8b3dfb 100644 --- a/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetCompliancePolicyNonCompli if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.py index 0c22b6574b7..2ea6f696850 100644 --- a/msgraph/generated/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetComplianceSettingNonCompl if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.py index 9a716a119f4..5362ed55ba8 100644 --- a/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetConfigurationPolicyNonCom if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.py b/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.py index a2d37d73aa8..4caf32b21a9 100644 --- a/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetConfigurationPolicyNonCom if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.py index 0c4690a3f58..3a69d8cfc89 100644 --- a/msgraph/generated/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetConfigurationSettingNonCo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.py b/msgraph/generated/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.py index fe4bf1f61de..52ef22998fb 100644 --- a/msgraph/generated/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.py +++ b/msgraph/generated/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetDeviceManagementIntentPer if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.py b/msgraph/generated/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.py index ebf3abecf98..2096d5991df 100644 --- a/msgraph/generated/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetDeviceManagementIntentSet if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.py index 4e0c9e9d990..0eafff5dacc 100644 --- a/msgraph/generated/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetDeviceNonComplianceReport if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.py b/msgraph/generated/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.py index 6701e6f22f8..f54de2d7c50 100644 --- a/msgraph/generated/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetDevicesWithoutComplianceP if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_historical_report/get_historical_report_request_builder.py b/msgraph/generated/device_management/reports/get_historical_report/get_historical_report_request_builder.py index f6a186ed093..fec719c9a95 100644 --- a/msgraph/generated/device_management/reports/get_historical_report/get_historical_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_historical_report/get_historical_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetHistoricalReportPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.py b/msgraph/generated/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.py index e1b724ec2fb..b0ec4b924c4 100644 --- a/msgraph/generated/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetNoncompliantDevicesAndSet if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.py b/msgraph/generated/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.py index c63a3c2e1ba..22c9dc43a9e 100644 --- a/msgraph/generated/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.py +++ b/msgraph/generated/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetPolicyNonComplianceMetada if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.py index 0f400be0848..cdba09001a0 100644 --- a/msgraph/generated/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetPolicyNonComplianceReport if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.py b/msgraph/generated/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.py index a9611a81026..754e6039f79 100644 --- a/msgraph/generated/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetPolicyNonComplianceSummar if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_report_filters/get_report_filters_request_builder.py b/msgraph/generated/device_management/reports/get_report_filters/get_report_filters_request_builder.py index 983fc343439..356750a6723 100644 --- a/msgraph/generated/device_management/reports/get_report_filters/get_report_filters_request_builder.py +++ b/msgraph/generated/device_management/reports/get_report_filters/get_report_filters_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetReportFiltersPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.py b/msgraph/generated/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.py index ef0b07499a1..91569c3362f 100644 --- a/msgraph/generated/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.py +++ b/msgraph/generated/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[GetSettingNonComplianceRepor if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/reports/reports_request_builder.py b/msgraph/generated/device_management/reports/reports_request_builder.py index a2311f524e5..ec9f5ccfc9d 100644 --- a/msgraph/generated/device_management/reports/reports_request_builder.py +++ b/msgraph/generated/device_management/reports/reports_request_builder.py @@ -20,10 +20,10 @@ from .get_configuration_policy_non_compliance_report.get_configuration_policy_non_compliance_report_request_builder import GetConfigurationPolicyNonComplianceReportRequestBuilder from .get_configuration_policy_non_compliance_summary_report.get_configuration_policy_non_compliance_summary_report_request_builder import GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder from .get_configuration_setting_non_compliance_report.get_configuration_setting_non_compliance_report_request_builder import GetConfigurationSettingNonComplianceReportRequestBuilder + from .get_devices_without_compliance_policy_report.get_devices_without_compliance_policy_report_request_builder import GetDevicesWithoutCompliancePolicyReportRequestBuilder from .get_device_management_intent_per_setting_contributing_profiles.get_device_management_intent_per_setting_contributing_profiles_request_builder import GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder from .get_device_management_intent_settings_report.get_device_management_intent_settings_report_request_builder import GetDeviceManagementIntentSettingsReportRequestBuilder from .get_device_non_compliance_report.get_device_non_compliance_report_request_builder import GetDeviceNonComplianceReportRequestBuilder - from .get_devices_without_compliance_policy_report.get_devices_without_compliance_policy_report_request_builder import GetDevicesWithoutCompliancePolicyReportRequestBuilder from .get_historical_report.get_historical_report_request_builder import GetHistoricalReportRequestBuilder from .get_noncompliant_devices_and_settings_report.get_noncompliant_devices_and_settings_report_request_builder import GetNoncompliantDevicesAndSettingsReportRequestBuilder from .get_policy_non_compliance_metadata.get_policy_non_compliance_metadata_request_builder import GetPolicyNonComplianceMetadataRequestBuilder @@ -118,12 +118,12 @@ def to_delete_request_information(self,request_configuration: Optional[ReportsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ReportsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -133,14 +133,14 @@ def to_get_request_information(self,request_configuration: Optional[ReportsReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementReports] = None, request_configuration: Optional[ReportsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -153,13 +153,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagementReports] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/resource_operations/count/count_request_builder.py b/msgraph/generated/device_management/resource_operations/count/count_request_builder.py index 997a20b818f..d0e1b367fb5 100644 --- a/msgraph/generated/device_management/resource_operations/count/count_request_builder.py +++ b/msgraph/generated/device_management/resource_operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/resource_operations/item/resource_operation_item_request_builder.py b/msgraph/generated/device_management/resource_operations/item/resource_operation_item_request_builder.py index f5bae380f88..8687c7f2117 100644 --- a/msgraph/generated/device_management/resource_operations/item/resource_operation_item_request_builder.py +++ b/msgraph/generated/device_management/resource_operations/item/resource_operation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceO Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceOper Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceOperation] = None, request_configuration: Optional[ResourceOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ResourceOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/resource_operations/resource_operations_request_builder.py b/msgraph/generated/device_management/resource_operations/resource_operations_request_builder.py index 14c7e720ac0..3bbe4c69046 100644 --- a/msgraph/generated/device_management/resource_operations/resource_operations_request_builder.py +++ b/msgraph/generated/device_management/resource_operations/resource_operations_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceOper Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceOperation] = None, request_configuration: Optional[ResourceOperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ResourceOperation] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/role_assignments/count/count_request_builder.py b/msgraph/generated/device_management/role_assignments/count/count_request_builder.py index eb168f2cc6d..22997e36be9 100644 --- a/msgraph/generated/device_management/role_assignments/count/count_request_builder.py +++ b/msgraph/generated/device_management/role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.py b/msgraph/generated/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.py index 389586d803b..af99ffcda4f 100644 --- a/msgraph/generated/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.py +++ b/msgraph/generated/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceAnd Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceAndAppManagementRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceAndApp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceAndAppManagementRoleAssignment] = None, request_configuration: Optional[DeviceAndAppManagementRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DeviceAndAppManagementRoleA if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/role_assignments/item/role_definition/role_definition_request_builder.py b/msgraph/generated/device_management/role_assignments/item/role_definition/role_definition_request_builder.py index 54c554ea15c..8f8d8ada625 100644 --- a/msgraph/generated/device_management/role_assignments/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/device_management/role_assignments/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/device_management/role_assignments/role_assignments_request_builder.py b/msgraph/generated/device_management/role_assignments/role_assignments_request_builder.py index e9cd0084ab7..e3ace72ed13 100644 --- a/msgraph/generated/device_management/role_assignments/role_assignments_request_builder.py +++ b/msgraph/generated/device_management/role_assignments/role_assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleAssignme Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceAndAppManagementRoleAssignment] = None, request_configuration: Optional[RoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeviceAndAppManagementRoleAs if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/role_definitions/count/count_request_builder.py b/msgraph/generated/device_management/role_definitions/count/count_request_builder.py index 4d7c221ffb6..4da18899374 100644 --- a/msgraph/generated/device_management/role_definitions/count/count_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/role_definitions/item/role_assignments/count/count_request_builder.py b/msgraph/generated/device_management/role_definitions/item/role_assignments/count/count_request_builder.py index bde421ab860..cc5cb9e8a56 100644 --- a/msgraph/generated/device_management/role_definitions/item/role_assignments/count/count_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/item/role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.py b/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.py index 848920d0340..8369d85a406 100644 --- a/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[RoleAssig Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleAssignme Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RoleAssignment] = None, request_configuration: Optional[RoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[RoleAssignment] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.py b/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.py index cd1fb683741..cb0265508ab 100644 --- a/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.py b/msgraph/generated/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.py index 87eafdadd17..f08c65540ca 100644 --- a/msgraph/generated/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleAssignme Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RoleAssignment] = None, request_configuration: Optional[RoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[RoleAssignment] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 08a99c10307..d98f8717b99 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 @@ -29,10 +29,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RoleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a roleDefinition. + Deletes a deviceAndAppManagementRoleDefinition. 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-rbac-roledefinition-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-deviceandappmanagementroledefinition-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -96,17 +96,17 @@ async def patch(self,body: Optional[RoleDefinition] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[RoleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a roleDefinition. + Deletes a deviceAndAppManagementRoleDefinition. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RoleDefinition] = None, request_configuration: Optional[RoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[RoleDefinition] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 3038d737756..3c3f24ef9b2 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 @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[RoleDefinition] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/software_update_status_summary/software_update_status_summary_request_builder.py b/msgraph/generated/device_management/software_update_status_summary/software_update_status_summary_request_builder.py index ecef3679229..9960ef4d0e3 100644 --- a/msgraph/generated/device_management/software_update_status_summary/software_update_status_summary_request_builder.py +++ b/msgraph/generated/device_management/software_update_status_summary/software_update_status_summary_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[SoftwareUpda Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SoftwareUpdateStatusSummaryRequestBuilder: diff --git a/msgraph/generated/device_management/telecom_expense_management_partners/count/count_request_builder.py b/msgraph/generated/device_management/telecom_expense_management_partners/count/count_request_builder.py index 80d09973d84..496e1cd1f35 100644 --- a/msgraph/generated/device_management/telecom_expense_management_partners/count/count_request_builder.py +++ b/msgraph/generated/device_management/telecom_expense_management_partners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.py b/msgraph/generated/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.py index 2f1f8d8f8a8..cbcb566ed57 100644 --- a/msgraph/generated/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.py +++ b/msgraph/generated/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TelecomEx Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TelecomExpenseManagementPartnerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TelecomExpen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TelecomExpenseManagementPartner] = None, request_configuration: Optional[TelecomExpenseManagementPartnerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TelecomExpenseManagementPar if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.py b/msgraph/generated/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.py index 7cdbba84eb0..08420adb52b 100644 --- a/msgraph/generated/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.py +++ b/msgraph/generated/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[TelecomExpen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TelecomExpenseManagementPartner] = None, request_configuration: Optional[TelecomExpenseManagementPartnersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TelecomExpenseManagementPart if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/terms_and_conditions/count/count_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/count/count_request_builder.py index 4f708abdb46..f211c1b5225 100644 --- a/msgraph/generated/device_management/terms_and_conditions/count/count_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.py index c03dc5440e0..89331026bdc 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AcceptanceSt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsAndConditionsAcceptanceStatus] = None, request_configuration: Optional[AcceptanceStatusesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TermsAndConditionsAcceptance if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.py index a7f9c5e226f..1dea747c3a9 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.py index 9d9d92c0f29..ca9e8314a1f 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TermsAndCond Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TermsAndConditionsRequestBuilder: diff --git a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.py index 4b50b4fad60..e5974086456 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermsAndC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermsAndConditionsAcceptanceStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[TermsAndCond Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsAndConditionsAcceptanceStatus] = None, request_configuration: Optional[TermsAndConditionsAcceptanceStatusItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TermsAndConditionsAcceptanc if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/terms_and_conditions/item/assignments/assignments_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/assignments/assignments_request_builder.py index 30443ece4b0..64d41abde7f 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/assignments/assignments_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsAndConditionsAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TermsAndConditionsAssignment if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/terms_and_conditions/item/assignments/count/count_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/assignments/count/count_request_builder.py index a6e3f33e632..5f8bda4af66 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.py index 01af6063836..666209f7cc5 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermsAndC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermsAndConditionsAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermsAndCond Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsAndConditionsAssignment] = None, request_configuration: Optional[TermsAndConditionsAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TermsAndConditionsAssignmen if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.py index 48c0613ee8b..4d3f009e1d8 100644 --- a/msgraph/generated/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermsAndC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermsAndConditionsItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[TermsAndCond Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsAndConditions] = None, request_configuration: Optional[TermsAndConditionsItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TermsAndConditions] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/terms_and_conditions/terms_and_conditions_request_builder.py b/msgraph/generated/device_management/terms_and_conditions/terms_and_conditions_request_builder.py index eeed6dfc8ce..d453b02183e 100644 --- a/msgraph/generated/device_management/terms_and_conditions/terms_and_conditions_request_builder.py +++ b/msgraph/generated/device_management/terms_and_conditions/terms_and_conditions_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[TermsAndCond Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsAndConditions] = None, request_configuration: Optional[TermsAndConditionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TermsAndConditions] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/troubleshooting_events/count/count_request_builder.py b/msgraph/generated/device_management/troubleshooting_events/count/count_request_builder.py index 455664ca467..13b20bcb93a 100644 --- a/msgraph/generated/device_management/troubleshooting_events/count/count_request_builder.py +++ b/msgraph/generated/device_management/troubleshooting_events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py b/msgraph/generated/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py index cfb84494444..898c4d8e2d3 100644 --- a/msgraph/generated/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py +++ b/msgraph/generated/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceMan Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceManagementTroubleshootingEventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementTroubleshootingEvent] = None, request_configuration: Optional[DeviceManagementTroubleshootingEventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagementTroubleshoo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/troubleshooting_events/troubleshooting_events_request_builder.py b/msgraph/generated/device_management/troubleshooting_events/troubleshooting_events_request_builder.py index 6d005e68e70..a2ad4a0c6a5 100644 --- a/msgraph/generated/device_management/troubleshooting_events/troubleshooting_events_request_builder.py +++ b/msgraph/generated/device_management/troubleshooting_events/troubleshooting_events_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Troubleshoot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementTroubleshootingEvent] = None, request_configuration: Optional[TroubleshootingEventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceManagementTroubleshoot if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.py index ce09ce924e2..e3a61372634 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.py index 660b7b75d9b..e4f6563e11d 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthApplicationPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.py index 61c6a7e3a12..aaf652e9e13 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthApplicationPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.py index 3150823cf27..c5ed1a8fc34 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/user_experience_analytics_app_health_app_performance_by_app_version_details_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/user_experience_analytics_app_health_app_performance_by_app_version_details_item_request_builder.py index 1f16078917d..7f158e390c8 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/user_experience_analytics_app_health_app_performance_by_app_version_details_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/user_experience_analytics_app_health_app_performance_by_app_version_details_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/user_experience_analytics_app_health_application_performance_by_app_version_details_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/user_experience_analytics_app_health_application_performance_by_app_version_details_request_builder.py index a7c4671c771..0707dae8ae4 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/user_experience_analytics_app_health_application_performance_by_app_version_details_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/user_experience_analytics_app_health_application_performance_by_app_version_details_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.py index 90179f52d0f..942804371a1 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/user_experience_analytics_app_health_app_performance_by_app_version_device_id_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/user_experience_analytics_app_health_app_performance_by_app_version_device_id_item_request_builder.py index 7b76649b7b4..cd7ffdefd31 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/user_experience_analytics_app_health_app_performance_by_app_version_device_id_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/user_experience_analytics_app_health_app_performance_by_app_version_device_id_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/user_experience_analytics_app_health_application_performance_by_app_version_device_id_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/user_experience_analytics_app_health_application_performance_by_app_version_device_id_request_builder.py index aadbb176ad6..aa4e78d7df2 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/user_experience_analytics_app_health_application_performance_by_app_version_device_id_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/user_experience_analytics_app_health_application_performance_by_app_version_device_id_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.py index 0db891fa158..cab7f5ea2fa 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.py index 7eab1a3cedb..0a065fe443c 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.py index f7b7e238753..8381c715263 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.py index 95f6b9ead8b..3e5a4b8f286 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.py index 50399c812b7..c8194b238de 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthDeviceModelPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.py index 80f09d0b45a..38d40e2c29c 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthDeviceModelPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.py index 96ff48747c7..0e6a1c000ce 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.py index 547d0fc7339..acbeab5d910 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthDevicePerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.py index e03002be289..a0ceed46c41 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthDevicePerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.py index 1d1d8e582df..4b0706dac5d 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.py index 668ff897054..c41a29f120d 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthDevicePerformanceDetails] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.py index 33003299c80..319f5e77d3e 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthDevicePerformanceDetails] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.py index df6b57a27cb..08bb7f4e2c8 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.py index 1023e904d47..dad47dfce62 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthOSVersionPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsAppH if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.py index 997b47de868..174fbd330b3 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsAppHealthOSVersionPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsAppHe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.py index e7c1088c856..db7a821188f 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.py index 3d51f16a033..9762ed7a36e 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsMetric] = None, request_configuration: Optional[UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsMetr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.py index e4e2e1ad3aa..f26c05bd072 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[MetricValues Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsMetric] = None, request_configuration: Optional[MetricValuesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsMetri if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.py index a01a9961dee..36592c228f3 100644 --- a/msgraph/generated/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsCategory] = None, request_configuration: Optional[UserExperienceAnalyticsAppHealthOverviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsCate if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/count/count_request_builder.py index 54f95d6f358..ff2bd0fcb6b 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.py index 7808a2e6fa0..04fa8f8b2b1 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppHealthMet Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppHealthMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.py index 78ef0e4d121..0255230b38a 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BatteryHealt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BatteryHealthMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.py index e0d35a7495d..7c29094fe19 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BestPractice Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BestPracticesMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.py index 52bf2d68551..ada596d700a 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceBootPe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeviceBootPerformanceMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.py index 90ff4bc7e8a..4af53d66632 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RebootAnalyt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RebootAnalyticsMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.py index 786dc5b1e29..6ecf7306d0d 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourcePerf Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ResourcePerformanceMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.py index 35445769a39..9fbc60c2386 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.py @@ -104,12 +104,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsBaselineItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -119,14 +119,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsBaseline] = None, request_configuration: Optional[UserExperienceAnalyticsBaselineItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsBase if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.py index 6e2071e155b..2016dd1ac75 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorkFromAnyw Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkFromAnywhereMetricsRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.py index c9518bb91d9..824c0c32ba9 100644 --- a/msgraph/generated/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsBaseline] = None, request_configuration: Optional[UserExperienceAnalyticsBaselinesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsBasel if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_categories/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_categories/count/count_request_builder.py index 83d7dda2eac..4d5f4ac1659 100644 --- a/msgraph/generated/device_management/user_experience_analytics_categories/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.py index 94624ec5b67..6dcd49f168c 100644 --- a/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.py index 45d59d55012..fec1aa0ce47 100644 --- a/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsMetric] = None, request_configuration: Optional[UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsMetr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.py index 97ac0453336..3886c55daed 100644 --- a/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[MetricValues Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsMetric] = None, request_configuration: Optional[MetricValuesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsMetri if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.py index aae96ac1f85..1a6e4baebfe 100644 --- a/msgraph/generated/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsCategory] = None, request_configuration: Optional[UserExperienceAnalyticsCategoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsCate if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.py index 329d7834a70..08432ff0645 100644 --- a/msgraph/generated/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsCategory] = None, request_configuration: Optional[UserExperienceAnalyticsCategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsCateg if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_performance/count/count_request_builder.py index 0bd48ba85e5..2a891c0f5cb 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.py index 4426f0d319d..a872e5ab29b 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDevicePerformance] = None, request_configuration: Optional[UserExperienceAnalyticsDevicePerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsDevi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_response.py b/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_get_response.py similarity index 92% rename from msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_response.py rename to msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_get_response.py index 471e8281a73..5d94d63a09a 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_response.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SummarizeDevicePerformanceDevicesWithSummarizeByResponse(BaseCollectionPaginationCountResponse): +class SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UserExperienceAnalyticsDevicePerformance]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SummarizeDevicePerformanceDevicesWithSummarizeByResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SummarizeDevicePerformanceDevicesWithSummarizeByResponse + Returns: SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SummarizeDevicePerformanceDevicesWithSummarizeByResponse() + return SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.py index 432a04d03a2..75715fdb849 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .summarize_device_performance_devices_with_summarize_by_response import SummarizeDevicePerformanceDevicesWithSummarizeByResponse + from .summarize_device_performance_devices_with_summarize_by_get_response import SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse class SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param summarize_by: Usage: summarizeBy='{summarizeBy}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['summarize_by'] = str(summarize_by) super().__init__(request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/summarizeDevicePerformanceDevices(summarizeBy='{summarizeBy}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration] = None) -> Optional[SummarizeDevicePerformanceDevicesWithSummarizeByResponse]: + async def get(self,request_configuration: Optional[SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration] = None) -> Optional[SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse]: """ Invoke function summarizeDevicePerformanceDevices param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SummarizeDevicePerformanceDevicesWithSummarizeByResponse] + Returns: Optional[SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[SummarizeDevicePerformanceDev } if not self.request_adapter: raise Exception("Http core is null") - from .summarize_device_performance_devices_with_summarize_by_response import SummarizeDevicePerformanceDevicesWithSummarizeByResponse + from .summarize_device_performance_devices_with_summarize_by_get_response import SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse - return await self.request_adapter.send_async(request_info, SummarizeDevicePerformanceDevicesWithSummarizeByResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[SummarizeDev Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.py index 78ea128b707..28fdf737c98 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.py @@ -108,14 +108,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDevicePerformance] = None, request_configuration: Optional[UserExperienceAnalyticsDevicePerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -128,13 +128,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_scores/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_scores/count/count_request_builder.py index ea5467f4fba..0fa2f26e707 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_scores/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_scores/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.py index 32335632e45..19d59f3a267 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceScores] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceScoresItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsDevi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.py index ac80e5c6dc2..345663192c8 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceScores] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceScoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.py index c6ca399959a..678f5ce3249 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.py index af11f048e0f..554d1505f7c 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceStartupHistory] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsDevi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.py index e090a19ccfc..dd06da51962 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceStartupHistory] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.py index ad0ff8aec40..e801e048f9b 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.py index 12d5cd431cd..47e54171595 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceStartupProcessPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsDevi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.py index 8408fc39e3d..34951555871 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceStartupProcessPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.py index 019526347af..8f58c2e3954 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.py index c0a51e35c23..20502f49bd5 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceStartupProcess] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsDevi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.py index c8a0fd216df..5ef33e42106 100644 --- a/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsDeviceStartupProcess] = None, request_configuration: Optional[UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_metric_history/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_metric_history/count/count_request_builder.py index 64e30fd3fc3..9a91bf10e70 100644 --- a/msgraph/generated/device_management/user_experience_analytics_metric_history/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_metric_history/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.py index c218053e69c..34b7e7235d1 100644 --- a/msgraph/generated/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsMetricHistory] = None, request_configuration: Optional[UserExperienceAnalyticsMetricHistoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsMetr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.py index 15eb623cc49..189251a0945 100644 --- a/msgraph/generated/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsMetricHistory] = None, request_configuration: Optional[UserExperienceAnalyticsMetricHistoryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsMetri if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_model_scores/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_model_scores/count/count_request_builder.py index 7e7aa4fcc67..d64c712e784 100644 --- a/msgraph/generated/device_management/user_experience_analytics_model_scores/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_model_scores/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.py index 1c9a6e240f8..a4b6b61762f 100644 --- a/msgraph/generated/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsModelScoresItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsModelScores] = None, request_configuration: Optional[UserExperienceAnalyticsModelScoresItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsMode if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.py index 528337a1d05..9ee143d05d6 100644 --- a/msgraph/generated/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsModelScores] = None, request_configuration: Optional[UserExperienceAnalyticsModelScoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsModel if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.py index 762cd4da8df..6a0c6f608ba 100644 --- a/msgraph/generated/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsOverviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsOverview] = None, request_configuration: Optional[UserExperienceAnalyticsOverviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsOver if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_score_history/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_score_history/count/count_request_builder.py index 971ee711c7c..25b8f9dbbbc 100644 --- a/msgraph/generated/device_management/user_experience_analytics_score_history/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_score_history/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.py index 3949626fd4d..a724a18c14d 100644 --- a/msgraph/generated/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsScoreHistory] = None, request_configuration: Optional[UserExperienceAnalyticsScoreHistoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsScor if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.py index 294993703c2..5e61a831412 100644 --- a/msgraph/generated/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsScoreHistory] = None, request_configuration: Optional[UserExperienceAnalyticsScoreHistoryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsScore if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.py index f94b1f48fc6..f4d6aaec742 100644 --- a/msgraph/generated/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.py index 25ce8d7cab4..b5c09d67982 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric] = None, request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsWork if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.py index af91c0ffc5b..302478af993 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.py index 71bbcc48e0f..1da4e359360 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.py index 61809c721e1..0099ea7ee1b 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereDevice] = None, request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsWork if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.py index bd80734dcae..86c49ffbf3a 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[MetricDevice Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereDevice] = None, request_configuration: Optional[MetricDevicesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsWorkF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.py index 2f443a4b872..f3cf08b2542 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereMetric] = None, request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsWork if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.py index 8588c2c0341..41ff2df365c 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereMetric] = None, request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsWorkF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.py index ca12f5d7153..004e359dc10 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.py index 42ef863bbd8..03419deb9bd 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserExper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereModelPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserExperienceAnalyticsWork if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.py b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.py index 0cbe4ad98a1..b4ac233814a 100644 --- a/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.py +++ b/msgraph/generated/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[UserExperien Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserExperienceAnalyticsWorkFromAnywhereModelPerformance] = None, request_configuration: Optional[UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserExperienceAnalyticsWorkF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_response.py b/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_get_response.py similarity index 93% rename from msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_response.py rename to msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_get_response.py index c7ce50e3028..abc51222230 100644 --- a/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_response.py +++ b/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse(AdditionalDataHolder, BackedModel, Parsable): +class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse(AdditionalDataH value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse + Returns: VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse() + return VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.py b/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.py index f09dff4c3f2..19cf73714e0 100644 --- a/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.py +++ b/msgraph/generated/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .verify_windows_enrollment_auto_discovery_with_domain_name_response import VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse + from .verify_windows_enrollment_auto_discovery_with_domain_name_get_response import VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['domain_name'] = str(domain_name) super().__init__(request_adapter, "{+baseurl}/deviceManagement/verifyWindowsEnrollmentAutoDiscovery(domainName='{domainName}')", path_parameters) - async def get(self,request_configuration: Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilderGetRequestConfiguration] = None) -> Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse]: + async def get(self,request_configuration: Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilderGetRequestConfiguration] = None) -> Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse]: """ Invoke function verifyWindowsEnrollmentAutoDiscovery param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse] + Returns: Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[VerifyWindowsEnrollmentAutoDi } if not self.request_adapter: raise Exception("Http core is null") - from .verify_windows_enrollment_auto_discovery_with_domain_name_response import VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse + from .verify_windows_enrollment_auto_discovery_with_domain_name_get_response import VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse - return await self.request_adapter.send_async(request_info, VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[VerifyWindow Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilder: diff --git a/msgraph/generated/device_management/windows_autopilot_device_identities/count/count_request_builder.py b/msgraph/generated/device_management/windows_autopilot_device_identities/count/count_request_builder.py index a086987afc7..a8a9cfedd1d 100644 --- a/msgraph/generated/device_management/windows_autopilot_device_identities/count/count_request_builder.py +++ b/msgraph/generated/device_management/windows_autopilot_device_identities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.py b/msgraph/generated/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.py index c8d43b2e231..040d7e4a87b 100644 --- a/msgraph/generated/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.py +++ b/msgraph/generated/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssignUserToDevicePostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.py b/msgraph/generated/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.py index 144ee3996e4..a7272b22a2f 100644 --- a/msgraph/generated/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.py +++ b/msgraph/generated/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[UnassignUse Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnassignUserFromDeviceRequestBuilder: diff --git a/msgraph/generated/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.py b/msgraph/generated/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.py index a2efe4f9bed..c60bca1290a 100644 --- a/msgraph/generated/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.py +++ b/msgraph/generated/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpdateDevicePropertiesPostRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.py b/msgraph/generated/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.py index 1398ab915b7..9a101db862c 100644 --- a/msgraph/generated/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.py +++ b/msgraph/generated/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsAu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsAutopilotDeviceIdentityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsAutop Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsAutopilotDeviceIdentity] = None, request_configuration: Optional[WindowsAutopilotDeviceIdentityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[WindowsAutopilotDeviceIdent if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.py b/msgraph/generated/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.py index 20d0a071e64..da9e85c617b 100644 --- a/msgraph/generated/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.py +++ b/msgraph/generated/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsAutop Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsAutopilotDeviceIdentity] = None, request_configuration: Optional[WindowsAutopilotDeviceIdentitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsAutopilotDeviceIdenti if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.py b/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.py index fbd2e4fa16c..ccd4356db07 100644 --- a/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.py +++ b/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.py b/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.py index 70b595fc95f..987fa8ca5bb 100644 --- a/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.py +++ b/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionAppLearningSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLearningSummary] = None, request_configuration: Optional[WindowsInformationProtectionAppLearningSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.py b/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.py index 512398b9aa2..1f0bd35f1dc 100644 --- a/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.py +++ b/msgraph/generated/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionAppLearningSummary] = None, request_configuration: Optional[WindowsInformationProtectionAppLearningSummariesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.py b/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.py index 193ae6332f2..e2ae63fb56f 100644 --- a/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.py +++ b/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.py b/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.py index 1093c9adc72..fb4eb3285ac 100644 --- a/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.py +++ b/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionNetworkLearningSummary] = None, request_configuration: Optional[WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WindowsInformationProtectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.py b/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.py index 3ff09a89689..b7113f2d8fd 100644 --- a/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.py +++ b/msgraph/generated/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsInfor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsInformationProtectionNetworkLearningSummary] = None, request_configuration: Optional[WindowsInformationProtectionNetworkLearningSummariesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsInformationProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_malware_information/count/count_request_builder.py b/msgraph/generated/device_management/windows_malware_information/count/count_request_builder.py index 40c97fc5449..b0d79ddcce7 100644 --- a/msgraph/generated/device_management/windows_malware_information/count/count_request_builder.py +++ b/msgraph/generated/device_management/windows_malware_information/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.py b/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.py index 0f1d7d2a340..fdf9ecaac50 100644 --- a/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.py +++ b/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.py b/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.py index 7a2f386ef56..dc894bf63a3 100644 --- a/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.py +++ b/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceMalwar Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MalwareStateForWindowsDevice] = None, request_configuration: Optional[DeviceMalwareStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MalwareStateForWindowsDevice if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.py b/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.py index 58577b9c01b..f1fba909d14 100644 --- a/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.py +++ b/msgraph/generated/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[MalwareSt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MalwareStateForWindowsDeviceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[MalwareState Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MalwareStateForWindowsDevice] = None, request_configuration: Optional[MalwareStateForWindowsDeviceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[MalwareStateForWindowsDevic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.py b/msgraph/generated/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.py index ed16c2516f8..19311f04ae5 100644 --- a/msgraph/generated/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.py +++ b/msgraph/generated/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsMa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsMalwareInformationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsMalwa Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsMalwareInformation] = None, request_configuration: Optional[WindowsMalwareInformationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WindowsMalwareInformation] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/device_management/windows_malware_information/windows_malware_information_request_builder.py b/msgraph/generated/device_management/windows_malware_information/windows_malware_information_request_builder.py index d84ae7e5632..b4c5dc9008a 100644 --- a/msgraph/generated/device_management/windows_malware_information/windows_malware_information_request_builder.py +++ b/msgraph/generated/device_management/windows_malware_information/windows_malware_information_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsMalwa Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsMalwareInformation] = None, request_configuration: Optional[WindowsMalwareInformationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsMalwareInformation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/count/count_request_builder.py b/msgraph/generated/devices/count/count_request_builder.py index 44e57852727..5ec5de21246 100644 --- a/msgraph/generated/devices/count/count_request_builder.py +++ b/msgraph/generated/devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/delta/delta_response.py b/msgraph/generated/devices/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/devices/delta/delta_response.py rename to msgraph/generated/devices/delta/delta_get_response.py index 3a9c79696cf..6319f60d925 100644 --- a/msgraph/generated/devices/delta/delta_response.py +++ b/msgraph/generated/devices/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Device]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/devices/delta/delta_request_builder.py b/msgraph/generated/devices/delta/delta_request_builder.py index 0cb2cd1877e..8925f87f04b 100644 --- a/msgraph/generated/devices/delta/delta_request_builder.py +++ b/msgraph/generated/devices/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/devices/devices_request_builder.py b/msgraph/generated/devices/devices_request_builder.py index 9aa4d75d757..7f02e66ad98 100644 --- a/msgraph/generated/devices/devices_request_builder.py +++ b/msgraph/generated/devices/devices_request_builder.py @@ -49,7 +49,7 @@ def by_device_id(self,device_id: str) -> DeviceItemRequestBuilder: async def get(self,request_configuration: Optional[DevicesRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceCollectionResponse]: """ - Retrieve a list of device objects registered in the organization. + Retrieve a list of device objects registered in the organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/device-list?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[DevicesRequestBuilderGetReque async def post(self,body: Optional[Device] = None, request_configuration: Optional[DevicesRequestBuilderPostRequestConfiguration] = None) -> Optional[Device]: """ - Create and register a new device in the organization. + Create and register a new device in the organization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Device] @@ -96,24 +96,24 @@ async def post(self,body: Optional[Device] = None, request_configuration: Option def to_get_request_information(self,request_configuration: Optional[DevicesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of device objects registered in the organization. + Retrieve a list of device objects registered in the organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Device] = None, request_configuration: Optional[DevicesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create and register a new device in the organization. + Create and register a new device in the organization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -121,13 +121,13 @@ def to_post_request_information(self,body: Optional[Device] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -189,7 +189,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class DevicesRequestBuilderGetQueryParameters(): """ - Retrieve a list of device objects registered in the organization. + Retrieve a list of device objects registered in the organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_post_response.py similarity index 89% rename from msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_response.py rename to msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_post_response.py index bbc810c760f..4811ce7ed9a 100644 --- a/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_response.py +++ b/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExtensionProperty]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse + Returns: GetAvailableExtensionPropertiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() + return GetAvailableExtensionPropertiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_request_builder.py index afbb86f64a9..7e2f966f1f8 100644 --- a/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/devices/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/get_by_ids/get_by_ids_response.py b/msgraph/generated/devices/get_by_ids/get_by_ids_post_response.py similarity index 92% rename from msgraph/generated/devices/get_by_ids/get_by_ids_response.py rename to msgraph/generated/devices/get_by_ids/get_by_ids_post_response.py index 3628311761a..11bb9a8ae29 100644 --- a/msgraph/generated/devices/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/devices/get_by_ids/get_by_ids_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: GetByIdsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return GetByIdsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/devices/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/devices/get_by_ids/get_by_ids_request_builder.py index 66319577d37..89408c8414e 100644 --- a/msgraph/generated/devices/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/devices/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/devices/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/devices/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/devices/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/devices/item/check_member_groups/check_member_groups_request_builder.py index 795e8131891..26812092055 100644 --- a/msgraph/generated/devices/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/devices/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/{device%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/devices/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/devices/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/devices/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/devices/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/devices/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/devices/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/devices/item/check_member_objects/check_member_objects_request_builder.py index acf4d0bdfe7..60338d2a4bb 100644 --- a/msgraph/generated/devices/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/devices/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/{device%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/devices/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/devices/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/devices/item/device_item_request_builder.py b/msgraph/generated/devices/item/device_item_request_builder.py index 7fe37651648..c3dd6c3c206 100644 --- a/msgraph/generated/devices/item/device_item_request_builder.py +++ b/msgraph/generated/devices/item/device_item_request_builder.py @@ -38,7 +38,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DeviceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a registered device. + Delete a registered device. This API is available in the following national cloud deployments. 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/device-delete?view=graph-rest-1.0 @@ -58,7 +58,7 @@ async def delete(self,request_configuration: Optional[DeviceItemRequestBuilderDe async def get(self,request_configuration: Optional[DeviceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Device]: """ - Get the properties and relationships of a device object. + Get the properties and relationships of a device object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Device] Find more info here: https://learn.microsoft.com/graph/api/device-get?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[DeviceItemRequestBuilderGetRe async def patch(self,body: Optional[Device] = None, request_configuration: Optional[DeviceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Device]: """ - Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. + Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Device] @@ -105,39 +105,39 @@ async def patch(self,body: Optional[Device] = None, request_configuration: Optio def to_delete_request_information(self,request_configuration: Optional[DeviceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a registered device. + Delete a registered device. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a device object. + Get the properties and relationships of a device object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Device] = None, request_configuration: Optional[DeviceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. + Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -145,13 +145,13 @@ def to_patch_request_information(self,body: Optional[Device] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -268,7 +268,7 @@ class DeviceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguratio @dataclass class DeviceItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a device object. + Get the properties and relationships of a device object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/devices/item/extensions/count/count_request_builder.py b/msgraph/generated/devices/item/extensions/count/count_request_builder.py index 9a0424390da..9b8147b19a2 100644 --- a/msgraph/generated/devices/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/devices/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/extensions/extensions_request_builder.py b/msgraph/generated/devices/item/extensions/extensions_request_builder.py index 795a07d1f27..1530380c779 100644 --- a/msgraph/generated/devices/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/devices/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/devices/item/extensions/item/extension_item_request_builder.py index ff93df8f39c..0fbcde4c7b8 100644 --- a/msgraph/generated/devices/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/devices/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/applications/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/devices/item/get_member_groups/get_member_groups_post_response.py similarity index 90% rename from msgraph/generated/applications/item/check_member_groups/check_member_groups_response.py rename to msgraph/generated/devices/item/get_member_groups/get_member_groups_post_response.py index 0db69ab16a2..cfbe18b3b1a 100644 --- a/msgraph/generated/applications/item/check_member_groups/check_member_groups_response.py +++ b/msgraph/generated/devices/item/get_member_groups/get_member_groups_post_response.py @@ -9,20 +9,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse + Returns: GetMemberGroupsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() + return GetMemberGroupsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/devices/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/devices/item/get_member_groups/get_member_groups_request_builder.py index cc0ec9a1d43..9205c128ac1 100644 --- a/msgraph/generated/devices/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/devices/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/{device%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/devices/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/devices/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/devices/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/devices/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/devices/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/devices/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/devices/item/get_member_objects/get_member_objects_request_builder.py index 205732e64b5..6087b2a2fa3 100644 --- a/msgraph/generated/devices/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/devices/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/devices/{device%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/devices/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/devices/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/devices/item/member_of/count/count_request_builder.py b/msgraph/generated/devices/item/member_of/count/count_request_builder.py index 127eb8b1a2a..47a908e4a8c 100644 --- a/msgraph/generated/devices/item/member_of/count/count_request_builder.py +++ b/msgraph/generated/devices/item/member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/devices/item/member_of/graph_administrative_unit/count/count_request_builder.py index caca426470b..23f965097b2 100644 --- a/msgraph/generated/devices/item/member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/devices/item/member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index a256bb703fc..8fdcc51eacb 100644 --- a/msgraph/generated/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/graph_group/count/count_request_builder.py b/msgraph/generated/devices/item/member_of/graph_group/count/count_request_builder.py index 886724c99ce..83f5f9c590e 100644 --- a/msgraph/generated/devices/item/member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/devices/item/member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/devices/item/member_of/graph_group/graph_group_request_builder.py index bda7cef095e..9b56a22daed 100644 --- a/msgraph/generated/devices/item/member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/devices/item/member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/item/directory_object_item_request_builder.py b/msgraph/generated/devices/item/member_of/item/directory_object_item_request_builder.py index 18f9e4c54b2..b73ac7b3323 100644 --- a/msgraph/generated/devices/item/member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/devices/item/member_of/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index d0b5a592367..9fcd212afd8 100644 --- a/msgraph/generated/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/devices/item/member_of/item/graph_group/graph_group_request_builder.py index 2b520263dc6..fa5158a9c89 100644 --- a/msgraph/generated/devices/item/member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/devices/item/member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/devices/item/member_of/member_of_request_builder.py b/msgraph/generated/devices/item/member_of/member_of_request_builder.py index 011525ddc79..2c5d7025537 100644 --- a/msgraph/generated/devices/item/member_of/member_of_request_builder.py +++ b/msgraph/generated/devices/item/member_of/member_of_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[MemberOfRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MemberOfRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/count/count_request_builder.py b/msgraph/generated/devices/item/registered_owners/count/count_request_builder.py index a3319277711..1164372be90 100644 --- a/msgraph/generated/devices/item/registered_owners/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.py index 2e2d1f6b28d..af6c1b397b2 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 691c1fbf69e..3924584541c 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_endpoint/count/count_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_endpoint/count/count_request_builder.py index c859bc63724..b97d4d24c8f 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.py index 042b2f38923..d8b344a139d 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_service_principal/count/count_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_service_principal/count/count_request_builder.py index a8dcb962c64..2187034d47a 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.py index 4414a2cef82..dbd325aa368 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_user/count/count_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_user/count/count_request_builder.py index 3b5383bbcf5..441791baed9 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_user/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/graph_user/graph_user_request_builder.py b/msgraph/generated/devices/item/registered_owners/graph_user/graph_user_request_builder.py index eb0549ec18b..d991146e9a5 100644 --- a/msgraph/generated/devices/item/registered_owners/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 69bdbc3b5ec..0f99854e092 100644 --- a/msgraph/generated/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.py index e1a60dda816..85652c8dcc7 100644 --- a/msgraph/generated/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.py index e3e19a6b3fc..165572596a2 100644 --- a/msgraph/generated/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/item/graph_user/graph_user_request_builder.py b/msgraph/generated/devices/item/registered_owners/item/graph_user/graph_user_request_builder.py index 6285a3b0e9c..7424a74da02 100644 --- a/msgraph/generated/devices/item/registered_owners/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_owners/item/ref/ref_request_builder.py b/msgraph/generated/devices/item/registered_owners/item/ref/ref_request_builder.py index bb9fbd1925e..d7c32530e77 100644 --- a/msgraph/generated/devices/item/registered_owners/item/ref/ref_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a user as a registered owner of the device. + Remove a user as a registered owner of the device. This API is available in the following national cloud deployments. 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/device-delete-registeredowners?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a user as a registered owner of the device. + Remove a user as a registered owner of the device. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a user as a registered owner of the device. + Remove a user as a registered owner of the device. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/devices/item/registered_owners/ref/ref_request_builder.py b/msgraph/generated/devices/item/registered_owners/ref/ref_request_builder.py index 545f1e5e25f..d61667f28d3 100644 --- a/msgraph/generated/devices/item/registered_owners/ref/ref_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a user as a registered owner of the device. + Add a user as a registered owner of the device. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a user as a registered owner of the device. + Add a user as a registered owner of the device. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/registered_owners/registered_owners_request_builder.py b/msgraph/generated/devices/item/registered_owners/registered_owners_request_builder.py index 3350391c2ff..104e91ab872 100644 --- a/msgraph/generated/devices/item/registered_owners/registered_owners_request_builder.py +++ b/msgraph/generated/devices/item/registered_owners/registered_owners_request_builder.py @@ -76,14 +76,14 @@ def to_get_request_information(self,request_configuration: Optional[RegisteredOw Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RegisteredOwnersRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/count/count_request_builder.py b/msgraph/generated/devices/item/registered_users/count/count_request_builder.py index c1b37b8bfb7..9b0945ef6d7 100644 --- a/msgraph/generated/devices/item/registered_users/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.py index f3dd9efa77e..f0aba050006 100644 --- a/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 211ea965002..777eddb3c6c 100644 --- a/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_endpoint/count/count_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_endpoint/count/count_request_builder.py index e5bcfc3c80e..63292a4fd0c 100644 --- a/msgraph/generated/devices/item/registered_users/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.py index c13cf538785..88c2133d46f 100644 --- a/msgraph/generated/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_service_principal/count/count_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_service_principal/count/count_request_builder.py index 7512d2c1e9b..1645f1fdeb3 100644 --- a/msgraph/generated/devices/item/registered_users/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.py index 3b477a74ae6..597318772db 100644 --- a/msgraph/generated/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_user/count/count_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_user/count/count_request_builder.py index 472c87f5be4..4e1a512c7c1 100644 --- a/msgraph/generated/devices/item/registered_users/graph_user/count/count_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/graph_user/graph_user_request_builder.py b/msgraph/generated/devices/item/registered_users/graph_user/graph_user_request_builder.py index a2472abc732..b754bfb280a 100644 --- a/msgraph/generated/devices/item/registered_users/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index fb2813c9306..6d06b9b1378 100644 --- a/msgraph/generated/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.py index aea65a30635..5aaa6160fff 100644 --- a/msgraph/generated/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.py index ba08f0dbf72..393fa260c08 100644 --- a/msgraph/generated/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/item/graph_user/graph_user_request_builder.py b/msgraph/generated/devices/item/registered_users/item/graph_user/graph_user_request_builder.py index 4de1a5bb827..37971935fc6 100644 --- a/msgraph/generated/devices/item/registered_users/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/devices/item/registered_users/item/ref/ref_request_builder.py b/msgraph/generated/devices/item/registered_users/item/ref/ref_request_builder.py index 08dbd2385e4..c3a6af2cdc1 100644 --- a/msgraph/generated/devices/item/registered_users/item/ref/ref_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a user as a registered user of the device. + Remove a user as a registered user of the device. This API is available in the following national cloud deployments. 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/device-delete-registeredusers?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a user as a registered user of the device. + Remove a user as a registered user of the device. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a user as a registered user of the device. + Remove a user as a registered user of the device. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/devices/item/registered_users/ref/ref_request_builder.py b/msgraph/generated/devices/item/registered_users/ref/ref_request_builder.py index 2b4cfa862c6..58a8040947d 100644 --- a/msgraph/generated/devices/item/registered_users/ref/ref_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a registered user for the device. + Add a registered user for the device. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a registered user for the device. + Add a registered user for the device. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices/item/registered_users/registered_users_request_builder.py b/msgraph/generated/devices/item/registered_users/registered_users_request_builder.py index 90910ba1f7d..eb3e34aa76e 100644 --- a/msgraph/generated/devices/item/registered_users/registered_users_request_builder.py +++ b/msgraph/generated/devices/item/registered_users/registered_users_request_builder.py @@ -76,14 +76,14 @@ def to_get_request_information(self,request_configuration: Optional[RegisteredUs Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RegisteredUsersRequestBuilder: diff --git a/msgraph/generated/devices/item/restore/restore_request_builder.py b/msgraph/generated/devices/item/restore/restore_request_builder.py index 9e37fc1e647..c83d2b2cde8 100644 --- a/msgraph/generated/devices/item/restore/restore_request_builder.py +++ b/msgraph/generated/devices/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/count/count_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/count/count_request_builder.py index 078dc2d3e5f..3a9d61d6fb2 100644 --- a/msgraph/generated/devices/item/transitive_member_of/count/count_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py index 807abf2ee68..62871ff11e4 100644 --- a/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index 351a6b62415..b64489c7f54 100644 --- a/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/graph_group/count/count_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/graph_group/count/count_request_builder.py index 918164157a8..b9cfb328ee0 100644 --- a/msgraph/generated/devices/item/transitive_member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/graph_group/graph_group_request_builder.py index 6e044206489..a6088312a2d 100644 --- a/msgraph/generated/devices/item/transitive_member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/item/directory_object_item_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/item/directory_object_item_request_builder.py index c23f6d568c3..632b0ba1b11 100644 --- a/msgraph/generated/devices/item/transitive_member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index 4317b2b15b0..1c468c84715 100644 --- a/msgraph/generated/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.py index 00a3b8dec17..2ba9414217b 100644 --- a/msgraph/generated/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/devices/item/transitive_member_of/transitive_member_of_request_builder.py b/msgraph/generated/devices/item/transitive_member_of/transitive_member_of_request_builder.py index f256af86ab8..f9b5c6dbcce 100644 --- a/msgraph/generated/devices/item/transitive_member_of/transitive_member_of_request_builder.py +++ b/msgraph/generated/devices/item/transitive_member_of/transitive_member_of_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[TransitiveMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TransitiveMemberOfRequestBuilder: diff --git a/msgraph/generated/devices/validate_properties/validate_properties_request_builder.py b/msgraph/generated/devices/validate_properties/validate_properties_request_builder.py index 0c6ce01d476..815cdcf6281 100644 --- a/msgraph/generated/devices/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/devices/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/devices_with_device_id/devices_with_device_id_request_builder.py b/msgraph/generated/devices_with_device_id/devices_with_device_id_request_builder.py index 5174220e9c7..7599e4891aa 100644 --- a/msgraph/generated/devices_with_device_id/devices_with_device_id_request_builder.py +++ b/msgraph/generated/devices_with_device_id/devices_with_device_id_request_builder.py @@ -25,11 +25,13 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['device_id'] = str(device_id) super().__init__(request_adapter, "{+baseurl}/devices(deviceId='{deviceId}'){?%24select,%24expand}", path_parameters) async def delete(self,request_configuration: Optional[DevicesWithDeviceIdRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a registered device. + Delete a registered device. This API is available in the following national cloud deployments. 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/device-delete?view=graph-rest-1.0 @@ -49,7 +51,7 @@ async def delete(self,request_configuration: Optional[DevicesWithDeviceIdRequest async def get(self,request_configuration: Optional[DevicesWithDeviceIdRequestBuilderGetRequestConfiguration] = None) -> Optional[Device]: """ - Get the properties and relationships of a device object. + Get the properties and relationships of a device object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Device] Find more info here: https://learn.microsoft.com/graph/api/device-get?view=graph-rest-1.0 @@ -71,7 +73,7 @@ async def get(self,request_configuration: Optional[DevicesWithDeviceIdRequestBui async def patch(self,body: Optional[Device] = None, request_configuration: Optional[DevicesWithDeviceIdRequestBuilderPatchRequestConfiguration] = None) -> Optional[Device]: """ - Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. + Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Device] @@ -96,39 +98,39 @@ async def patch(self,body: Optional[Device] = None, request_configuration: Optio def to_delete_request_information(self,request_configuration: Optional[DevicesWithDeviceIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a registered device. + Delete a registered device. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DevicesWithDeviceIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a device object. + Get the properties and relationships of a device object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Device] = None, request_configuration: Optional[DevicesWithDeviceIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. + Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Device] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +171,7 @@ class DevicesWithDeviceIdRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class DevicesWithDeviceIdRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a device object. + Get the properties and relationships of a device object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/administrative_units/administrative_units_request_builder.py b/msgraph/generated/directory/administrative_units/administrative_units_request_builder.py index 4368c62fb8d..32c108248c1 100644 --- a/msgraph/generated/directory/administrative_units/administrative_units_request_builder.py +++ b/msgraph/generated/directory/administrative_units/administrative_units_request_builder.py @@ -46,7 +46,7 @@ def by_administrative_unit_id(self,administrative_unit_id: str) -> Administrativ async def get(self,request_configuration: Optional[AdministrativeUnitsRequestBuilderGetRequestConfiguration] = None) -> Optional[AdministrativeUnitCollectionResponse]: """ - Retrieve a list of administrativeUnit objects. + Retrieve a list of administrativeUnit objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AdministrativeUnitCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directory-list-administrativeunits?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[AdministrativeUnitsRequestBui async def post(self,body: Optional[AdministrativeUnit] = None, request_configuration: Optional[AdministrativeUnitsRequestBuilderPostRequestConfiguration] = None) -> Optional[AdministrativeUnit]: """ - Use this API to create a new administrativeUnit. + Use this API to create a new administrativeUnit. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AdministrativeUnit] @@ -93,24 +93,24 @@ async def post(self,body: Optional[AdministrativeUnit] = None, request_configura def to_get_request_information(self,request_configuration: Optional[AdministrativeUnitsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of administrativeUnit objects. + Retrieve a list of administrativeUnit objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AdministrativeUnit] = None, request_configuration: Optional[AdministrativeUnitsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new administrativeUnit. + Use this API to create a new administrativeUnit. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[AdministrativeUnit] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class AdministrativeUnitsRequestBuilderGetQueryParameters(): """ - Retrieve a list of administrativeUnit objects. + Retrieve a list of administrativeUnit objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/administrative_units/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/count/count_request_builder.py index d432c2f9542..48d0c921448 100644 --- a/msgraph/generated/directory/administrative_units/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/delta/delta_response.py b/msgraph/generated/directory/administrative_units/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/directory/administrative_units/delta/delta_response.py rename to msgraph/generated/directory/administrative_units/delta/delta_get_response.py index c0dea937db8..7b1c1c2a82e 100644 --- a/msgraph/generated/directory/administrative_units/delta/delta_response.py +++ b/msgraph/generated/directory/administrative_units/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[AdministrativeUnit]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/administrative_units/delta/delta_request_builder.py b/msgraph/generated/directory/administrative_units/delta/delta_request_builder.py index b5f8de2963c..cab4d144582 100644 --- a/msgraph/generated/directory/administrative_units/delta/delta_request_builder.py +++ b/msgraph/generated/directory/administrative_units/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/administrativeUnits/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/administrative_unit_item_request_builder.py b/msgraph/generated/directory/administrative_units/item/administrative_unit_item_request_builder.py index 8c49b375d12..faa99bb8ad8 100644 --- a/msgraph/generated/directory/administrative_units/item/administrative_unit_item_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/administrative_unit_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AdministrativeUnitItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an administrativeUnit. + Delete an administrativeUnit. This API is available in the following national cloud deployments. 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/administrativeunit-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[AdministrativeUnitItemRequ async def get(self,request_configuration: Optional[AdministrativeUnitItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AdministrativeUnit]: """ - Retrieve the properties and relationships of an administrativeUnit object. + Retrieve the properties and relationships of an administrativeUnit object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AdministrativeUnit] Find more info here: https://learn.microsoft.com/graph/api/administrativeunit-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[AdministrativeUnitItemRequest async def patch(self,body: Optional[AdministrativeUnit] = None, request_configuration: Optional[AdministrativeUnitItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AdministrativeUnit]: """ - Update the properties of an administrativeUnit object. + Update the properties of an administrativeUnit object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AdministrativeUnit] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[AdministrativeUnit] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[AdministrativeUnitItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an administrativeUnit. + Delete an administrativeUnit. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AdministrativeUnitItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an administrativeUnit object. + Retrieve the properties and relationships of an administrativeUnit object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AdministrativeUnit] = None, request_configuration: Optional[AdministrativeUnitItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an administrativeUnit object. + Update the properties of an administrativeUnit object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[AdministrativeUnit] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class AdministrativeUnitItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class AdministrativeUnitItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an administrativeUnit object. + Retrieve the properties and relationships of an administrativeUnit object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/administrative_units/item/extensions/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/extensions/count/count_request_builder.py index 6de88b7603b..7329a0a355a 100644 --- a/msgraph/generated/directory/administrative_units/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/extensions/extensions_request_builder.py b/msgraph/generated/directory/administrative_units/item/extensions/extensions_request_builder.py index f0f81092e91..dbf6e1c879b 100644 --- a/msgraph/generated/directory/administrative_units/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/administrative_units/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/directory/administrative_units/item/extensions/item/extension_item_request_builder.py index 374003f4412..2845f1a166d 100644 --- a/msgraph/generated/directory/administrative_units/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/administrative_units/item/members/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/count/count_request_builder.py index 0dca22638e5..75b36991eaa 100644 --- a/msgraph/generated/directory/administrative_units/item/members/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_application/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_application/count/count_request_builder.py index 3f561ab8995..338226eac31 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_application/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_application/graph_application_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_application/graph_application_request_builder.py index 61e87b8b617..2612890ca74 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_device/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_device/count/count_request_builder.py index 63ab8167dcb..5e88b0399dd 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_device/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_device/graph_device_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_device/graph_device_request_builder.py index 97cab451d04..152694b37c0 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_group/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_group/count/count_request_builder.py index f3d2981c1b1..71e78b45116 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_group/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_group/graph_group_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_group/graph_group_request_builder.py index 287c3af28ef..5cf030be194 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.py index 792cba95871..5e7b4883825 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.py index db523901317..402d29ad0b0 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.py index 4c79c791688..069079ca926 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.py index 69d22a5fd03..25b8cf5bacb 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_user/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_user/count/count_request_builder.py index ef37eceb558..64d3f4e8c5a 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_user/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/graph_user/graph_user_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/graph_user/graph_user_request_builder.py index 0cc8c607721..f40a0bd6220 100644 --- a/msgraph/generated/directory/administrative_units/item/members/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.py index 7adf7692ecd..8086f799cdb 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.py index e2b95e333d9..4aecc84d64e 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.py index 53acfe906ec..ef56c2138e2 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.py index a1883538c93..0cf7b9070f8 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from .......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.py index 3260e574432..5691c96df96 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.py index 589ee954df6..d16f8d091ee 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/members/item/ref/ref_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/item/ref/ref_request_builder.py index dc58a5e0d73..9dd89b4a4e5 100644 --- a/msgraph/generated/directory/administrative_units/item/members/item/ref/ref_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Use this API to remove a member (user, group, or device) from an administrative unit. + Use this API to remove a member (user, group, or device) from an administrative unit. This API is available in the following national cloud deployments. 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/administrativeunit-delete-members?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Use this API to remove a member (user, group, or device) from an administrative unit. + Use this API to remove a member (user, group, or device) from an administrative unit. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Use this API to remove a member (user, group, or device) from an administrative unit. + Use this API to remove a member (user, group, or device) from an administrative unit. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/administrative_units/item/members/members_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/members_request_builder.py index 77bf8686642..348e3458494 100644 --- a/msgraph/generated/directory/administrative_units/item/members/members_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/members_request_builder.py @@ -104,14 +104,14 @@ def to_get_request_information(self,request_configuration: Optional[MembersReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryObject] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -124,13 +124,13 @@ def to_post_request_information(self,body: Optional[DirectoryObject] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/administrative_units/item/members/ref/ref_request_builder.py b/msgraph/generated/directory/administrative_units/item/members/ref/ref_request_builder.py index d15d54d39d8..6b21e082eb4 100644 --- a/msgraph/generated/directory/administrative_units/item/members/ref/ref_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/members/ref/ref_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/administrative_units/item/scoped_role_members/count/count_request_builder.py b/msgraph/generated/directory/administrative_units/item/scoped_role_members/count/count_request_builder.py index a625a92326c..21dd1ad491d 100644 --- a/msgraph/generated/directory/administrative_units/item/scoped_role_members/count/count_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/scoped_role_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.py b/msgraph/generated/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.py index 75ab09c0e1e..b4bbb4e9133 100644 --- a/msgraph/generated/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + Remove a Microsoft Entra role assignment with administrative unit scope. This API is available in the following national cloud deployments. 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/administrativeunit-delete-scopedrolemembers?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ScopedRoleMembershipItemRe async def get(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ScopedRoleMembership]: """ - Get an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + Get a Microsoft Entra role assignment with administrative unit scope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ScopedRoleMembership] Find more info here: https://learn.microsoft.com/graph/api/administrativeunit-get-scopedrolemembers?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[ScopedRoleMembership] = None, request_config def to_delete_request_information(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + Remove a Microsoft Entra role assignment with administrative unit scope. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + Get a Microsoft Entra role assignment with administrative unit scope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ScopedRoleMembership] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ScopedRoleMembershipItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class ScopedRoleMembershipItemRequestBuilderGetQueryParameters(): """ - Get an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + Get a Microsoft Entra role assignment with administrative unit scope. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.py b/msgraph/generated/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.py index 3fe04500579..2798c156e83 100644 --- a/msgraph/generated/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.py +++ b/msgraph/generated/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.py @@ -45,7 +45,7 @@ def by_scoped_role_membership_id(self,scoped_role_membership_id: str) -> ScopedR async def get(self,request_configuration: Optional[ScopedRoleMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ScopedRoleMembershipCollectionResponse]: """ - List Azure Active Directory (Azure AD) role assignments with administrative unit scope. + List Microsoft Entra role assignments with administrative unit scope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ScopedRoleMembershipCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/administrativeunit-list-scopedrolemembers?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ScopedRoleMembersRequestBuild async def post(self,body: Optional[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ScopedRoleMembership]: """ - Assign an Azure Active Directory (Azure AD) role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Azure AD roles with administrative unit scope. + Assign a Microsoft Entra role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Microsoft Entra roles with administrative unit scope. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ScopedRoleMembership] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ScopedRoleMembership] = None, request_configu def to_get_request_information(self,request_configuration: Optional[ScopedRoleMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List Azure Active Directory (Azure AD) role assignments with administrative unit scope. + List Microsoft Entra role assignments with administrative unit scope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign an Azure Active Directory (Azure AD) role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Azure AD roles with administrative unit scope. + Assign a Microsoft Entra role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Microsoft Entra roles with administrative unit scope. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ScopedRoleMembership] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ScopedRoleMembersRequestBuilderGetQueryParameters(): """ - List Azure Active Directory (Azure AD) role assignments with administrative unit scope. + List Microsoft Entra role assignments with administrative unit scope. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/attribute_sets/attribute_sets_request_builder.py b/msgraph/generated/directory/attribute_sets/attribute_sets_request_builder.py index 2364f064704..b6c31626d9f 100644 --- a/msgraph/generated/directory/attribute_sets/attribute_sets_request_builder.py +++ b/msgraph/generated/directory/attribute_sets/attribute_sets_request_builder.py @@ -45,7 +45,7 @@ def by_attribute_set_id(self,attribute_set_id: str) -> AttributeSetItemRequestBu async def get(self,request_configuration: Optional[AttributeSetsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttributeSetCollectionResponse]: """ - Get a list of the attributeSet objects and their properties. + Get a list of the attributeSet objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttributeSetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directory-list-attributesets?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AttributeSetsRequestBuilderGe async def post(self,body: Optional[AttributeSet] = None, request_configuration: Optional[AttributeSetsRequestBuilderPostRequestConfiguration] = None) -> Optional[AttributeSet]: """ - Create a new attributeSet object. + Create a new attributeSet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttributeSet] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AttributeSet] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[AttributeSetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the attributeSet objects and their properties. + Get a list of the attributeSet objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttributeSet] = None, request_configuration: Optional[AttributeSetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new attributeSet object. + Create a new attributeSet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AttributeSet] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AttributeSetsRequestBuilderGetQueryParameters(): """ - Get a list of the attributeSet objects and their properties. + Get a list of the attributeSet objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/attribute_sets/count/count_request_builder.py b/msgraph/generated/directory/attribute_sets/count/count_request_builder.py index 02058bcea38..3bb9f483eab 100644 --- a/msgraph/generated/directory/attribute_sets/count/count_request_builder.py +++ b/msgraph/generated/directory/attribute_sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/attribute_sets/item/attribute_set_item_request_builder.py b/msgraph/generated/directory/attribute_sets/item/attribute_set_item_request_builder.py index 63a71d6398e..07e851b9c06 100644 --- a/msgraph/generated/directory/attribute_sets/item/attribute_set_item_request_builder.py +++ b/msgraph/generated/directory/attribute_sets/item/attribute_set_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AttributeSetItemRequestBui async def get(self,request_configuration: Optional[AttributeSetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AttributeSet]: """ - Read the properties and relationships of an attributeSet object. + Read the properties and relationships of an attributeSet object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttributeSet] Find more info here: https://learn.microsoft.com/graph/api/attributeset-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[AttributeSetItemRequestBuilde async def patch(self,body: Optional[AttributeSet] = None, request_configuration: Optional[AttributeSetItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AttributeSet]: """ - Update the properties of an attributeSet object. + Update the properties of an attributeSet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttributeSet] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Attribute Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttributeSetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an attributeSet object. + Read the properties and relationships of an attributeSet object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttributeSet] = None, request_configuration: Optional[AttributeSetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an attributeSet object. + Update the properties of an attributeSet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AttributeSet] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AttributeSetItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class AttributeSetItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an attributeSet object. + Read the properties and relationships of an attributeSet object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/custom_security_attribute_definitions/count/count_request_builder.py b/msgraph/generated/directory/custom_security_attribute_definitions/count/count_request_builder.py index abaff598009..a4268d6a846 100644 --- a/msgraph/generated/directory/custom_security_attribute_definitions/count/count_request_builder.py +++ b/msgraph/generated/directory/custom_security_attribute_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.py b/msgraph/generated/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.py index 6c7739fd6b4..7041515b359 100644 --- a/msgraph/generated/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.py +++ b/msgraph/generated/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.py @@ -45,7 +45,7 @@ def by_custom_security_attribute_definition_id(self,custom_security_attribute_de async def get(self,request_configuration: Optional[CustomSecurityAttributeDefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomSecurityAttributeDefinitionCollectionResponse]: """ - Get a list of the customSecurityAttributeDefinition objects and their properties. + Get a list of the customSecurityAttributeDefinition objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomSecurityAttributeDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directory-list-customsecurityattributedefinitions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CustomSecurityAttributeDefini async def post(self,body: Optional[CustomSecurityAttributeDefinition] = None, request_configuration: Optional[CustomSecurityAttributeDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CustomSecurityAttributeDefinition]: """ - Create a new customSecurityAttributeDefinition object. + Create a new customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomSecurityAttributeDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CustomSecurityAttributeDefinition] = None, re def to_get_request_information(self,request_configuration: Optional[CustomSecurityAttributeDefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the customSecurityAttributeDefinition objects and their properties. + Get a list of the customSecurityAttributeDefinition objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomSecurityAttributeDefinition] = None, request_configuration: Optional[CustomSecurityAttributeDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new customSecurityAttributeDefinition object. + Create a new customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CustomSecurityAttributeDefin if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustomSecurityAttributeDefinitionsRequestBuilderGetQueryParameters(): """ - Get a list of the customSecurityAttributeDefinition objects and their properties. + Get a list of the customSecurityAttributeDefinition objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.py b/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.py index 5816b71f2e1..4f262592468 100644 --- a/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.py +++ b/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.py @@ -45,7 +45,7 @@ def by_allowed_value_id(self,allowed_value_id: str) -> AllowedValueItemRequestBu async def get(self,request_configuration: Optional[AllowedValuesRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedValueCollectionResponse]: """ - Get a list of the allowedValue objects and their properties. + Get a list of the allowedValue objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AllowedValueCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/customsecurityattributedefinition-list-allowedvalues?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AllowedValuesRequestBuilderGe async def post(self,body: Optional[AllowedValue] = None, request_configuration: Optional[AllowedValuesRequestBuilderPostRequestConfiguration] = None) -> Optional[AllowedValue]: """ - Create a new allowedValue object. + Create a new allowedValue object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AllowedValue] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AllowedValue] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[AllowedValuesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the allowedValue objects and their properties. + Get a list of the allowedValue objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AllowedValue] = None, request_configuration: Optional[AllowedValuesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new allowedValue object. + Create a new allowedValue object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AllowedValue] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedValuesRequestBuilderGetQueryParameters(): """ - Get a list of the allowedValue objects and their properties. + Get a list of the allowedValue objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.py b/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.py index 7b12a08db8f..d889984ef3f 100644 --- a/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.py +++ b/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.py b/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.py index 20733fb3fb9..f5da154cbb0 100644 --- a/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.py +++ b/msgraph/generated/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AllowedValueItemRequestBui async def get(self,request_configuration: Optional[AllowedValueItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedValue]: """ - Read the properties and relationships of an allowedValue object. + Read the properties and relationships of an allowedValue object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AllowedValue] Find more info here: https://learn.microsoft.com/graph/api/allowedvalue-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[AllowedValueItemRequestBuilde async def patch(self,body: Optional[AllowedValue] = None, request_configuration: Optional[AllowedValueItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AllowedValue]: """ - Update the properties of an allowedValue object. + Update the properties of an allowedValue object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AllowedValue] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[AllowedVa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AllowedValueItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an allowedValue object. + Read the properties and relationships of an allowedValue object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AllowedValue] = None, request_configuration: Optional[AllowedValueItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an allowedValue object. + Update the properties of an allowedValue object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AllowedValue] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AllowedValueItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class AllowedValueItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an allowedValue object. + Read the properties and relationships of an allowedValue object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.py b/msgraph/generated/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.py index 286755348ef..4c5b6b9abf4 100644 --- a/msgraph/generated/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.py +++ b/msgraph/generated/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CustomSecurityAttributeDef async def get(self,request_configuration: Optional[CustomSecurityAttributeDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomSecurityAttributeDefinition]: """ - Read the properties and relationships of a customSecurityAttributeDefinition object. + Read the properties and relationships of a customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomSecurityAttributeDefinition] Find more info here: https://learn.microsoft.com/graph/api/customsecurityattributedefinition-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[CustomSecurityAttributeDefini async def patch(self,body: Optional[CustomSecurityAttributeDefinition] = None, request_configuration: Optional[CustomSecurityAttributeDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CustomSecurityAttributeDefinition]: """ - Update the properties of a customSecurityAttributeDefinition object. + Update the properties of a customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomSecurityAttributeDefinition] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[CustomSec Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CustomSecurityAttributeDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a customSecurityAttributeDefinition object. + Read the properties and relationships of a customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomSecurityAttributeDefinition] = None, request_configuration: Optional[CustomSecurityAttributeDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a customSecurityAttributeDefinition object. + Update the properties of a customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CustomSecurityAttributeDefi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class CustomSecurityAttributeDefinitionItemRequestBuilderDeleteRequestConfigurat @dataclass class CustomSecurityAttributeDefinitionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a customSecurityAttributeDefinition object. + Read the properties and relationships of a customSecurityAttributeDefinition object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/deleted_items/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/count/count_request_builder.py index 9190478cdda..cd85223d433 100644 --- a/msgraph/generated/directory/deleted_items/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/deleted_items_request_builder.py b/msgraph/generated/directory/deleted_items/deleted_items_request_builder.py index bb2973c4628..d0b6cbf5acf 100644 --- a/msgraph/generated/directory/deleted_items/deleted_items_request_builder.py +++ b/msgraph/generated/directory/deleted_items/deleted_items_request_builder.py @@ -10,11 +10,9 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ...models.directory_object import DirectoryObject from ...models.directory_object_collection_response import DirectoryObjectCollectionResponse from ...models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .graph_administrative_unit.graph_administrative_unit_request_builder import GraphAdministrativeUnitRequestBuilder @@ -55,7 +53,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[DeletedItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] """ @@ -74,65 +72,21 @@ async def get(self,request_configuration: Optional[DeletedItemsRequestBuilderGet return await self.request_adapter.send_async(request_info, DirectoryObjectCollectionResponse, error_mapping) - async def post(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[DeletedItemsRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: - """ - Create new navigation property to deletedItems for directory - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - """ - if not body: - raise TypeError("body cannot be null.") - request_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.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeletedItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) - return request_info - - def to_post_request_information(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[DeletedItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Create new navigation property to deletedItems for directory - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() request_info.url_template = self.url_template request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + 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) -> DeletedItemsRequestBuilder: @@ -154,15 +108,6 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - @property def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: """ @@ -247,7 +192,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class DeletedItemsRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -313,14 +258,4 @@ class DeletedItemsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration query_parameters: Optional[DeletedItemsRequestBuilder.DeletedItemsRequestBuilderGetQueryParameters] = None - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class DeletedItemsRequestBuilderPostRequestConfiguration(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/directory/deleted_items/delta/delta_response.py b/msgraph/generated/directory/deleted_items/delta/delta_response.py deleted file mode 100644 index 9ca6a38f9fe..00000000000 --- a/msgraph/generated/directory/deleted_items/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from ....models.base_delta_function_response import BaseDeltaFunctionResponse - from ....models.directory_object import DirectoryObject - -from ....models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from ....models.base_delta_function_response import BaseDeltaFunctionResponse - from ....models.directory_object import DirectoryObject - - from ....models.base_delta_function_response import BaseDeltaFunctionResponse - from ....models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_response.py similarity index 89% rename from msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_response.py rename to msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_response.py index 3f412464ca0..a9c1c91e3c9 100644 --- a/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_response.py +++ b/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExtensionProperty]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse + Returns: GetAvailableExtensionPropertiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() + return GetAvailableExtensionPropertiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.py index 49bc855fc82..c960f53f74e 100644 --- a/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_response.py b/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_post_response.py similarity index 92% rename from msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_response.py rename to msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_post_response.py index 6519973d3ae..a0861316c73 100644 --- a/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_post_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: GetByIdsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return GetByIdsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_request_builder.py index 95ae3d2a0c2..995adb6963c 100644 --- a/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/directory/deleted_items/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/deleted_items/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/graph_administrative_unit/count/count_request_builder.py index 56d6ee183b2..25033bf1232 100644 --- a/msgraph/generated/directory/deleted_items/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.py index d212b49bb66..cc718ffb438 100644 --- a/msgraph/generated/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_application/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/graph_application/count/count_request_builder.py index 32e40895719..dc70edede27 100644 --- a/msgraph/generated/directory/deleted_items/graph_application/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_application/graph_application_request_builder.py b/msgraph/generated/directory/deleted_items/graph_application/graph_application_request_builder.py index 4b9fd92a301..b399d68b283 100644 --- a/msgraph/generated/directory/deleted_items/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_device/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/graph_device/count/count_request_builder.py index 45b3db8fe11..3571014a476 100644 --- a/msgraph/generated/directory/deleted_items/graph_device/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_device/graph_device_request_builder.py b/msgraph/generated/directory/deleted_items/graph_device/graph_device_request_builder.py index 382b5b62e7f..1911c14ff1b 100644 --- a/msgraph/generated/directory/deleted_items/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_group/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/graph_group/count/count_request_builder.py index ce7e7fca0ba..a60c5ef0168 100644 --- a/msgraph/generated/directory/deleted_items/graph_group/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_group/graph_group_request_builder.py b/msgraph/generated/directory/deleted_items/graph_group/graph_group_request_builder.py index 424f16479e5..00fe41e373b 100644 --- a/msgraph/generated/directory/deleted_items/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_service_principal/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/graph_service_principal/count/count_request_builder.py index be9b392d92f..de56f1bf761 100644 --- a/msgraph/generated/directory/deleted_items/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.py index bc7a62fe690..0a5419aecbb 100644 --- a/msgraph/generated/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_user/count/count_request_builder.py b/msgraph/generated/directory/deleted_items/graph_user/count/count_request_builder.py index ccbd8528ef0..75758e276b4 100644 --- a/msgraph/generated/directory/deleted_items/graph_user/count/count_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/graph_user/graph_user_request_builder.py b/msgraph/generated/directory/deleted_items/graph_user/graph_user_request_builder.py index 2f738397ff1..76a70e2c56d 100644 --- a/msgraph/generated/directory/deleted_items/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/directory/deleted_items/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_post_response.py similarity index 90% rename from msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_response.py rename to msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_post_response.py index f2b6edeac9a..874c6685115 100644 --- a/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_response.py +++ b/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_post_response.py @@ -9,20 +9,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse + Returns: CheckMemberGroupsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() + return CheckMemberGroupsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.py index bb3d0ebb110..a54fed77308 100644 --- a/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_post_response.py similarity index 90% rename from msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_response.py rename to msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_post_response.py index 1b6f401e01b..8e9242c1f5a 100644 --- a/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_response.py +++ b/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_post_response.py @@ -9,20 +9,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse + Returns: CheckMemberObjectsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() + return CheckMemberObjectsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.py index 68a367006f3..a9c08a1277a 100644 --- a/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/deleted_items/item/directory_object_item_request_builder.py b/msgraph/generated/directory/deleted_items/item/directory_object_item_request_builder.py index 8b01bfc0fa3..50c7e01ef89 100644 --- a/msgraph/generated/directory/deleted_items/item/directory_object_item_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/directory_object_item_request_builder.py @@ -39,7 +39,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. + Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. This API is available in the following national cloud deployments. 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/directory-deleteditems-delete?view=graph-rest-1.0 @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[DirectoryObjectItemRequest async def get(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-get?view=graph-rest-1.0 @@ -79,80 +79,36 @@ async def get(self,request_configuration: Optional[DirectoryObjectItemRequestBui return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - async def patch(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[DirectoryObjectItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DirectoryObject]: - """ - Update the navigation property deletedItems in directory - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - """ - 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.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - def to_delete_request_information(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. + Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) - return request_info - - def to_patch_request_information(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[DirectoryObjectItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: - """ - Update the navigation property deletedItems in directory - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() request_info.url_template = self.url_template request_info.path_parameters = self.path_parameters - request_info.http_method = Method.PATCH - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + 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) -> DirectoryObjectItemRequestBuilder: @@ -277,7 +233,7 @@ class DirectoryObjectItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class DirectoryObjectItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -313,14 +269,4 @@ class DirectoryObjectItemRequestBuilderGetRequestConfiguration(BaseRequestConfig query_parameters: Optional[DirectoryObjectItemRequestBuilder.DirectoryObjectItemRequestBuilderGetQueryParameters] = None - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class DirectoryObjectItemRequestBuilderPatchRequestConfiguration(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/directory/deleted_items/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_post_response.py similarity index 90% rename from msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_response.py rename to msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_post_response.py index 7fc2eb6a681..a321ef87764 100644 --- a/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_response.py +++ b/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_post_response.py @@ -9,20 +9,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse + Returns: GetMemberGroupsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() + return GetMemberGroupsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.py index 23a276a4cbb..c6cf4141879 100644 --- a/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_post_response.py similarity index 90% rename from msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_response.py rename to msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_post_response.py index 49fffed74d0..8bec882a626 100644 --- a/msgraph/generated/directory/deleted_items/item/check_member_groups/check_member_groups_response.py +++ b/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_post_response.py @@ -9,20 +9,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse + Returns: GetMemberObjectsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() + return GetMemberObjectsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.py index d75253a422b..85518fdf168 100644 --- a/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index bc3a50a7945..5f97028f38e 100644 --- a/msgraph/generated/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/graph_application/graph_application_request_builder.py b/msgraph/generated/directory/deleted_items/item/graph_application/graph_application_request_builder.py index 0feda1cd105..a41a6a433d4 100644 --- a/msgraph/generated/directory/deleted_items/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/graph_device/graph_device_request_builder.py b/msgraph/generated/directory/deleted_items/item/graph_device/graph_device_request_builder.py index fe5fad04667..a5b9ddb9e65 100644 --- a/msgraph/generated/directory/deleted_items/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/graph_group/graph_group_request_builder.py b/msgraph/generated/directory/deleted_items/item/graph_group/graph_group_request_builder.py index ceca0cfdf81..f2f983f4676 100644 --- a/msgraph/generated/directory/deleted_items/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.py index 90cca3f4816..f6e46aca128 100644 --- a/msgraph/generated/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/graph_user/graph_user_request_builder.py b/msgraph/generated/directory/deleted_items/item/graph_user/graph_user_request_builder.py index ab71c37af17..ee546be8b73 100644 --- a/msgraph/generated/directory/deleted_items/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/item/restore/restore_request_builder.py b/msgraph/generated/directory/deleted_items/item/restore/restore_request_builder.py index b8500d4e43a..c80e9c5eb99 100644 --- a/msgraph/generated/directory/deleted_items/item/restore/restore_request_builder.py +++ b/msgraph/generated/directory/deleted_items/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/directory/deleted_items/validate_properties/validate_properties_request_builder.py b/msgraph/generated/directory/deleted_items/validate_properties/validate_properties_request_builder.py index e1663a5a1c1..1ee0c3bb5a7 100644 --- a/msgraph/generated/directory/deleted_items/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/directory/deleted_items/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/directory_request_builder.py b/msgraph/generated/directory/directory_request_builder.py index dd65fc98b59..9fd34e92337 100644 --- a/msgraph/generated/directory/directory_request_builder.py +++ b/msgraph/generated/directory/directory_request_builder.py @@ -84,14 +84,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Directory] = None, request_configuration: Optional[DirectoryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -104,13 +104,13 @@ def to_patch_request_information(self,body: Optional[Directory] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_get_response.py b/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_get_response.py new file mode 100644 index 00000000000..1edb836228b --- /dev/null +++ b/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_get_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class AvailableProviderTypesGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AvailableProviderTypesGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AvailableProviderTypesGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AvailableProviderTypesGetResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.py b/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.py index 3b03061338e..7825e649e35 100644 --- a/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.py +++ b/msgraph/generated/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .available_provider_types_response import AvailableProviderTypesResponse + from .available_provider_types_get_response import AvailableProviderTypesGetResponse class AvailableProviderTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directory/federationConfigurations/availableProviderTypes(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[AvailableProviderTypesResponse]: + async def get(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[AvailableProviderTypesGetResponse]: """ Invoke function availableProviderTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AvailableProviderTypesResponse] + Returns: Optional[AvailableProviderTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[AvailableProviderTypesRequest } if not self.request_adapter: raise Exception("Http core is null") - from .available_provider_types_response import AvailableProviderTypesResponse + from .available_provider_types_get_response import AvailableProviderTypesGetResponse - return await self.request_adapter.send_async(request_info, AvailableProviderTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AvailableProviderTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AvailablePro Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AvailableProviderTypesRequestBuilder: diff --git a/msgraph/generated/directory/federation_configurations/count/count_request_builder.py b/msgraph/generated/directory/federation_configurations/count/count_request_builder.py index de689089d30..f9927544526 100644 --- a/msgraph/generated/directory/federation_configurations/count/count_request_builder.py +++ b/msgraph/generated/directory/federation_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/federation_configurations/federation_configurations_request_builder.py b/msgraph/generated/directory/federation_configurations/federation_configurations_request_builder.py index d4eff78c8b9..f89349bcd51 100644 --- a/msgraph/generated/directory/federation_configurations/federation_configurations_request_builder.py +++ b/msgraph/generated/directory/federation_configurations/federation_configurations_request_builder.py @@ -96,14 +96,14 @@ def to_get_request_information(self,request_configuration: Optional[FederationCo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProviderBase] = None, request_configuration: Optional[FederationConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[IdentityProviderBase] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/federation_configurations/item/identity_provider_base_item_request_builder.py b/msgraph/generated/directory/federation_configurations/item/identity_provider_base_item_request_builder.py index fba561be83c..35a974adce1 100644 --- a/msgraph/generated/directory/federation_configurations/item/identity_provider_base_item_request_builder.py +++ b/msgraph/generated/directory/federation_configurations/item/identity_provider_base_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a samlOrWsFedExternalDomainFederation object. + Delete a samlOrWsFedExternalDomainFederation object. This API is available in the following national cloud deployments. 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/samlorwsfedexternaldomainfederation-delete?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[IdentityProviderBase] = None, request_config def to_delete_request_information(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a samlOrWsFedExternalDomainFederation object. + Delete a samlOrWsFedExternalDomainFederation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityProv Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProviderBase] = None, request_configuration: Optional[IdentityProviderBaseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[IdentityProviderBase] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory/on_premises_synchronization/count/count_request_builder.py b/msgraph/generated/directory/on_premises_synchronization/count/count_request_builder.py index 307a9baf37d..aba3155d5a8 100644 --- a/msgraph/generated/directory/on_premises_synchronization/count/count_request_builder.py +++ b/msgraph/generated/directory/on_premises_synchronization/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.py b/msgraph/generated/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.py index de8c9b7c606..cc2f060b549 100644 --- a/msgraph/generated/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.py +++ b/msgraph/generated/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.py @@ -10,8 +10,8 @@ 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.on_premises_directory_synchronization import OnPremisesDirectorySynchronization + from ....models.o_data_errors.o_data_error import ODataError class OnPremisesDirectorySynchronizationItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OnPremisesDirectorySynchro async def get(self,request_configuration: Optional[OnPremisesDirectorySynchronizationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnPremisesDirectorySynchronization]: """ - Read the properties and relationships of an onPremisesDirectorySynchronization object. + Read the properties and relationships of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnPremisesDirectorySynchronization] Find more info here: https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[OnPremisesDirectorySynchroniz async def patch(self,body: Optional[OnPremisesDirectorySynchronization] = None, request_configuration: Optional[OnPremisesDirectorySynchronizationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[OnPremisesDirectorySynchronization]: """ - Update the properties of an onPremisesDirectorySynchronization object. + Update the properties of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnPremisesDirectorySynchronization] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[OnPremise Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnPremisesDirectorySynchronizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an onPremisesDirectorySynchronization object. + Read the properties and relationships of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnPremisesDirectorySynchronization] = None, request_configuration: Optional[OnPremisesDirectorySynchronizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an onPremisesDirectorySynchronization object. + Update the properties of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[OnPremisesDirectorySynchron if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class OnPremisesDirectorySynchronizationItemRequestBuilderDeleteRequestConfigura @dataclass class OnPremisesDirectorySynchronizationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an onPremisesDirectorySynchronization object. + Read the properties and relationships of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory/on_premises_synchronization/on_premises_synchronization_request_builder.py b/msgraph/generated/directory/on_premises_synchronization/on_premises_synchronization_request_builder.py index c70cb51490d..ef71ab0c25b 100644 --- a/msgraph/generated/directory/on_premises_synchronization/on_premises_synchronization_request_builder.py +++ b/msgraph/generated/directory/on_premises_synchronization/on_premises_synchronization_request_builder.py @@ -10,9 +10,9 @@ 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.on_premises_directory_synchronization import OnPremisesDirectorySynchronization from ...models.on_premises_directory_synchronization_collection_response import OnPremisesDirectorySynchronizationCollectionResponse + from ...models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.on_premises_directory_synchronization_item_request_builder import OnPremisesDirectorySynchronizationItemRequestBuilder @@ -45,7 +45,7 @@ def by_on_premises_directory_synchronization_id(self,on_premises_directory_synch async def get(self,request_configuration: Optional[OnPremisesSynchronizationRequestBuilderGetRequestConfiguration] = None) -> Optional[OnPremisesDirectorySynchronizationCollectionResponse]: """ - Read the properties and relationships of an onPremisesDirectorySynchronization object. + Read the properties and relationships of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnPremisesDirectorySynchronizationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnPremisesDirectorySynchronization] = None, r def to_get_request_information(self,request_configuration: Optional[OnPremisesSynchronizationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an onPremisesDirectorySynchronization object. + Read the properties and relationships of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnPremisesDirectorySynchronization] = None, request_configuration: Optional[OnPremisesSynchronizationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnPremisesDirectorySynchroni if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OnPremisesSynchronizationRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an onPremisesDirectorySynchronization object. + Read the properties and relationships of an onPremisesDirectorySynchronization object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_objects/count/count_request_builder.py b/msgraph/generated/directory_objects/count/count_request_builder.py index 43d6568198e..800992b9423 100644 --- a/msgraph/generated/directory_objects/count/count_request_builder.py +++ b/msgraph/generated/directory_objects/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_role_templates/delta/delta_response.py b/msgraph/generated/directory_objects/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/directory_role_templates/delta/delta_response.py rename to msgraph/generated/directory_objects/delta/delta_get_response.py index 41ac4f7e1c6..9896959749d 100644 --- a/msgraph/generated/directory_role_templates/delta/delta_response.py +++ b/msgraph/generated/directory_objects/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory_objects/delta/delta_request_builder.py b/msgraph/generated/directory_objects/delta/delta_request_builder.py index 8803dbeb23a..9455c4c31bc 100644 --- a/msgraph/generated/directory_objects/delta/delta_request_builder.py +++ b/msgraph/generated/directory_objects/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/directory_objects/directory_objects_request_builder.py b/msgraph/generated/directory_objects/directory_objects_request_builder.py index 6a22819ff2b..10b4c3b35fd 100644 --- a/msgraph/generated/directory_objects/directory_objects_request_builder.py +++ b/msgraph/generated/directory_objects/directory_objects_request_builder.py @@ -99,14 +99,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryObject] = None, request_configuration: Optional[DirectoryObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[DirectoryObject] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.py index a15bc6c9d58..95a11786a6a 100644 --- a/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/directory_objects/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/directory_objects/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/directory_objects/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/directory_objects/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/directory_objects/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/directory_objects/get_by_ids/get_by_ids_request_builder.py index 7cee7edf098..cf11cc4f844 100644 --- a/msgraph/generated/directory_objects/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/directory_objects/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/get_by_ids/get_by_ids_response.py b/msgraph/generated/directory_objects/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/directory_objects/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/directory_objects/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_request_builder.py index 2a003dc7b49..e9819bc24ce 100644 --- a/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/directory_objects/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_request_builder.py index 990094c9af4..c7159f00306 100644 --- a/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/directory_objects/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_objects/item/directory_object_item_request_builder.py b/msgraph/generated/directory_objects/item/directory_object_item_request_builder.py index 6ee8d18bd6e..3fb3b296a63 100644 --- a/msgraph/generated/directory_objects/item/directory_object_item_request_builder.py +++ b/msgraph/generated/directory_objects/item/directory_object_item_request_builder.py @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a directory object, for example, a group, user, application, or service principal. + Delete a directory object, for example, a group, user, application, or service principal. This API is available in the following national cloud deployments. 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/directoryobject-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[DirectoryObjectItemRequest async def get(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Retrieve the properties and relationships of a directoryObject object. + Retrieve the properties and relationships of a directoryObject object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-get?view=graph-rest-1.0 @@ -99,34 +99,34 @@ async def patch(self,body: Optional[DirectoryObject] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a directory object, for example, a group, user, application, or service principal. + Delete a directory object, for example, a group, user, application, or service principal. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a directoryObject object. + Retrieve the properties and relationships of a directoryObject object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryObject] = None, request_configuration: Optional[DirectoryObjectItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[DirectoryObject] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -217,7 +217,7 @@ class DirectoryObjectItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class DirectoryObjectItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a directoryObject object. + Retrieve the properties and relationships of a directoryObject object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_request_builder.py index 4ec2e3dcb3e..634d0e0a265 100644 --- a/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/directory_objects/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_request_builder.py index 90547b686bc..788d48a0c5f 100644 --- a/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/directory_objects/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_objects/item/restore/restore_request_builder.py b/msgraph/generated/directory_objects/item/restore/restore_request_builder.py index 2eed59067c6..cca2db6098a 100644 --- a/msgraph/generated/directory_objects/item/restore/restore_request_builder.py +++ b/msgraph/generated/directory_objects/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/directory_objects/validate_properties/validate_properties_request_builder.py b/msgraph/generated/directory_objects/validate_properties/validate_properties_request_builder.py index d68baa8ff2a..b85de16dd91 100644 --- a/msgraph/generated/directory_objects/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/directory_objects/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/count/count_request_builder.py b/msgraph/generated/directory_role_templates/count/count_request_builder.py index 83cb74e7fce..65621aa3bd2 100644 --- a/msgraph/generated/directory_role_templates/count/count_request_builder.py +++ b/msgraph/generated/directory_role_templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/contracts/delta/delta_response.py b/msgraph/generated/directory_role_templates/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/contracts/delta/delta_response.py rename to msgraph/generated/directory_role_templates/delta/delta_get_response.py index 41ac4f7e1c6..9896959749d 100644 --- a/msgraph/generated/contracts/delta/delta_response.py +++ b/msgraph/generated/directory_role_templates/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory_role_templates/delta/delta_request_builder.py b/msgraph/generated/directory_role_templates/delta/delta_request_builder.py index 5aec8536ff3..8086b3642aa 100644 --- a/msgraph/generated/directory_role_templates/delta/delta_request_builder.py +++ b/msgraph/generated/directory_role_templates/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/directory_role_templates/directory_role_templates_request_builder.py b/msgraph/generated/directory_role_templates/directory_role_templates_request_builder.py index efe081c4e29..d0690d2d444 100644 --- a/msgraph/generated/directory_role_templates/directory_role_templates_request_builder.py +++ b/msgraph/generated/directory_role_templates/directory_role_templates_request_builder.py @@ -49,7 +49,7 @@ def by_directory_role_template_id(self,directory_role_template_id: str) -> Direc async def get(self,request_configuration: Optional[DirectoryRoleTemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryRoleTemplateCollectionResponse]: """ - Retrieve a list of directoryRoleTemplate objects. + Retrieve a list of directoryRoleTemplate objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryRoleTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryroletemplate-list?view=graph-rest-1.0 @@ -95,19 +95,19 @@ async def post(self,body: Optional[DirectoryRoleTemplate] = None, request_config def to_get_request_information(self,request_configuration: Optional[DirectoryRoleTemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of directoryRoleTemplate objects. + Retrieve a list of directoryRoleTemplate objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryRoleTemplate] = None, request_configuration: Optional[DirectoryRoleTemplatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[DirectoryRoleTemplate] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class DirectoryRoleTemplatesRequestBuilderGetQueryParameters(): """ - Retrieve a list of directoryRoleTemplate objects. + Retrieve a list of directoryRoleTemplate objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py index febd701d8f2..89f1a06df09 100644 --- a/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/directory_role_templates/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/directory_role_templates/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_request_builder.py index 004400c1ad4..d3d0eef3445 100644 --- a/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_response.py b/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/directory_role_templates/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/directory_role_templates/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.py index 714e0b224b8..87ea8156689 100644 --- a/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/directory_role_templates/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.py index 13955e1c472..ba14f2a6555 100644 --- a/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/directory_role_templates/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_role_templates/item/directory_role_template_item_request_builder.py b/msgraph/generated/directory_role_templates/item/directory_role_template_item_request_builder.py index 1b744753ec8..8cb15636afa 100644 --- a/msgraph/generated/directory_role_templates/item/directory_role_template_item_request_builder.py +++ b/msgraph/generated/directory_role_templates/item/directory_role_template_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[DirectoryRoleTemplateItemR async def get(self,request_configuration: Optional[DirectoryRoleTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryRoleTemplate]: """ - Retrieve the properties and relationships of a directoryroletemplate object. + Retrieve the properties and relationships of a directoryroletemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryRoleTemplate] Find more info here: https://learn.microsoft.com/graph/api/directoryroletemplate-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryRoleTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a directoryroletemplate object. + Retrieve the properties and relationships of a directoryroletemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryRoleTemplate] = None, request_configuration: Optional[DirectoryRoleTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[DirectoryRoleTemplate] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class DirectoryRoleTemplateItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class DirectoryRoleTemplateItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a directoryroletemplate object. + Retrieve the properties and relationships of a directoryroletemplate object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.py index 26a0d956066..59a88b2590b 100644 --- a/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/directory_role_templates/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.py index b993441200d..9b1480d1db1 100644 --- a/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/directory_role_templates/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_role_templates/item/restore/restore_request_builder.py b/msgraph/generated/directory_role_templates/item/restore/restore_request_builder.py index 426f939808a..9f02df6d896 100644 --- a/msgraph/generated/directory_role_templates/item/restore/restore_request_builder.py +++ b/msgraph/generated/directory_role_templates/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/directory_role_templates/validate_properties/validate_properties_request_builder.py b/msgraph/generated/directory_role_templates/validate_properties/validate_properties_request_builder.py index 4952e6c6d3a..bec0b53adcb 100644 --- a/msgraph/generated/directory_role_templates/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/directory_role_templates/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/count/count_request_builder.py b/msgraph/generated/directory_roles/count/count_request_builder.py index 3185a64a299..1a898f90d69 100644 --- a/msgraph/generated/directory_roles/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/delta/delta_response.py b/msgraph/generated/directory_roles/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/directory_roles/delta/delta_response.py rename to msgraph/generated/directory_roles/delta/delta_get_response.py index 537150280d9..dfc35f06008 100644 --- a/msgraph/generated/directory_roles/delta/delta_response.py +++ b/msgraph/generated/directory_roles/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DirectoryRole]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/directory_roles/delta/delta_request_builder.py b/msgraph/generated/directory_roles/delta/delta_request_builder.py index 16527a7bdd8..c06b72bca42 100644 --- a/msgraph/generated/directory_roles/delta/delta_request_builder.py +++ b/msgraph/generated/directory_roles/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/directory_roles/directory_roles_request_builder.py b/msgraph/generated/directory_roles/directory_roles_request_builder.py index dddf1528a04..ef99a66acd2 100644 --- a/msgraph/generated/directory_roles/directory_roles_request_builder.py +++ b/msgraph/generated/directory_roles/directory_roles_request_builder.py @@ -49,7 +49,7 @@ def by_directory_role_id(self,directory_role_id: str) -> DirectoryRoleItemReques async def get(self,request_configuration: Optional[DirectoryRolesRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryRoleCollectionResponse]: """ - List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryRoleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryrole-list?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[DirectoryRolesRequestBuilderG async def post(self,body: Optional[DirectoryRole] = None, request_configuration: Optional[DirectoryRolesRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryRole]: """ - Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID. + Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryRole] @@ -96,24 +96,24 @@ async def post(self,body: Optional[DirectoryRole] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[DirectoryRolesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryRole] = None, request_configuration: Optional[DirectoryRolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID. + Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -121,13 +121,13 @@ def to_post_request_information(self,body: Optional[DirectoryRole] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -189,7 +189,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class DirectoryRolesRequestBuilderGetQueryParameters(): """ - List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.py index ea33e2880be..d82c11f3854 100644 --- a/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/directory_roles/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/directory_roles/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/directory_roles/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/directory_roles/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/directory_roles/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/directory_roles/get_by_ids/get_by_ids_request_builder.py index 9068e92aa35..143e138e4f4 100644 --- a/msgraph/generated/directory_roles/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/directory_roles/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/get_by_ids/get_by_ids_response.py b/msgraph/generated/directory_roles/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/directory_roles/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/directory_roles/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_request_builder.py index af55ac4b5ad..99f22784868 100644 --- a/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/directory_roles/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_request_builder.py index 69c08825ae5..961786f72aa 100644 --- a/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/directory_roles/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_roles/item/directory_role_item_request_builder.py b/msgraph/generated/directory_roles/item/directory_role_item_request_builder.py index 772c98e9a65..6f6d203cedc 100644 --- a/msgraph/generated/directory_roles/item/directory_role_item_request_builder.py +++ b/msgraph/generated/directory_roles/item/directory_role_item_request_builder.py @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[DirectoryRoleItemRequestBu async def get(self,request_configuration: Optional[DirectoryRoleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryRole]: """ - Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryRole] Find more info here: https://learn.microsoft.com/graph/api/directoryrole-get?view=graph-rest-1.0 @@ -105,29 +105,29 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryRole] = None, request_configuration: Optional[DirectoryRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[DirectoryRole] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -236,7 +236,7 @@ class DirectoryRoleItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class DirectoryRoleItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_request_builder.py index 9e96dcd6c2a..c60db4af603 100644 --- a/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/directory_roles/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_request_builder.py index 1a02836355b..981a1bf60df 100644 --- a/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/directory_roles/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/directory_roles/item/members/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/count/count_request_builder.py index bf23e2692ad..b68c9db5e04 100644 --- a/msgraph/generated/directory_roles/item/members/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_application/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_application/count/count_request_builder.py index 907e406b928..c032b185847 100644 --- a/msgraph/generated/directory_roles/item/members/graph_application/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_application/graph_application_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_application/graph_application_request_builder.py index 2b8521fb870..6a355bf486a 100644 --- a/msgraph/generated/directory_roles/item/members/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_device/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_device/count/count_request_builder.py index 727139099f7..9f46f58d7f1 100644 --- a/msgraph/generated/directory_roles/item/members/graph_device/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_device/graph_device_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_device/graph_device_request_builder.py index 7af5f00eecb..841ff2eb13a 100644 --- a/msgraph/generated/directory_roles/item/members/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_group/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_group/count/count_request_builder.py index 035d122085c..47bcbc21684 100644 --- a/msgraph/generated/directory_roles/item/members/graph_group/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_group/graph_group_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_group/graph_group_request_builder.py index 9e3f920f295..63aace16b0b 100644 --- a/msgraph/generated/directory_roles/item/members/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_org_contact/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_org_contact/count/count_request_builder.py index 3204db0912b..cac7dc89f99 100644 --- a/msgraph/generated/directory_roles/item/members/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.py index 150923ba3f9..56ae7cb7c2a 100644 --- a/msgraph/generated/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_service_principal/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_service_principal/count/count_request_builder.py index 9d714ea2c16..ee5e58a159c 100644 --- a/msgraph/generated/directory_roles/item/members/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.py index 2cb02ed81f6..1027a8d4cea 100644 --- a/msgraph/generated/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_user/count/count_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_user/count/count_request_builder.py index 8536a1121a5..4d036a54073 100644 --- a/msgraph/generated/directory_roles/item/members/graph_user/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/graph_user/graph_user_request_builder.py b/msgraph/generated/directory_roles/item/members/graph_user/graph_user_request_builder.py index c2679aae35f..29202ecbf9c 100644 --- a/msgraph/generated/directory_roles/item/members/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/graph_application/graph_application_request_builder.py b/msgraph/generated/directory_roles/item/members/item/graph_application/graph_application_request_builder.py index 2bc77cbd0d7..0895e49ae68 100644 --- a/msgraph/generated/directory_roles/item/members/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/graph_device/graph_device_request_builder.py b/msgraph/generated/directory_roles/item/members/item/graph_device/graph_device_request_builder.py index 5bf2c312ae3..e24dfbc0b76 100644 --- a/msgraph/generated/directory_roles/item/members/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/graph_group/graph_group_request_builder.py b/msgraph/generated/directory_roles/item/members/item/graph_group/graph_group_request_builder.py index 16c6f4138a9..e8c9d5c9926 100644 --- a/msgraph/generated/directory_roles/item/members/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.py index 784a61b5510..88a869c0c3c 100644 --- a/msgraph/generated/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.py index 043032b1ae0..63e593bd3f6 100644 --- a/msgraph/generated/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/graph_user/graph_user_request_builder.py b/msgraph/generated/directory_roles/item/members/item/graph_user/graph_user_request_builder.py index 6cff6fbe38e..10f97d323a9 100644 --- a/msgraph/generated/directory_roles/item/members/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/item/ref/ref_request_builder.py b/msgraph/generated/directory_roles/item/members/item/ref/ref_request_builder.py index 3cc81d3e793..eff62cb3877 100644 --- a/msgraph/generated/directory_roles/item/members/item/ref/ref_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. 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/directoryrole-delete-member?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_roles/item/members/members_request_builder.py b/msgraph/generated/directory_roles/item/members/members_request_builder.py index dc882001b28..f5565978bc9 100644 --- a/msgraph/generated/directory_roles/item/members/members_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/members_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MembersReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MembersRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/members/ref/ref_request_builder.py b/msgraph/generated/directory_roles/item/members/ref/ref_request_builder.py index e59b6049d42..b7b4163e84e 100644 --- a/msgraph/generated/directory_roles/item/members/ref/ref_request_builder.py +++ b/msgraph/generated/directory_roles/item/members/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/item/restore/restore_request_builder.py b/msgraph/generated/directory_roles/item/restore/restore_request_builder.py index 6fd1226dd1c..67c797a6d40 100644 --- a/msgraph/generated/directory_roles/item/restore/restore_request_builder.py +++ b/msgraph/generated/directory_roles/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/scoped_members/count/count_request_builder.py b/msgraph/generated/directory_roles/item/scoped_members/count/count_request_builder.py index 44eacbb23ce..433ed231fcf 100644 --- a/msgraph/generated/directory_roles/item/scoped_members/count/count_request_builder.py +++ b/msgraph/generated/directory_roles/item/scoped_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.py b/msgraph/generated/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.py index 0d2ca7bf41d..170954bc457 100644 --- a/msgraph/generated/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.py +++ b/msgraph/generated/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ScopedRol Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopedRoleMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ScopedRoleMembership] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles/item/scoped_members/scoped_members_request_builder.py b/msgraph/generated/directory_roles/item/scoped_members/scoped_members_request_builder.py index bce769a8156..088a6966bce 100644 --- a/msgraph/generated/directory_roles/item/scoped_members/scoped_members_request_builder.py +++ b/msgraph/generated/directory_roles/item/scoped_members/scoped_members_request_builder.py @@ -45,7 +45,7 @@ def by_scoped_role_membership_id(self,scoped_role_membership_id: str) -> ScopedR async def get(self,request_configuration: Optional[ScopedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ScopedRoleMembershipCollectionResponse]: """ - Retrieve a list of scopedRoleMembership objects for a directory role. + Retrieve a list of scopedRoleMembership objects for a directory role. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ScopedRoleMembershipCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryrole-list-scopedmembers?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ScopedRoleMembership] = None, request_configu def to_get_request_information(self,request_configuration: Optional[ScopedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of scopedRoleMembership objects for a directory role. + Retrieve a list of scopedRoleMembership objects for a directory role. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedMembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ScopedRoleMembership] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ScopedMembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of scopedRoleMembership objects for a directory role. + Retrieve a list of scopedRoleMembership objects for a directory role. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/directory_roles/validate_properties/validate_properties_request_builder.py b/msgraph/generated/directory_roles/validate_properties/validate_properties_request_builder.py index 1cf806643cb..b57ddc4e12a 100644 --- a/msgraph/generated/directory_roles/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/directory_roles/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.py b/msgraph/generated/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.py index 31e772560e4..899e8430027 100644 --- a/msgraph/generated/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.py +++ b/msgraph/generated/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param role_template_id: Alternate key of directoryRole Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['role_template_id'] = str(role_template_id) super().__init__(request_adapter, "{+baseurl}/directoryRoles(roleTemplateId='{roleTemplateId}'){?%24select,%24expand}", path_parameters) async def delete(self,request_configuration: Optional[DirectoryRolesWithRoleTemplateIdRequestBuilderDeleteRequestConfiguration] = None) -> None: @@ -48,7 +50,7 @@ async def delete(self,request_configuration: Optional[DirectoryRolesWithRoleTemp async def get(self,request_configuration: Optional[DirectoryRolesWithRoleTemplateIdRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryRole]: """ - Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryRole] Find more info here: https://learn.microsoft.com/graph/api/directoryrole-get?view=graph-rest-1.0 @@ -99,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryRolesWithRoleTemplateIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryRole] = None, request_configuration: Optional[DirectoryRolesWithRoleTemplateIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DirectoryRole] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +169,7 @@ class DirectoryRolesWithRoleTemplateIdRequestBuilderDeleteRequestConfiguration(B @dataclass class DirectoryRolesWithRoleTemplateIdRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domain_dns_records/count/count_request_builder.py b/msgraph/generated/domain_dns_records/count/count_request_builder.py index 842fdd7fc91..d1174c25aee 100644 --- a/msgraph/generated/domain_dns_records/count/count_request_builder.py +++ b/msgraph/generated/domain_dns_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/domain_dns_records/domain_dns_records_request_builder.py b/msgraph/generated/domain_dns_records/domain_dns_records_request_builder.py index 78c5fbfe6cf..bf0d6d65ac1 100644 --- a/msgraph/generated/domain_dns_records/domain_dns_records_request_builder.py +++ b/msgraph/generated/domain_dns_records/domain_dns_records_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DomainDnsRec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DomainDnsRecord] = None, request_configuration: Optional[DomainDnsRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DomainDnsRecord] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/domain_dns_records/item/domain_dns_record_item_request_builder.py b/msgraph/generated/domain_dns_records/item/domain_dns_record_item_request_builder.py index a5bd5ae94ee..36332e680cc 100644 --- a/msgraph/generated/domain_dns_records/item/domain_dns_record_item_request_builder.py +++ b/msgraph/generated/domain_dns_records/item/domain_dns_record_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DomainDns Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DomainDnsRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DomainDnsRec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DomainDnsRecord] = None, request_configuration: Optional[DomainDnsRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DomainDnsRecord] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/domains/count/count_request_builder.py b/msgraph/generated/domains/count/count_request_builder.py index c6f4467a5ee..07adb36e0ca 100644 --- a/msgraph/generated/domains/count/count_request_builder.py +++ b/msgraph/generated/domains/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/domains/domains_request_builder.py b/msgraph/generated/domains/domains_request_builder.py index 2f3b26dd662..ed37f2a9d14 100644 --- a/msgraph/generated/domains/domains_request_builder.py +++ b/msgraph/generated/domains/domains_request_builder.py @@ -45,7 +45,7 @@ def by_domain_id(self,domain_id: str) -> DomainItemRequestBuilder: async def get(self,request_configuration: Optional[DomainsRequestBuilderGetRequestConfiguration] = None) -> Optional[DomainCollectionResponse]: """ - Retrieve a list of domain objects. + Retrieve a list of domain objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DomainCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/domain-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DomainsRequestBuilderGetReque async def post(self,body: Optional[Domain] = None, request_configuration: Optional[DomainsRequestBuilderPostRequestConfiguration] = None) -> Optional[Domain]: """ - Adds a domain to the tenant. Important: You cannot use an associated domain with your Azure AD tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + Adds a domain to the tenant. Important: You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Domain] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Domain] = None, request_configuration: Option def to_get_request_information(self,request_configuration: Optional[DomainsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of domain objects. + Retrieve a list of domain objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Domain] = None, request_configuration: Optional[DomainsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a domain to the tenant. Important: You cannot use an associated domain with your Azure AD tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + Adds a domain to the tenant. Important: You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Domain] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DomainsRequestBuilderGetQueryParameters(): """ - Retrieve a list of domain objects. + Retrieve a list of domain objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/domain_item_request_builder.py b/msgraph/generated/domains/item/domain_item_request_builder.py index ed72f3a187e..dc61275e497 100644 --- a/msgraph/generated/domains/item/domain_item_request_builder.py +++ b/msgraph/generated/domains/item/domain_item_request_builder.py @@ -35,7 +35,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DomainItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a domain from a tenant. + Deletes a domain from a tenant. This API is available in the following national cloud deployments. 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/domain-delete?view=graph-rest-1.0 @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[DomainItemRequestBuilderDe async def get(self,request_configuration: Optional[DomainItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Domain]: """ - Retrieve the properties and relationships of domain object. + Retrieve the properties and relationships of domain object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Domain] Find more info here: https://learn.microsoft.com/graph/api/domain-get?view=graph-rest-1.0 @@ -77,7 +77,7 @@ async def get(self,request_configuration: Optional[DomainItemRequestBuilderGetRe async def patch(self,body: Optional[Domain] = None, request_configuration: Optional[DomainItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Domain]: """ - Update the properties of domain object. + Update the properties of domain object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Domain] @@ -102,39 +102,39 @@ async def patch(self,body: Optional[Domain] = None, request_configuration: Optio def to_delete_request_information(self,request_configuration: Optional[DomainItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a domain from a tenant. + Deletes a domain from a tenant. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DomainItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of domain object. + Retrieve the properties and relationships of domain object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Domain] = None, request_configuration: Optional[DomainItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of domain object. + Update the properties of domain object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[Domain] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -238,7 +238,7 @@ class DomainItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguratio @dataclass class DomainItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of domain object. + Retrieve the properties and relationships of domain object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/domain_name_references/count/count_request_builder.py b/msgraph/generated/domains/item/domain_name_references/count/count_request_builder.py index 41c211f6b2d..bfa33cf2bfc 100644 --- a/msgraph/generated/domains/item/domain_name_references/count/count_request_builder.py +++ b/msgraph/generated/domains/item/domain_name_references/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/domains/item/domain_name_references/domain_name_references_request_builder.py b/msgraph/generated/domains/item/domain_name_references/domain_name_references_request_builder.py index e47d170df56..43dbbd2afbb 100644 --- a/msgraph/generated/domains/item/domain_name_references/domain_name_references_request_builder.py +++ b/msgraph/generated/domains/item/domain_name_references/domain_name_references_request_builder.py @@ -44,7 +44,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[DomainNameReferencesRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. + Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/domain-list-domainnamereferences?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[DomainNameReferencesRequestBu def to_get_request_information(self,request_configuration: Optional[DomainNameReferencesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. + Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DomainNameReferencesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DomainNameReferencesRequestBuilderGetQueryParameters(): """ - Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. + Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/domain_name_references/item/directory_object_item_request_builder.py b/msgraph/generated/domains/item/domain_name_references/item/directory_object_item_request_builder.py index 0b6ee17f696..3d97689fc1f 100644 --- a/msgraph/generated/domains/item/domain_name_references/item/directory_object_item_request_builder.py +++ b/msgraph/generated/domains/item/domain_name_references/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/domains/item/federation_configuration/count/count_request_builder.py b/msgraph/generated/domains/item/federation_configuration/count/count_request_builder.py index fc2657b3082..94459fe336b 100644 --- a/msgraph/generated/domains/item/federation_configuration/count/count_request_builder.py +++ b/msgraph/generated/domains/item/federation_configuration/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/domains/item/federation_configuration/federation_configuration_request_builder.py b/msgraph/generated/domains/item/federation_configuration/federation_configuration_request_builder.py index 4841981dbaf..c24ffe6469d 100644 --- a/msgraph/generated/domains/item/federation_configuration/federation_configuration_request_builder.py +++ b/msgraph/generated/domains/item/federation_configuration/federation_configuration_request_builder.py @@ -45,7 +45,7 @@ def by_internal_domain_federation_id(self,internal_domain_federation_id: str) -> async def get(self,request_configuration: Optional[FederationConfigurationRequestBuilderGetRequestConfiguration] = None) -> Optional[InternalDomainFederationCollectionResponse]: """ - Read the properties and relationships of an internalDomainFederation object. + Read the properties and relationships of an internalDomainFederation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InternalDomainFederationCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[FederationConfigurationReques async def post(self,body: Optional[InternalDomainFederation] = None, request_configuration: Optional[FederationConfigurationRequestBuilderPostRequestConfiguration] = None) -> Optional[InternalDomainFederation]: """ - Create a new internalDomainFederation object. + Create a new internalDomainFederation object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InternalDomainFederation] @@ -91,24 +91,24 @@ async def post(self,body: Optional[InternalDomainFederation] = None, request_con def to_get_request_information(self,request_configuration: Optional[FederationConfigurationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an internalDomainFederation object. + Read the properties and relationships of an internalDomainFederation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InternalDomainFederation] = None, request_configuration: Optional[FederationConfigurationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new internalDomainFederation object. + Create a new internalDomainFederation object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[InternalDomainFederation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class FederationConfigurationRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an internalDomainFederation object. + Read the properties and relationships of an internalDomainFederation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.py b/msgraph/generated/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.py index 6054ae0aa43..b1c4f8ef159 100644 --- a/msgraph/generated/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.py +++ b/msgraph/generated/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[InternalDomainFederationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an internalDomainFederation object. + Delete an internalDomainFederation object. This API is available in the following national cloud deployments. 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/internaldomainfederation-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[InternalDomainFederationIt async def get(self,request_configuration: Optional[InternalDomainFederationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[InternalDomainFederation]: """ - Read the properties and relationships of an internalDomainFederation object. + Read the properties and relationships of an internalDomainFederation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InternalDomainFederation] Find more info here: https://learn.microsoft.com/graph/api/internaldomainfederation-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[InternalDomainFederationItemR async def patch(self,body: Optional[InternalDomainFederation] = None, request_configuration: Optional[InternalDomainFederationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[InternalDomainFederation]: """ - Update the properties of an internalDomainFederation object. + Update the properties of an internalDomainFederation object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InternalDomainFederation] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[InternalDomainFederation] = None, request_co def to_delete_request_information(self,request_configuration: Optional[InternalDomainFederationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an internalDomainFederation object. + Delete an internalDomainFederation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[InternalDomainFederationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an internalDomainFederation object. + Read the properties and relationships of an internalDomainFederation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InternalDomainFederation] = None, request_configuration: Optional[InternalDomainFederationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an internalDomainFederation object. + Update the properties of an internalDomainFederation object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[InternalDomainFederation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class InternalDomainFederationItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class InternalDomainFederationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an internalDomainFederation object. + Read the properties and relationships of an internalDomainFederation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/force_delete/force_delete_request_builder.py b/msgraph/generated/domains/item/force_delete/force_delete_request_builder.py index a9c9a7c121d..2b361579cf2 100644 --- a/msgraph/generated/domains/item/force_delete/force_delete_request_builder.py +++ b/msgraph/generated/domains/item/force_delete/force_delete_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForceDeletePostRequestBody] = None, request_configuration: Optional[ForceDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return a HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. + Deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. This API is available in the following national cloud deployments. 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[ForceDeletePostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[ForceDeletePostRequestBody] = None, request_configuration: Optional[ForceDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return a HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. + Deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForceDeletePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_response.py b/msgraph/generated/domains/item/promote/promote_post_response.py similarity index 91% rename from msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_response.py rename to msgraph/generated/domains/item/promote/promote_post_response.py index e52ce0585e5..fa15157c2f4 100644 --- a/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_response.py +++ b/msgraph/generated/domains/item/promote/promote_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class RemoveGroupResponse(AdditionalDataHolder, BackedModel, Parsable): +class PromotePostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class RemoveGroupResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemoveGroupResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PromotePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RemoveGroupResponse + Returns: PromotePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return RemoveGroupResponse() + return PromotePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/domains/item/promote/promote_request_builder.py b/msgraph/generated/domains/item/promote/promote_request_builder.py index ad6a2ea0738..69102e5baa4 100644 --- a/msgraph/generated/domains/item/promote/promote_request_builder.py +++ b/msgraph/generated/domains/item/promote/promote_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .promote_response import PromoteResponse + from .promote_post_response import PromotePostResponse class PromoteRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/domains/{domain%2Did}/promote", path_parameters) - async def post(self,request_configuration: Optional[PromoteRequestBuilderPostRequestConfiguration] = None) -> Optional[PromoteResponse]: + async def post(self,request_configuration: Optional[PromoteRequestBuilderPostRequestConfiguration] = None) -> Optional[PromotePostResponse]: """ - Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true. + Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[PromoteResponse] + Returns: Optional[PromotePostResponse] Find more info here: https://learn.microsoft.com/graph/api/domain-promote?view=graph-rest-1.0 """ request_info = self.to_post_request_information( @@ -44,24 +44,24 @@ async def post(self,request_configuration: Optional[PromoteRequestBuilderPostReq } if not self.request_adapter: raise Exception("Http core is null") - from .promote_response import PromoteResponse + from .promote_post_response import PromotePostResponse - return await self.request_adapter.send_async(request_info, PromoteResponse, error_mapping) + return await self.request_adapter.send_async(request_info, PromotePostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[PromoteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true. + Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PromoteRequestBuilder: diff --git a/msgraph/generated/domains/item/service_configuration_records/count/count_request_builder.py b/msgraph/generated/domains/item/service_configuration_records/count/count_request_builder.py index 2e0b6c46db7..26abae6e97d 100644 --- a/msgraph/generated/domains/item/service_configuration_records/count/count_request_builder.py +++ b/msgraph/generated/domains/item/service_configuration_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.py b/msgraph/generated/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.py index 69bb8fe6946..c924d124128 100644 --- a/msgraph/generated/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.py +++ b/msgraph/generated/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DomainDns Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DomainDnsRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DomainDnsRec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DomainDnsRecord] = None, request_configuration: Optional[DomainDnsRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DomainDnsRecord] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/domains/item/service_configuration_records/service_configuration_records_request_builder.py b/msgraph/generated/domains/item/service_configuration_records/service_configuration_records_request_builder.py index 2a5620497f9..a8ce68ad796 100644 --- a/msgraph/generated/domains/item/service_configuration_records/service_configuration_records_request_builder.py +++ b/msgraph/generated/domains/item/service_configuration_records/service_configuration_records_request_builder.py @@ -45,7 +45,7 @@ def by_domain_dns_record_id(self,domain_dns_record_id: str) -> DomainDnsRecordIt async def get(self,request_configuration: Optional[ServiceConfigurationRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[DomainDnsRecordCollectionResponse]: """ - Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DomainDnsRecordCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/domain-list-serviceconfigurationrecords?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DomainDnsRecord] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[ServiceConfigurationRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DomainDnsRecord] = None, request_configuration: Optional[ServiceConfigurationRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DomainDnsRecord] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ServiceConfigurationRecordsRequestBuilderGetQueryParameters(): """ - Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/verification_dns_records/count/count_request_builder.py b/msgraph/generated/domains/item/verification_dns_records/count/count_request_builder.py index acaaa90240a..c81c3555f92 100644 --- a/msgraph/generated/domains/item/verification_dns_records/count/count_request_builder.py +++ b/msgraph/generated/domains/item/verification_dns_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.py b/msgraph/generated/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.py index e42c237204e..935ad2cef23 100644 --- a/msgraph/generated/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.py +++ b/msgraph/generated/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DomainDns Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DomainDnsRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DomainDnsRec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DomainDnsRecord] = None, request_configuration: Optional[DomainDnsRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DomainDnsRecord] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/domains/item/verification_dns_records/verification_dns_records_request_builder.py b/msgraph/generated/domains/item/verification_dns_records/verification_dns_records_request_builder.py index 36f60f5365d..5eb5755497f 100644 --- a/msgraph/generated/domains/item/verification_dns_records/verification_dns_records_request_builder.py +++ b/msgraph/generated/domains/item/verification_dns_records/verification_dns_records_request_builder.py @@ -45,7 +45,7 @@ def by_domain_dns_record_id(self,domain_dns_record_id: str) -> DomainDnsRecordIt async def get(self,request_configuration: Optional[VerificationDnsRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[DomainDnsRecordCollectionResponse]: """ - Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Azure AD tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DomainDnsRecordCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/domain-list-verificationdnsrecords?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DomainDnsRecord] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[VerificationDnsRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Azure AD tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DomainDnsRecord] = None, request_configuration: Optional[VerificationDnsRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DomainDnsRecord] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VerificationDnsRecordsRequestBuilderGetQueryParameters(): """ - Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Azure AD tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/domains/item/verify/verify_request_builder.py b/msgraph/generated/domains/item/verify/verify_request_builder.py index 54a89cdb6a9..81e53a82dbe 100644 --- a/msgraph/generated/domains/item/verify/verify_request_builder.py +++ b/msgraph/generated/domains/item/verify/verify_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[VerifyRequestBuilderPostRequestConfiguration] = None) -> Optional[Domain]: """ - Validates the ownership of the domain. + Validates the ownership of the domain. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Domain] Find more info here: https://learn.microsoft.com/graph/api/domain-verify?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[VerifyRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[VerifyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validates the ownership of the domain. + Validates the ownership of the domain. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> VerifyRequestBuilder: diff --git a/msgraph/generated/drives/drives_request_builder.py b/msgraph/generated/drives/drives_request_builder.py index 6965c66e845..9bb55da8a86 100644 --- a/msgraph/generated/drives/drives_request_builder.py +++ b/msgraph/generated/drives/drives_request_builder.py @@ -94,14 +94,14 @@ def to_get_request_information(self,request_configuration: Optional[DrivesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Drive] = None, request_configuration: Optional[DrivesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -114,13 +114,13 @@ def to_post_request_information(self,body: Optional[Drive] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/bundles/bundles_request_builder.py b/msgraph/generated/drives/item/bundles/bundles_request_builder.py index c5726eba24d..ac6f13696fd 100644 --- a/msgraph/generated/drives/item/bundles/bundles_request_builder.py +++ b/msgraph/generated/drives/item/bundles/bundles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[BundlesReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DriveItem] = None, request_configuration: Optional[BundlesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DriveItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/bundles/count/count_request_builder.py b/msgraph/generated/drives/item/bundles/count/count_request_builder.py index 3dd06966d94..f25e2ed2867 100644 --- a/msgraph/generated/drives/item/bundles/count/count_request_builder.py +++ b/msgraph/generated/drives/item/bundles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/bundles/item/content/content_request_builder.py b/msgraph/generated/drives/item/bundles/item/content/content_request_builder.py index 65056d4e5e0..d9fe2e4d09f 100644 --- a/msgraph/generated/drives/item/bundles/item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/bundles/item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/bundles/item/drive_item_item_request_builder.py b/msgraph/generated/drives/item/bundles/item/drive_item_item_request_builder.py index 840c11720e1..3aea66dccb5 100644 --- a/msgraph/generated/drives/item/bundles/item/drive_item_item_request_builder.py +++ b/msgraph/generated/drives/item/bundles/item/drive_item_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemItemRequestBuilder: diff --git a/msgraph/generated/drives/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/drives/item/created_by_user/created_by_user_request_builder.py index 7412ce5baf3..dff6a508162 100644 --- a/msgraph/generated/drives/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/drives/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 2e77262f92a..278d2af186b 100644 --- a/msgraph/generated/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..058a3507cee --- /dev/null +++ b/msgraph/generated/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..f8a3f8b558b --- /dev/null +++ b/msgraph/generated/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/drive_item_request_builder.py b/msgraph/generated/drives/item/drive_item_request_builder.py index 27dcade6b49..633ba630abc 100644 --- a/msgraph/generated/drives/item/drive_item_request_builder.py +++ b/msgraph/generated/drives/item/drive_item_request_builder.py @@ -120,12 +120,12 @@ def to_delete_request_information(self,request_configuration: Optional[DriveItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DriveItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -135,14 +135,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Drive] = None, request_configuration: Optional[DriveItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -155,13 +155,13 @@ def to_patch_request_information(self,body: Optional[Drive] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/following/count/count_request_builder.py b/msgraph/generated/drives/item/following/count/count_request_builder.py index 50446d7a7cc..5ac0a9a28f9 100644 --- a/msgraph/generated/drives/item/following/count/count_request_builder.py +++ b/msgraph/generated/drives/item/following/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/following/following_request_builder.py b/msgraph/generated/drives/item/following/following_request_builder.py index 0305773f5df..7395b5483d4 100644 --- a/msgraph/generated/drives/item/following/following_request_builder.py +++ b/msgraph/generated/drives/item/following/following_request_builder.py @@ -44,7 +44,7 @@ def by_drive_item_id(self,drive_item_id: str) -> DriveItemItemRequestBuilder: async def get(self,request_configuration: Optional[FollowingRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItemCollectionResponse]: """ - List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. + List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/drive-list-following?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[FollowingRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[FollowingRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. + List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FollowingRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class FollowingRequestBuilderGetQueryParameters(): """ - List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. + List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/following/item/content/content_request_builder.py b/msgraph/generated/drives/item/following/item/content/content_request_builder.py index 1ab43125aab..47899ad216a 100644 --- a/msgraph/generated/drives/item/following/item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/following/item/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/following/item/drive_item_item_request_builder.py b/msgraph/generated/drives/item/following/item/drive_item_item_request_builder.py index a8599cdaec2..4bc19170c6c 100644 --- a/msgraph/generated/drives/item/following/item/drive_item_item_request_builder.py +++ b/msgraph/generated/drives/item/following/item/drive_item_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemItemRequestBuilder: diff --git a/msgraph/generated/drives/item/items/count/count_request_builder.py b/msgraph/generated/drives/item/items/count/count_request_builder.py index 10d088b18e2..b8f6578d0d3 100644 --- a/msgraph/generated/drives/item/items/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/analytics/all_time/all_time_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/all_time/all_time_request_builder.py index ec6c4e88e17..8c7212b5127 100644 --- a/msgraph/generated/drives/item/items/item/analytics/all_time/all_time_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/all_time/all_time_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AllTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemActivityStat]: """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ItemActivityStat] Find more info here: https://learn.microsoft.com/graph/api/itemanalytics-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[AllTimeRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[AllTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllTimeRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> AllTimeRequestBuilder: @dataclass class AllTimeRequestBuilderGetQueryParameters(): """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/analytics/analytics_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/analytics_request_builder.py index da5f32391e4..4887a004e24 100644 --- a/msgraph/generated/drives/item/items/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/analytics_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Analytics Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.py index 444e9fa3e3d..37a60874a04 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py index 1f6dfcd1ef2..556ff5d1760 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivitiesRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivity] = None, request_configuration: Optional[ActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ItemActivity] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py index 990190b3f4c..a5b604e1c50 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py index 2df82b01d55..00a231a8883 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py index 329c64e6e59..db0af51c2af 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py index dedf49611c7..22b90840f8b 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ItemActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ItemActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivity] = None, request_configuration: Optional[ItemActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ItemActivity] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py index 905d2cadab3..d85a1c504e0 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ItemActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ItemActivityStatItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivityStat] = None, request_configuration: Optional[ItemActivityStatItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ItemActivityStat] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py index 11977ae2f97..c8311a8af41 100644 --- a/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivityStat] = None, request_configuration: Optional[ItemActivityStatsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ItemActivityStat] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.py b/msgraph/generated/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.py index 22315ec8c89..9b125676092 100644 --- a/msgraph/generated/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.py +++ b/msgraph/generated/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[LastSevenDay Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastSevenDaysRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py b/msgraph/generated/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py index daf00bb9f03..9b90ce4b6bf 100644 --- a/msgraph/generated/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py +++ b/msgraph/generated/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[AssignSensitivityLabelPostRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/checkin/checkin_request_builder.py b/msgraph/generated/drives/item/items/item/checkin/checkin_request_builder.py index c01a2b53ff7..6abcb0e630b 100644 --- a/msgraph/generated/drives/item/items/item/checkin/checkin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/checkin/checkin_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CheckinPostRequestBody] = None, request_configuration: Optional[CheckinRequestBuilderPostRequestConfiguration] = None) -> None: """ - Check in a checked out driveItem resource, which makes the version of the document available to others. + Check in a checked out driveItem resource, which makes the version of the document available to others. This API is available in the following national cloud deployments. 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[CheckinPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[CheckinPostRequestBody] = None, request_configuration: Optional[CheckinRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check in a checked out driveItem resource, which makes the version of the document available to others. + Check in a checked out driveItem resource, which makes the version of the document available to others. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CheckinPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/checkout/checkout_request_builder.py b/msgraph/generated/drives/item/items/item/checkout/checkout_request_builder.py index 272604dc953..f743f65565e 100644 --- a/msgraph/generated/drives/item/items/item/checkout/checkout_request_builder.py +++ b/msgraph/generated/drives/item/items/item/checkout/checkout_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CheckoutRequestBuilderPostRequestConfiguration] = None) -> None: """ - Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in. + Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/driveitem-checkout?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CheckoutRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[CheckoutRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in. + Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CheckoutRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/children/children_request_builder.py b/msgraph/generated/drives/item/items/item/children/children_request_builder.py index fcb64887ce7..9a5174b6e19 100644 --- a/msgraph/generated/drives/item/items/item/children/children_request_builder.py +++ b/msgraph/generated/drives/item/items/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_drive_item_id1(self,drive_item_id1: str) -> DriveItemItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItemCollectionResponse]: """ - Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. + Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/driveitem-list-children?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[DriveItem] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. + Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DriveItem] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DriveItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. + Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/children/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/children/count/count_request_builder.py index 20f51a8bb9b..f4ba2adcde1 100644 --- a/msgraph/generated/drives/item/items/item/children/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/children/item/content/content_request_builder.py b/msgraph/generated/drives/item/items/item/children/item/content/content_request_builder.py index 4651883e807..16ac4c3feaf 100644 --- a/msgraph/generated/drives/item/items/item/children/item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/items/item/children/item/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/items/item/children/item/drive_item_item_request_builder.py b/msgraph/generated/drives/item/items/item/children/item/drive_item_item_request_builder.py index df3f7e4c1bd..f0d435a2307 100644 --- a/msgraph/generated/drives/item/items/item/children/item/drive_item_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/children/item/drive_item_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemItemRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/content/content_request_builder.py b/msgraph/generated/drives/item/items/item/content/content_request_builder.py index 7a961b3b6be..1b2f89656c9 100644 --- a/msgraph/generated/drives/item/items/item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/items/item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/items/item/copy/copy_request_builder.py b/msgraph/generated/drives/item/items/item/copy/copy_request_builder.py index a925553acd3..9a87043a9a3 100644 --- a/msgraph/generated/drives/item/items/item/copy/copy_request_builder.py +++ b/msgraph/generated/drives/item/items/item/copy/copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> Optional[DriveItem]: """ - Asynchronously creates a copy of an [driveItem][item-resource] (including any children), under a new parent item or with a new name. + Asynchronously creates a copy of an driveItem][item-resource] (including any children), under a new parent item or with a new name. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItem] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyPostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Asynchronously creates a copy of an [driveItem][item-resource] (including any children), under a new parent item or with a new name. + Asynchronously creates a copy of an driveItem][item-resource] (including any children), under a new parent item or with a new name. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/create_link/create_link_request_builder.py b/msgraph/generated/drives/item/items/item/create_link/create_link_request_builder.py index 7c9fc3295b5..44fb35aeb59 100644 --- a/msgraph/generated/drives/item/items/item/create_link/create_link_request_builder.py +++ b/msgraph/generated/drives/item/items/item/create_link/create_link_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateLinkPostRequestBody] = None, request_configuration: Optional[CreateLinkRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: """ - You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. + You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Permission] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateLinkPostRequestBody] = None, request_co def to_post_request_information(self,body: Optional[CreateLinkPostRequestBody] = None, request_configuration: Optional[CreateLinkRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. + You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateLinkPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/drives/item/items/item/create_upload_session/create_upload_session_request_builder.py index 0850ae75407..6f70320baad 100644 --- a/msgraph/generated/drives/item/items/item/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/drives/item/items/item/create_upload_session/create_upload_session_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/drives/item/items/item/created_by_user/created_by_user_request_builder.py index 55f457f6332..1ff3ebf2afa 100644 --- a/msgraph/generated/drives/item/items/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/drives/item/items/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 0ba1c94ed0e..52dea0077c7 100644 --- a/msgraph/generated/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..9aa177e86d0 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..2c6845c65f6 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/items/{driveItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/delta/delta_response.py b/msgraph/generated/drives/item/items/item/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/drives/item/items/item/delta/delta_response.py rename to msgraph/generated/drives/item/items/item/delta/delta_get_response.py index 9f66931f5f7..299f5c581ca 100644 --- a/msgraph/generated/drives/item/items/item/delta/delta_response.py +++ b/msgraph/generated/drives/item/items/item/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DriveItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/delta/delta_request_builder.py b/msgraph/generated/drives/item/items/item/delta/delta_request_builder.py index 3cbdccc0447..c2dae3fbdf8 100644 --- a/msgraph/generated/drives/item/items/item/delta/delta_request_builder.py +++ b/msgraph/generated/drives/item/items/item/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_response.py b/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_get_response.py similarity index 91% rename from msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_response.py rename to msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_get_response.py index df117cd0817..59e2b059931 100644 --- a/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_response.py +++ b/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaWithTokenResponse(BaseDeltaFunctionResponse): +class DeltaWithTokenGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DriveItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaWithTokenResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaWithTokenGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaWithTokenResponse + Returns: DeltaWithTokenGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaWithTokenResponse() + return DeltaWithTokenGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_request_builder.py b/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_request_builder.py index 8c50455a671..76c4fa8c1a3 100644 --- a/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_request_builder.py +++ b/msgraph/generated/drives/item/items/item/delta_with_token/delta_with_token_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_with_token_response import DeltaWithTokenResponse + from .delta_with_token_get_response import DeltaWithTokenGetResponse class DeltaWithTokenRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param token: Usage: token='{token}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['token'] = str(token) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(token='{token}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaWithTokenRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaWithTokenResponse]: + async def get(self,request_configuration: Optional[DeltaWithTokenRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaWithTokenGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaWithTokenResponse] + Returns: Optional[DeltaWithTokenGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[DeltaWithTokenRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .delta_with_token_response import DeltaWithTokenResponse + from .delta_with_token_get_response import DeltaWithTokenGetResponse - return await self.request_adapter.send_async(request_info, DeltaWithTokenResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaWithTokenGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaWithTokenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaWithTok Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaWithTokenRequestBuilder: 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 d83d6c76c1d..b0ea8b4c834 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 @@ -58,7 +58,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DriveItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a DriveItem by using its ID or path.Note that deleting items using this method will move the items to the recycle bin instead of permanently deleting the item. + Delete a DriveItem by using its ID or path.Deleting items using this method moves the items to the recycle bin instead of permanently deleting the item. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/driveitem-delete?view=graph-rest-1.0 @@ -129,7 +129,7 @@ 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItem] @@ -166,17 +166,17 @@ def search_with_q(self,q: Optional[str] = None) -> SearchWithQRequestBuilder: def to_delete_request_information(self,request_configuration: Optional[DriveItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a DriveItem by using its ID or path.Note that deleting items using this method will move the items to the recycle bin instead of permanently deleting the item. + Delete a DriveItem by using its ID or path.Deleting items using this method moves the items to the recycle bin instead of permanently deleting the item. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DriveItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -186,19 +186,19 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -206,13 +206,13 @@ def to_patch_request_information(self,body: Optional[DriveItem] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -289,15 +289,6 @@ def copy(self) -> CopyRequestBuilder: return CopyRequestBuilder(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 create_link(self) -> CreateLinkRequestBuilder: """ @@ -316,6 +307,15 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: return CreateUploadSessionRequestBuilder(self.request_adapter, self.path_parameters) + @property + def created_by_user(self) -> CreatedByUserRequestBuilder: + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + + return CreatedByUserRequestBuilder(self.request_adapter, self.path_parameters) + @property def delta(self) -> DeltaRequestBuilder: """ diff --git a/msgraph/generated/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py b/msgraph/generated/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py index 56e3cf7c019..5e3489a6b94 100644 --- a/msgraph/generated/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py +++ b/msgraph/generated/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[ExtractSens Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ExtractSensitivityLabelsRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/follow/follow_request_builder.py b/msgraph/generated/drives/item/items/item/follow/follow_request_builder.py index 3553eeb9559..c5022356380 100644 --- a/msgraph/generated/drives/item/items/item/follow/follow_request_builder.py +++ b/msgraph/generated/drives/item/items/item/follow/follow_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[FollowRequestBuilderPostRequestConfiguration] = None) -> Optional[DriveItem]: """ - Follow a driveItem. + Follow a driveItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItem] Find more info here: https://learn.microsoft.com/graph/api/driveitem-follow?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[FollowRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[FollowRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Follow a driveItem. + Follow a driveItem. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> FollowRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py index f0931b13fb7..a76c6042283 100644 --- a/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index 4857ea1f715..fb1cad86774 100644 --- a/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index f9d6720f828..d71cab1fb1b 100644 --- a/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index 9ae79db4e04..ed65a9e8122 100644 --- a/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/permissions/item/grant/grant_response.py b/msgraph/generated/drives/item/items/item/invite/invite_post_response.py similarity index 92% rename from msgraph/generated/sites/item/permissions/item/grant/grant_response.py rename to msgraph/generated/drives/item/items/item/invite/invite_post_response.py index 7b277cb8d3e..57cf43e4705 100644 --- a/msgraph/generated/sites/item/permissions/item/grant/grant_response.py +++ b/msgraph/generated/drives/item/items/item/invite/invite_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GrantResponse(BaseCollectionPaginationCountResponse): +class InvitePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Permission]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> InvitePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GrantResponse + Returns: InvitePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GrantResponse() + return InvitePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/invite/invite_request_builder.py b/msgraph/generated/drives/item/items/item/invite/invite_request_builder.py index 6b8e99e40e3..3787ced2641 100644 --- a/msgraph/generated/drives/item/items/item/invite/invite_request_builder.py +++ b/msgraph/generated/drives/item/items/item/invite/invite_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .invite_post_request_body import InvitePostRequestBody - from .invite_response import InviteResponse + from .invite_post_response import InvitePostResponse class InviteRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/invite", path_parameters) - async def post(self,body: Optional[InvitePostRequestBody] = None, request_configuration: Optional[InviteRequestBuilderPostRequestConfiguration] = None) -> Optional[InviteResponse]: + async def post(self,body: Optional[InvitePostRequestBody] = None, request_configuration: Optional[InviteRequestBuilderPostRequestConfiguration] = None) -> Optional[InvitePostResponse]: """ - Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a [sharing link][]. + Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[InviteResponse] + Returns: Optional[InvitePostResponse] Find more info here: https://learn.microsoft.com/graph/api/driveitem-invite?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[InvitePostRequestBody] = None, request_config } if not self.request_adapter: raise Exception("Http core is null") - from .invite_response import InviteResponse + from .invite_post_response import InvitePostResponse - return await self.request_adapter.send_async(request_info, InviteResponse, error_mapping) + return await self.request_adapter.send_async(request_info, InvitePostResponse, error_mapping) def to_post_request_information(self,body: Optional[InvitePostRequestBody] = None, request_configuration: Optional[InviteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a [sharing link][]. + Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[InvitePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py index 5dba8d1fbdb..0e3c6e6cd14 100644 --- a/msgraph/generated/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 272438af19a..8bc511b32c2 100644 --- a/msgraph/generated/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..af7d3f4b08b --- /dev/null +++ b/msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..0b5b10f0064 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/items/{driveItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/list_item/list_item_request_builder.py b/msgraph/generated/drives/item/items/item/list_item/list_item_request_builder.py index 5686682c478..932bcc765c9 100644 --- a/msgraph/generated/drives/item/items/item/list_item/list_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/list_item/list_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ListItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ListItemRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/permanent_delete/permanent_delete_request_builder.py b/msgraph/generated/drives/item/items/item/permanent_delete/permanent_delete_request_builder.py index f355a47f6a9..119c3d3942e 100644 --- a/msgraph/generated/drives/item/items/item/permanent_delete/permanent_delete_request_builder.py +++ b/msgraph/generated/drives/item/items/item/permanent_delete/permanent_delete_request_builder.py @@ -51,12 +51,12 @@ def to_post_request_information(self,request_configuration: Optional[PermanentDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PermanentDeleteRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/permissions/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/permissions/count/count_request_builder.py index 886e650afbb..3b2725b19b0 100644 --- a/msgraph/generated/drives/item/items/item/permissions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_response.py b/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_post_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/permissions/item/grant/grant_response.py rename to msgraph/generated/drives/item/items/item/permissions/item/grant/grant_post_response.py index 00b25da2591..f0fd631a02d 100644 --- a/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_response.py +++ b/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_post_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GrantResponse(BaseCollectionPaginationCountResponse): +class GrantPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Permission]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GrantResponse + Returns: GrantPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GrantResponse() + return GrantPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_request_builder.py b/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_request_builder.py index bee9c02c64b..c1ba621c28c 100644 --- a/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_request_builder.py +++ b/msgraph/generated/drives/item/items/item/permissions/item/grant/grant_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError from .grant_post_request_body import GrantPostRequestBody - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse class GrantRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions/{permission%2Did}/grant", path_parameters) - async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantResponse]: + async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantPostResponse]: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GrantResponse] + Returns: Optional[GrantPostResponse] Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GrantPostRequestBody] = None, request_configu } if not self.request_adapter: raise Exception("Http core is null") - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse - return await self.request_adapter.send_async(request_info, GrantResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/permissions/item/permission_item_request_builder.py b/msgraph/generated/drives/item/items/item/permissions/item/permission_item_request_builder.py index c28e45d8103..666d6ed566a 100644 --- a/msgraph/generated/drives/item/items/item/permissions/item/permission_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/permissions/item/permission_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove access to a DriveItem. Only sharing permissions that are not inherited can be deleted.The inheritedFrom property must be null. + Remove access to a DriveItem. Only sharing permissions that are not inherited can be deleted.The inheritedFrom property must be null. This API is available in the following national cloud deployments. 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/permission-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PermissionItemRequestBuild async def get(self,request_configuration: Optional[PermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Permission]: """ - Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. + Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. This API is available in the following national cloud deployments. 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/permission-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[PermissionItemRequestBuilderG async def patch(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Permission]: """ - Update the properties of a sharing permission by patching the permission resource. Only the roles property can be modified this way. + Update the properties of a sharing permission by patching the permission resource. Only the roles property can be modified this way. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Permission] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[Permission] = None, request_configuration: O def to_delete_request_information(self,request_configuration: Optional[PermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove access to a DriveItem. Only sharing permissions that are not inherited can be deleted.The inheritedFrom property must be null. + Remove access to a DriveItem. Only sharing permissions that are not inherited can be deleted.The inheritedFrom property must be null. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. + Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Permission] = None, request_configuration: Optional[PermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a sharing permission by patching the permission resource. Only the roles property can be modified this way. + Update the properties of a sharing permission by patching the permission resource. Only the roles property can be modified this way. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Permission] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class PermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class PermissionItemRequestBuilderGetQueryParameters(): """ - Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. + Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/permissions/permissions_request_builder.py b/msgraph/generated/drives/item/items/item/permissions/permissions_request_builder.py index ae7f5f0fd31..eaecf438c59 100644 --- a/msgraph/generated/drives/item/items/item/permissions/permissions_request_builder.py +++ b/msgraph/generated/drives/item/items/item/permissions/permissions_request_builder.py @@ -45,7 +45,7 @@ def by_permission_id(self,permission_id: str) -> PermissionItemRequestBuilder: async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: """ - List the effective sharing permissions on a driveItem. + List the effective sharing permissions on a driveItem. This API is available in the following national cloud deployments. 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/driveitem-list-permissions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Permission] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the effective sharing permissions on a driveItem. + List the effective sharing permissions on a driveItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Permission] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PermissionsRequestBuilderGetQueryParameters(): """ - List the effective sharing permissions on a driveItem. + List the effective sharing permissions on a driveItem. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/preview/preview_request_builder.py b/msgraph/generated/drives/item/items/item/preview/preview_request_builder.py index 74dd3a47b3f..60b3e9f95d2 100644 --- a/msgraph/generated/drives/item/items/item/preview/preview_request_builder.py +++ b/msgraph/generated/drives/item/items/item/preview/preview_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PreviewPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/restore/restore_request_builder.py b/msgraph/generated/drives/item/items/item/restore/restore_request_builder.py index 490abe7f8c3..199198dea67 100644 --- a/msgraph/generated/drives/item/items/item/restore/restore_request_builder.py +++ b/msgraph/generated/drives/item/items/item/restore/restore_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RestorePostRequestBody] = None, request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DriveItem]: """ - Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. + Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItem] @@ -54,7 +54,7 @@ async def post(self,body: Optional[RestorePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[RestorePostRequestBody] = None, request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. + Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RestorePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_response.py b/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_get_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/search_with_q/search_with_q_response.py rename to msgraph/generated/drives/item/items/item/search_with_q/search_with_q_get_response.py index 72f0a14a911..29379212b44 100644 --- a/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_response.py +++ b/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SearchWithQResponse(BaseCollectionPaginationCountResponse): +class SearchWithQGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DriveItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SearchWithQResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SearchWithQGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SearchWithQResponse + Returns: SearchWithQGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SearchWithQResponse() + return SearchWithQGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_request_builder.py b/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_request_builder.py index 5789d4b36db..40a5f2eb923 100644 --- a/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_request_builder.py +++ b/msgraph/generated/drives/item/items/item/search_with_q/search_with_q_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .search_with_q_response import SearchWithQResponse + from .search_with_q_get_response import SearchWithQGetResponse class SearchWithQRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['q'] = str(q) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/search(q='{q}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[SearchWithQRequestBuilderGetRequestConfiguration] = None) -> Optional[SearchWithQResponse]: + async def get(self,request_configuration: Optional[SearchWithQRequestBuilderGetRequestConfiguration] = None) -> Optional[SearchWithQGetResponse]: """ Invoke function search param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SearchWithQResponse] + Returns: Optional[SearchWithQGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[SearchWithQRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .search_with_q_response import SearchWithQResponse + from .search_with_q_get_response import SearchWithQGetResponse - return await self.request_adapter.send_async(request_info, SearchWithQResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SearchWithQGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SearchWithQRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[SearchWithQR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SearchWithQRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/subscriptions/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/subscriptions/count/count_request_builder.py index 292cb314154..b91c2445dd8 100644 --- a/msgraph/generated/drives/item/items/item/subscriptions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/subscriptions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py index 97553059e82..6e8f2f118f8 100644 --- a/msgraph/generated/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py +++ b/msgraph/generated/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReauthorizeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/drives/item/items/item/subscriptions/item/subscription_item_request_builder.py index 30abb869f57..9aacbaee301 100644 --- a/msgraph/generated/drives/item/items/item/subscriptions/item/subscription_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/subscriptions/item/subscription_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Subscript Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Subscription] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/subscriptions/subscriptions_request_builder.py b/msgraph/generated/drives/item/items/item/subscriptions/subscriptions_request_builder.py index 8ff5c8d2810..c77ca866fc1 100644 --- a/msgraph/generated/drives/item/items/item/subscriptions/subscriptions_request_builder.py +++ b/msgraph/generated/drives/item/items/item/subscriptions/subscriptions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Subscription] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/thumbnails/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/thumbnails/count/count_request_builder.py index 1e0dc3edfd9..0ba7e0491e2 100644 --- a/msgraph/generated/drives/item/items/item/thumbnails/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/thumbnails/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.py b/msgraph/generated/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.py index 26b48558788..c3f6d35e0c3 100644 --- a/msgraph/generated/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Thumbnail Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ThumbnailSetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ThumbnailSet Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThumbnailSet] = None, request_configuration: Optional[ThumbnailSetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ThumbnailSet] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/thumbnails/thumbnails_request_builder.py b/msgraph/generated/drives/item/items/item/thumbnails/thumbnails_request_builder.py index 98278e989f2..f9eee5fb571 100644 --- a/msgraph/generated/drives/item/items/item/thumbnails/thumbnails_request_builder.py +++ b/msgraph/generated/drives/item/items/item/thumbnails/thumbnails_request_builder.py @@ -45,7 +45,7 @@ def by_thumbnail_set_id(self,thumbnail_set_id: str) -> ThumbnailSetItemRequestBu async def get(self,request_configuration: Optional[ThumbnailsRequestBuilderGetRequestConfiguration] = None) -> Optional[ThumbnailSetCollectionResponse]: """ - Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: + Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ThumbnailSetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/driveitem-list-thumbnails?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ThumbnailSet] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ThumbnailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: + Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThumbnailSet] = None, request_configuration: Optional[ThumbnailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ThumbnailSet] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ThumbnailsRequestBuilderGetQueryParameters(): """ - Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: + Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/unfollow/unfollow_request_builder.py b/msgraph/generated/drives/item/items/item/unfollow/unfollow_request_builder.py index 6ec97b07348..1f13e5f72ff 100644 --- a/msgraph/generated/drives/item/items/item/unfollow/unfollow_request_builder.py +++ b/msgraph/generated/drives/item/items/item/unfollow/unfollow_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnfollowRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unfollow a driveItem. + Unfollow a driveItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/driveitem-unfollow?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnfollowRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[UnfollowRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unfollow a driveItem. + Unfollow a driveItem. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnfollowRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/validate_permission/validate_permission_request_builder.py b/msgraph/generated/drives/item/items/item/validate_permission/validate_permission_request_builder.py index 6e05f0f9029..157f5cd29ca 100644 --- a/msgraph/generated/drives/item/items/item/validate_permission/validate_permission_request_builder.py +++ b/msgraph/generated/drives/item/items/item/validate_permission/validate_permission_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ValidatePermissionPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/versions/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/versions/count/count_request_builder.py index 9be40c097f7..f5b31dff42c 100644 --- a/msgraph/generated/drives/item/items/item/versions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/versions/item/content/content_request_builder.py b/msgraph/generated/drives/item/items/item/versions/item/content/content_request_builder.py index 27a0911aaa1..e85bf41c9f4 100644 --- a/msgraph/generated/drives/item/items/item/versions/item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/items/item/versions/item/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/items/item/versions/item/drive_item_version_item_request_builder.py b/msgraph/generated/drives/item/items/item/versions/item/drive_item_version_item_request_builder.py index e19f77b2778..d45399009d3 100644 --- a/msgraph/generated/drives/item/items/item/versions/item/drive_item_version_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/versions/item/drive_item_version_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[DriveItemVersionItemReques async def get(self,request_configuration: Optional[DriveItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItemVersion]: """ - Retrieve the metadata for a specific version of a DriveItem. + Retrieve the metadata for a specific version of a DriveItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItemVersion] Find more info here: https://learn.microsoft.com/graph/api/driveitemversion-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[DriveItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DriveItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a specific version of a DriveItem. + Retrieve the metadata for a specific version of a DriveItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DriveItemVersion] = None, request_configuration: Optional[DriveItemVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DriveItemVersion] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class DriveItemVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class DriveItemVersionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a specific version of a DriveItem. + Retrieve the metadata for a specific version of a DriveItem. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.py index 1177f89c279..399e8290668 100644 --- a/msgraph/generated/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.py +++ b/msgraph/generated/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a previous version of a DriveItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. + Restore a previous version of a DriveItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/driveitemversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreVersionRequestBuilder def to_post_request_information(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a previous version of a DriveItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. + Restore a previous version of a DriveItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreVersionRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/versions/versions_request_builder.py b/msgraph/generated/drives/item/items/item/versions/versions_request_builder.py index d7494e7c22a..f6647e0fa14 100644 --- a/msgraph/generated/drives/item/items/item/versions/versions_request_builder.py +++ b/msgraph/generated/drives/item/items/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_drive_item_version_id(self,drive_item_version_id: str) -> DriveItemVersio async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItemVersionCollectionResponse]: """ - OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings which may be unique per user or location. + OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings that may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItemVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/driveitem-list-versions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DriveItemVersion] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings which may be unique per user or location. + OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings that may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DriveItemVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DriveItemVersion] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings which may be unique per user or location. + OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings that may be unique per user or location. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/application/application_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/application/application_request_builder.py index 8e36c7cebac..2bea2d857ef 100644 --- a/msgraph/generated/drives/item/items/item/workbook/application/application_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/application/application_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ApplicationRequestBuilderD async def get(self,request_configuration: Optional[ApplicationRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookApplication]: """ - Retrieve the properties and relationships of a workbookApplication object. + Retrieve the properties and relationships of a workbookApplication object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookApplication] Find more info here: https://learn.microsoft.com/graph/api/workbookapplication-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[Applicati Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApplicationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a workbookApplication object. + Retrieve the properties and relationships of a workbookApplication object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookApplication] = None, request_configuration: Optional[ApplicationRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookApplication] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ApplicationRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class ApplicationRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a workbookApplication object. + Retrieve the properties and relationships of a workbookApplication object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/application/calculate/calculate_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/application/calculate/calculate_request_builder.py index 3256a3818b9..965410ee450 100644 --- a/msgraph/generated/drives/item/items/item/workbook/application/calculate/calculate_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/application/calculate/calculate_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CalculatePostRequestBody] = None, request_configuration: Optional[CalculateRequestBuilderPostRequestConfiguration] = None) -> None: """ - Recalculate all currently opened workbooks in Excel. + Recalculate all currently opened workbooks in Excel. This API is available in the following national cloud deployments. 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[CalculatePostRequestBody] = None, request_con def to_post_request_information(self,body: Optional[CalculatePostRequestBody] = None, request_configuration: Optional[CalculateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Recalculate all currently opened workbooks in Excel. + Recalculate all currently opened workbooks in Excel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CalculatePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/close_session/close_session_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/close_session/close_session_request_builder.py index 3bf3fe3fe91..4fae0ad627c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/close_session/close_session_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/close_session/close_session_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CloseSessionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Use this API to close an existing workbook session. + Use this API to close an existing workbook session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/workbook-closesession?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CloseSessionRequestBuilderPo def to_post_request_information(self,request_configuration: Optional[CloseSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to close an existing workbook session. + Use this API to close an existing workbook session. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CloseSessionRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/comments/comments_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/comments/comments_request_builder.py index 4a4d6c142b2..d64b6728b28 100644 --- a/msgraph/generated/drives/item/items/item/workbook/comments/comments_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/comments/comments_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[CommentsRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookComment] = None, request_configuration: Optional[CommentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WorkbookComment] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/comments/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/comments/count/count_request_builder.py index ac990cbb9de..89039e3f0e3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/comments/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/comments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.py index 26112056c9f..e39b86dc545 100644 --- a/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py index fa64c4a69cf..1cebee41992 100644 --- a/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[WorkbookCommentReplyItemRe async def get(self,request_configuration: Optional[WorkbookCommentReplyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookCommentReply]: """ - Retrieve the properties and relationships of workbookCommentReply object. + Retrieve the properties and relationships of workbookCommentReply object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookCommentReply] Find more info here: https://learn.microsoft.com/graph/api/workbookcommentreply-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookCommentReplyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of workbookCommentReply object. + Retrieve the properties and relationships of workbookCommentReply object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookCommentReply] = None, request_configuration: Optional[WorkbookCommentReplyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookCommentReply] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class WorkbookCommentReplyItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class WorkbookCommentReplyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of workbookCommentReply object. + Retrieve the properties and relationships of workbookCommentReply object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.py index e6354512f9d..e1f28fc1271 100644 --- a/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.py @@ -45,7 +45,7 @@ def by_workbook_comment_reply_id(self,workbook_comment_reply_id: str) -> Workboo async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookCommentReplyCollectionResponse]: """ - Retrieve the properties and relationships of workbookCommentReply object. + Retrieve the properties and relationships of workbookCommentReply object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookCommentReplyCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[WorkbookCommentReply] = None, request_configu def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of workbookCommentReply object. + Retrieve the properties and relationships of workbookCommentReply object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookCommentReply] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WorkbookCommentReply] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of workbookCommentReply object. + Retrieve the properties and relationships of workbookCommentReply object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.py index 3cfeee91d9c..686028b59e6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookCommentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[WorkbookComm Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookComment] = None, request_configuration: Optional[WorkbookCommentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookComment] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/create_session/create_session_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/create_session/create_session_request_builder.py index 136e6d334f8..cc137f47ab7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/create_session/create_session_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/create_session/create_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateSessionPostRequestBody] = None, request_configuration: Optional[CreateSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookSessionInfo]: """ - Create a new workbook session. Excel APIs can be called in one of two modes: To represent the session in the API, use the workbook-session-id: {session-id} header. In some cases, creating a new session requires an indeterminate time to complete. Microsoft Graph also provides a long running operations pattern. This pattern provides a way to poll for creation status updates, without waiting for the creation to complete. The following are the steps: + Create a new workbook session. Excel APIs can be called in one of two modes: To represent the session in the API, use the workbook-session-id: {session-id} header. In some cases, creating a new session requires an indeterminate time to complete. Microsoft Graph also provides a long running operations pattern. This pattern provides a way to poll for creation status updates, without waiting for the creation to complete. The following are the steps: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookSessionInfo] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateSessionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CreateSessionPostRequestBody] = None, request_configuration: Optional[CreateSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new workbook session. Excel APIs can be called in one of two modes: To represent the session in the API, use the workbook-session-id: {session-id} header. In some cases, creating a new session requires an indeterminate time to complete. Microsoft Graph also provides a long running operations pattern. This pattern provides a way to poll for creation status updates, without waiting for the creation to complete. The following are the steps: + Create a new workbook session. Excel APIs can be called in one of two modes: To represent the session in the API, use the workbook-session-id: {session-id} header. In some cases, creating a new session requires an indeterminate time to complete. Microsoft Graph also provides a long running operations pattern. This pattern provides a way to poll for creation status updates, without waiting for the creation to complete. The following are the steps: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateSessionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/abs/abs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/abs/abs_request_builder.py index 7ea1f3dc5b3..f60a408c636 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/abs/abs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/abs/abs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AbsPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.py index 362d0c18b9d..1227d0bd149 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AccrIntPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py index e98c98d5281..ea8f8b1d850 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AccrIntMPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/acos/acos_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/acos/acos_request_builder.py index 977ddcf49aa..6b54d6d0224 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/acos/acos_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/acos/acos_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AcosPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.py index a50cc8f05a0..e14dda11fb9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AcoshPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/acot/acot_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/acot/acot_request_builder.py index 0534c2ba52e..a23bd6b7ee6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/acot/acot_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/acot/acot_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AcotPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.py index 163990c5dce..fd2a4412e6a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AcothPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py index ceaf9d9382b..67287ad3294 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AmorDegrcPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py index e83460fc752..ce3c8c47b25 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AmorLincPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/and_/and_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/and_/and_request_builder.py index 43a3476c224..6862fba249f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/and_/and_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/and_/and_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AndPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.py index fd144ffc951..7338f476e6e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ArabicPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/areas/areas_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/areas/areas_request_builder.py index 6f3776627e4..478571644a1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/areas/areas_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/areas/areas_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AreasPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/asc/asc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/asc/asc_request_builder.py index c8a8589cefb..0ceb9b285fe 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/asc/asc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/asc/asc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AscPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/asin/asin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/asin/asin_request_builder.py index f5a5ce3c5e2..84e0f04ae39 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/asin/asin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/asin/asin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AsinPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.py index 4234b3f6474..7704e63696a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AsinhPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/atan/atan_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/atan/atan_request_builder.py index e734de8a5bc..eb12863c282 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/atan/atan_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/atan/atan_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AtanPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.py index dc570ea0327..b04fc1b38de 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Atan2PostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.py index 211d3dc7d47..d74b890648f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AtanhPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py index eb2b39358fd..e4017e46251 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AveDevPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/average/average_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/average/average_request_builder.py index d1dd112a8fa..40f0f3cff71 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/average/average_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/average/average_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AveragePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.py index 3304b3a906e..d2e7a9d728a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AverageAPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.py index 1709e9166eb..5b92c757688 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AverageIfPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py index 97c64ed924d..9be5caee5cd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AverageIfsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.py index dd3d0282322..efd1b510e5a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BahtTextPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/base/base_request_builder_.py b/msgraph/generated/drives/item/items/item/workbook/functions/base/base_request_builder_.py index fb44d853a83..8ed8552f18b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/base/base_request_builder_.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/base/base_request_builder_.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BasePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py index e4d8b58ee59..ffdcc687cf5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BesselIPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py index 817b610ec26..cd6742a3b13 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BesselJPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py index fe9274e4204..6d63fdfea10 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BesselKPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py index ff74b38b886..bb416f947aa 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BesselYPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py index 13586064973..65c759464fe 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Beta_DistPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py index b886b1fc085..7b55411375e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Beta_InvPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py index bd40549fe23..07dc4128578 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Bin2DecPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py index 5d26f05c729..2a52477298b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Bin2HexPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py index c538bba8844..57646e79c66 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Bin2OctPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py index 1b36d107602..dbc82f8c540 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Binom_DistPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py index 51d6b201aad..17729c34a9a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Binom_Dist_RangePostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py index db6d2c053a4..c9933e3c8f0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Binom_InvPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.py index 47762dde0f2..af479d8c40c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BitandPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py index 127c5b8d8c8..e7a85c72959 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BitlshiftPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.py index cbe43f18c58..95f3c9dae5c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BitorPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py index 39248d9df6c..6e42a7a9370 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BitrshiftPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.py index f6b7d6d2e96..3d2c60163ab 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[BitxorPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py index 573d7790841..df322f7db7a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Ceiling_MathPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py index 9d10cb6aaa4..396a9ebcec0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Ceiling_PrecisePostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/char/char_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/char/char_request_builder.py index 73830ac5721..e5ae278b8f6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/char/char_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/char/char_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CharPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py index 5357bb74246..2992ab89837 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ChiSq_DistPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py index cb0cf08e872..efae0027806 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ChiSq_Dist_RTPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py index fbbdb63dc32..eef2ae137a5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ChiSq_InvPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py index dc57d01d77e..5feeb27d687 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ChiSq_Inv_RTPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/choose/choose_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/choose/choose_request_builder.py index 214cb2b8e04..a6e0f34b892 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/choose/choose_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/choose/choose_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ChoosePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/clean/clean_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/clean/clean_request_builder.py index fd449841af4..84ec8bd8459 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/clean/clean_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/clean/clean_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CleanPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/code/code_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/code/code_request_builder.py index 1a7529cb443..9cd5f27981e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/code/code_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/code/code_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CodePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/columns/columns_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/columns/columns_request_builder.py index bf73f373071..b7624892d2b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/columns/columns_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/columns/columns_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ColumnsPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/combin/combin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/combin/combin_request_builder.py index 19167aafc6a..33f8326b1e3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/combin/combin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/combin/combin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CombinPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/combina/combina_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/combina/combina_request_builder.py index 86618b842a1..563bdcdd5a6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/combina/combina_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/combina/combina_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CombinaPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/complex/complex_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/complex/complex_request_builder.py index cce44c91737..91923e8c57d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/complex/complex_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/complex/complex_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ComplexPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.py index 73100ac4346..64e71f5714b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ConcatenatePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py index af29a5b6750..7b8b1171d61 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Confidence_NormPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py index 9159eb07a71..0eaaab0e2f5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Confidence_TPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/convert/convert_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/convert/convert_request_builder.py index 87bf2d025c0..d6e9b88f28b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/convert/convert_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/convert/convert_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ConvertPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/cos/cos_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/cos/cos_request_builder.py index 3cc69fdec0b..a089068b2a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/cos/cos_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/cos/cos_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CosPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.py index af2ca9e3fd4..d753abdb369 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoshPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/cot/cot_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/cot/cot_request_builder.py index 14845b76c38..a9e4e9df499 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/cot/cot_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/cot/cot_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CotPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coth/coth_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coth/coth_request_builder.py index e2b9a398fb8..42a12c1632e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coth/coth_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coth/coth_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CothPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/count/count_request_builder.py index 29831f59dea..d68334edba5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/count/count_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CountPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.py index 222a78a90d4..bdf7382204d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CountAPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.py index d71b749e855..f3590160bfa 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CountBlankPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.py index b1e39c8916b..83dd02624a6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CountIfPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py index 5c01bdac8f1..f5d2e527b96 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CountIfsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py index 4a849223fe2..5b1d9776b1b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoupDayBsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.py index 219dacc277b..62cb056faeb 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoupDaysPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py index b671d56cdbd..b2ade1c7892 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoupDaysNcPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py index d6dacc2aa1c..1e400e8d35e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoupNcdPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.py index b354426ff6b..69728b8a5fa 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoupNumPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py index a754c65dd69..ed62085ca8e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CoupPcdPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/csc/csc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/csc/csc_request_builder.py index cd4bd4d0fdd..1f1f427c173 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/csc/csc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/csc/csc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CscPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/csch/csch_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/csch/csch_request_builder.py index 918a16a627d..35dfecd36ca 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/csch/csch_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/csch/csch_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CschPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py index e793609e281..b37902cf97d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CumIPmtPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py index 1dfe1047355..33fbf59515a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CumPrincPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/date/date_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/date/date_request_builder.py index dd6c069d7a9..584a002d724 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/date/date_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/date/date_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DatePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.py index 57bb38a9ac5..b060ced7640 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DatevaluePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.py index f01c9bec56d..ae18660e37d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DaveragePostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/day/day_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/day/day_request_builder.py index 8dfc007fd68..8ff0203386e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/day/day_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/day/day_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DayPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/days/days_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/days/days_request_builder.py index ba87b77448b..10aacd2b9bc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/days/days_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/days/days_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DaysPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/days360/days360_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/days360/days360_request_builder.py index 0b770759b3d..872924598ab 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/days360/days360_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/days360/days360_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Days360PostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/db/db_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/db/db_request_builder.py index afb766cdcca..4eb02afddd4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/db/db_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/db/db_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DbPostRequestBody] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.py index 2d298005b14..9ba35f7e145 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DbcsPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.py index 31d950804f8..3bd31fe5cdf 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DcountPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py index 2e9a422a233..ef852196321 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DcountAPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.py index b44aefd28c1..f510a3bfb8d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DdbPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py index ff578951a2a..07129ae922e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Dec2BinPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py index ef47f9c61d7..ca65d57527f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Dec2HexPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py index abed38b536e..06c70247707 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Dec2OctPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.py index 39c0704a477..81b65ee8568 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DecimalPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.py index 72aa19e46d4..6345767ec5c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DegreesPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/delta/delta_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/delta/delta_request_builder.py index f634be4c740..938543ad992 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/delta/delta_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/delta/delta_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DeltaPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py index 5375fc2e81f..57b63497385 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DevSqPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dget/dget_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dget/dget_request_builder.py index 9c3fef732cc..a1666734a96 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dget/dget_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dget/dget_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DgetPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/disc/disc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/disc/disc_request_builder.py index e144179d46b..32caa10a4a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/disc/disc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/disc/disc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DiscPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.py index 8da0251515e..b3d5b57ddae 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DmaxPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.py index f20f6433ded..e7905a44326 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DminPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.py index 9a010ab0fae..34a810e0771 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DollarPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py index 9197ebd0039..ab5369eef5a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DollarDePostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py index 2916ef7199b..d067cebf21f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DollarFrPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.py index 207180d70eb..e434e9df0f3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DproductPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py index 6fd0c216ce6..967ba0b478d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DstDevPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py index 62a6ab0cf43..57277d7a7be 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DstDevPPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.py index dbabc7533af..c80d47f1691 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DsumPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/duration/duration_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/duration/duration_request_builder.py index 3f1fd5605f9..1cd6e2a2650 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/duration/duration_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/duration/duration_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DurationPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.py index 7f557c7ab1a..2ead8478818 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DvarPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py index cbc8ddb673d..ed3582eb99e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[DvarPPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py index 54ac3d820f2..a7a66c4c4f5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Ecma_CeilingPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/edate/edate_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/edate/edate_request_builder.py index b8a1899cae9..23fe3e10f46 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/edate/edate_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/edate/edate_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[EdatePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/effect/effect_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/effect/effect_request_builder.py index 719b52ee4cb..7cd20a40fc4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/effect/effect_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/effect/effect_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[EffectPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.py index 01821d10439..568d9edfaaf 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[EoMonthPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/erf/erf_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/erf/erf_request_builder.py index 1825926dee1..1a417fca06e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/erf/erf_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/erf/erf_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ErfPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.py index 4d8ec464117..8e797ecaf27 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ErfCPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py index 905eea93d77..dc2407f08f1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ErfC_PrecisePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py index c62c897aada..72979ada312 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Erf_PrecisePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.py index 4717f20107a..27f49405643 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Error_TypePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/even/even_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/even/even_request_builder.py index 0844a1ce800..bfc54fc05b0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/even/even_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/even/even_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[EvenPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/exact/exact_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/exact/exact_request_builder.py index 7fc72666554..c7a7608000b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/exact/exact_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/exact/exact_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ExactPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/exp/exp_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/exp/exp_request_builder.py index 2b9396d671d..ef515d4605a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/exp/exp_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/exp/exp_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ExpPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py index 5455658ae60..5d4193324e7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Expon_DistPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/f_dist/f_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/f_dist/f_dist_request_builder.py index 1f859c09673..cfd58dfe139 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/f_dist/f_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/f_dist/f_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[F_DistPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py index b88c8c54fe7..795a6b0a97a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[F_Dist_RTPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/f_inv/f_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/f_inv/f_inv_request_builder.py index 9901eb5988d..b26eb3f8fc9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/f_inv/f_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/f_inv/f_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[F_InvPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py index 900823e838d..03ff5401f05 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[F_Inv_RTPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fact/fact_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fact/fact_request_builder.py index bca3e8eb61a..cdd94d31593 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fact/fact_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fact/fact_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FactPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fact_double/fact_double_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fact_double/fact_double_request_builder.py index 5d182abf02a..b88eb19acb0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fact_double/fact_double_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fact_double/fact_double_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FactDoublePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/false_/false_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/false_/false_request_builder.py index 4747aad2bdd..db376f219e7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/false_/false_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/false_/false_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[FalseReques Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> FalseRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/find/find_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/find/find_request_builder.py index 96d43d91eaf..277145c189d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/find/find_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/find/find_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FindPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/find_b/find_b_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/find_b/find_b_request_builder.py index 7ecfcd821b4..869bcd898e3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/find_b/find_b_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/find_b/find_b_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FindBPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fisher/fisher_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fisher/fisher_request_builder.py index b266ad3028c..c006ba686b9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fisher/fisher_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fisher/fisher_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FisherPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py index 2ffbc357a42..d44dc8eeb4a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FisherInvPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fixed/fixed_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fixed/fixed_request_builder.py index 7e445bdeef6..b3a805222ba 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fixed/fixed_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fixed/fixed_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FixedPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/floor_math/floor_math_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/floor_math/floor_math_request_builder.py index f4d97ef289a..a2d31e1d189 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/floor_math/floor_math_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/floor_math/floor_math_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Floor_MathPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py index ec138bc48cd..73dba3a26b2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Floor_PrecisePostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/functions_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/functions_request_builder.py index d21be8dde6f..ab38e5e11f1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/functions_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/functions_request_builder.py @@ -30,11 +30,11 @@ from .atan.atan_request_builder import AtanRequestBuilder from .atan2.atan2_request_builder import Atan2RequestBuilder from .atanh.atanh_request_builder import AtanhRequestBuilder - from .ave_dev.ave_dev_request_builder import AveDevRequestBuilder from .average.average_request_builder import AverageRequestBuilder from .average_a.average_a_request_builder import AverageARequestBuilder from .average_if.average_if_request_builder import AverageIfRequestBuilder from .average_ifs.average_ifs_request_builder import AverageIfsRequestBuilder + from .ave_dev.ave_dev_request_builder import AveDevRequestBuilder from .baht_text.baht_text_request_builder import BahtTextRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .bessel_i.bessel_i_request_builder import BesselIRequestBuilder @@ -81,9 +81,9 @@ from .count_blank.count_blank_request_builder import CountBlankRequestBuilder from .count_if.count_if_request_builder import CountIfRequestBuilder from .count_ifs.count_ifs_request_builder import CountIfsRequestBuilder - from .coup_day_bs.coup_day_bs_request_builder import CoupDayBsRequestBuilder from .coup_days.coup_days_request_builder import CoupDaysRequestBuilder from .coup_days_nc.coup_days_nc_request_builder import CoupDaysNcRequestBuilder + from .coup_day_bs.coup_day_bs_request_builder import CoupDayBsRequestBuilder from .coup_ncd.coup_ncd_request_builder import CoupNcdRequestBuilder from .coup_num.coup_num_request_builder import CoupNumRequestBuilder from .coup_pcd.coup_pcd_request_builder import CoupPcdRequestBuilder @@ -153,10 +153,10 @@ from .f_inv.f_inv_request_builder import F_InvRequestBuilder from .f_inv_r_t.f_inv_r_t_request_builder import F_Inv_RTRequestBuilder from .gamma.gamma_request_builder import GammaRequestBuilder - from .gamma_ln.gamma_ln_request_builder import GammaLnRequestBuilder - from .gamma_ln_precise.gamma_ln_precise_request_builder import GammaLn_PreciseRequestBuilder from .gamma_dist.gamma_dist_request_builder import Gamma_DistRequestBuilder from .gamma_inv.gamma_inv_request_builder import Gamma_InvRequestBuilder + from .gamma_ln.gamma_ln_request_builder import GammaLnRequestBuilder + from .gamma_ln_precise.gamma_ln_precise_request_builder import GammaLn_PreciseRequestBuilder from .gauss.gauss_request_builder import GaussRequestBuilder from .gcd.gcd_request_builder import GcdRequestBuilder from .geo_mean.geo_mean_request_builder import GeoMeanRequestBuilder @@ -170,8 +170,8 @@ from .hyperlink.hyperlink_request_builder import HyperlinkRequestBuilder from .hyp_geom_dist.hyp_geom_dist_request_builder import HypGeom_DistRequestBuilder from .if_.if_request_builder import IfRequestBuilder - from .im_abs.im_abs_request_builder import ImAbsRequestBuilder from .imaginary.imaginary_request_builder import ImaginaryRequestBuilder + from .im_abs.im_abs_request_builder import ImAbsRequestBuilder from .im_argument.im_argument_request_builder import ImArgumentRequestBuilder from .im_conjugate.im_conjugate_request_builder import ImConjugateRequestBuilder from .im_cos.im_cos_request_builder import ImCosRequestBuilder @@ -199,19 +199,19 @@ from .int_rate.int_rate_request_builder import IntRateRequestBuilder from .ipmt.ipmt_request_builder import IpmtRequestBuilder from .irr.irr_request_builder import IrrRequestBuilder + from .iso_ceiling.iso_ceiling_request_builder import Iso_CeilingRequestBuilder + from .iso_week_num.iso_week_num_request_builder import IsoWeekNumRequestBuilder + from .ispmt.ispmt_request_builder import IspmtRequestBuilder + from .isref.isref_request_builder import IsrefRequestBuilder from .is_err.is_err_request_builder import IsErrRequestBuilder from .is_error.is_error_request_builder import IsErrorRequestBuilder from .is_even.is_even_request_builder import IsEvenRequestBuilder from .is_formula.is_formula_request_builder import IsFormulaRequestBuilder from .is_logical.is_logical_request_builder import IsLogicalRequestBuilder - from .is_n_a.is_n_a_request_builder import IsNARequestBuilder from .is_non_text.is_non_text_request_builder import IsNonTextRequestBuilder from .is_number.is_number_request_builder import IsNumberRequestBuilder + from .is_n_a.is_n_a_request_builder import IsNARequestBuilder from .is_odd.is_odd_request_builder import IsOddRequestBuilder - from .iso_week_num.iso_week_num_request_builder import IsoWeekNumRequestBuilder - from .iso_ceiling.iso_ceiling_request_builder import Iso_CeilingRequestBuilder - from .ispmt.ispmt_request_builder import IspmtRequestBuilder - from .isref.isref_request_builder import IsrefRequestBuilder from .is_text.is_text_request_builder import IsTextRequestBuilder from .kurt.kurt_request_builder import KurtRequestBuilder from .large.large_request_builder import LargeRequestBuilder @@ -235,8 +235,8 @@ from .mid.mid_request_builder import MidRequestBuilder from .midb.midb_request_builder import MidbRequestBuilder from .min.min_request_builder import MinRequestBuilder - from .min_a.min_a_request_builder import MinARequestBuilder from .minute.minute_request_builder import MinuteRequestBuilder + from .min_a.min_a_request_builder import MinARequestBuilder from .mirr.mirr_request_builder import MirrRequestBuilder from .mod.mod_request_builder import ModRequestBuilder from .month.month_request_builder import MonthRequestBuilder @@ -323,8 +323,8 @@ from .sqrt_pi.sqrt_pi_request_builder import SqrtPiRequestBuilder from .standardize.standardize_request_builder import StandardizeRequestBuilder from .st_dev_a.st_dev_a_request_builder import StDevARequestBuilder - from .st_dev_p_a.st_dev_p_a_request_builder import StDevPARequestBuilder from .st_dev_p.st_dev_p_request_builder import StDev_PRequestBuilder + from .st_dev_p_a.st_dev_p_a_request_builder import StDevPARequestBuilder from .st_dev_s.st_dev_s_request_builder import StDev_SRequestBuilder from .substitute.substitute_request_builder import SubstituteRequestBuilder from .subtotal.subtotal_request_builder import SubtotalRequestBuilder @@ -359,8 +359,8 @@ from .usdollar.usdollar_request_builder import UsdollarRequestBuilder from .value.value_request_builder import ValueRequestBuilder from .var_a.var_a_request_builder import VarARequestBuilder - from .var_p_a.var_p_a_request_builder import VarPARequestBuilder from .var_p.var_p_request_builder import Var_PRequestBuilder + from .var_p_a.var_p_a_request_builder import VarPARequestBuilder from .var_s.var_s_request_builder import Var_SRequestBuilder from .vdb.vdb_request_builder import VdbRequestBuilder from .vlookup.vlookup_request_builder import VlookupRequestBuilder @@ -374,9 +374,9 @@ from .xor.xor_request_builder import XorRequestBuilder from .year.year_request_builder import YearRequestBuilder from .year_frac.year_frac_request_builder import YearFracRequestBuilder + from .yield_.yield_request_builder import YieldRequestBuilder from .yield_disc.yield_disc_request_builder import YieldDiscRequestBuilder from .yield_mat.yield_mat_request_builder import YieldMatRequestBuilder - from .yield_.yield_request_builder import YieldRequestBuilder from .z_test.z_test_request_builder import Z_TestRequestBuilder class FunctionsRequestBuilder(BaseRequestBuilder): @@ -463,12 +463,12 @@ def to_delete_request_information(self,request_configuration: Optional[Functions Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -478,14 +478,14 @@ def to_get_request_information(self,request_configuration: Optional[FunctionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookFunctions] = None, request_configuration: Optional[FunctionsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -498,13 +498,13 @@ def to_patch_request_information(self,body: Optional[WorkbookFunctions] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -1562,15 +1562,6 @@ def erf(self) -> ErfRequestBuilder: return ErfRequestBuilder(self.request_adapter, self.path_parameters) - @property - def erf_precise(self) -> Erf_PreciseRequestBuilder: - """ - Provides operations to call the erf_Precise method. - """ - from .erf_precise.erf_precise_request_builder import Erf_PreciseRequestBuilder - - return Erf_PreciseRequestBuilder(self.request_adapter, self.path_parameters) - @property def erf_c(self) -> ErfCRequestBuilder: """ @@ -1589,6 +1580,15 @@ def erf_c_precise(self) -> ErfC_PreciseRequestBuilder: return ErfC_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + @property + def erf_precise(self) -> Erf_PreciseRequestBuilder: + """ + Provides operations to call the erf_Precise method. + """ + from .erf_precise.erf_precise_request_builder import Erf_PreciseRequestBuilder + + return Erf_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + @property def error_type(self) -> Error_TypeRequestBuilder: """ @@ -1842,22 +1842,22 @@ def gcd(self) -> GcdRequestBuilder: return GcdRequestBuilder(self.request_adapter, self.path_parameters) @property - def geo_mean(self) -> GeoMeanRequestBuilder: + def ge_step(self) -> GeStepRequestBuilder: """ - Provides operations to call the geoMean method. + Provides operations to call the geStep method. """ - from .geo_mean.geo_mean_request_builder import GeoMeanRequestBuilder + from .ge_step.ge_step_request_builder import GeStepRequestBuilder - return GeoMeanRequestBuilder(self.request_adapter, self.path_parameters) + return GeStepRequestBuilder(self.request_adapter, self.path_parameters) @property - def ge_step(self) -> GeStepRequestBuilder: + def geo_mean(self) -> GeoMeanRequestBuilder: """ - Provides operations to call the geStep method. + Provides operations to call the geoMean method. """ - from .ge_step.ge_step_request_builder import GeStepRequestBuilder + from .geo_mean.geo_mean_request_builder import GeoMeanRequestBuilder - return GeStepRequestBuilder(self.request_adapter, self.path_parameters) + return GeoMeanRequestBuilder(self.request_adapter, self.path_parameters) @property def har_mean(self) -> HarMeanRequestBuilder: @@ -1914,22 +1914,22 @@ def hour(self) -> HourRequestBuilder: return HourRequestBuilder(self.request_adapter, self.path_parameters) @property - def hyperlink(self) -> HyperlinkRequestBuilder: + def hyp_geom_dist(self) -> HypGeom_DistRequestBuilder: """ - Provides operations to call the hyperlink method. + Provides operations to call the hypGeom_Dist method. """ - from .hyperlink.hyperlink_request_builder import HyperlinkRequestBuilder + from .hyp_geom_dist.hyp_geom_dist_request_builder import HypGeom_DistRequestBuilder - return HyperlinkRequestBuilder(self.request_adapter, self.path_parameters) + return HypGeom_DistRequestBuilder(self.request_adapter, self.path_parameters) @property - def hyp_geom_dist(self) -> HypGeom_DistRequestBuilder: + def hyperlink(self) -> HyperlinkRequestBuilder: """ - Provides operations to call the hypGeom_Dist method. + Provides operations to call the hyperlink method. """ - from .hyp_geom_dist.hyp_geom_dist_request_builder import HypGeom_DistRequestBuilder + from .hyperlink.hyperlink_request_builder import HyperlinkRequestBuilder - return HypGeom_DistRequestBuilder(self.request_adapter, self.path_parameters) + return HyperlinkRequestBuilder(self.request_adapter, self.path_parameters) @property def if_(self) -> IfRequestBuilder: @@ -1949,15 +1949,6 @@ def im_abs(self) -> ImAbsRequestBuilder: return ImAbsRequestBuilder(self.request_adapter, self.path_parameters) - @property - def imaginary(self) -> ImaginaryRequestBuilder: - """ - Provides operations to call the imaginary method. - """ - from .imaginary.imaginary_request_builder import ImaginaryRequestBuilder - - return ImaginaryRequestBuilder(self.request_adapter, self.path_parameters) - @property def im_argument(self) -> ImArgumentRequestBuilder: """ @@ -2165,6 +2156,15 @@ def im_tan(self) -> ImTanRequestBuilder: return ImTanRequestBuilder(self.request_adapter, self.path_parameters) + @property + def imaginary(self) -> ImaginaryRequestBuilder: + """ + Provides operations to call the imaginary method. + """ + from .imaginary.imaginary_request_builder import ImaginaryRequestBuilder + + return ImaginaryRequestBuilder(self.request_adapter, self.path_parameters) + @property def int(self) -> IntRequestBuilder: """ @@ -2274,22 +2274,31 @@ def is_number(self) -> IsNumberRequestBuilder: return IsNumberRequestBuilder(self.request_adapter, self.path_parameters) @property - def iso_ceiling(self) -> Iso_CeilingRequestBuilder: + def is_odd(self) -> IsOddRequestBuilder: """ - Provides operations to call the iso_Ceiling method. + Provides operations to call the isOdd method. """ - from .iso_ceiling.iso_ceiling_request_builder import Iso_CeilingRequestBuilder + from .is_odd.is_odd_request_builder import IsOddRequestBuilder - return Iso_CeilingRequestBuilder(self.request_adapter, self.path_parameters) + return IsOddRequestBuilder(self.request_adapter, self.path_parameters) @property - def is_odd(self) -> IsOddRequestBuilder: + def is_text(self) -> IsTextRequestBuilder: """ - Provides operations to call the isOdd method. + Provides operations to call the isText method. """ - from .is_odd.is_odd_request_builder import IsOddRequestBuilder + from .is_text.is_text_request_builder import IsTextRequestBuilder - return IsOddRequestBuilder(self.request_adapter, self.path_parameters) + return IsTextRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def iso_ceiling(self) -> Iso_CeilingRequestBuilder: + """ + Provides operations to call the iso_Ceiling method. + """ + from .iso_ceiling.iso_ceiling_request_builder import Iso_CeilingRequestBuilder + + return Iso_CeilingRequestBuilder(self.request_adapter, self.path_parameters) @property def iso_week_num(self) -> IsoWeekNumRequestBuilder: @@ -2318,15 +2327,6 @@ def isref(self) -> IsrefRequestBuilder: return IsrefRequestBuilder(self.request_adapter, self.path_parameters) - @property - def is_text(self) -> IsTextRequestBuilder: - """ - Provides operations to call the isText method. - """ - from .is_text.is_text_request_builder import IsTextRequestBuilder - - return IsTextRequestBuilder(self.request_adapter, self.path_parameters) - @property def kurt(self) -> KurtRequestBuilder: """ @@ -2408,15 +2408,6 @@ def log(self) -> LogRequestBuilder: return LogRequestBuilder(self.request_adapter, self.path_parameters) - @property - def log10(self) -> Log10RequestBuilder: - """ - Provides operations to call the log10 method. - """ - from .log10.log10_request_builder import Log10RequestBuilder - - return Log10RequestBuilder(self.request_adapter, self.path_parameters) - @property def log_norm_dist(self) -> LogNorm_DistRequestBuilder: """ @@ -2435,6 +2426,15 @@ def log_norm_inv(self) -> LogNorm_InvRequestBuilder: return LogNorm_InvRequestBuilder(self.request_adapter, self.path_parameters) + @property + def log10(self) -> Log10RequestBuilder: + """ + Provides operations to call the log10 method. + """ + from .log10.log10_request_builder import Log10RequestBuilder + + return Log10RequestBuilder(self.request_adapter, self.path_parameters) + @property def lookup(self) -> LookupRequestBuilder: """ @@ -2814,40 +2814,40 @@ def pduration(self) -> PdurationRequestBuilder: return PdurationRequestBuilder(self.request_adapter, self.path_parameters) @property - def percentile_exc(self) -> Percentile_ExcRequestBuilder: + def percent_rank_exc(self) -> PercentRank_ExcRequestBuilder: """ - Provides operations to call the percentile_Exc method. + Provides operations to call the percentRank_Exc method. """ - from .percentile_exc.percentile_exc_request_builder import Percentile_ExcRequestBuilder + from .percent_rank_exc.percent_rank_exc_request_builder import PercentRank_ExcRequestBuilder - return Percentile_ExcRequestBuilder(self.request_adapter, self.path_parameters) + return PercentRank_ExcRequestBuilder(self.request_adapter, self.path_parameters) @property - def percentile_inc(self) -> Percentile_IncRequestBuilder: + def percent_rank_inc(self) -> PercentRank_IncRequestBuilder: """ - Provides operations to call the percentile_Inc method. + Provides operations to call the percentRank_Inc method. """ - from .percentile_inc.percentile_inc_request_builder import Percentile_IncRequestBuilder + from .percent_rank_inc.percent_rank_inc_request_builder import PercentRank_IncRequestBuilder - return Percentile_IncRequestBuilder(self.request_adapter, self.path_parameters) + return PercentRank_IncRequestBuilder(self.request_adapter, self.path_parameters) @property - def percent_rank_exc(self) -> PercentRank_ExcRequestBuilder: + def percentile_exc(self) -> Percentile_ExcRequestBuilder: """ - Provides operations to call the percentRank_Exc method. + Provides operations to call the percentile_Exc method. """ - from .percent_rank_exc.percent_rank_exc_request_builder import PercentRank_ExcRequestBuilder + from .percentile_exc.percentile_exc_request_builder import Percentile_ExcRequestBuilder - return PercentRank_ExcRequestBuilder(self.request_adapter, self.path_parameters) + return Percentile_ExcRequestBuilder(self.request_adapter, self.path_parameters) @property - def percent_rank_inc(self) -> PercentRank_IncRequestBuilder: + def percentile_inc(self) -> Percentile_IncRequestBuilder: """ - Provides operations to call the percentRank_Inc method. + Provides operations to call the percentile_Inc method. """ - from .percent_rank_inc.percent_rank_inc_request_builder import PercentRank_IncRequestBuilder + from .percentile_inc.percentile_inc_request_builder import Percentile_IncRequestBuilder - return PercentRank_IncRequestBuilder(self.request_adapter, self.path_parameters) + return Percentile_IncRequestBuilder(self.request_adapter, self.path_parameters) @property def permut(self) -> PermutRequestBuilder: @@ -3300,13 +3300,13 @@ def sqrt_pi(self) -> SqrtPiRequestBuilder: return SqrtPiRequestBuilder(self.request_adapter, self.path_parameters) @property - def standardize(self) -> StandardizeRequestBuilder: + def st_dev_a(self) -> StDevARequestBuilder: """ - Provides operations to call the standardize method. + Provides operations to call the stDevA method. """ - from .standardize.standardize_request_builder import StandardizeRequestBuilder + from .st_dev_a.st_dev_a_request_builder import StDevARequestBuilder - return StandardizeRequestBuilder(self.request_adapter, self.path_parameters) + return StDevARequestBuilder(self.request_adapter, self.path_parameters) @property def st_dev_p(self) -> StDev_PRequestBuilder: @@ -3318,31 +3318,31 @@ def st_dev_p(self) -> StDev_PRequestBuilder: return StDev_PRequestBuilder(self.request_adapter, self.path_parameters) @property - def st_dev_s(self) -> StDev_SRequestBuilder: + def st_dev_p_a(self) -> StDevPARequestBuilder: """ - Provides operations to call the stDev_S method. + Provides operations to call the stDevPA method. """ - from .st_dev_s.st_dev_s_request_builder import StDev_SRequestBuilder + from .st_dev_p_a.st_dev_p_a_request_builder import StDevPARequestBuilder - return StDev_SRequestBuilder(self.request_adapter, self.path_parameters) + return StDevPARequestBuilder(self.request_adapter, self.path_parameters) @property - def st_dev_a(self) -> StDevARequestBuilder: + def st_dev_s(self) -> StDev_SRequestBuilder: """ - Provides operations to call the stDevA method. + Provides operations to call the stDev_S method. """ - from .st_dev_a.st_dev_a_request_builder import StDevARequestBuilder + from .st_dev_s.st_dev_s_request_builder import StDev_SRequestBuilder - return StDevARequestBuilder(self.request_adapter, self.path_parameters) + return StDev_SRequestBuilder(self.request_adapter, self.path_parameters) @property - def st_dev_p_a(self) -> StDevPARequestBuilder: + def standardize(self) -> StandardizeRequestBuilder: """ - Provides operations to call the stDevPA method. + Provides operations to call the standardize method. """ - from .st_dev_p_a.st_dev_p_a_request_builder import StDevPARequestBuilder + from .standardize.standardize_request_builder import StandardizeRequestBuilder - return StDevPARequestBuilder(self.request_adapter, self.path_parameters) + return StandardizeRequestBuilder(self.request_adapter, self.path_parameters) @property def substitute(self) -> SubstituteRequestBuilder: @@ -3633,40 +3633,40 @@ def value(self) -> ValueRequestBuilder: return ValueRequestBuilder(self.request_adapter, self.path_parameters) @property - def var_p(self) -> Var_PRequestBuilder: + def var_a(self) -> VarARequestBuilder: """ - Provides operations to call the var_P method. + Provides operations to call the varA method. """ - from .var_p.var_p_request_builder import Var_PRequestBuilder + from .var_a.var_a_request_builder import VarARequestBuilder - return Var_PRequestBuilder(self.request_adapter, self.path_parameters) + return VarARequestBuilder(self.request_adapter, self.path_parameters) @property - def var_s(self) -> Var_SRequestBuilder: + def var_p(self) -> Var_PRequestBuilder: """ - Provides operations to call the var_S method. + Provides operations to call the var_P method. """ - from .var_s.var_s_request_builder import Var_SRequestBuilder + from .var_p.var_p_request_builder import Var_PRequestBuilder - return Var_SRequestBuilder(self.request_adapter, self.path_parameters) + return Var_PRequestBuilder(self.request_adapter, self.path_parameters) @property - def var_a(self) -> VarARequestBuilder: + def var_p_a(self) -> VarPARequestBuilder: """ - Provides operations to call the varA method. + Provides operations to call the varPA method. """ - from .var_a.var_a_request_builder import VarARequestBuilder + from .var_p_a.var_p_a_request_builder import VarPARequestBuilder - return VarARequestBuilder(self.request_adapter, self.path_parameters) + return VarPARequestBuilder(self.request_adapter, self.path_parameters) @property - def var_p_a(self) -> VarPARequestBuilder: + def var_s(self) -> Var_SRequestBuilder: """ - Provides operations to call the varPA method. + Provides operations to call the var_S method. """ - from .var_p_a.var_p_a_request_builder import VarPARequestBuilder + from .var_s.var_s_request_builder import Var_SRequestBuilder - return VarPARequestBuilder(self.request_adapter, self.path_parameters) + return Var_SRequestBuilder(self.request_adapter, self.path_parameters) @property def vdb(self) -> VdbRequestBuilder: @@ -3687,22 +3687,22 @@ def vlookup(self) -> VlookupRequestBuilder: return VlookupRequestBuilder(self.request_adapter, self.path_parameters) @property - def weekday(self) -> WeekdayRequestBuilder: + def week_num(self) -> WeekNumRequestBuilder: """ - Provides operations to call the weekday method. + Provides operations to call the weekNum method. """ - from .weekday.weekday_request_builder import WeekdayRequestBuilder + from .week_num.week_num_request_builder import WeekNumRequestBuilder - return WeekdayRequestBuilder(self.request_adapter, self.path_parameters) + return WeekNumRequestBuilder(self.request_adapter, self.path_parameters) @property - def week_num(self) -> WeekNumRequestBuilder: + def weekday(self) -> WeekdayRequestBuilder: """ - Provides operations to call the weekNum method. + Provides operations to call the weekday method. """ - from .week_num.week_num_request_builder import WeekNumRequestBuilder + from .weekday.weekday_request_builder import WeekdayRequestBuilder - return WeekNumRequestBuilder(self.request_adapter, self.path_parameters) + return WeekdayRequestBuilder(self.request_adapter, self.path_parameters) @property def weibull_dist(self) -> Weibull_DistRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fv/fv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fv/fv_request_builder.py index 8aa1dc75f67..4db7fdf58ef 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fv/fv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fv/fv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FvPostRequestBody] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py index 174fdccafc8..cb9d8f05efe 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[FvschedulePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gamma/gamma_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gamma/gamma_request_builder.py index 449bc8a4394..016b7ef0aa4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gamma/gamma_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gamma/gamma_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GammaPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py index 60fd2fbefa5..8c2c97b67ac 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Gamma_DistPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py index f271d279eaf..529a52caf22 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Gamma_InvPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py index 6cb2a90bfd1..283b41d4450 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GammaLnPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py index 4729ae72b8c..dba40fa5aa2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GammaLn_PrecisePostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gauss/gauss_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gauss/gauss_request_builder.py index 8780e21b43f..58637414f2b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gauss/gauss_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gauss/gauss_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GaussPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/gcd/gcd_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/gcd/gcd_request_builder.py index 5b3791d1a28..4a2545d419e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/gcd/gcd_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/gcd/gcd_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GcdPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ge_step/ge_step_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ge_step/ge_step_request_builder.py index 919265d44e6..0a332aceaaa 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ge_step/ge_step_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ge_step/ge_step_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GeStepPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py index 2bdd93e31ba..241457fc578 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[GeoMeanPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/har_mean/har_mean_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/har_mean/har_mean_request_builder.py index d8a3da9cb18..88d8e8b18a6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/har_mean/har_mean_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/har_mean/har_mean_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[HarMeanPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py index f3d48416fa7..979b7824abc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Hex2BinPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py index 5361d31330d..3d89d0df710 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Hex2DecPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py index dd263849a8c..262c6388efe 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Hex2OctPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hlookup/hlookup_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hlookup/hlookup_request_builder.py index 0d07dcb59a7..d1379eb8738 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hlookup/hlookup_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hlookup/hlookup_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[HlookupPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hour/hour_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hour/hour_request_builder.py index 7caf6ad50cc..91f00de6fb4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hour/hour_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hour/hour_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[HourPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py index b5dc8039613..8cbd92850fc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[HypGeom_DistPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py index 7aede20cfce..4d8a701b956 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[HyperlinkPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/if_/if_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/if_/if_request_builder.py index 470b03a2184..4ab617f181d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/if_/if_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/if_/if_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IfPostRequestBody] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_abs/im_abs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_abs/im_abs_request_builder.py index c1d8d86b474..fd495815eb0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_abs/im_abs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_abs/im_abs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImAbsPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_argument/im_argument_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_argument/im_argument_request_builder.py index 0279864a618..58e0a8c38f8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_argument/im_argument_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_argument/im_argument_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImArgumentPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py index 61b629177c1..77243306eb0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImConjugatePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_cos/im_cos_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_cos/im_cos_request_builder.py index f2a3d033ef5..2dc422bc717 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_cos/im_cos_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_cos/im_cos_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImCosPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py index fe4b33d2cd0..d3f1557fe0c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImCoshPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_cot/im_cot_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_cot/im_cot_request_builder.py index 8194c21040c..4b9a433c63b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_cot/im_cot_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_cot/im_cot_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImCotPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_csc/im_csc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_csc/im_csc_request_builder.py index e188ed12609..48a2e20a21c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_csc/im_csc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_csc/im_csc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImCscPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_csch/im_csch_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_csch/im_csch_request_builder.py index 34f6dfba755..1299fdd417b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_csch/im_csch_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_csch/im_csch_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImCschPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_div/im_div_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_div/im_div_request_builder.py index b1011b9ade5..2eeac181613 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_div/im_div_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_div/im_div_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImDivPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_exp/im_exp_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_exp/im_exp_request_builder.py index 5e04008105a..300d344e98d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_exp/im_exp_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_exp/im_exp_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImExpPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_ln/im_ln_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_ln/im_ln_request_builder.py index d0428c484ef..ef2a8eae563 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_ln/im_ln_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_ln/im_ln_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImLnPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_log10/im_log10_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_log10/im_log10_request_builder.py index 8a5c0e17c11..c9d00a4d821 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_log10/im_log10_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_log10/im_log10_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImLog10PostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_log2/im_log2_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_log2/im_log2_request_builder.py index e15c34014e5..ed392619d73 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_log2/im_log2_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_log2/im_log2_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImLog2PostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_power/im_power_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_power/im_power_request_builder.py index 9af6ee82fa5..acb0f4811aa 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_power/im_power_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_power/im_power_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImPowerPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_product/im_product_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_product/im_product_request_builder.py index 908ca85b801..f8d742f4961 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_product/im_product_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_product/im_product_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImProductPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_real/im_real_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_real/im_real_request_builder.py index 86541b2cbdc..099f4c3ba45 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_real/im_real_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_real/im_real_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImRealPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sec/im_sec_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sec/im_sec_request_builder.py index 61059ecea40..ae09a5056df 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sec/im_sec_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sec/im_sec_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSecPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sech/im_sech_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sech/im_sech_request_builder.py index e12f3405254..c618f4ce446 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sech/im_sech_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sech/im_sech_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSechPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sin/im_sin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sin/im_sin_request_builder.py index f1530ea9f34..94f970c6271 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sin/im_sin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sin/im_sin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSinPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py index 02de4e341ce..b6f4abe81c8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSinhPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py index 85ace697168..879e0e6f89e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSqrtPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sub/im_sub_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sub/im_sub_request_builder.py index c0c9964462b..eda5686d53b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sub/im_sub_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sub/im_sub_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSubPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_sum/im_sum_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_sum/im_sum_request_builder.py index 0360c5e4741..35d38c5219e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_sum/im_sum_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_sum/im_sum_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImSumPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/im_tan/im_tan_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/im_tan/im_tan_request_builder.py index 996c3af5415..efdaa4a59b9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/im_tan/im_tan_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/im_tan/im_tan_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImTanPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/imaginary/imaginary_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/imaginary/imaginary_request_builder.py index a315cfe9674..a42e9ae5f2f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/imaginary/imaginary_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/imaginary/imaginary_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ImaginaryPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/int/int_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/int/int_request_builder.py index 4575b2eb205..5198ac02f04 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/int/int_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/int/int_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IntPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/int_rate/int_rate_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/int_rate/int_rate_request_builder.py index 4e52b5df365..ef572badb82 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/int_rate/int_rate_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/int_rate/int_rate_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IntRatePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ipmt/ipmt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ipmt/ipmt_request_builder.py index 98595f9c666..3b6f022cfc6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ipmt/ipmt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ipmt/ipmt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IpmtPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/irr/irr_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/irr/irr_request_builder.py index 72254be9a0e..c1580925574 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/irr/irr_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/irr/irr_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IrrPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_err/is_err_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_err/is_err_request_builder.py index 64a32283084..ddf395ef27d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_err/is_err_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_err/is_err_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsErrPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_error/is_error_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_error/is_error_request_builder.py index 7805411e6f6..815d44e7d06 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_error/is_error_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_error/is_error_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsErrorPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_even/is_even_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_even/is_even_request_builder.py index cd9892bd7d2..22998f6943e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_even/is_even_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_even/is_even_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsEvenPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_formula/is_formula_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_formula/is_formula_request_builder.py index 789bfb7d033..e4cfd99811d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_formula/is_formula_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_formula/is_formula_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsFormulaPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_logical/is_logical_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_logical/is_logical_request_builder.py index 8f20d229f01..1607b7edd71 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_logical/is_logical_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_logical/is_logical_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsLogicalPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py index 1e438d088c1..cf7669dc281 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsNAPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py index b22cb60670b..782c4ef1fd8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsNonTextPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_number/is_number_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_number/is_number_request_builder.py index 57b823e2111..9d20a74d41e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_number/is_number_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_number/is_number_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsNumberPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_odd/is_odd_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_odd/is_odd_request_builder.py index 4cab1217e8c..4e3fc579bdb 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_odd/is_odd_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_odd/is_odd_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsOddPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/is_text/is_text_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/is_text/is_text_request_builder.py index a3389ea00dc..48488efa673 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/is_text/is_text_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/is_text/is_text_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsTextPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py index 6642d3d3684..04c35286fe2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Iso_CeilingPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py index 1bb5557e692..ab3f6260ab3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsoWeekNumPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ispmt/ispmt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ispmt/ispmt_request_builder.py index bcd039a46ed..a29ac83835a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ispmt/ispmt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ispmt/ispmt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IspmtPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/isref/isref_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/isref/isref_request_builder.py index 9bfc1bccc20..21e7bba7526 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/isref/isref_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/isref/isref_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[IsrefPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/kurt/kurt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/kurt/kurt_request_builder.py index 973bf143121..e2ff9279e86 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/kurt/kurt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/kurt/kurt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[KurtPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/large/large_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/large/large_request_builder.py index bc25144e58a..c5128699971 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/large/large_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/large/large_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LargePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/lcm/lcm_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/lcm/lcm_request_builder.py index 953ceb7f61b..94584427a61 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/lcm/lcm_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/lcm/lcm_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LcmPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/left/left_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/left/left_request_builder.py index 3deb91f6313..70cb3dd5f63 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/left/left_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/left/left_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LeftPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/leftb/leftb_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/leftb/leftb_request_builder.py index 90e175cb938..ac0314de178 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/leftb/leftb_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/leftb/leftb_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LeftbPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/len/len_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/len/len_request_builder.py index 805cf1948bd..84a51372841 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/len/len_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/len/len_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LenPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/lenb/lenb_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/lenb/lenb_request_builder.py index d3d918620c2..6474a924284 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/lenb/lenb_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/lenb/lenb_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LenbPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ln/ln_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ln/ln_request_builder.py index 4ed59484e98..e4e187bf07e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ln/ln_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ln/ln_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LnPostRequestBody] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/log/log_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/log/log_request_builder.py index e97c49e6f7d..d6f7f20a4d8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/log/log_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/log/log_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LogPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/log10/log10_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/log10/log10_request_builder.py index 283a7f71717..90b2a95d437 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/log10/log10_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/log10/log10_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Log10PostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py index bf805a9872b..9f0dcb70385 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LogNorm_DistPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py index 5b7990b056a..2c22003d746 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LogNorm_InvPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/lookup/lookup_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/lookup/lookup_request_builder.py index d9fea75af1d..c861bc4b98f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/lookup/lookup_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/lookup/lookup_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LookupPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/lower/lower_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/lower/lower_request_builder.py index d87934829e5..61daac958b5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/lower/lower_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/lower/lower_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[LowerPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/match/match_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/match/match_request_builder.py index db268adc618..afeda0760b7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/match/match_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/match/match_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MatchPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/max/max_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/max/max_request_builder.py index ebfbcf1749d..260d365bdc3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/max/max_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/max/max_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MaxPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/max_a/max_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/max_a/max_a_request_builder.py index 43b9a627e92..8a0d19b9c10 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/max_a/max_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/max_a/max_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MaxAPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/mduration/mduration_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/mduration/mduration_request_builder.py index fea4da271d6..bda6c78f99d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/mduration/mduration_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/mduration/mduration_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MdurationPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/median/median_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/median/median_request_builder.py index 7066b027d7d..ee636d85a1a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/median/median_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/median/median_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MedianPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/mid/mid_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/mid/mid_request_builder.py index a9f13cfd33b..cb2f5432a1e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/mid/mid_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/mid/mid_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MidPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/midb/midb_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/midb/midb_request_builder.py index b2ad3d53b5c..08177619e1c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/midb/midb_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/midb/midb_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MidbPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/min/min_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/min/min_request_builder.py index f08ffc46e8a..6885bd4eb09 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/min/min_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/min/min_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MinPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/min_a/min_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/min_a/min_a_request_builder.py index 05fad46c0ba..90e77fe5f9e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/min_a/min_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/min_a/min_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MinAPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/minute/minute_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/minute/minute_request_builder.py index 2f52bf45a69..5c8e2f90019 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/minute/minute_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/minute/minute_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MinutePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/mirr/mirr_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/mirr/mirr_request_builder.py index 8f49536b249..6e663c7ac05 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/mirr/mirr_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/mirr/mirr_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MirrPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/mod/mod_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/mod/mod_request_builder.py index 95e48956dd5..b0e1fb98e98 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/mod/mod_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/mod/mod_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ModPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/month/month_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/month/month_request_builder.py index cb19103c369..6078832987a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/month/month_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/month/month_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MonthPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/mround/mround_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/mround/mround_request_builder.py index 4267e1dbd61..0efebd1023f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/mround/mround_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/mround/mround_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MroundPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py index a1e34fac595..9b6b8cee424 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[MultiNomialPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/n/n_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/n/n_request_builder.py index ecef76f999b..1f6407155a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/n/n_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/n/n_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NPostRequestBody] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/na/na_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/na/na_request_builder.py index 3a2b7997fda..4b787053659 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/na/na_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/na/na_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[NaRequestBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> NaRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py index bc5b774d3a3..babf1940fb1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NegBinom_DistPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/network_days/network_days_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/network_days/network_days_request_builder.py index 1ddd1afa04a..28885b22d23 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/network_days/network_days_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/network_days/network_days_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NetworkDaysPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py index cfd7cd19451..f8e3b372132 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NetworkDays_IntlPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/nominal/nominal_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/nominal/nominal_request_builder.py index 826b5e64384..9a6168ed535 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/nominal/nominal_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/nominal/nominal_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NominalPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py index b10480ff562..4de673f4b98 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Norm_DistPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py index d76df552054..96199d2890f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Norm_InvPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py index 9aae710e847..c7ad06c978c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Norm_S_DistPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py index eddbb425655..33ccebddb38 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Norm_S_InvPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/not_/not_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/not_/not_request_builder.py index d8d4b362b5a..8fbc484b4bd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/not_/not_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/not_/not_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NotPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/now/now_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/now/now_request_builder.py index 43b5270c964..5fc526fdbb2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/now/now_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/now/now_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[NowRequestB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> NowRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/nper/nper_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/nper/nper_request_builder.py index 56e9668bc0d..a4b2bf544f5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/nper/nper_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/nper/nper_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NperPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/npv/npv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/npv/npv_request_builder.py index 0ce3d149a8b..0cfeaf93872 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/npv/npv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/npv/npv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NpvPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/number_value/number_value_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/number_value/number_value_request_builder.py index 439a022ff29..bd1c77aa1e0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/number_value/number_value_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/number_value/number_value_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[NumberValuePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py index 6126ea89389..fb050e3eef1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Oct2BinPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py index cf854887bba..7387bc19fa0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Oct2DecPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py index 4a6aa266c1c..21fcafc0d10 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Oct2HexPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/odd/odd_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/odd/odd_request_builder.py index 57a340c293b..db9b0bfbbd6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/odd/odd_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/odd/odd_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[OddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py index e97ed026c9f..55cead25106 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[OddFPricePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py index b80801491e6..fbc23c989b7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[OddFYieldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py index 1e39f36f316..20ee97592e0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[OddLPricePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py index e46c42e68ba..e0af0e15136 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[OddLYieldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/or_/or_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/or_/or_request_builder.py index e558c7cf4e5..8dc28b8013e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/or_/or_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/or_/or_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[OrPostRequestBody] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/pduration/pduration_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/pduration/pduration_request_builder.py index 7685ea6b03f..20712baad0f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/pduration/pduration_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/pduration/pduration_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PdurationPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py index f49cda3c184..9656d5b39f6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PercentRank_ExcPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py index 5b08460cef3..c77541d2017 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PercentRank_IncPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py index 04f98735e8f..6a91eafa1f7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Percentile_ExcPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py index 7db53b10f11..6a1e0d68290 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Percentile_IncPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/permut/permut_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/permut/permut_request_builder.py index 35efde7330a..9d3d5bef5e5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/permut/permut_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/permut/permut_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PermutPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/permutationa/permutationa_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/permutationa/permutationa_request_builder.py index 382cfb3ca9b..79eb66b7b19 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/permutationa/permutationa_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/permutationa/permutationa_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PermutationaPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/phi/phi_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/phi/phi_request_builder.py index 35257d8adc6..9f3ce7ae05d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/phi/phi_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/phi/phi_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PhiPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/pi/pi_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/pi/pi_request_builder.py index 322ce3f3559..efd0348ae31 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/pi/pi_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/pi/pi_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[PiRequestBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PiRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/pmt/pmt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/pmt/pmt_request_builder.py index 6c07f07def2..ca9217d7d2d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/pmt/pmt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/pmt/pmt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PmtPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py index 387708f0a56..301e54df5eb 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Poisson_DistPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/power/power_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/power/power_request_builder.py index 3371637eaf3..c61a88e9e14 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/power/power_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/power/power_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PowerPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/ppmt/ppmt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/ppmt/ppmt_request_builder.py index 95134d502c0..081db4a2e40 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/ppmt/ppmt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/ppmt/ppmt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PpmtPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/price/price_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/price/price_request_builder.py index 371c7f2df1e..3d410bc8d23 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/price/price_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/price/price_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PricePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/price_disc/price_disc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/price_disc/price_disc_request_builder.py index af325443c0a..add4ae15a70 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/price_disc/price_disc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/price_disc/price_disc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PriceDiscPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/price_mat/price_mat_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/price_mat/price_mat_request_builder.py index 4d0d23369f0..a283649b6d5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/price_mat/price_mat_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/price_mat/price_mat_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PriceMatPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/product/product_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/product/product_request_builder.py index 74e06ee218f..9ce2ebb43a4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/product/product_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/product/product_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ProductPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/proper/proper_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/proper/proper_request_builder.py index 851626eb535..3c3e5de2873 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/proper/proper_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/proper/proper_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ProperPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/pv/pv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/pv/pv_request_builder.py index c95464c3032..1b6fa6e21c2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/pv/pv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/pv/pv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[PvPostRequestBody] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py index 4e0e0fdf7e7..ed8207b51a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Quartile_ExcPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py index ffbbf53ce7b..904ca28f73a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Quartile_IncPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/quotient/quotient_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/quotient/quotient_request_builder.py index a505b4533cc..7b5030d1ab1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/quotient/quotient_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/quotient/quotient_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[QuotientPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/radians/radians_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/radians/radians_request_builder.py index ffbfcf6a482..c25c7511df1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/radians/radians_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/radians/radians_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RadiansPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rand/rand_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rand/rand_request_builder.py index fa9aa9bcb34..7720af1ca30 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rand/rand_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rand/rand_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[RandRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RandRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rand_between/rand_between_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rand_between/rand_between_request_builder.py index 398979ff062..9817369d76e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rand_between/rand_between_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rand_between/rand_between_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RandBetweenPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py index 9306a4533e3..2fe31ffc1e9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Rank_AvgPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py index 9eb19ce8f05..7a2594c91d7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Rank_EqPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rate/rate_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rate/rate_request_builder.py index 127bb209075..95d53e194ec 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rate/rate_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rate/rate_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RatePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/received/received_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/received/received_request_builder.py index df9d31b3efb..b43e1ecab07 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/received/received_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/received/received_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ReceivedPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/replace/replace_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/replace/replace_request_builder.py index df8aeea6974..28d302a7de8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/replace/replace_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/replace/replace_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ReplacePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/replace_b/replace_b_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/replace_b/replace_b_request_builder.py index 9ff313dad2c..137266cdb46 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/replace_b/replace_b_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/replace_b/replace_b_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ReplaceBPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rept/rept_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rept/rept_request_builder.py index 61f53bcea7e..d742c0b0569 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rept/rept_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rept/rept_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ReptPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/right/right_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/right/right_request_builder.py index 1970285651a..2d2d81f07e5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/right/right_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/right/right_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RightPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rightb/rightb_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rightb/rightb_request_builder.py index 05be9b7870c..9565d294643 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rightb/rightb_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rightb/rightb_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RightbPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/roman/roman_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/roman/roman_request_builder.py index 340b3561734..028fdc87c29 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/roman/roman_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/roman/roman_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RomanPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/round/round_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/round/round_request_builder.py index 8ad28b4e2a7..99f989af6d1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/round/round_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/round/round_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RoundPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/round_down/round_down_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/round_down/round_down_request_builder.py index dd101c3537a..ede859a18ef 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/round_down/round_down_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/round_down/round_down_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RoundDownPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/round_up/round_up_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/round_up/round_up_request_builder.py index e7919658eb4..4ab237f9d33 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/round_up/round_up_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/round_up/round_up_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RoundUpPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rows/rows_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rows/rows_request_builder.py index 58b105fe3a7..c720733a5d8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rows/rows_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rows/rows_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RowsPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/rri/rri_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/rri/rri_request_builder.py index bc1a9ae3b96..420c1b75038 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/rri/rri_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/rri/rri_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RriPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sec/sec_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sec/sec_request_builder.py index 893fc49fe91..da3f24e4a00 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sec/sec_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sec/sec_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SecPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sech/sech_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sech/sech_request_builder.py index 4146324ec56..55a81406c04 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sech/sech_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sech/sech_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SechPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/second/second_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/second/second_request_builder.py index 75db596804f..2681659fb33 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/second/second_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/second/second_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SecondPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/series_sum/series_sum_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/series_sum/series_sum_request_builder.py index f7d566d036b..366de6da621 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/series_sum/series_sum_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/series_sum/series_sum_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SeriesSumPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sheet/sheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sheet/sheet_request_builder.py index 7e2b865fa14..6479e68b2b4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sheet/sheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sheet/sheet_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SheetPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sheets/sheets_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sheets/sheets_request_builder.py index c5e5f46861b..3c69fe87431 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sheets/sheets_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sheets/sheets_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SheetsPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sign/sign_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sign/sign_request_builder.py index 37e52dbb5e6..2de0c5a71df 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sign/sign_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sign/sign_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SignPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sin/sin_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sin/sin_request_builder.py index cf08e833011..a81eb01e2af 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sin/sin_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sin/sin_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SinPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sinh/sinh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sinh/sinh_request_builder.py index 01e2fdc0302..6741a74c744 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sinh/sinh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sinh/sinh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SinhPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/skew/skew_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/skew/skew_request_builder.py index 7555ab52579..63c314fe3f9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/skew/skew_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/skew/skew_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SkewPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/skew_p/skew_p_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/skew_p/skew_p_request_builder.py index 5ecfcf687cf..deba01c4bd5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/skew_p/skew_p_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/skew_p/skew_p_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Skew_pPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sln/sln_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sln/sln_request_builder.py index d9ee928ae48..bfd0c7813cb 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sln/sln_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sln/sln_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SlnPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/small/small_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/small/small_request_builder.py index f3bb169e693..4417b804f39 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/small/small_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/small/small_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SmallPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sqrt/sqrt_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sqrt/sqrt_request_builder.py index 2fdb3fd243c..9b9a0eff376 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sqrt/sqrt_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sqrt/sqrt_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SqrtPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py index e17bad090a4..f7fe681e29c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SqrtPiPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py index 7418bf710a3..421bb1810c9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[StDevAPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py index 8b2fbe23fc7..1734d4195dc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[StDev_PPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py index 2e209ff714b..d3fdba50a6d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[StDevPAPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py index 47b76831d9c..3f2f3622e09 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[StDev_SPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/standardize/standardize_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/standardize/standardize_request_builder.py index 3efcadb998a..8e3813d70c0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/standardize/standardize_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/standardize/standardize_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[StandardizePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/substitute/substitute_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/substitute/substitute_request_builder.py index 85f0f7e3e96..c4ab478cdd5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/substitute/substitute_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/substitute/substitute_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SubstitutePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/subtotal/subtotal_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/subtotal/subtotal_request_builder.py index 63ee0f938cb..7f9b24f1042 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/subtotal/subtotal_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/subtotal/subtotal_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SubtotalPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sum/sum_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sum/sum_request_builder.py index d681b16fe21..5f52eb71878 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sum/sum_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sum/sum_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SumPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sum_if/sum_if_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sum_if/sum_if_request_builder.py index e138eeec63a..1128af26e1f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sum_if/sum_if_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sum_if/sum_if_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SumIfPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py index bc907890bc2..08315f3d8c8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SumIfsPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py index d0557967e40..da913c95384 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SumSqPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/syd/syd_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/syd/syd_request_builder.py index 83bb7fbecb5..2df0b61d573 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/syd/syd_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/syd/syd_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[SydPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/t/t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/t/t_request_builder.py index 03fef13bcbd..bda1502cb68 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/t/t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/t/t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TPostRequestBody] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/t_dist/t_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/t_dist/t_dist_request_builder.py index b970a63608b..90e89a0a4a5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/t_dist/t_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/t_dist/t_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[T_DistPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py index 230b6da5d9a..c9544418f6f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[T_Dist_2TPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py index 94161fb54d7..008b14b2468 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[T_Dist_RTPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/t_inv/t_inv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/t_inv/t_inv_request_builder.py index d10895a2a34..fd7065791a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/t_inv/t_inv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/t_inv/t_inv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[T_InvPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py index 56aff1b9af6..1a8dc75d632 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[T_Inv_2TPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/tan/tan_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/tan/tan_request_builder.py index 45e879166b0..acfd51028b7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/tan/tan_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/tan/tan_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TanPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/tanh/tanh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/tanh/tanh_request_builder.py index ddbe6719695..32ed6e8dce4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/tanh/tanh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/tanh/tanh_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TanhPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py index 9c5d0295566..ef1f0506d94 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TbillEqPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py index fea8a951ee9..54ee4c77129 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TbillPricePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py index d6f1dd2387f..e7612a6f5ed 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TbillYieldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/text/text_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/text/text_request_builder.py index a02936f64e6..ce68bad27bf 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/text/text_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/text/text_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TextPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/time/time_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/time/time_request_builder.py index c41c3b03b49..c9aaa088548 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/time/time_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/time/time_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TimePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/timevalue/timevalue_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/timevalue/timevalue_request_builder.py index 7f2b27c54d9..fd09c7e4a6d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/timevalue/timevalue_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/timevalue/timevalue_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TimevaluePostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/today/today_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/today/today_request_builder.py index c5fb5a2f469..181818193a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/today/today_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/today/today_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[TodayReques Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TodayRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/trim/trim_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/trim/trim_request_builder.py index 691ccee63df..b60587e7f7c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/trim/trim_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/trim/trim_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TrimPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py index 3f419c881c7..23e51cc94d2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TrimMeanPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/true_/true_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/true_/true_request_builder.py index ade48dc075b..db2f81ce8e6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/true_/true_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/true_/true_request_builder.py @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[TrueRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TrueRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/trunc/trunc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/trunc/trunc_request_builder.py index d77a456ecd3..8383450056d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/trunc/trunc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/trunc/trunc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TruncPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/type/type_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/type/type_request_builder.py index 9a61e3eb411..6ae6e308eb7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/type/type_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/type/type_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[TypePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/unichar/unichar_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/unichar/unichar_request_builder.py index e372cea0e70..88174bf3324 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/unichar/unichar_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/unichar/unichar_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[UnicharPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/unicode/unicode_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/unicode/unicode_request_builder.py index 1ed05dbdd33..4960b3aad76 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/unicode/unicode_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/unicode/unicode_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[UnicodePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/upper/upper_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/upper/upper_request_builder.py index ee9547b4123..8fea8c7ebb3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/upper/upper_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/upper/upper_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[UpperPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/usdollar/usdollar_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/usdollar/usdollar_request_builder.py index 7388d58fba7..82879cd67f9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/usdollar/usdollar_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/usdollar/usdollar_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[UsdollarPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/value/value_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/value/value_request_builder.py index f7e05d67f6d..0dda839aaf5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/value/value_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/value/value_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[ValuePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/var_a/var_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/var_a/var_a_request_builder.py index dc6a342ecc5..4a961851db7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/var_a/var_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/var_a/var_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[VarAPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/var_p/var_p_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/var_p/var_p_request_builder.py index ce089527277..642d81e2090 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/var_p/var_p_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/var_p/var_p_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Var_PPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py index efa8a638816..ff585046c5e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[VarPAPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/var_s/var_s_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/var_s/var_s_request_builder.py index 894c19b37ba..377b72eb327 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/var_s/var_s_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/var_s/var_s_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Var_SPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/vdb/vdb_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/vdb/vdb_request_builder.py index 75369d70f83..32d4761ae2e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/vdb/vdb_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/vdb/vdb_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[VdbPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/vlookup/vlookup_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/vlookup/vlookup_request_builder.py index 9b98ccb9fba..e0003882ecf 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/vlookup/vlookup_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/vlookup/vlookup_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[VlookupPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/week_num/week_num_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/week_num/week_num_request_builder.py index f77fd8bd15a..53431869b1e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/week_num/week_num_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/week_num/week_num_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[WeekNumPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/weekday/weekday_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/weekday/weekday_request_builder.py index 8ef73c44eee..601950bde3f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/weekday/weekday_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/weekday/weekday_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[WeekdayPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py index 09523d2366e..a11b809d81a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Weibull_DistPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/work_day/work_day_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/work_day/work_day_request_builder.py index 2548c1efb15..176b8ee56dd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/work_day/work_day_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/work_day/work_day_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[WorkDayPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py index 71377b0850b..ac73900ea35 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[WorkDay_IntlPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/xirr/xirr_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/xirr/xirr_request_builder.py index b39a95fa10e..2deb4a4ad36 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/xirr/xirr_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/xirr/xirr_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[XirrPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/xnpv/xnpv_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/xnpv/xnpv_request_builder.py index 3c67ff632b1..8febdf601a5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/xnpv/xnpv_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/xnpv/xnpv_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[XnpvPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/xor/xor_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/xor/xor_request_builder.py index fd136990329..8ce888c11f0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/xor/xor_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/xor/xor_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[XorPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/year/year_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/year/year_request_builder.py index 8a8948e8b92..cb84904c56b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/year/year_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/year/year_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[YearPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/year_frac/year_frac_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/year_frac/year_frac_request_builder.py index c88df0244fe..e88dafc56e4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/year_frac/year_frac_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/year_frac/year_frac_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[YearFracPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/yield_/yield_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/yield_/yield_request_builder.py index 877d6615211..cec9a552a19 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/yield_/yield_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/yield_/yield_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[YieldPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py index 76871c0d179..992e0f44461 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[YieldDiscPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py index 32245375558..b94ed00a2e1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[YieldMatPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/functions/z_test/z_test_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/functions/z_test/z_test_request_builder.py index cbb269f1712..b423a56f86b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/functions/z_test/z_test_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/functions/z_test/z_test_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[Z_TestPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/names/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/add/add_request_builder.py index 25acb5073d1..ab64536e483 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookNamedItem]: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItem] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py index a189f0d9b08..3451cba397d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddFormulaLocalPostRequestBody] = None, request_configuration: Optional[AddFormulaLocalRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookNamedItem]: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItem] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddFormulaLocalPostRequestBody] = None, reque def to_post_request_information(self,body: Optional[AddFormulaLocalPostRequestBody] = None, request_configuration: Optional[AddFormulaLocalRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddFormulaLocalPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/names/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/count/count_request_builder.py index cdc54e3fac9..10358a1695a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 d173895eb32..7b1534f3dc9 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]: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookRange] - Find more info here: https://learn.microsoft.com/graph/api/range-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/nameditem-range?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/names/item/workbook_named_item_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/item/workbook_named_item_item_request_builder.py index 120ec2674f2..cbfff2f11ca 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/item/workbook_named_item_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/item/workbook_named_item_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[WorkbookNamedItemItemReque async def get(self,request_configuration: Optional[WorkbookNamedItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookNamedItem]: """ - Retrieve the properties and relationships of nameditem object. + Retrieve the properties and relationships of nameditem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItem] Find more info here: https://learn.microsoft.com/graph/api/nameditem-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[WorkbookNamedItemItemRequestB async def patch(self,body: Optional[WorkbookNamedItem] = None, request_configuration: Optional[WorkbookNamedItemItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookNamedItem]: """ - Update the properties of nameditem object. + Update the properties of nameditem object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItem] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookN Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookNamedItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of nameditem object. + Retrieve the properties and relationships of nameditem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookNamedItem] = None, request_configuration: Optional[WorkbookNamedItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of nameditem object. + Update the properties of nameditem object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookNamedItem] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class WorkbookNamedItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class WorkbookNamedItemItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of nameditem object. + Retrieve the properties and relationships of nameditem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/names/item/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/item/worksheet/worksheet_request_builder.py index e7e3b4eec9b..18a35aa4562 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/item/worksheet/worksheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/item/worksheet/worksheet_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorksheetReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/drives/item/items/item/workbook/names/names_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/names_request_builder.py index d4df5bed56e..a103b9f61b3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/names_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/names_request_builder.py @@ -47,7 +47,7 @@ def by_workbook_named_item_id(self,workbook_named_item_id: str) -> WorkbookNamed async def get(self,request_configuration: Optional[NamesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookNamedItemCollectionResponse]: """ - Retrieve a list of nameditem objects. + Retrieve a list of nameditem objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/workbook-list-names?view=graph-rest-1.0 @@ -93,19 +93,19 @@ async def post(self,body: Optional[WorkbookNamedItem] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[NamesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of nameditem objects. + Retrieve a list of nameditem objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookNamedItem] = None, request_configuration: Optional[NamesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[WorkbookNamedItem] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ def count(self) -> CountRequestBuilder: @dataclass class NamesRequestBuilderGetQueryParameters(): """ - Retrieve a list of nameditem objects. + Retrieve a list of nameditem objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/operations/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/operations/count/count_request_builder.py index 44f20410e2c..f322e7bd5c4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/operations/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/operations/item/workbook_operation_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/operations/item/workbook_operation_item_request_builder.py index d94ed2b2c6e..d7f406cae67 100644 --- a/msgraph/generated/drives/item/items/item/workbook/operations/item/workbook_operation_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/operations/item/workbook_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[WorkbookOperationItemReque async def get(self,request_configuration: Optional[WorkbookOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookOperation]: """ - Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. + Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookOperation] Find more info here: https://learn.microsoft.com/graph/api/workbookoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookO Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. + Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookOperation] = None, request_configuration: Optional[WorkbookOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class WorkbookOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class WorkbookOperationItemRequestBuilderGetQueryParameters(): """ - Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. + Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/operations/operations_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/operations/operations_request_builder.py index 6185b6efda4..c235629ed86 100644 --- a/msgraph/generated/drives/item/items/item/workbook/operations/operations_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_workbook_operation_id(self,workbook_operation_id: str) -> WorkbookOperati async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookOperationCollectionResponse]: """ - Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. + Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[WorkbookOperation] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. + Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[WorkbookOperation] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. + Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object. Currently not all requests support async. Take Create session request as an example. Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/refresh_session/refresh_session_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/refresh_session/refresh_session_request_builder.py index 525d34a3660..e2a8fe504cc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/refresh_session/refresh_session_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/refresh_session/refresh_session_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RefreshSessionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Use this API to refresh an existing workbook session. + Use this API to refresh an existing workbook session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/workbook-refreshsession?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RefreshSessionRequestBuilder def to_post_request_information(self,request_configuration: Optional[RefreshSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to refresh an existing workbook session. + Use this API to refresh an existing workbook session. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RefreshSessionRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py index 861b1e99c06..d5d2a6fe8e4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['key'] = str(key) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/sessionInfoResource(key='{key}')", path_parameters) async def get(self,request_configuration: Optional[SessionInfoResourceWithKeyRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookSessionInfo]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[SessionInfoR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SessionInfoResourceWithKeyRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py index 0ba122b5689..6954dc2d939 100644 --- a/msgraph/generated/drives/item/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['key'] = str(key) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tableRowOperationResult(key='{key}')", path_parameters) async def get(self,request_configuration: Optional[TableRowOperationResultWithKeyRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRow]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[TableRowOper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TableRowOperationResultWithKeyRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/add/add_request_builder.py index 9f4cb90d785..974598331dd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/add/add_request_builder.py @@ -29,10 +29,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTable]: """ - Invoke action add + Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTable] + Find more info here: https://learn.microsoft.com/graph/api/tablecollection-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -53,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action add + Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -61,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/tables/count/count_get_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/workbook/tables/count/count_response.py rename to msgraph/generated/drives/item/items/item/workbook/tables/count/count_get_response.py index 6a35033081a..f60427e8c47 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/count/count_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/count/count_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class CountResponse(AdditionalDataHolder, BackedModel, Parsable): +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class CountResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[int] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse + Returns: CountGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CountResponse() + return CountGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/count/count_request_builder.py index ab97c52e294..99d221c5e1d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py index 5196a9c8754..aefa575dad1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearFiltersRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clears all the filters currently applied on the table. + Clears all the filters currently applied on the table. This API is available in the following national cloud deployments. 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 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearFiltersRequestBuilderPo def to_post_request_information(self,request_configuration: Optional[ClearFiltersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clears all the filters currently applied on the table. + Clears all the filters currently applied on the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearFiltersRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/add/add_request_builder.py index d706ddc4691..f449291b2f6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Adds a new column to the table. + Adds a new column to the table. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new column to the table. + Adds a new column to the table. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 ecc1c601bf9..14ea22f2448 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 @@ -47,10 +47,10 @@ def by_workbook_table_column_id(self,workbook_table_column_id: str) -> WorkbookT async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumnCollectionResponse]: """ - Retrieve a list of tablecolumn objects. + Retrieve a list of tablecolumn objects. This API is available in the following national cloud deployments. 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 + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -81,7 +81,7 @@ def item_at_with_index(self,index: Optional[int] = None) -> ItemAtWithIndexReque async def post(self,body: Optional[WorkbookTableColumn] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Use this API to create a new TableColumn. + Use this API to create a new TableColumn. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] @@ -106,24 +106,24 @@ async def post(self,body: Optional[WorkbookTableColumn] = None, request_configur def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tablecolumn objects. + Retrieve a list of tablecolumn objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Use this API to create a new TableColumn. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[WorkbookTableColumn] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Retrieve a list of tablecolumn objects. + Retrieve a list of tablecolumn objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_get_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_response.py rename to msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_get_response.py index 6a35033081a..f60427e8c47 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class CountResponse(AdditionalDataHolder, BackedModel, Parsable): +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class CountResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[int] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse + Returns: CountGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CountResponse() + return CountGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_request_builder.py index 92315c73bba..198c1c4bc89 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py index fd47fd9aba5..4ee3ec4959f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the data body of the column. + Gets the range object associated with the data body of the column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the data body of the column. + Gets the range object associated with the data body of the column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DataBodyRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py index be20060fdbc..b360d6b7c19 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Apply the given filter criteria on the given column. + Apply the given filter criteria on the given column. This API is available in the following national cloud deployments. 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[ApplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Apply the given filter criteria on the given column. + Apply the given filter criteria on the given column. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py index bced2ed4e65..85ab7145f40 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyBottomItemsFilterPostRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py index 90fb29553fa..c0ffaa3c660 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyBottomPercentFilterPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py index 49ff2449ddc..4f116eb63e4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyCellColorFilterPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py index 15e4ec16b4c..3bb56e749a4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyCustomFilterPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py index 0cc8dbd4459..b96b5276d8e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyDynamicFilterPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py index 26d6446efeb..b3c294b7067 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyFontColorFilterPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py index 828ac194c65..22dc0fca76e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyIconFilterPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py index b1fad3e6d32..36afa324686 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyTopItemsFilterPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py index 99da7ed9810..3c60ca67c2b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyTopPercentFilterPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py index 262eb9f4aff..3e6c1028777 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyValuesFilterPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py index a407834a9d5..1085b6794db 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the filter on the given column. + Clear the filter on the given column. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/filter-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the filter on the given column. + Clear the filter on the given column. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py index 62cd21d5891..1bf8a9aa5dd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[FilterReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FilterRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,14 +124,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[WorkbookFilter] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py index c0517a20ca8..16ba2a608f6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the header row of the column. + Gets the range object associated with the header row of the column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderG def to_get_request_information(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the header row of the column. + Gets the range object associated with the header row of the column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> HeaderRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/range/range_request_builder.py index f70370b2a9e..fe12e33314d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/range/range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the entire column. + Gets the range object associated with the entire column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the entire column. + Gets the range object associated with the entire column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py index 04ecb460598..43f790baa66 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the totals row of the column. + Gets the range object associated with the totals row of the column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the totals row of the column. + Gets the range object associated with the totals row of the column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TotalRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py index 96442a70d0e..402aa5f8763 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the column from the table. + Deletes the column from the table. This API is available in the following national cloud deployments. 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/tablecolumn-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[WorkbookTableColumnItemReq async def get(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Retrieve the properties and relationships of tablecolumn object. + Retrieve the properties and relationships of tablecolumn object. This API is available in the following national cloud deployments. 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/tablecolumn-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[WorkbookTableColumnItemReques async def patch(self,body: Optional[WorkbookTableColumn] = None, request_configuration: Optional[WorkbookTableColumnItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Update the properties of tablecolumn object. + Update the properties of tablecolumn object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] @@ -100,39 +100,39 @@ async def patch(self,body: Optional[WorkbookTableColumn] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the column from the table. + Deletes the column from the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of tablecolumn object. + Retrieve the properties and relationships of tablecolumn object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTableColumn] = None, request_configuration: Optional[WorkbookTableColumnItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of tablecolumn object. + Update the properties of tablecolumn object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTableColumn] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -218,7 +218,7 @@ class WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class WorkbookTableColumnItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of tablecolumn object. + Retrieve the properties and relationships of tablecolumn object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 0386059e1a3..65831e0b34d 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] - Find more info here: https://learn.microsoft.com/graph/api/tablecolumncollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py index 6d2d6cad9aa..080fb4bee38 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ConvertToRangeRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Converts the table into a normal range of cells. All data is preserved. + Converts the table into a normal range of cells. All data is preserved. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ConvertToRangeRequestBuilder 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. + Converts the table into a normal range of cells. All data is preserved. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ConvertToRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py index e55cb7760ce..5bbe7cd3499 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the data body of the table. + Gets the range object associated with the data body of the table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the data body of the table. + Gets the range object associated with the data body of the table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DataBodyRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py index ca74905acad..bebe0b6f26f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with header row of the table. + Gets the range object associated with header row of the table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderG def to_get_request_information(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with header row of the table. + Gets the range object associated with header row of the table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> HeaderRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/range/range_request_builder.py index 799a680673f..99e1f683ed9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/range/range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Get the range object associated with the entire table. + Get the range object associated with the entire table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the range object associated with the entire table. + Get the range object associated with the entire table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py index ef5acaa3b66..e8291b9f0e1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReapplyFiltersRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reapplies all the filters currently on the table. + Reapplies all the filters currently on the table. This API is available in the following national cloud deployments. 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 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReapplyFiltersRequestBuilder def to_post_request_information(self,request_configuration: Optional[ReapplyFiltersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reapplies all the filters currently on the table. + Reapplies all the filters currently on the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReapplyFiltersRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/add/add_request_builder.py index bbca84a833e..847644c91af 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableRow]: """ - Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_get_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_response.py rename to msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_get_response.py index 6a35033081a..f60427e8c47 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class CountResponse(AdditionalDataHolder, BackedModel, Parsable): +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class CountResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[int] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse + Returns: CountGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CountResponse() + return CountGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_request_builder.py index 3acbd6bd40d..8bb30256912 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/range/range_request_builder.py index 0d930d88baf..4a4c889109e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/range/range_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[RangeRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py index a1f9375ab47..ba54687570e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the row from the table. + Deletes the row from the table. This API is available in the following national cloud deployments. 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/tablerow-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[WorkbookTableRowItemReques async def get(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRow]: """ - Retrieve the properties and relationships of tablerow object. + Retrieve the properties and relationships of tablerow object. This API is available in the following national cloud deployments. 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/tablerow-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[WorkbookTableRowItemRequestBu async def patch(self,body: Optional[WorkbookTableRow] = None, request_configuration: Optional[WorkbookTableRowItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTableRow]: """ - Update the properties of tablerow object. + Update the properties of tablerow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[WorkbookTableRow] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the row from the table. + Deletes the row from the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of tablerow object. + Retrieve the properties and relationships of tablerow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTableRow] = None, request_configuration: Optional[WorkbookTableRowItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of tablerow object. + Update the properties of tablerow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTableRow] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class WorkbookTableRowItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of tablerow object. + Retrieve the properties and relationships of tablerow object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 4e5f3706e9d..4a2e0990afe 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRow]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] - Find more info here: https://learn.microsoft.com/graph/api/tablerowcollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: 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 ef02c2abf2f..87eead27d17 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 @@ -47,10 +47,10 @@ def by_workbook_table_row_id(self,workbook_table_row_id: str) -> WorkbookTableRo async def get(self,request_configuration: Optional[RowsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRowCollectionResponse]: """ - Retrieve a list of tablerow objects. + Retrieve a list of tablerow objects. This API is available in the following national cloud deployments. 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 + Find more info here: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -81,7 +81,7 @@ def item_at_with_index(self,index: Optional[int] = None) -> ItemAtWithIndexReque 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] @@ -106,24 +106,24 @@ async def post(self,body: Optional[WorkbookTableRow] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[RowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tablerow objects. + Retrieve a list of tablerow objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[WorkbookTableRow] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RowsRequestBuilderGetQueryParameters(): """ - Retrieve a list of tablerow objects. + Retrieve a list of tablerow objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/apply/apply_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/apply/apply_request_builder.py index e643f87271b..5e1fc898cb8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/apply/apply_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/apply/apply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Perform a sort operation. + Perform a sort operation. This API is available in the following national cloud deployments. 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[ApplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Perform a sort operation. + Perform a sort operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/clear/clear_request_builder.py index aedd07d623c..02d51c6b796 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/tablesort-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py index 73824863241..ac8e4b829fe 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReapplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reapplies the current sorting parameters to the table. + Reapplies the current sorting parameters to the table. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/tablesort-reapply?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReapplyRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[ReapplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reapplies the current sorting parameters to the table. + Reapplies the current sorting parameters to the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReapplyRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/sort_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/sort_request_builder.py index e47f3899740..3991be92872 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/sort_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/sort/sort_request_builder.py @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SortRequestBuilderDeleteRe async def get(self,request_configuration: Optional[SortRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableSort]: """ - Retrieve the properties and relationships of tablesort object. + Retrieve the properties and relationships of tablesort object. This API is available in the following national cloud deployments. 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 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[SortReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SortRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of tablesort object. + Retrieve the properties and relationships of tablesort object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTableSort] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class SortRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SortRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of tablesort object. + Retrieve the properties and relationships of tablesort object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py index f4dd8a58e22..fcaf05cbdd7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with totals row of the table. + Gets the range object associated with totals row of the table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with totals row of the table. + Gets the range object associated with totals row of the table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TotalRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/workbook_table_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/workbook_table_item_request_builder.py index 381dde9c66d..4cdf320344e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/workbook_table_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/workbook_table_item_request_builder.py @@ -39,7 +39,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkbookTableItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the table. + Deletes the table. This API is available in the following national cloud deployments. 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-delete?view=graph-rest-1.0 @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[WorkbookTableItemRequestBu async def get(self,request_configuration: Optional[WorkbookTableItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTable]: """ - Retrieve the properties and relationships of table object. + Retrieve the properties and relationships of table object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTable] Find more info here: https://learn.microsoft.com/graph/api/table-get?view=graph-rest-1.0 @@ -81,7 +81,7 @@ async def get(self,request_configuration: Optional[WorkbookTableItemRequestBuild async def patch(self,body: Optional[WorkbookTable] = None, request_configuration: Optional[WorkbookTableItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTable]: """ - Update the properties of table object. + Update the properties of table object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTable] @@ -106,39 +106,39 @@ async def patch(self,body: Optional[WorkbookTable] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[WorkbookTableItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the table. + Deletes the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookTableItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of table object. + Retrieve the properties and relationships of table object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTable] = None, request_configuration: Optional[WorkbookTableItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of table object. + Update the properties of table object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -146,13 +146,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTable] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -278,7 +278,7 @@ class WorkbookTableItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class WorkbookTableItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of table object. + Retrieve the properties and relationships of table object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py index 6cedf95e129..e61e1c6f41c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorksheetReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: 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 416741c1dac..bc2f7f2cb79 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTable]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/tables_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/tables_request_builder.py index 1711f65e8d2..d01b1c98d43 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/tables_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/tables_request_builder.py @@ -47,7 +47,7 @@ def by_workbook_table_id(self,workbook_table_id: str) -> WorkbookTableItemReques async def get(self,request_configuration: Optional[TablesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableCollectionResponse]: """ - Retrieve a list of table objects. + Retrieve a list of table objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/table-list?view=graph-rest-1.0 @@ -105,19 +105,19 @@ async def post(self,body: Optional[WorkbookTable] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[TablesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of table objects. + Retrieve a list of table objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTable] = None, request_configuration: Optional[TablesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[WorkbookTable] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -171,7 +171,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TablesRequestBuilderGetQueryParameters(): """ - Retrieve a list of table objects. + Retrieve a list of table objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/workbook_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/workbook_request_builder.py index 4c1035a533f..b0be373f8ba 100644 --- a/msgraph/generated/drives/item/items/item/workbook/workbook_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/workbook_request_builder.py @@ -21,8 +21,8 @@ from .operations.operations_request_builder import OperationsRequestBuilder from .refresh_session.refresh_session_request_builder import RefreshSessionRequestBuilder from .session_info_resource_with_key.session_info_resource_with_key_request_builder import SessionInfoResourceWithKeyRequestBuilder - from .table_row_operation_result_with_key.table_row_operation_result_with_key_request_builder import TableRowOperationResultWithKeyRequestBuilder from .tables.tables_request_builder import TablesRequestBuilder + from .table_row_operation_result_with_key.table_row_operation_result_with_key_request_builder import TableRowOperationResultWithKeyRequestBuilder from .worksheets.worksheets_request_builder import WorksheetsRequestBuilder class WorkbookRequestBuilder(BaseRequestBuilder): @@ -133,12 +133,12 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -148,14 +148,14 @@ def to_get_request_information(self,request_configuration: Optional[WorkbookRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Workbook] = None, request_configuration: Optional[WorkbookRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -168,13 +168,13 @@ def to_patch_request_information(self,body: Optional[Workbook] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/add/add_request_builder.py index 93e0656cda4..765238ace50 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookWorksheet]: """ - Adds a new worksheet to the workbook. The worksheet is added at the end of existing worksheets. If you wish to activate the newly added worksheet, call.activate() on it. + Adds a new worksheet to the workbook. The worksheet is added at the end of existing worksheets. If you wish to activate the newly added worksheet, call .activate() on it. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookWorksheet] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new worksheet to the workbook. The worksheet is added at the end of existing worksheets. If you wish to activate the newly added worksheet, call.activate() on it. + Adds a new worksheet to the workbook. The worksheet is added at the end of existing worksheets. If you wish to activate the newly added worksheet, call .activate() on it. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/count/count_request_builder.py index 639822137ae..1ccd63eddb8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py index b4fc43b23b8..4eaf9db49a1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py @@ -26,6 +26,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param row: Usage: row={row} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['column'] = str(column) + path_parameters['row'] = str(row) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/cell(row={row},column={column})", path_parameters) async def get(self,request_configuration: Optional[CellWithRowWithColumnRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: @@ -56,13 +59,13 @@ def to_get_request_information(self,request_configuration: Optional[CellWithRowW Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CellWithRowWithColumnRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/add/add_request_builder.py index cdf85762e03..ead839a461f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChart]: """ - Creates a new chart. + Creates a new chart. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChart] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Creates a new chart. + Creates a new chart. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 6cf41046cfb..a9bbcc2692b 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 @@ -48,10 +48,10 @@ def by_workbook_chart_id(self,workbook_chart_id: str) -> WorkbookChartItemReques async def get(self,request_configuration: Optional[ChartsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartCollectionResponse]: """ - Retrieve a list of chart objects. + Retrieve a list of chart objects. This API is available in the following national cloud deployments. 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/chart-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/worksheet-list-charts?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -94,7 +94,7 @@ def item_with_name(self,name: Optional[str] = None) -> ItemWithNameRequestBuilde async def post(self,body: Optional[WorkbookChart] = None, request_configuration: Optional[ChartsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChart]: """ - Use this API to create a new Chart. + Use this API to create a new Chart. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChart] @@ -119,24 +119,24 @@ async def post(self,body: Optional[WorkbookChart] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ChartsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of chart objects. + Retrieve a list of chart objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChart] = None, request_configuration: Optional[ChartsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new Chart. + Use this API to create a new Chart. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_post_request_information(self,body: Optional[WorkbookChart] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -185,7 +185,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChartsRequestBuilderGetQueryParameters(): """ - Retrieve a list of chart objects. + Retrieve a list of chart objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_get_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_response.py rename to msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_get_response.py index 6a35033081a..f60427e8c47 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/count/count_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class CountResponse(AdditionalDataHolder, BackedModel, Parsable): +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class CountResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[int] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse + Returns: CountGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CountResponse() + return CountGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_request_builder.py index f6829a19e0b..ad3e0c4821f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py index f2f2432b29d..b3d68d12f0e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[AxesReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AxesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AxesRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxes] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py index 6ea647232ab..53e8177e70a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[CategoryA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CategoryAxisRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[CategoryAxis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxis] = None, request_configuration: Optional[CategoryAxisRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxis] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py index c8d3cbe8d2f..bd2068da422 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[FontRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartFont]: """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFont] Find more info here: https://learn.microsoft.com/graph/api/chartfont-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[FontRequestBuilderGetRequestC async def patch(self,body: Optional[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartFont]: """ - Update the properties of chartfont object. + Update the properties of chartfont object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFont] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartfont object. + Update the properties of chartfont object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class FontRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FontRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. """ 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/axes/category_axis/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py index ba707cbb02a..316cd3c60cc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py index d8d5da6e17f..681d0810fc8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py index d89d7059423..00cf7232496 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[LineRequestBuilderDeleteRe async def get(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartLineFormat]: """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLineFormat] Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[LineRequestBuilderGetRequestC async def patch(self,body: Optional[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartLineFormat]: """ - Update the properties of chartlineformat object. + Update the properties of chartlineformat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLineFormat] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartlineformat object. + Update the properties of chartlineformat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class LineRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class LineRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. """ 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/axes/category_axis/major_gridlines/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py index 08bfd592b8d..78e3429540e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlinesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlinesForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py index c6cd0707790..edd8b56e0d3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py index b8715d0cd17..840ce571582 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py index eba3a2edf3d..c80f5d6d053 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[MajorGrid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MajorGridlinesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[MajorGridlin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlines] = None, request_configuration: Optional[MajorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlines] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py index aed88e60e9d..a1d32e30807 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlinesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlinesForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py index 007081badc4..8f0527e1a8b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py index f4009168c11..a1897bde471 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py index c0e4e5ff01a..ac339dd74a7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MinorGridlinesRequestBuild async def get(self,request_configuration: Optional[MinorGridlinesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartGridlines]: """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartGridlines] Find more info here: https://learn.microsoft.com/graph/api/chartgridlines-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[MinorGridlinesRequestBuilderG async def patch(self,body: Optional[WorkbookChartGridlines] = None, request_configuration: Optional[MinorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartGridlines]: """ - Update the properties of chartgridlines object. + Update the properties of chartgridlines object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartGridlines] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[MinorGrid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MinorGridlinesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlines] = None, request_configuration: Optional[MinorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartgridlines object. + Update the properties of chartgridlines object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlines] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class MinorGridlinesRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class MinorGridlinesRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. """ 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/axes/category_axis/title/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py index 660b9ab7bdb..92dcdce63b0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py index 8f87f90ec81..e49a0fa43c4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisTitleFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisTitleForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py index 685c12a1a6e..a1118dc30ee 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TitleRequestBuilderDeleteR async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartAxisTitle]: """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxisTitle] Find more info here: https://learn.microsoft.com/graph/api/chartaxistitle-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequest async def patch(self,body: Optional[WorkbookChartAxisTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAxisTitle]: """ - Update the properties of chartaxistitle object. + Update the properties of chartaxistitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxisTitle] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[TitleRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartaxistitle object. + Update the properties of chartaxistitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisTitle] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class TitleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class TitleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. """ 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/axes/series_axis/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py index 4e2a7037760..a8d88aee4fe 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[FontRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartFont]: """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFont] Find more info here: https://learn.microsoft.com/graph/api/chartfont-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[FontRequestBuilderGetRequestC async def patch(self,body: Optional[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartFont]: """ - Update the properties of chartfont object. + Update the properties of chartfont object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFont] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartfont object. + Update the properties of chartfont object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class FontRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FontRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. """ 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/axes/series_axis/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py index 919044ee4b9..0d377c2d33e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py index 11ece22fdeb..2ba7c06f0db 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py index 273c2b3a4a4..44923824024 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[LineRequestBuilderDeleteRe async def get(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartLineFormat]: """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLineFormat] Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[LineRequestBuilderGetRequestC async def patch(self,body: Optional[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartLineFormat]: """ - Update the properties of chartlineformat object. + Update the properties of chartlineformat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLineFormat] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartlineformat object. + Update the properties of chartlineformat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class LineRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class LineRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. """ 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/axes/series_axis/major_gridlines/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py index 449c6c0d0db..cdd11286f35 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlinesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlinesForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py index 8a6b532b0d0..9a3f121d87d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py index 2b9752a7f89..358d3ba2719 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py index 6be19665b0f..16baeeef923 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[MajorGrid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MajorGridlinesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[MajorGridlin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlines] = None, request_configuration: Optional[MajorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlines] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py index 7f5f31da0f0..cdfb6a54189 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlinesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlinesForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py index 363cda7a85d..bafdb3bc005 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py index 3e8de576d21..c267e6a832f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py index f68a8234cff..0e11b425db3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MinorGridlinesRequestBuild async def get(self,request_configuration: Optional[MinorGridlinesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartGridlines]: """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartGridlines] Find more info here: https://learn.microsoft.com/graph/api/chartgridlines-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[MinorGridlinesRequestBuilderG async def patch(self,body: Optional[WorkbookChartGridlines] = None, request_configuration: Optional[MinorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartGridlines]: """ - Update the properties of chartgridlines object. + Update the properties of chartgridlines object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartGridlines] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[MinorGrid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MinorGridlinesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlines] = None, request_configuration: Optional[MinorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartgridlines object. + Update the properties of chartgridlines object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlines] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class MinorGridlinesRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class MinorGridlinesRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. """ 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/axes/series_axis/series_axis_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py index 2ffce50001c..c3468aaf259 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SeriesAxi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SeriesAxisRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SeriesAxisRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxis] = None, request_configuration: Optional[SeriesAxisRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxis] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py index d90a7534ce7..4fe17f91471 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py index a61eeed2ea3..a3fe7b4810f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisTitleFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisTitleForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py index 05fcf4f2f7a..70f9c458b26 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TitleRequestBuilderDeleteR async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartAxisTitle]: """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxisTitle] Find more info here: https://learn.microsoft.com/graph/api/chartaxistitle-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequest async def patch(self,body: Optional[WorkbookChartAxisTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAxisTitle]: """ - Update the properties of chartaxistitle object. + Update the properties of chartaxistitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxisTitle] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[TitleRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartaxistitle object. + Update the properties of chartaxistitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisTitle] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class TitleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class TitleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. """ 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/axes/value_axis/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py index 79040db12c2..3f80b4b6ffa 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[FontRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartFont]: """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFont] Find more info here: https://learn.microsoft.com/graph/api/chartfont-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[FontRequestBuilderGetRequestC async def patch(self,body: Optional[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartFont]: """ - Update the properties of chartfont object. + Update the properties of chartfont object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFont] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartfont object. + Update the properties of chartfont object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class FontRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FontRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartfont object. + Retrieve the properties and relationships of chartfont object. This API is available in the following national cloud deployments. """ 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/axes/value_axis/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py index 9a8eaf2f5a3..a7dbcfefefd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py index a42dd269f1c..f9116c65fd2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py index a0e5bbc2aa7..e17333085db 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[LineRequestBuilderDeleteRe async def get(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartLineFormat]: """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLineFormat] Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[LineRequestBuilderGetRequestC async def patch(self,body: Optional[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartLineFormat]: """ - Update the properties of chartlineformat object. + Update the properties of chartlineformat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLineFormat] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartlineformat object. + Update the properties of chartlineformat object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class LineRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class LineRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartlineformat object. + Retrieve the properties and relationships of chartlineformat object. This API is available in the following national cloud deployments. """ 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/axes/value_axis/major_gridlines/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py index 67131dd32b7..3ccd6ef7196 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlinesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlinesForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py index 1a2dcf429da..07ab5744619 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py index e63c8c2de10..c3e6804c470 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py index c30aead358c..1dd88f4c04f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[MajorGrid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MajorGridlinesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[MajorGridlin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlines] = None, request_configuration: Optional[MajorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlines] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py index 75cc128a4ec..ef5d5d7ea70 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlinesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlinesForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py index e74a69f7415..1c4b2cb3f06 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py index e3c78ad2461..be023f214f6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py index 697a8d85c65..36f3584d42a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MinorGridlinesRequestBuild async def get(self,request_configuration: Optional[MinorGridlinesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartGridlines]: """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartGridlines] Find more info here: https://learn.microsoft.com/graph/api/chartgridlines-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[MinorGridlinesRequestBuilderG async def patch(self,body: Optional[WorkbookChartGridlines] = None, request_configuration: Optional[MinorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartGridlines]: """ - Update the properties of chartgridlines object. + Update the properties of chartgridlines object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartGridlines] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[MinorGrid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MinorGridlinesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartGridlines] = None, request_configuration: Optional[MinorGridlinesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartgridlines object. + Update the properties of chartgridlines object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartGridlines] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class MinorGridlinesRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class MinorGridlinesRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartgridlines object. + Retrieve the properties and relationships of chartgridlines object. This API is available in the following national cloud deployments. """ 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/axes/value_axis/title/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py index 46b3839a5f8..3624041e8c7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py index 0f53afdbfdc..361962389ba 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisTitleFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisTitleForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py index b3e584a0011..5915fa407f7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TitleRequestBuilderDeleteR async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartAxisTitle]: """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxisTitle] Find more info here: https://learn.microsoft.com/graph/api/chartaxistitle-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequest async def patch(self,body: Optional[WorkbookChartAxisTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAxisTitle]: """ - Update the properties of chartaxistitle object. + Update the properties of chartaxistitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxisTitle] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[TitleRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxisTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartaxistitle object. + Update the properties of chartaxistitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxisTitle] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class TitleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class TitleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartaxistitle object. + Retrieve the properties and relationships of chartaxistitle object. This API is available in the following national cloud deployments. """ 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/axes/value_axis/value_axis_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py index 90792971973..a28c22acbe7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[ValueAxisRequestBuilderDel async def get(self,request_configuration: Optional[ValueAxisRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartAxis]: """ - Retrieve the properties and relationships of chartaxis object. + Retrieve the properties and relationships of chartaxis object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxis] Find more info here: https://learn.microsoft.com/graph/api/chartaxis-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[ValueAxisRequestBuilderGetReq async def patch(self,body: Optional[WorkbookChartAxis] = None, request_configuration: Optional[ValueAxisRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAxis]: """ - Update the properties of chartaxis object. + Update the properties of chartaxis object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartAxis] @@ -103,34 +103,34 @@ def to_delete_request_information(self,request_configuration: Optional[ValueAxis Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ValueAxisRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartaxis object. + Retrieve the properties and relationships of chartaxis object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartAxis] = None, request_configuration: Optional[ValueAxisRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartaxis object. + Update the properties of chartaxis object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAxis] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -207,7 +207,7 @@ class ValueAxisRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class ValueAxisRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartaxis object. + Retrieve the properties and relationships of chartaxis object. This API is available in the following national cloud deployments. """ 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/data_labels/data_labels_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py index 409d2861a9e..8b25990fc94 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[DataLabelsRequestBuilderDe async def get(self,request_configuration: Optional[DataLabelsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartDataLabels]: """ - Retrieve the properties and relationships of chartdatalabels object. + Retrieve the properties and relationships of chartdatalabels object. This API is available in the following national cloud deployments. 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 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[DataLabelsRequestBuilderGetRe async def patch(self,body: Optional[WorkbookChartDataLabels] = None, request_configuration: Optional[DataLabelsRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartDataLabels]: """ - Update the properties of chartdatalabels object. + Update the properties of chartdatalabels object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartDataLabels] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[DataLabel Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DataLabelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartdatalabels object. + Retrieve the properties and relationships of chartdatalabels object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Update the properties of chartdatalabels object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartDataLabels] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class DataLabelsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguratio @dataclass class DataLabelsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartdatalabels object. + Retrieve the properties and relationships of chartdatalabels object. This API is available in the following national cloud deployments. """ 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/data_labels/format/fill/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py index f469b0c8140..9db67223235 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py index 019218a7334..9ae9b937404 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FillReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FillRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFill] = None, request_configuration: Optional[FillRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFill] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py index b53fc0ea2ce..a2246c3dd11 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> None: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. 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[SetSolidColorPostRequestBody] = None, request def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py index 3207a9e4dca..0e96b0e44c7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py index ce20a338685..1d5f66118de 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartDataLabelFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartDataLabelForma if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py index dd90f9daad2..54333a27d98 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py index ab03a4342e4..97919b93a4e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FillReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FillRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFill] = None, request_configuration: Optional[FillRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFill] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py index eb698bffb87..05056316f1a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> None: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. 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[SetSolidColorPostRequestBody] = None, request def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py index 59f4002e000..f027bd5f3b8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py index e70588ac615..b725cf32a57 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartAreaFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_response.py rename to msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py index b98fa9619a7..c981ba00d64 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class ImageResponse(AdditionalDataHolder, BackedModel, Parsable): +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) @@ -15,15 +15,15 @@ class ImageResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ImageResponse: + 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: ImageResponse + Returns: ImageGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ImageResponse() + return ImageGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py index cde2260d2bf..e8d199d5448 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .image_response import ImageResponse + from .image_get_response import ImageGetResponse class ImageRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/image()", path_parameters) - async def get(self,request_configuration: Optional[ImageRequestBuilderGetRequestConfiguration] = None) -> Optional[ImageResponse]: + 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[ImageResponse] + Returns: Optional[ImageGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[ImageRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .image_response import ImageResponse + from .image_get_response import ImageGetResponse - return await self.request_adapter.send_async(request_info, ImageResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ImageGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[ImageRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[ImageRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ImageRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py similarity index 91% rename from msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py rename to msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py index 7d5bf82da6c..81e3e0a8477 100644 --- a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class CreateDownloadUrlResponse(AdditionalDataHolder, BackedModel, Parsable): +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) @@ -15,15 +15,15 @@ class CreateDownloadUrlResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CreateDownloadUrlResponse: + 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: CreateDownloadUrlResponse + Returns: ImageWithWidthGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CreateDownloadUrlResponse() + return ImageWithWidthGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py index 542aa86e5e0..d8bb2f8d24a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .image_with_width_response import ImageWithWidthResponse + from .image_with_width_get_response import ImageWithWidthGetResponse class ImageWithWidthRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni 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/{workbookChart%2Did}/image(width={width})", path_parameters) - async def get(self,request_configuration: Optional[ImageWithWidthRequestBuilderGetRequestConfiguration] = None) -> Optional[ImageWithWidthResponse]: + 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[ImageWithWidthResponse] + Returns: Optional[ImageWithWidthGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[ImageWithWidthRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .image_with_width_response import ImageWithWidthResponse + from .image_with_width_get_response import ImageWithWidthGetResponse - return await self.request_adapter.send_async(request_info, ImageWithWidthResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ImageWithWidthGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[ImageWithWidthRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ImageWithWid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ImageWithWidthRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py similarity index 89% rename from msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_response.py rename to msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py index 273b2eb8cf9..65fcbdfed46 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_response.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class ImageWithWidthWithHeightResponse(AdditionalDataHolder, BackedModel, Parsable): +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) @@ -15,15 +15,15 @@ class ImageWithWidthWithHeightResponse(AdditionalDataHolder, BackedModel, Parsab value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ImageWithWidthWithHeightResponse: + 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: ImageWithWidthWithHeightResponse + Returns: ImageWithWidthWithHeightGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ImageWithWidthWithHeightResponse() + return ImageWithWidthWithHeightGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/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/image_with_width_with_height/image_with_width_with_height_request_builder.py index c950d436173..c292334f034 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/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/image_with_width_with_height/image_with_width_with_height_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .image_with_width_with_height_response import ImageWithWidthWithHeightResponse + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse class ImageWithWidthWithHeightRequestBuilder(BaseRequestBuilder): """ @@ -26,13 +26,16 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni 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/{workbookChart%2Did}/image(width={width},height={height})", path_parameters) - async def get(self,request_configuration: Optional[ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration] = None) -> Optional[ImageWithWidthWithHeightResponse]: + 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[ImageWithWidthWithHeightResponse] + Returns: Optional[ImageWithWidthWithHeightGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -45,9 +48,9 @@ async def get(self,request_configuration: Optional[ImageWithWidthWithHeightReque } if not self.request_adapter: raise Exception("Http core is null") - from .image_with_width_with_height_response import ImageWithWidthWithHeightResponse + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse - return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -56,13 +59,13 @@ def to_get_request_information(self,request_configuration: Optional[ImageWithWid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ImageWithWidthWithHeightRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py new file mode 100644 index 00000000000..2997b2839f9 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightWithFittingModeGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: 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/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/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py index 36f96f019db..2e006a4bbf1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .image_with_width_with_height_with_fitting_mode_response import ImageWithWidthWithHeightWithFittingModeResponse + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse class ImageWithWidthWithHeightWithFittingModeRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param width: Usage: width={width} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['fitting_mode'] = 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/{workbookChart%2Did}/image(width={width},height={height},fittingMode='{fittingMode}')", path_parameters) - async def get(self,request_configuration: Optional[ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration] = None) -> Optional[ImageWithWidthWithHeightWithFittingModeResponse]: + 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[ImageWithWidthWithHeightWithFittingModeResponse] + Returns: Optional[ImageWithWidthWithHeightWithFittingModeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[ImageWithWidthWithHeightWithF } if not self.request_adapter: raise Exception("Http core is null") - from .image_with_width_with_height_with_fitting_mode_response import ImageWithWidthWithHeightWithFittingModeResponse + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse - return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightWithFittingModeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightWithFittingModeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,13 +61,13 @@ def to_get_request_information(self,request_configuration: Optional[ImageWithWid Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py index 95b731458d0..4014affdb4d 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py index c3b69665651..3787fd10ec6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FillReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FillRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFill] = None, request_configuration: Optional[FillRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFill] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py index b4261a38a73..2b3ccd77f0a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> None: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. 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[SetSolidColorPostRequestBody] = None, request def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py index 5a411df273c..76f39745e27 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py index c892210c9a0..b01ba8c5572 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLegendFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLegendFormat] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py index 49d34ada7fd..a0f36532715 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[LegendRequestBuilderDelete async def get(self,request_configuration: Optional[LegendRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartLegend]: """ - Retrieve the properties and relationships of chartlegend object. + Retrieve the properties and relationships of chartlegend object. This API is available in the following national cloud deployments. 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 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[LegendRequestBuilderGetReques async def patch(self,body: Optional[WorkbookChartLegend] = None, request_configuration: Optional[LegendRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartLegend]: """ - Update the properties of chartlegend object. + Update the properties of chartlegend object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartLegend] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[LegendReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LegendRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartlegend object. + Retrieve the properties and relationships of chartlegend object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Update the properties of chartlegend object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLegend] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class LegendRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class LegendRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartlegend object. + Retrieve the properties and relationships of chartlegend object. This API is available in the following national cloud deployments. """ 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/count/count_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py new file mode 100644 index 00000000000..f60427e8c47 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py index 1e7db6bf2bb..27c7345c48a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ............models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_response.py deleted file mode 100644 index 6a35033081a..00000000000 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/count/count_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CountResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[int] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CountResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_int_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_int_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py index d35d96efb2d..f00cfd23c57 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py index a9c4c2756a2..a1b811f4ce4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[FillRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartFill]: """ - Represents the fill format of a chart series, which includes background formating information. Read-only. + Represents the fill format of a chart series, which includes background formatting information. Read-only. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFill] """ @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[FillReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Represents the fill format of a chart series, which includes background formating information. Read-only. + Represents the fill format of a chart series, which includes background formatting information. Read-only. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFill] = None, request_configuration: Optional[FillRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFill] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -185,7 +185,7 @@ class FillRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FillRequestBuilderGetQueryParameters(): """ - Represents the fill format of a chart series, which includes background formating information. Read-only. + Represents the fill format of a chart series, which includes background formatting information. Read-only. """ 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/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py index 1d6ceba81cb..bcf64332a9c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> None: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. 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[SetSolidColorPostRequestBody] = None, request def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py index be446e11d62..4baf88f70c1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartSeriesFormat] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py index 573588be15f..0660fa6110a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the line format of a chart element. + Clear the line format of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py index b301e8f191b..09e1450ac82 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[LineReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LineRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[LineRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartLineFormat] = None, request_configuration: Optional[LineRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartLineFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py new file mode 100644 index 00000000000..f60427e8c47 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py index 5b593c47baf..530e22613d5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..............models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_response.py deleted file mode 100644 index 6a35033081a..00000000000 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CountResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[int] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CountResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_int_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_int_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py index 961db82a446..15016633a81 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py index 5721e3441ca..9a2c166b296 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[FillRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartFill]: """ - Represents the fill format of a chart, which includes background formating information. Read-only. + Represents the fill format of a chart, which includes background formatting information. Read-only. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartFill] """ @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[FillReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Represents the fill format of a chart, which includes background formating information. Read-only. + Represents the fill format of a chart, which includes background formatting information. Read-only. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFill] = None, request_configuration: Optional[FillRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFill] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -185,7 +185,7 @@ class FillRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FillRequestBuilderGetQueryParameters(): """ - Represents the fill format of a chart, which includes background formating information. Read-only. + Represents the fill format of a chart, which includes background formatting information. Read-only. """ 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/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py index b61bb765259..8b8f256c943 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> None: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. 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[SetSolidColorPostRequestBody] = None, request def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py index b23bf0fb9ad..c131658d463 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartPointFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py index 52a296644b2..242cd4e3a25 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[WorkbookChartPointItemRequ async def get(self,request_configuration: Optional[WorkbookChartPointItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartPoint]: """ - Retrieve the properties and relationships of chartpoint object. + Retrieve the properties and relationships of chartpoint object. This API is available in the following national cloud deployments. 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/chartpoint-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookChartPointItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartpoint object. + Retrieve the properties and relationships of chartpoint object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartPoint] = None, request_configuration: Optional[WorkbookChartPointItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartPoint] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class WorkbookChartPointItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class WorkbookChartPointItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartpoint object. + Retrieve the properties and relationships of chartpoint object. This API is available in the following national cloud deployments. """ 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/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 0365ea5ffb3..e3ed5a9c564 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartPoint]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartPoint] - Find more info here: https://learn.microsoft.com/graph/api/chartpointscollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: 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 19234f348bb..86cba3d6000 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,7 +46,7 @@ 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 chartpoint objects. This API is available in the following national cloud deployments. 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 @@ -80,7 +80,7 @@ def item_at_with_index(self,index: Optional[int] = None) -> ItemAtWithIndexReque async def post(self,body: Optional[WorkbookChartPoint] = None, request_configuration: Optional[PointsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChartPoint]: """ - Use this API to create a new ChartPoints. + Use this API to create a new ChartPoints. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartPoint] @@ -105,24 +105,24 @@ 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 chartpoint objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Use this API to create a new ChartPoints. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[WorkbookChartPoint] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PointsRequestBuilderGetQueryParameters(): """ - Retrieve a list of chartpoint objects. + Retrieve a list of chartpoint objects. This API is available in the following national cloud deployments. """ 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/workbook_chart_series_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py index 4d437760ca7..1bca1eb613b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[WorkbookChartSeriesItemReq async def get(self,request_configuration: Optional[WorkbookChartSeriesItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartSeries]: """ - Retrieve the properties and relationships of chartseries object. + Retrieve the properties and relationships of chartseries object. This API is available in the following national cloud deployments. 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/chartseries-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[WorkbookChartSeriesItemReques async def patch(self,body: Optional[WorkbookChartSeries] = None, request_configuration: Optional[WorkbookChartSeriesItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartSeries]: """ - Update the properties of chartseries object. + Update the properties of chartseries object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartSeries] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookChartSeriesItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chartseries object. + Retrieve the properties and relationships of chartseries object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartSeries] = None, request_configuration: Optional[WorkbookChartSeriesItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chartseries object. + Update the properties of chartseries object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartSeries] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class WorkbookChartSeriesItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class WorkbookChartSeriesItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chartseries object. + Retrieve the properties and relationships of chartseries object. This API is available in the following national cloud deployments. """ 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/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 bd079762420..eebadf1fafb 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartSeries]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartSeries] - Find more info here: https://learn.microsoft.com/graph/api/chartseriescollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: 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 8372f734992..7078796ea1b 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 @@ -46,7 +46,7 @@ def by_workbook_chart_series_id(self,workbook_chart_series_id: str) -> WorkbookC async def get(self,request_configuration: Optional[SeriesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartSeriesCollectionResponse]: """ - Retrieve a list of chartseries objects. + Retrieve a list of chartseries objects. This API is available in the following national cloud deployments. 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 @@ -80,7 +80,7 @@ def item_at_with_index(self,index: Optional[int] = None) -> ItemAtWithIndexReque async def post(self,body: Optional[WorkbookChartSeries] = None, request_configuration: Optional[SeriesRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChartSeries]: """ - Use this API to create a new ChartSeries. + Use this API to create a new ChartSeries. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartSeries] @@ -105,24 +105,24 @@ async def post(self,body: Optional[WorkbookChartSeries] = None, request_configur def to_get_request_information(self,request_configuration: Optional[SeriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of chartseries objects. + Retrieve a list of chartseries objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Use this API to create a new ChartSeries. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[WorkbookChartSeries] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SeriesRequestBuilderGetQueryParameters(): """ - Retrieve a list of chartseries objects. + Retrieve a list of chartseries objects. This API is available in the following national cloud deployments. """ 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/set_data/set_data_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py index 769bf37c795..68d3a7c93ed 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetDataPostRequestBody] = None, request_configuration: Optional[SetDataRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resets the source data for the chart. + Resets the source data for the chart. This API is available in the following national cloud deployments. 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[SetDataPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[SetDataPostRequestBody] = None, request_configuration: Optional[SetDataRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resets the source data for the chart. + Resets the source data for the chart. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetDataPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py index 7af485eaebd..43283347ad6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetPositionPostRequestBody] = None, request_configuration: Optional[SetPositionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Positions the chart relative to cells on the worksheet. + Positions the chart relative to cells on the worksheet. This API is available in the following national cloud deployments. 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[SetPositionPostRequestBody] = None, request_c 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. + Positions the chart relative to cells on the worksheet. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetPositionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py index 0137bcf7100..906f455005a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the fill color of a chart element. + Clear the fill color of a chart element. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py index 7e7d826bc7e..87db75955b1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FillReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FillRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FillRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFill] = None, request_configuration: Optional[FillRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFill] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py index 739f6cb2df6..4043a98aaef 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> None: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. 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[SetSolidColorPostRequestBody] = None, request def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody] = None, request_configuration: Optional[SetSolidColorRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Sets the fill formatting of a chart element to a uniform color. + Sets the fill formatting of a chart element to a uniform color. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetSolidColorPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py index 90302e98108..a41e4e76962 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FontReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FontRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FontRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartFont] = None, request_configuration: Optional[FontRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartFont] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py index 5ba44ea9fdb..e7ecfd92644 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[FormatReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[FormatReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChartTitleFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartTitleFormat] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py index af5d68f17b5..af9d88ea793 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TitleRequestBuilderDeleteR async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartTitle]: """ - Retrieve the properties and relationships of charttitle object. + Retrieve the properties and relationships of charttitle object. This API is available in the following national cloud deployments. 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 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[TitleRequestBuilderGetRequest async def patch(self,body: Optional[WorkbookChartTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartTitle]: """ - Update the properties of charttitle object. + Update the properties of charttitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartTitle] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[TitleRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of charttitle object. + Retrieve the properties and relationships of charttitle object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Update the properties of charttitle object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChartTitle] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class TitleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class TitleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of charttitle object. + Retrieve the properties and relationships of charttitle object. This API is available in the following national cloud deployments. """ 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/workbook_chart_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py index 68ec09626db..94deda3980f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py @@ -41,7 +41,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkbookChartItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the chart object. + Deletes the chart object. This API is available in the following national cloud deployments. 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-delete?view=graph-rest-1.0 @@ -61,7 +61,7 @@ async def delete(self,request_configuration: Optional[WorkbookChartItemRequestBu async def get(self,request_configuration: Optional[WorkbookChartItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChart]: """ - Retrieve the properties and relationships of chart object. + Retrieve the properties and relationships of chart object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChart] Find more info here: https://learn.microsoft.com/graph/api/chart-get?view=graph-rest-1.0 @@ -128,7 +128,7 @@ def image_with_width_with_height_with_fitting_mode(self,fitting_mode: Optional[s async def patch(self,body: Optional[WorkbookChart] = None, request_configuration: Optional[WorkbookChartItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChart]: """ - Update the properties of chart object. + Update the properties of chart object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChart] @@ -153,39 +153,39 @@ async def patch(self,body: Optional[WorkbookChart] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[WorkbookChartItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the chart object. + Deletes the chart object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookChartItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chart object. + Retrieve the properties and relationships of chart object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookChart] = None, request_configuration: Optional[WorkbookChartItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of chart object. + Update the properties of chart object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -193,13 +193,13 @@ def to_patch_request_information(self,body: Optional[WorkbookChart] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -316,7 +316,7 @@ class WorkbookChartItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class WorkbookChartItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chart object. + Retrieve the properties and relationships of chart object. This API is available in the following national cloud deployments. """ 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/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py index 645fb5d5a69..66f82fafdc9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorksheetReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: 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 f0ae4c27d54..382e869a169 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChart]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChart] - Find more info here: https://learn.microsoft.com/graph/api/chartcollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: 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 8b8f54b8c94..60520f567a5 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['name'] = str(name) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')", path_parameters) async def get(self,request_configuration: Optional[ItemWithNameRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChart]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemWithName Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemWithNameRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add/add_request_builder.py index f18d518aa1b..05343c52272 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookNamedItem]: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItem] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py index 72a3136a4b1..4d3122cda65 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddFormulaLocalPostRequestBody] = None, request_configuration: Optional[AddFormulaLocalRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookNamedItem]: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItem] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddFormulaLocalPostRequestBody] = None, reque def to_post_request_information(self,body: Optional[AddFormulaLocalPostRequestBody] = None, request_configuration: Optional[AddFormulaLocalRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new name to the collection of the given scope using the user's locale for the formula. + Adds a new name to the collection of the given scope using the user's locale for the formula. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddFormulaLocalPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/count/count_request_builder.py index acc6dd7755a..1aed3bf56f4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 3c14d3a6beb..b6c74db3f12 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]: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookRange] - Find more info here: https://learn.microsoft.com/graph/api/range-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/nameditem-range?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py index b1ac4a74975..208486cceb7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookN Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookNamedItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[WorkbookName Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookNamedItem] = None, request_configuration: Optional[WorkbookNamedItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[WorkbookNamedItem] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py index 3e0ca23b887..c0f6cb3f778 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorksheetReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/names_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/names_request_builder.py index ee29448a7cc..683ce17896c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/names_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/names_request_builder.py @@ -47,7 +47,7 @@ def by_workbook_named_item_id(self,workbook_named_item_id: str) -> WorkbookNamed async def get(self,request_configuration: Optional[NamesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookNamedItemCollectionResponse]: """ - Retrieve a list of named item associated with the worksheet. + Retrieve a list of named item associated with the worksheet. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookNamedItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/worksheet-list-names?view=graph-rest-1.0 @@ -93,19 +93,19 @@ async def post(self,body: Optional[WorkbookNamedItem] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[NamesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of named item associated with the worksheet. + Retrieve a list of named item associated with the worksheet. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookNamedItem] = None, request_configuration: Optional[NamesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[WorkbookNamedItem] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ def count(self) -> CountRequestBuilder: @dataclass class NamesRequestBuilderGetQueryParameters(): """ - Retrieve a list of named item associated with the worksheet. + Retrieve a list of named item associated with the worksheet. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py index 007a7aedf7d..bddf5877fa0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py index 2f8b69538f8..2205199df80 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RefreshRequestBuilderPostRequestConfiguration] = None) -> None: """ - Refreshes the PivotTable. + Refreshes the PivotTable. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/workbookpivottable-refresh?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RefreshRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RefreshRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Refreshes the PivotTable. + Refreshes the PivotTable. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RefreshRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py index c3d5a16ec02..ee58782fc0f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[WorkbookPivotTableItemRequ async def get(self,request_configuration: Optional[WorkbookPivotTableItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookPivotTable]: """ - Retrieve the properties and relationships of workbookPivotTable object. + Retrieve the properties and relationships of workbookPivotTable object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookPivotTable] Find more info here: https://learn.microsoft.com/graph/api/workbookpivottable-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookP Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookPivotTableItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of workbookPivotTable object. + Retrieve the properties and relationships of workbookPivotTable object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookPivotTable] = None, request_configuration: Optional[WorkbookPivotTableItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookPivotTable] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class WorkbookPivotTableItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class WorkbookPivotTableItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of workbookPivotTable object. + Retrieve the properties and relationships of workbookPivotTable object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py index fb3735cc103..77ff2c24bdd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorksheetReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py index 881a2721b9d..67f434afab8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py @@ -46,7 +46,7 @@ def by_workbook_pivot_table_id(self,workbook_pivot_table_id: str) -> WorkbookPiv async def get(self,request_configuration: Optional[PivotTablesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookPivotTableCollectionResponse]: """ - Retrieve a list of workbookpivottable objects. + Retrieve a list of workbookpivottable objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookPivotTableCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/workbookworksheet-list-pivottables?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[WorkbookPivotTable] = None, request_configura def to_get_request_information(self,request_configuration: Optional[PivotTablesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of workbookpivottable objects. + Retrieve a list of workbookpivottable objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookPivotTable] = None, request_configuration: Optional[PivotTablesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WorkbookPivotTable] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def refresh_all(self) -> RefreshAllRequestBuilder: @dataclass class PivotTablesRequestBuilderGetQueryParameters(): """ - Retrieve a list of workbookpivottable objects. + Retrieve a list of workbookpivottable objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py index 53775bcc67c..cc9ddd2061a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RefreshAllRequestBuilderPostRequestConfiguration] = None) -> None: """ - Refreshes the PivotTable within a given worksheet. + Refreshes the PivotTable within a given worksheet. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/workbookpivottable-refreshall?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RefreshAllRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[RefreshAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Refreshes the PivotTable within a given worksheet. + Refreshes the PivotTable within a given worksheet. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RefreshAllRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py index bd086666716..1456d62caf9 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ProtectPostRequestBody] = None, request_configuration: Optional[ProtectRequestBuilderPostRequestConfiguration] = None) -> None: """ - Protect a worksheet. It throws if the worksheet has been protected. + Protect a worksheet. It throws if the worksheet has been protected. This API is available in the following national cloud deployments. 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[ProtectPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ProtectPostRequestBody] = None, request_configuration: Optional[ProtectRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Protect a worksheet. It throws if the worksheet has been protected. + Protect a worksheet. It throws if the worksheet has been protected. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ProtectPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protection_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protection_request_builder.py index 0071e09ba96..ac4908f56e6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protection_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/protection_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ProtectionRequestBuilderDe async def get(self,request_configuration: Optional[ProtectionRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookWorksheetProtection]: """ - Retrieve the properties and relationships of worksheetprotection object. + Retrieve the properties and relationships of worksheetprotection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookWorksheetProtection] Find more info here: https://learn.microsoft.com/graph/api/worksheetprotection-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[Protectio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProtectionRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of worksheetprotection object. + Retrieve the properties and relationships of worksheetprotection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookWorksheetProtection] = None, request_configuration: Optional[ProtectionRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkbookWorksheetProtection if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class ProtectionRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguratio @dataclass class ProtectionRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of worksheetprotection object. + Retrieve the properties and relationships of worksheetprotection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py index ac12ee07502..aec82b9fbab 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnprotectRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unprotect a worksheet + Unprotect a worksheet This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/worksheetprotection-unprotect?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnprotectRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnprotectRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unprotect a worksheet + Unprotect a worksheet This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnprotectRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range/range_request_builder.py index 370182529f4..cf239eb85f7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range/range_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[RangeRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py index 8d07278f497..ad144cf688c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['address'] = str(address) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/range(address='{address}')", path_parameters) async def get(self,request_configuration: Optional[RangeWithAddressRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[RangeWithAdd Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeWithAddressRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/add/add_request_builder.py index 753218d85a9..758b2e742bd 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/add/add_request_builder.py @@ -29,10 +29,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTable]: """ - Invoke action add + Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTable] + Find more info here: https://learn.microsoft.com/graph/api/tablecollection-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -53,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action add + Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -61,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_get_response.py new file mode 100644 index 00000000000..f60427e8c47 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_request_builder.py index f94c097fe8a..deace7a48f7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_response.py deleted file mode 100644 index 6a35033081a..00000000000 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/count/count_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CountResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[int] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CountResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_int_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_int_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py index 4601e5c8139..4a481f34509 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearFiltersRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clears all the filters currently applied on the table. + Clears all the filters currently applied on the table. This API is available in the following national cloud deployments. 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 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearFiltersRequestBuilderPo def to_post_request_information(self,request_configuration: Optional[ClearFiltersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clears all the filters currently applied on the table. + Clears all the filters currently applied on the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearFiltersRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py index 85f9f39b087..a7507e43973 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Adds a new column to the table. + Adds a new column to the table. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a new column to the table. + Adds a new column to the table. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 6908011453b..cd80d702c41 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 @@ -47,10 +47,10 @@ def by_workbook_table_column_id(self,workbook_table_column_id: str) -> WorkbookT async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumnCollectionResponse]: """ - Retrieve a list of tablecolumn objects. + Retrieve a list of tablecolumn objects. This API is available in the following national cloud deployments. 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 + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -81,7 +81,7 @@ def item_at_with_index(self,index: Optional[int] = None) -> ItemAtWithIndexReque async def post(self,body: Optional[WorkbookTableColumn] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Use this API to create a new TableColumn. + Use this API to create a new TableColumn. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] @@ -106,24 +106,24 @@ async def post(self,body: Optional[WorkbookTableColumn] = None, request_configur def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tablecolumn objects. + Retrieve a list of tablecolumn objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Use this API to create a new TableColumn. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[WorkbookTableColumn] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Retrieve a list of tablecolumn objects. + Retrieve a list of tablecolumn objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py new file mode 100644 index 00000000000..f60427e8c47 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py index e5115d53fca..8610f269e63 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ............models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_response.py deleted file mode 100644 index 6a35033081a..00000000000 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/count/count_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CountResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[int] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CountResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_int_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_int_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py index 7f57b188a64..c515c49fce1 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the data body of the column. + Gets the range object associated with the data body of the column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the data body of the column. + Gets the range object associated with the data body of the column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DataBodyRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py index 0e3b6354c06..5a365e02463 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Apply the given filter criteria on the given column. + Apply the given filter criteria on the given column. This API is available in the following national cloud deployments. 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[ApplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Apply the given filter criteria on the given column. + Apply the given filter criteria on the given column. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py index 6cb00588c78..848a0bd40fc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyBottomItemsFilterPostRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py index fb59b8eecb6..c42294e6040 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyBottomPercentFilterPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py index 8fbc8a44ac2..307f806a87f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyCellColorFilterPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py index 3c636cd086b..8bf02dfd152 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyCustomFilterPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py index a5eaf32a032..b9508aa2f00 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyDynamicFilterPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py index b613cf1a26c..79f0db446c4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyFontColorFilterPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py index 6c01aa4ed7f..05fe1b63bd6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyIconFilterPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py index 2edf36017e7..f1dbce43902 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyTopItemsFilterPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py index 2b3654720e4..6b660e2fa0f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyTopPercentFilterPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py index 87b816b9802..1cade30338e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyValuesFilterPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py index 804c08b2650..5d8fd38eb7a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the filter on the given column. + Clear the filter on the given column. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/filter-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the filter on the given column. + Clear the filter on the given column. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py index e44cacbea81..52c147d302b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[FilterReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FilterRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,14 +124,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[WorkbookFilter] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py index d1c2b7bbe02..3809459fd8f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the header row of the column. + Gets the range object associated with the header row of the column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderG def to_get_request_information(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the header row of the column. + Gets the range object associated with the header row of the column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> HeaderRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py index 41b9def0377..f6e245da0b6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the entire column. + Gets the range object associated with the entire column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the entire column. + Gets the range object associated with the entire column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py index 5e20982d6d2..8ab5fd853ae 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the totals row of the column. + Gets the range object associated with the totals row of the column. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the totals row of the column. + Gets the range object associated with the totals row of the column. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TotalRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py index 783487c7936..7309cd0e0e7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the column from the table. + Deletes the column from the table. This API is available in the following national cloud deployments. 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/tablecolumn-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[WorkbookTableColumnItemReq async def get(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Retrieve the properties and relationships of tablecolumn object. + Retrieve the properties and relationships of tablecolumn object. This API is available in the following national cloud deployments. 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/tablecolumn-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[WorkbookTableColumnItemReques async def patch(self,body: Optional[WorkbookTableColumn] = None, request_configuration: Optional[WorkbookTableColumnItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: """ - Update the properties of tablecolumn object. + Update the properties of tablecolumn object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] @@ -100,39 +100,39 @@ async def patch(self,body: Optional[WorkbookTableColumn] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the column from the table. + Deletes the column from the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookTableColumnItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of tablecolumn object. + Retrieve the properties and relationships of tablecolumn object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTableColumn] = None, request_configuration: Optional[WorkbookTableColumnItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of tablecolumn object. + Update the properties of tablecolumn object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTableColumn] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -218,7 +218,7 @@ class WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class WorkbookTableColumnItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of tablecolumn object. + Retrieve the properties and relationships of tablecolumn object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 37cb074359f..d7be4d40289 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumn] - Find more info here: https://learn.microsoft.com/graph/api/tablecolumncollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py index 063a126ae80..177d12cdb41 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ConvertToRangeRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Converts the table into a normal range of cells. All data is preserved. + Converts the table into a normal range of cells. All data is preserved. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ConvertToRangeRequestBuilder 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. + Converts the table into a normal range of cells. All data is preserved. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ConvertToRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py index 3b8487f79a6..8d68a153dea 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with the data body of the table. + Gets the range object associated with the data body of the table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with the data body of the table. + Gets the range object associated with the data body of the table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DataBodyRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py index c112d17cf69..1afdb39aa89 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with header row of the table. + Gets the range object associated with header row of the table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderG def to_get_request_information(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with header row of the table. + Gets the range object associated with header row of the table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> HeaderRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py index 5714447257f..3aabe60c01f 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Get the range object associated with the entire table. + Get the range object associated with the entire table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the range object associated with the entire table. + Get the range object associated with the entire table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py index fb421673bf9..a69bb118fd0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReapplyFiltersRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reapplies all the filters currently on the table. + Reapplies all the filters currently on the table. This API is available in the following national cloud deployments. 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 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReapplyFiltersRequestBuilder def to_post_request_information(self,request_configuration: Optional[ReapplyFiltersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reapplies all the filters currently on the table. + Reapplies all the filters currently on the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReapplyFiltersRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py index a8245a3e79b..7923f702580 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableRow]: """ - Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py new file mode 100644 index 00000000000..f60427e8c47 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py index 0e64c247d02..e5ad1da0117 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ............models.o_data_errors.o_data_error import ODataError - from .count_response import CountResponse + from .count_get_response import CountGetResponse class CountRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/count()", path_parameters) - async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[CountGetResponse]: """ Invoke function count param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CountResponse] + Returns: Optional[CountGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .count_response import CountResponse + from .count_get_response import CountGetResponse - return await self.request_adapter.send_async(request_info, CountResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_response.py deleted file mode 100644 index 6a35033081a..00000000000 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/count/count_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CountResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[int] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CountResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CountResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CountResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_int_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_int_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py index 39c6f6014e0..784939d1ae0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[RangeRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py index 847b9725531..0d7a96d6baf 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the row from the table. + Deletes the row from the table. This API is available in the following national cloud deployments. 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/tablerow-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[WorkbookTableRowItemReques async def get(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRow]: """ - Retrieve the properties and relationships of tablerow object. + Retrieve the properties and relationships of tablerow object. This API is available in the following national cloud deployments. 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/tablerow-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[WorkbookTableRowItemRequestBu async def patch(self,body: Optional[WorkbookTableRow] = None, request_configuration: Optional[WorkbookTableRowItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTableRow]: """ - Update the properties of tablerow object. + Update the properties of tablerow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[WorkbookTableRow] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the row from the table. + Deletes the row from the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookTableRowItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of tablerow object. + Retrieve the properties and relationships of tablerow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTableRow] = None, request_configuration: Optional[WorkbookTableRowItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of tablerow object. + Update the properties of tablerow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTableRow] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class WorkbookTableRowItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of tablerow object. + Retrieve the properties and relationships of tablerow object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 a3c0b2cc0f9..4c3a52bb972 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRow]: @@ -32,7 +34,6 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder Invoke function itemAt param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] - Find more info here: https://learn.microsoft.com/graph/api/tablerowcollection-itemat?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -56,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: 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 ec55eb64103..fc95c1d5e12 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 @@ -47,10 +47,10 @@ def by_workbook_table_row_id(self,workbook_table_row_id: str) -> WorkbookTableRo async def get(self,request_configuration: Optional[RowsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRowCollectionResponse]: """ - Retrieve a list of tablerow objects. + Retrieve a list of tablerow objects. This API is available in the following national cloud deployments. 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 + Find more info here: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -81,7 +81,7 @@ def item_at_with_index(self,index: Optional[int] = None) -> ItemAtWithIndexReque 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRow] @@ -106,24 +106,24 @@ async def post(self,body: Optional[WorkbookTableRow] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[RowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tablerow objects. + Retrieve a list of tablerow objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[WorkbookTableRow] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RowsRequestBuilderGetQueryParameters(): """ - Retrieve a list of tablerow objects. + Retrieve a list of tablerow objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py index c388db702f9..26c6f2a3f7b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Perform a sort operation. + Perform a sort operation. This API is available in the following national cloud deployments. 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[ApplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None, request_configuration: Optional[ApplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Perform a sort operation. + Perform a sort operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ApplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py index 558b7f6fcad..6ca26f80bb3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/tablesort-clear?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[ClearRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py index 85b9248fef3..f1fca393a63 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReapplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reapplies the current sorting parameters to the table. + Reapplies the current sorting parameters to the table. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/tablesort-reapply?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReapplyRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[ReapplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reapplies the current sorting parameters to the table. + Reapplies the current sorting parameters to the table. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReapplyRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py index 6a19df1e7eb..67f8e54c103 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SortRequestBuilderDeleteRe async def get(self,request_configuration: Optional[SortRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableSort]: """ - Retrieve the properties and relationships of tablesort object. + Retrieve the properties and relationships of tablesort object. This API is available in the following national cloud deployments. 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 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[SortReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SortRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of tablesort object. + Retrieve the properties and relationships of tablesort object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTableSort] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class SortRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SortRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of tablesort object. + Retrieve the properties and relationships of tablesort object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py index 928240bcaae..afe9f1078e4 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: """ - Gets the range object associated with totals row of the table. + Gets the range object associated with totals row of the table. This API is available in the following national cloud deployments. 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 @@ -50,18 +50,18 @@ async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Gets the range object associated with totals row of the table. + Gets the range object associated with totals row of the table. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> TotalRowRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py index 24d926f1242..d7de135e2f7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py @@ -108,12 +108,12 @@ def to_delete_request_information(self,request_configuration: Optional[WorkbookT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookTableItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -123,14 +123,14 @@ def to_get_request_information(self,request_configuration: Optional[WorkbookTabl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTable] = None, request_configuration: Optional[WorkbookTableItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +143,13 @@ def to_patch_request_information(self,body: Optional[WorkbookTable] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py index e65873f93bc..9dcf85c4c73 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[WorksheetReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: 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 b0ee27a01a9..9ad3f22b994 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})", path_parameters) async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTable]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ItemAtWithIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/tables_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/tables_request_builder.py index bf4ad63697d..dc33ee678e0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/tables_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/tables_request_builder.py @@ -47,7 +47,7 @@ def by_workbook_table_id(self,workbook_table_id: str) -> WorkbookTableItemReques async def get(self,request_configuration: Optional[TablesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableCollectionResponse]: """ - Retrieve a list of table objects. + Retrieve a list of table objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/worksheet-list-tables?view=graph-rest-1.0 @@ -105,19 +105,19 @@ async def post(self,body: Optional[WorkbookTable] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[TablesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of table objects. + Retrieve a list of table objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookTable] = None, request_configuration: Optional[TablesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[WorkbookTable] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -171,7 +171,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TablesRequestBuilderGetQueryParameters(): """ - Retrieve a list of table objects. + Retrieve a list of table objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py index f9cb06f9199..71ae4e970b6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[UsedRangeReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsedRangeRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py index 14383aade29..7a83ca13280 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param values_only: Usage: valuesOnly={valuesOnly} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['values_only'] = str(values_only) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/usedRange(valuesOnly={valuesOnly})", path_parameters) async def get(self,request_configuration: Optional[UsedRangeWithValuesOnlyRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookRange]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[UsedRangeWit Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsedRangeWithValuesOnlyRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py index e0211cd1eeb..394ea33896e 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py @@ -53,7 +53,7 @@ def cell_with_row_with_column(self,column: Optional[int] = None, row: Optional[i async def delete(self,request_configuration: Optional[WorkbookWorksheetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes the worksheet from the workbook. + Deletes the worksheet from the workbook. This API is available in the following national cloud deployments. 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/worksheet-delete?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def delete(self,request_configuration: Optional[WorkbookWorksheetItemReque async def get(self,request_configuration: Optional[WorkbookWorksheetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookWorksheet]: """ - Retrieve the properties and relationships of worksheet object. + Retrieve the properties and relationships of worksheet object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookWorksheet] Find more info here: https://learn.microsoft.com/graph/api/worksheet-get?view=graph-rest-1.0 @@ -95,7 +95,7 @@ async def get(self,request_configuration: Optional[WorkbookWorksheetItemRequestB async def patch(self,body: Optional[WorkbookWorksheet] = None, request_configuration: Optional[WorkbookWorksheetItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookWorksheet]: """ - Update the properties of worksheet object. + Update the properties of worksheet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookWorksheet] @@ -132,39 +132,39 @@ def range_with_address(self,address: Optional[str] = None) -> RangeWithAddressRe def to_delete_request_information(self,request_configuration: Optional[WorkbookWorksheetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes the worksheet from the workbook. + Deletes the worksheet from the workbook. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkbookWorksheetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of worksheet object. + Retrieve the properties and relationships of worksheet object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookWorksheet] = None, request_configuration: Optional[WorkbookWorksheetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of worksheet object. + Update the properties of worksheet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -172,13 +172,13 @@ def to_patch_request_information(self,body: Optional[WorkbookWorksheet] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -280,7 +280,7 @@ class WorkbookWorksheetItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class WorkbookWorksheetItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of worksheet object. + Retrieve the properties and relationships of worksheet object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 e1fce71bb65..acaedf9eb3e 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 @@ -46,10 +46,10 @@ def by_workbook_worksheet_id(self,workbook_worksheet_id: str) -> WorkbookWorkshe async def get(self,request_configuration: Optional[WorksheetsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookWorksheetCollectionResponse]: """ - Retrieve a list of worksheet objects. + Retrieve a list of worksheet objects. This API is available in the following national cloud deployments. 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/worksheet-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/workbook-list-worksheets?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -92,19 +92,19 @@ async def post(self,body: Optional[WorkbookWorksheet] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[WorksheetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of worksheet objects. + Retrieve a list of worksheet objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkbookWorksheet] = None, request_configuration: Optional[WorksheetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WorkbookWorksheet] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def count(self) -> CountRequestBuilder: @dataclass class WorksheetsRequestBuilderGetQueryParameters(): """ - Retrieve a list of worksheet objects. + Retrieve a list of worksheet objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/items_request_builder.py b/msgraph/generated/drives/item/items/items_request_builder.py index 68e71858e2d..f4ac8e0a085 100644 --- a/msgraph/generated/drives/item/items/items_request_builder.py +++ b/msgraph/generated/drives/item/items/items_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemsRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DriveItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DriveItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/drives/item/last_modified_by_user/last_modified_by_user_request_builder.py index 020b933a8f9..a52b9edb9e0 100644 --- a/msgraph/generated/drives/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/drives/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 61af2fabc16..cdbe90b5ad1 100644 --- a/msgraph/generated/drives/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..644f036d919 --- /dev/null +++ b/msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..c175a5e23da --- /dev/null +++ b/msgraph/generated/drives/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/columns/columns_request_builder.py b/msgraph/generated/drives/item/list_/columns/columns_request_builder.py index bcc0465f43d..54dc5d31172 100644 --- a/msgraph/generated/drives/item/list_/columns/columns_request_builder.py +++ b/msgraph/generated/drives/item/list_/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. 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/list-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Create a column for a [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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 [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/columns/count/count_request_builder.py b/msgraph/generated/drives/item/list_/columns/count/count_request_builder.py index e274ff97249..222cb6d6ef0 100644 --- a/msgraph/generated/drives/item/list_/columns/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/columns/item/column_definition_item_request_builder.py b/msgraph/generated/drives/item/list_/columns/item/column_definition_item_request_builder.py index caf61690a53..2c2c5d444a6 100644 --- a/msgraph/generated/drives/item/list_/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/columns/item/column_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnDef Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/drives/item/list_/columns/item/source_column/source_column_request_builder.py index 3ff16057fc3..336b40e4031 100644 --- a/msgraph/generated/drives/item/list_/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/drives/item/list_/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/drives/item/list_/content_types/add_copy/add_copy_request_builder.py index e47763730f1..63d8048778f 100644 --- a/msgraph/generated/drives/item/list_/content_types/add_copy/add_copy_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/add_copy/add_copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/drives/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py index 0cc8d235d55..5c92638ccb4 100644 --- a/msgraph/generated/drives/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = N def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/content_types_request_builder.py b/msgraph/generated/drives/item/list_/content_types/content_types_request_builder.py index ae99adf36a9..534ee6467f4 100644 --- a/msgraph/generated/drives/item/list_/content_types/content_types_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/content_types_request_builder.py @@ -48,7 +48,7 @@ def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuild async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. 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/list-list-contenttypes?view=graph-rest-1.0 @@ -94,19 +94,19 @@ async def post(self,body: Optional[ContentType] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[ContentType] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesReques @dataclass class ContentTypesRequestBuilderGetQueryParameters(): """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/content_types/count/count_request_builder.py b/msgraph/generated/drives/item/list_/content_types/count/count_request_builder.py index 301e677c88f..b4bf91c9fb0 100644 --- a/msgraph/generated/drives/item/list_/content_types/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py b/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py similarity index 89% rename from msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py rename to msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py index 4f27a15e2c4..18ec4d512d0 100644 --- a/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py +++ b/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetCompatibleHubContentTypesResponse(BaseCollectionPaginationCountResponse): +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetCompatibleHubContentTypesResponse + Returns: GetCompatibleHubContentTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetCompatibleHubContentTypesResponse() + return GetCompatibleHubContentTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py index 7984692e681..f9387e7d037 100644 --- a/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/contentTypes/getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesResponse]: + async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: """ Invoke function getCompatibleHubContentTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetCompatibleHubContentTypesResponse] + Returns: Optional[GetCompatibleHubContentTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesR } if not self.request_adapter: raise Exception("Http core is null") - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse - return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetCompatibl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetCompatibleHubContentTypesRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py index c1d07ee2e11..a90299e751f 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. 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[AssociateWithHubSitesPostRequestBody] = None, def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/item/base/base_request_builder_.py b/msgraph/generated/drives/item/list_/content_types/item/base/base_request_builder_.py index ead23f6cf80..d01485a48ed 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/base/base_request_builder_.py +++ b/msgraph/generated/drives/item/list_/content_types/item/base/base_request_builder_.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseRequestBuilder_: diff --git a/msgraph/generated/drives/item/list_/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/base_types/base_types_request_builder.py index 3a5a65bd97c..52f6c17532c 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/base_types/base_types_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/base_types/base_types_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseTypesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseTypesRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/base_types/count/count_request_builder.py index 0884b98b886..8ca9490e398 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/base_types/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/base_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py index 3c78c520088..2b88f121dcb 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ContentTypeItemRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/column_links/column_links_request_builder.py index 71e1fd2ddde..20ab979660a 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/column_links/column_links_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/column_links/column_links_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinksR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ColumnLink] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/column_links/count/count_request_builder.py index 3ef51676afb..2620058aa71 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/column_links/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/column_links/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py index b42b83c8e0c..93218ecea7d 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnLin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnLinkItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinkIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinkItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ColumnLink] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/column_positions/column_positions_request_builder.py index c14919a0a6d..33cd28df498 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/column_positions/column_positions_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/column_positions/column_positions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnPositi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnPositionsRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/column_positions/count/count_request_builder.py index 68231ff77bb..d0545aa9c61 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/column_positions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/column_positions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py index 50ec43062e8..dfadf495dbc 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/columns/columns_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/columns/columns_request_builder.py index 23eb7604103..a0021ff25be 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/columns/columns_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. 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/contenttype-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/columns/count/count_request_builder.py index 2114ce7de47..701fcd8c429 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/columns/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py index 64f24978844..a6a7e2e6dd4 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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/columndefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ColumnDefinitionItemReques async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. 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/columndefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBu async def patch(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ColumnDefinition] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ColumnDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py index 792d2b29255..ba7d48b49b0 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/content_type_item_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/content_type_item_request_builder.py index 0770dfd9e84..61b7fd45218 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/content_type_item_request_builder.py @@ -15,9 +15,9 @@ from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder from .column_links.column_links_request_builder import ColumnLinksRequestBuilder from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder - from .columns.columns_request_builder import ColumnsRequestBuilder from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder from .is_published.is_published_request_builder import IsPublishedRequestBuilder from .publish.publish_request_builder import PublishRequestBuilder @@ -107,12 +107,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContentTy Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -122,14 +122,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[ContentType] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py index ca041036269..3bf9a6eaf9c 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. 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[CopyToDefaultContentLocationPostRequestBody] def to_post_request_information(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CopyToDefaultContentLocation if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..97dd03cb77a --- /dev/null +++ b/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_request_builder.py index 8bec0a32011..2d31f06c3ea 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/is_published/is_published_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse class IsPublishedRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/contentTypes/{contentType%2Did}/isPublished()", path_parameters) - async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedResponse]: + async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedGetResponse]: """ Invoke function isPublished param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[IsPublishedResponse] + Returns: Optional[IsPublishedGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse - return await self.request_adapter.send_async(request_info, IsPublishedResponse, error_mapping) + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[IsPublishedR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> IsPublishedRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/publish/publish_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/publish/publish_request_builder.py index 5e77e7f73ba..c6b72d12bf5 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/publish/publish_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/drives/item/list_/content_types/item/unpublish/unpublish_request_builder.py index e80119b6c06..4b428a4b916 100644 --- a/msgraph/generated/drives/item/list_/content_types/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/drives/item/list_/content_types/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/created_by_user/created_by_user_request_builder.py b/msgraph/generated/drives/item/list_/created_by_user/created_by_user_request_builder.py index c825b413182..42c56e2c727 100644 --- a/msgraph/generated/drives/item/list_/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/drives/item/list_/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from .....models.o_data_errors.o_data_error import ODataError from .....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 2f3994f33e9..1d32dd46203 100644 --- a/msgraph/generated/drives/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..4e6482cb376 --- /dev/null +++ b/msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..7c0e8fccdbc --- /dev/null +++ b/msgraph/generated/drives/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/list/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/drive/drive_request_builder.py b/msgraph/generated/drives/item/list_/drive/drive_request_builder.py index 5a9814df281..46996f9c59e 100644 --- a/msgraph/generated/drives/item/list_/drive/drive_request_builder.py +++ b/msgraph/generated/drives/item/list_/drive/drive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Drive] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DriveRequestBuilder: @dataclass class DriveRequestBuilderGetQueryParameters(): """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/items/count/count_request_builder.py b/msgraph/generated/drives/item/list_/items/count/count_request_builder.py index a8f9ff822d5..df6c9e86efc 100644 --- a/msgraph/generated/drives/item/list_/items/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/analytics/analytics_request_builder.py b/msgraph/generated/drives/item/list_/items/item/analytics/analytics_request_builder.py index 05d66fd5ebf..8f4842f9171 100644 --- a/msgraph/generated/drives/item/list_/items/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/analytics/analytics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AnalyticsRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/drives/item/list_/items/item/created_by_user/created_by_user_request_builder.py index 6dec6350c12..552ec3f7b40 100644 --- a/msgraph/generated/drives/item/list_/items/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from .......models.o_data_errors.o_data_error import ODataError from .......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 1c8cc5a2c69..c6bd0251c47 100644 --- a/msgraph/generated/drives/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..8b96ee12061 --- /dev/null +++ b/msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..4e5e1f4f5bc --- /dev/null +++ b/msgraph/generated/drives/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/list/items/{listItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/items/item/document_set_versions/count/count_request_builder.py b/msgraph/generated/drives/item/list_/items/item/document_set_versions/count/count_request_builder.py index b8eda74d133..6ef377aedf8 100644 --- a/msgraph/generated/drives/item/list_/items/item/document_set_versions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/document_set_versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py b/msgraph/generated/drives/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py index 54274adf4d3..1354f0d9a65 100644 --- a/msgraph/generated/drives/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py @@ -45,7 +45,7 @@ def by_document_set_version_id(self,document_set_version_id: str) -> DocumentSet async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersionCollectionResponse]: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-documentsetversions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBui async def post(self,body: Optional[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DocumentSetVersion] = None, request_configura def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DocumentSetVersionsRequestBuilderGetQueryParameters(): """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py b/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py index 8e44b663ce6..2bda5a5b41c 100644 --- a/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequ async def get(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[DocumentSetVersion] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class DocumentSetVersionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py b/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py index b4f9e29c39c..fb8b780682a 100644 --- a/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py b/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py index f481a23f80e..d440d06b237 100644 --- a/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/drive_item/content/content_request_builder.py b/msgraph/generated/drives/item/list_/items/item/drive_item/content/content_request_builder.py index 6f6dae7084c..fe60db34c63 100644 --- a/msgraph/generated/drives/item/list_/items/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/list_/items/item/drive_item/drive_item_request_builder.py b/msgraph/generated/drives/item/list_/items/item/drive_item/drive_item_request_builder.py index 5a1c2c927a4..685ac6d14a5 100644 --- a/msgraph/generated/drives/item/list_/items/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/fields/fields_request_builder.py b/msgraph/generated/drives/item/list_/items/item/fields/fields_request_builder.py index 9081f6e6e0a..afff291fd9f 100644 --- a/msgraph/generated/drives/item/list_/items/item/fields/fields_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/fields/fields_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[FieldsRequestBuilderGetReques async def patch(self,body: Optional[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> Optional[FieldValueSet]: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FieldValueSet] @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,19 +113,19 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py index 13eab5abd1e..c0732961acf 100644 --- a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index 77d94bf177f..19bbf293bca 100644 --- a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index 3ff2427ba45..0749a77a29a 100644 --- a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index ad035d07bd5..80df58263ed 100644 --- a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py index 96b4060067f..ff923738795 100644 --- a/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from .......models.o_data_errors.o_data_error import ODataError from .......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 6d1fac01c20..9b4b3cb7878 100644 --- a/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..c7a41249153 --- /dev/null +++ b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..2dd1981e921 --- /dev/null +++ b/msgraph/generated/drives/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/list/items/{listItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/items/item/list_item_item_request_builder.py b/msgraph/generated/drives/item/list_/items/item/list_item_item_request_builder.py index 06443efaf74..8916bcef419 100644 --- a/msgraph/generated/drives/item/list_/items/item/list_item_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/list_item_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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/listitem-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ListItemItemRequestBuilder async def get(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItem]: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] Find more info here: https://learn.microsoft.com/graph/api/listitem-get?view=graph-rest-1.0 @@ -121,34 +121,34 @@ async def patch(self,body: Optional[ListItem] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ListItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -161,13 +161,13 @@ def to_patch_request_information(self,body: Optional[ListItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ListItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class ListItemItemRequestBuilderGetQueryParameters(): """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/items/item/versions/count/count_request_builder.py b/msgraph/generated/drives/item/list_/items/item/versions/count/count_request_builder.py index 22399c97324..4e8013710bb 100644 --- a/msgraph/generated/drives/item/list_/items/item/versions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/versions/item/fields/fields_request_builder.py b/msgraph/generated/drives/item/list_/items/item/versions/item/fields/fields_request_builder.py index f398c01a1c8..03d47912c1b 100644 --- a/msgraph/generated/drives/item/list_/items/item/versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/items/item/versions/item/list_item_version_item_request_builder.py b/msgraph/generated/drives/item/list_/items/item/versions/item/list_item_version_item_request_builder.py index 2dcc942d1e8..65b036ec300 100644 --- a/msgraph/generated/drives/item/list_/items/item/versions/item/list_item_version_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/versions/item/list_item_version_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ListItemVersionItemRequest async def get(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersion]: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersion] Find more info here: https://learn.microsoft.com/graph/api/listitemversion-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemV Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[ListItemVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ListItemVersion] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class ListItemVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class ListItemVersionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/drives/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py index 5ede25ec1aa..e56077c37fa 100644 --- a/msgraph/generated/drives/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/listitemversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreVersionRequestBuilder def to_post_request_information(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreVersionRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/items/item/versions/versions_request_builder.py b/msgraph/generated/drives/item/list_/items/item/versions/versions_request_builder.py index 676050ac86b..1383ca40e49 100644 --- a/msgraph/generated/drives/item/list_/items/item/versions/versions_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_list_item_version_id(self,list_item_version_id: str) -> ListItemVersionIt async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersionCollectionResponse]: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-versions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ListItemVersion] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItemVersion] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/items/items_request_builder.py b/msgraph/generated/drives/item/list_/items/items_request_builder.py index fbcc39a85ae..bed3b5da53a 100644 --- a/msgraph/generated/drives/item/list_/items/items_request_builder.py +++ b/msgraph/generated/drives/item/list_/items/items_request_builder.py @@ -45,7 +45,7 @@ def by_list_item_id(self,list_item_id: str) -> ListItemItemRequestBuilder: async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemCollectionResponse]: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequest async def post(self,body: Optional[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> Optional[ListItem]: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ListItem] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ListItem] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ItemsRequestBuilderGetQueryParameters(): """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/drives/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py index 4755f39df78..64eeab77b9c 100644 --- a/msgraph/generated/drives/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/drives/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from .....models.o_data_errors.o_data_error import ODataError from .....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/drives/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/drives/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index d5a70cb8b50..7bd628677b5 100644 --- a/msgraph/generated/drives/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/drives/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..9c637de7c5d --- /dev/null +++ b/msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..e0f027082ec --- /dev/null +++ b/msgraph/generated/drives/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /drives/{drive-id}/list/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/list_/list_request_builder.py b/msgraph/generated/drives/item/list_/list_request_builder.py index d6ed3e97a69..035ec585291 100644 --- a/msgraph/generated/drives/item/list_/list_request_builder.py +++ b/msgraph/generated/drives/item/list_/list_request_builder.py @@ -105,12 +105,12 @@ def to_delete_request_information(self,request_configuration: Optional[ListReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -120,14 +120,14 @@ def to_get_request_information(self,request_configuration: Optional[ListRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[List_] = None, request_configuration: Optional[ListRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[List_] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/operations/count/count_request_builder.py b/msgraph/generated/drives/item/list_/operations/count/count_request_builder.py index 5b625e6c125..f411f1e6f18 100644 --- a/msgraph/generated/drives/item/list_/operations/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/drives/item/list_/operations/item/rich_long_running_operation_item_request_builder.py index 37b32d42b35..c21e9a86702 100644 --- a/msgraph/generated/drives/item/list_/operations/item/rich_long_running_operation_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/operations/item/rich_long_running_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[RichLongR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[RichLongRunn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RichLongRunningOperation] = None, request_configuration: Optional[RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/operations/operations_request_builder.py b/msgraph/generated/drives/item/list_/operations/operations_request_builder.py index b106ddc18c1..8cac0b8f5b4 100644 --- a/msgraph/generated/drives/item/list_/operations/operations_request_builder.py +++ b/msgraph/generated/drives/item/list_/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/subscriptions/count/count_request_builder.py b/msgraph/generated/drives/item/list_/subscriptions/count/count_request_builder.py index 387489f443d..4a2f1326d92 100644 --- a/msgraph/generated/drives/item/list_/subscriptions/count/count_request_builder.py +++ b/msgraph/generated/drives/item/list_/subscriptions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/drives/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py index 5f88f7461e0..cd1a0ea5ca4 100644 --- a/msgraph/generated/drives/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py +++ b/msgraph/generated/drives/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReauthorizeRequestBuilder: diff --git a/msgraph/generated/drives/item/list_/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/drives/item/list_/subscriptions/item/subscription_item_request_builder.py index 7bedb57b4af..c3b21618947 100644 --- a/msgraph/generated/drives/item/list_/subscriptions/item/subscription_item_request_builder.py +++ b/msgraph/generated/drives/item/list_/subscriptions/item/subscription_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Subscript Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Subscription] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/subscriptions/subscriptions_request_builder.py b/msgraph/generated/drives/item/list_/subscriptions/subscriptions_request_builder.py index e913fd5a6c2..78b520d2a72 100644 --- a/msgraph/generated/drives/item/list_/subscriptions/subscriptions_request_builder.py +++ b/msgraph/generated/drives/item/list_/subscriptions/subscriptions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Subscription] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/recent/recent_response.py b/msgraph/generated/drives/item/recent/recent_get_response.py similarity index 92% rename from msgraph/generated/drives/item/recent/recent_response.py rename to msgraph/generated/drives/item/recent/recent_get_response.py index 4858be7ad4d..7b263c86902 100644 --- a/msgraph/generated/drives/item/recent/recent_response.py +++ b/msgraph/generated/drives/item/recent/recent_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class RecentResponse(BaseCollectionPaginationCountResponse): +class RecentGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DriveItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RecentResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RecentGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RecentResponse + Returns: RecentGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return RecentResponse() + return RecentGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/recent/recent_request_builder.py b/msgraph/generated/drives/item/recent/recent_request_builder.py index ad00e27064a..502ff26ac13 100644 --- a/msgraph/generated/drives/item/recent/recent_request_builder.py +++ b/msgraph/generated/drives/item/recent/recent_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .recent_response import RecentResponse + from .recent_get_response import RecentGetResponse class RecentRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/recent(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[RecentRequestBuilderGetRequestConfiguration] = None) -> Optional[RecentResponse]: + async def get(self,request_configuration: Optional[RecentRequestBuilderGetRequestConfiguration] = None) -> Optional[RecentGetResponse]: """ Invoke function recent param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RecentResponse] + Returns: Optional[RecentGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[RecentRequestBuilderGetReques } if not self.request_adapter: raise Exception("Http core is null") - from .recent_response import RecentResponse + from .recent_get_response import RecentGetResponse - return await self.request_adapter.send_async(request_info, RecentResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RecentGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[RecentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RecentReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RecentRequestBuilder: diff --git a/msgraph/generated/drives/item/root/content/content_request_builder.py b/msgraph/generated/drives/item/root/content/content_request_builder.py index 854916b09a1..074439c696c 100644 --- a/msgraph/generated/drives/item/root/content/content_request_builder.py +++ b/msgraph/generated/drives/item/root/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/root/root_request_builder.py b/msgraph/generated/drives/item/root/root_request_builder.py index c86a2e58a2f..39f34dd86e6 100644 --- a/msgraph/generated/drives/item/root/root_request_builder.py +++ b/msgraph/generated/drives/item/root/root_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RootRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Retrieve the metadata for a driveItem in a drive by file system path or ID.item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item. + Retrieve the metadata for a driveItem in a drive by file system path or ID.item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[RootRequestBuilderGetRequestC def to_get_request_information(self,request_configuration: Optional[RootRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a driveItem in a drive by file system path or ID.item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item. + Retrieve the metadata for a driveItem in a drive by file system path or ID.item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RootRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class RootRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a driveItem in a drive by file system path or ID.item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item. + Retrieve the metadata for a driveItem in a drive by file system path or ID.item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/search_with_q/search_with_q_response.py b/msgraph/generated/drives/item/search_with_q/search_with_q_get_response.py similarity index 92% rename from msgraph/generated/drives/item/search_with_q/search_with_q_response.py rename to msgraph/generated/drives/item/search_with_q/search_with_q_get_response.py index 2e595a47db5..9a5eae03389 100644 --- a/msgraph/generated/drives/item/search_with_q/search_with_q_response.py +++ b/msgraph/generated/drives/item/search_with_q/search_with_q_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SearchWithQResponse(BaseCollectionPaginationCountResponse): +class SearchWithQGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DriveItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SearchWithQResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SearchWithQGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SearchWithQResponse + Returns: SearchWithQGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SearchWithQResponse() + return SearchWithQGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/search_with_q/search_with_q_request_builder.py b/msgraph/generated/drives/item/search_with_q/search_with_q_request_builder.py index b6e133205b9..3597572e698 100644 --- a/msgraph/generated/drives/item/search_with_q/search_with_q_request_builder.py +++ b/msgraph/generated/drives/item/search_with_q/search_with_q_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .search_with_q_response import SearchWithQResponse + from .search_with_q_get_response import SearchWithQGetResponse class SearchWithQRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['q'] = str(q) super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/search(q='{q}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[SearchWithQRequestBuilderGetRequestConfiguration] = None) -> Optional[SearchWithQResponse]: + async def get(self,request_configuration: Optional[SearchWithQRequestBuilderGetRequestConfiguration] = None) -> Optional[SearchWithQGetResponse]: """ Invoke function search param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SearchWithQResponse] + Returns: Optional[SearchWithQGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[SearchWithQRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .search_with_q_response import SearchWithQResponse + from .search_with_q_get_response import SearchWithQGetResponse - return await self.request_adapter.send_async(request_info, SearchWithQResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SearchWithQGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SearchWithQRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[SearchWithQR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SearchWithQRequestBuilder: diff --git a/msgraph/generated/drives/item/shared_with_me/shared_with_me_response.py b/msgraph/generated/drives/item/shared_with_me/shared_with_me_get_response.py similarity index 91% rename from msgraph/generated/drives/item/shared_with_me/shared_with_me_response.py rename to msgraph/generated/drives/item/shared_with_me/shared_with_me_get_response.py index 126cb8223c0..3b69d4c99db 100644 --- a/msgraph/generated/drives/item/shared_with_me/shared_with_me_response.py +++ b/msgraph/generated/drives/item/shared_with_me/shared_with_me_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SharedWithMeResponse(BaseCollectionPaginationCountResponse): +class SharedWithMeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[DriveItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SharedWithMeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SharedWithMeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SharedWithMeResponse + Returns: SharedWithMeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SharedWithMeResponse() + return SharedWithMeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/drives/item/shared_with_me/shared_with_me_request_builder.py b/msgraph/generated/drives/item/shared_with_me/shared_with_me_request_builder.py index f19bfcaf041..d15ec348d8e 100644 --- a/msgraph/generated/drives/item/shared_with_me/shared_with_me_request_builder.py +++ b/msgraph/generated/drives/item/shared_with_me/shared_with_me_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .shared_with_me_response import SharedWithMeResponse + from .shared_with_me_get_response import SharedWithMeGetResponse class SharedWithMeRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/drives/{drive%2Did}/sharedWithMe(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[SharedWithMeRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithMeResponse]: + async def get(self,request_configuration: Optional[SharedWithMeRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithMeGetResponse]: """ Invoke function sharedWithMe param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SharedWithMeResponse] + Returns: Optional[SharedWithMeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[SharedWithMeRequestBuilderGet } if not self.request_adapter: raise Exception("Http core is null") - from .shared_with_me_response import SharedWithMeResponse + from .shared_with_me_get_response import SharedWithMeGetResponse - return await self.request_adapter.send_async(request_info, SharedWithMeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SharedWithMeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SharedWithMeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SharedWithMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SharedWithMeRequestBuilder: diff --git a/msgraph/generated/drives/item/special/count/count_request_builder.py b/msgraph/generated/drives/item/special/count/count_request_builder.py index 1564bbbe5cf..c883395df9a 100644 --- a/msgraph/generated/drives/item/special/count/count_request_builder.py +++ b/msgraph/generated/drives/item/special/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/special/item/content/content_request_builder.py b/msgraph/generated/drives/item/special/item/content/content_request_builder.py index 83454b7beda..4d8f316977e 100644 --- a/msgraph/generated/drives/item/special/item/content/content_request_builder.py +++ b/msgraph/generated/drives/item/special/item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/drives/item/special/item/drive_item_item_request_builder.py b/msgraph/generated/drives/item/special/item/drive_item_item_request_builder.py index e6d4f5610e6..a96910ca330 100644 --- a/msgraph/generated/drives/item/special/item/drive_item_item_request_builder.py +++ b/msgraph/generated/drives/item/special/item/drive_item_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. + Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. This API is available in the following national cloud deployments. 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/drive-get-specialfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[DriveItemItemRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[DriveItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. + Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemItemRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class DriveItemItemRequestBuilderGetQueryParameters(): """ - Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. + Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/special/special_request_builder.py b/msgraph/generated/drives/item/special/special_request_builder.py index cbe9bef2215..f2983c1ed44 100644 --- a/msgraph/generated/drives/item/special/special_request_builder.py +++ b/msgraph/generated/drives/item/special/special_request_builder.py @@ -44,7 +44,7 @@ def by_drive_item_id(self,drive_item_id: str) -> DriveItemItemRequestBuilder: async def get(self,request_configuration: Optional[SpecialRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItemCollectionResponse]: """ - Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. + Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveItemCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[SpecialRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SpecialRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. + Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SpecialRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SpecialRequestBuilderGetQueryParameters(): """ - Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. + Use the special collection to access a special folder by name. Special folders provide simple aliases to access well-known folders in OneDrive without the need to look up the folder by path (which would require localization), or reference the folder with an ID. If a special folder is renamed or moved to another location within the drive, this syntax will continue to find that folder. Special folders are automatically created the first time an application attempts to write to one, if it doesn't already exist. If a user deletes one, it is recreated when written to again. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/classes_request_builder.py b/msgraph/generated/education/classes/classes_request_builder.py index a76b7f26333..707f1afbbcf 100644 --- a/msgraph/generated/education/classes/classes_request_builder.py +++ b/msgraph/generated/education/classes/classes_request_builder.py @@ -46,7 +46,7 @@ def by_education_class_id(self,education_class_id: str) -> EducationClassItemReq async def get(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClassCollectionResponse]: """ - Get a list of the educationClass objects and their properties. + Get a list of the educationClass objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClassCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ClassesRequestBuilderGetReque async def post(self,body: Optional[EducationClass] = None, request_configuration: Optional[ClassesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationClass]: """ - Create a new educationClass object. + Create a new educationClass object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClass] @@ -93,24 +93,24 @@ async def post(self,body: Optional[EducationClass] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the educationClass objects and their properties. + Get a list of the educationClass objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationClass] = None, request_configuration: Optional[ClassesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new educationClass object. + Create a new educationClass object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EducationClass] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ClassesRequestBuilderGetQueryParameters(): """ - Get a list of the educationClass objects and their properties. + Get a list of the educationClass objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/count/count_request_builder.py b/msgraph/generated/education/classes/count/count_request_builder.py index c0e0be9b7eb..e17704a915f 100644 --- a/msgraph/generated/education/classes/count/count_request_builder.py +++ b/msgraph/generated/education/classes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/delta/delta_response.py b/msgraph/generated/education/classes/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/classes/delta/delta_response.py rename to msgraph/generated/education/classes/delta/delta_get_response.py index af2addae0c3..7046e59fd36 100644 --- a/msgraph/generated/education/classes/delta/delta_response.py +++ b/msgraph/generated/education/classes/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationClass]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/classes/delta/delta_request_builder.py b/msgraph/generated/education/classes/delta/delta_request_builder.py index 3f00d032b96..ea9f487ec3d 100644 --- a/msgraph/generated/education/classes/delta/delta_request_builder.py +++ b/msgraph/generated/education/classes/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/classes/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignment_categories/assignment_categories_request_builder.py b/msgraph/generated/education/classes/item/assignment_categories/assignment_categories_request_builder.py index 7e74ab99978..a59217bc955 100644 --- a/msgraph/generated/education/classes/item/assignment_categories/assignment_categories_request_builder.py +++ b/msgraph/generated/education/classes/item/assignment_categories/assignment_categories_request_builder.py @@ -46,7 +46,7 @@ def by_education_category_id(self,education_category_id: str) -> EducationCatego async def get(self,request_configuration: Optional[AssignmentCategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationCategoryCollectionResponse]: """ - Retrieve a list of educationCategory objects. Only teachers can perform this operation. + Retrieve a list of educationCategory objects. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategoryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-categories?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[AssignmentCategoriesRequestBu async def post(self,body: Optional[EducationCategory] = None, request_configuration: Optional[AssignmentCategoriesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationCategory]: """ - Creates a new educationCategory on an educationClass. Only teachers can perform this operation. + Create a new educationCategory on an educationClass. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategory] @@ -93,24 +93,24 @@ async def post(self,body: Optional[EducationCategory] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[AssignmentCategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of educationCategory objects. Only teachers can perform this operation. + Retrieve a list of educationCategory objects. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationCategory] = None, request_configuration: Optional[AssignmentCategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Creates a new educationCategory on an educationClass. Only teachers can perform this operation. + Create a new educationCategory on an educationClass. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EducationCategory] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class AssignmentCategoriesRequestBuilderGetQueryParameters(): """ - Retrieve a list of educationCategory objects. Only teachers can perform this operation. + Retrieve a list of educationCategory objects. Only teachers can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignment_categories/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignment_categories/count/count_request_builder.py index 14bc45af134..1677c2b7ee5 100644 --- a/msgraph/generated/education/classes/item/assignment_categories/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignment_categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignment_categories/delta/delta_response.py b/msgraph/generated/education/classes/item/assignment_categories/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/classes/item/assignment_categories/delta/delta_response.py rename to msgraph/generated/education/classes/item/assignment_categories/delta/delta_get_response.py index dc6dba86235..a842587c4de 100644 --- a/msgraph/generated/education/classes/item/assignment_categories/delta/delta_response.py +++ b/msgraph/generated/education/classes/item/assignment_categories/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationCategory]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/classes/item/assignment_categories/delta/delta_request_builder.py b/msgraph/generated/education/classes/item/assignment_categories/delta/delta_request_builder.py index 63db8de42c4..09f381d0d06 100644 --- a/msgraph/generated/education/classes/item/assignment_categories/delta/delta_request_builder.py +++ b/msgraph/generated/education/classes/item/assignment_categories/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/assignmentCategories/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignment_categories/item/education_category_item_request_builder.py b/msgraph/generated/education/classes/item/assignment_categories/item/education_category_item_request_builder.py index 24300873f1c..1c84aac88da 100644 --- a/msgraph/generated/education/classes/item/assignment_categories/item/education_category_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignment_categories/item/education_category_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationCategoryItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an existing category. Only teachers can perform this operation. + Delete an existing category. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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/educationcategory-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationCategoryItemReque async def get(self,request_configuration: Optional[EducationCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationCategory]: """ - Retrieve an educationCategory object. Only teachers, students, and applications with application permissions can perform this operation. + Retrieve an educationCategory object. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategory] Find more info here: https://learn.microsoft.com/graph/api/educationcategory-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationCategory] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[EducationCategoryItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an existing category. Only teachers can perform this operation. + Delete an existing category. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve an educationCategory object. Only teachers, students, and applications with application permissions can perform this operation. + Retrieve an educationCategory object. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationCategory] = None, request_configuration: Optional[EducationCategoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationCategory] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationCategoryItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class EducationCategoryItemRequestBuilderGetQueryParameters(): """ - Retrieve an educationCategory object. Only teachers, students, and applications with application permissions can perform this operation. + Retrieve an educationCategory object. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignment_defaults/assignment_defaults_request_builder.py b/msgraph/generated/education/classes/item/assignment_defaults/assignment_defaults_request_builder.py index 3ecf2c12cc7..af834e912f9 100644 --- a/msgraph/generated/education/classes/item/assignment_defaults/assignment_defaults_request_builder.py +++ b/msgraph/generated/education/classes/item/assignment_defaults/assignment_defaults_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignmentDefaultsRequestB async def get(self,request_configuration: Optional[AssignmentDefaultsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentDefaults]: """ - Read the properties and relationships of an educationAssignmentDefaults object. These are the class-level assignment defaults respected by new assignments created in the class. Callers can continue to specify custom values on each assignment creation if they don't want the default behaviors. Only teachers can perform this operation. + Read the properties and relationships of an educationAssignmentDefaults object. These are the class-level assignment defaults respected by new assignments created in the class. Callers can continue to specify custom values on each assignment creation if they don't want the default behaviors. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentDefaults] Find more info here: https://learn.microsoft.com/graph/api/educationassignmentdefaults-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[AssignmentDefaultsRequestBuil async def patch(self,body: Optional[EducationAssignmentDefaults] = None, request_configuration: Optional[AssignmentDefaultsRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationAssignmentDefaults]: """ - Update the properties of an educationAssignmentDefaults object. Only teachers can update these settings. + Update the properties of an educationAssignmentDefaults object. Only teachers can update these settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentDefaults] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Assignmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignmentDefaultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an educationAssignmentDefaults object. These are the class-level assignment defaults respected by new assignments created in the class. Callers can continue to specify custom values on each assignment creation if they don't want the default behaviors. Only teachers can perform this operation. + Read the properties and relationships of an educationAssignmentDefaults object. These are the class-level assignment defaults respected by new assignments created in the class. Callers can continue to specify custom values on each assignment creation if they don't want the default behaviors. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentDefaults] = None, request_configuration: Optional[AssignmentDefaultsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationAssignmentDefaults object. Only teachers can update these settings. + Update the properties of an educationAssignmentDefaults object. Only teachers can update these settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignmentDefaults if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignmentDefaultsRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class AssignmentDefaultsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an educationAssignmentDefaults object. These are the class-level assignment defaults respected by new assignments created in the class. Callers can continue to specify custom values on each assignment creation if they don't want the default behaviors. Only teachers can perform this operation. + Read the properties and relationships of an educationAssignmentDefaults object. These are the class-level assignment defaults respected by new assignments created in the class. Callers can continue to specify custom values on each assignment creation if they don't want the default behaviors. Only teachers can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignment_settings/assignment_settings_request_builder.py b/msgraph/generated/education/classes/item/assignment_settings/assignment_settings_request_builder.py index 2db8d6e93e9..8b216e32baa 100644 --- a/msgraph/generated/education/classes/item/assignment_settings/assignment_settings_request_builder.py +++ b/msgraph/generated/education/classes/item/assignment_settings/assignment_settings_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[AssignmentSettingsRequestBuil async def patch(self,body: Optional[EducationAssignmentSettings] = None, request_configuration: Optional[AssignmentSettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationAssignmentSettings]: """ - Update the properties of an educationAssignmentSettings object. Only teachers can update these settings. + Update the properties of an educationAssignmentSettings object. Only teachers can update these settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentSettings] @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Assignmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignmentSettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,19 +113,19 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentSe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentSettings] = None, request_configuration: Optional[AssignmentSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationAssignmentSettings object. Only teachers can update these settings. + Update the properties of an educationAssignmentSettings object. Only teachers can update these settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignmentSettings if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py b/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py index 8a8c44dcf8c..453ba083018 100644 --- a/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py @@ -46,7 +46,7 @@ def by_education_assignment_id(self,education_assignment_id: str) -> EducationAs async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentCollectionResponse]: """ - Retrieve a list of assignment objects. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application executing with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them. + Retrieve a list of assignment objects. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application executing with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-assignments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetR async def post(self,body: Optional[EducationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a new assignment. Only teachers in a class can create an assignment. Assignments start in the Draft state, which means that students will not see the assignment until publication. + Create a new assignment. Only teachers in a class can create an assignment. Assignments start in the Draft state, which means that students will not see the assignment until publication. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[EducationAssignment] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of assignment objects. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application executing with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them. + Retrieve a list of assignment objects. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application executing with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new assignment. Only teachers in a class can create an assignment. Assignments start in the Draft state, which means that students will not see the assignment until publication. + Create a new assignment. Only teachers in a class can create an assignment. Assignments start in the Draft state, which means that students will not see the assignment until publication. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EducationAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class AssignmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of assignment objects. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application executing with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them. + Retrieve a list of assignment objects. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application executing with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/count/count_request_builder.py index 2a319790a82..6a17c720e21 100644 --- a/msgraph/generated/education/classes/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/delta/delta_response.py b/msgraph/generated/education/classes/item/assignments/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/users/item/assignments/delta/delta_response.py rename to msgraph/generated/education/classes/item/assignments/delta/delta_get_response.py index d815b641462..a473ac4ffe0 100644 --- a/msgraph/generated/education/users/item/assignments/delta/delta_response.py +++ b/msgraph/generated/education/classes/item/assignments/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/classes/item/assignments/delta/delta_request_builder.py b/msgraph/generated/education/classes/item/assignments/delta/delta_request_builder.py index 9620514ca24..a58a4ee7235 100644 --- a/msgraph/generated/education/classes/item/assignments/delta/delta_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/assignments/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/categories/categories_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/categories/categories_request_builder.py index c8c1ea1f491..c147eafd5e8 100644 --- a/msgraph/generated/education/classes/item/assignments/item/categories/categories_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/categories/categories_request_builder.py @@ -47,7 +47,7 @@ def by_education_category_id(self,education_category_id: str) -> EducationCatego async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationCategoryCollectionResponse]: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategoryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-categories?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRe async def post(self,body: Optional[EducationCategory] = None, request_configuration: Optional[CategoriesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationCategory]: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategory] @@ -94,24 +94,24 @@ async def post(self,body: Optional[EducationCategory] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationCategory] = None, request_configuration: Optional[CategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[EducationCategory] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +169,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class CategoriesRequestBuilderGetQueryParameters(): """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/categories/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/categories/count/count_request_builder.py index f797408a7f7..df22b428956 100644 --- a/msgraph/generated/education/classes/item/assignments/item/categories/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_response.py b/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_response.py rename to msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_get_response.py index f8bb96b7c36..a1f80355041 100644 --- a/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_response.py +++ b/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationCategory]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_request_builder.py index 9f24b9c7a78..1c87b487cd6 100644 --- a/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/categories/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/assignments/{educationAssignment%2Did}/categories/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/categories/item/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/categories/item/ref/ref_request_builder.py index cc1a4b9df0e..1346baa8bd7 100644 --- a/msgraph/generated/education/classes/item/assignments/item/categories/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/categories/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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/educationassignment-remove-category?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/categories/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/categories/ref/ref_request_builder.py index aff593752ee..ea49e82e67e 100644 --- a/msgraph/generated/education/classes/item/assignments/item/categories/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/categories/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-categories?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/education_assignment_item_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/education_assignment_item_request_builder.py index 53807b59a8c..b7830147141 100644 --- a/msgraph/generated/education/classes/item/assignments/item/education_assignment_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/education_assignment_item_request_builder.py @@ -35,7 +35,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an existing assignment. Only teachers within a class can delete assignments. + Delete an existing assignment. Only teachers within a class can delete assignments. This API is available in the following national cloud deployments. 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/educationassignment-delete?view=graph-rest-1.0 @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[EducationAssignmentItemReq async def get(self,request_configuration: Optional[EducationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Get the properties and relationships of an assignment. Only teachers, students, and applications with application permissions can perform this operation. Students can only see assignments assigned to them; teachers and applications with application permissions can see all assignments in a class. + Get the properties and relationships of an assignment. Only teachers, students, and applications with application permissions can perform this operation. Students can only see assignments assigned to them; teachers and applications with application permissions can see all assignments in a class. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get?view=graph-rest-1.0 @@ -77,7 +77,7 @@ async def get(self,request_configuration: Optional[EducationAssignmentItemReques async def patch(self,body: Optional[EducationAssignment] = None, request_configuration: Optional[EducationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Update an educationAssignment object. Only teachers can perform this action. Alternatively, request to change the status of an assignment with publish action. Don't use a PATCH operation for this purpose. + Update an educationAssignment object. Only teachers can perform this action. Alternatively, request to change the status of an assignment with publish action. Don't use a PATCH operation for this purpose. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] @@ -102,39 +102,39 @@ async def patch(self,body: Optional[EducationAssignment] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[EducationAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an existing assignment. Only teachers within a class can delete assignments. + Delete an existing assignment. Only teachers within a class can delete assignments. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of an assignment. Only teachers, students, and applications with application permissions can perform this operation. Students can only see assignments assigned to them; teachers and applications with application permissions can see all assignments in a class. + Get the properties and relationships of an assignment. Only teachers, students, and applications with application permissions can perform this operation. Students can only see assignments assigned to them; teachers and applications with application permissions can see all assignments in a class. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignment] = None, request_configuration: Optional[EducationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an educationAssignment object. Only teachers can perform this action. Alternatively, request to change the status of an assignment with publish action. Don't use a PATCH operation for this purpose. + Update an educationAssignment object. Only teachers can perform this action. Alternatively, request to change the status of an assignment with publish action. Don't use a PATCH operation for this purpose. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignment] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -238,7 +238,7 @@ class EducationAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EducationAssignmentItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of an assignment. Only teachers, students, and applications with application permissions can perform this operation. Students can only see assignments assigned to them; teachers and applications with application permissions can see all assignments in a class. + Get the properties and relationships of an assignment. Only teachers, students, and applications with application permissions can perform this operation. Students can only see assignments assigned to them; teachers and applications with application permissions can see all assignments in a class. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py index f560c094b31..f44c09cc1da 100644 --- a/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-publish?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/resources/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/resources/count/count_request_builder.py index e05ab5ac816..45e8317af89 100644 --- a/msgraph/generated/education/classes/item/assignments/item/resources/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py index aaa466d9b8c..6fdc49f519c 100644 --- a/msgraph/generated/education/classes/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers cannot remove resources marked as 'distributeToStudents', after the assignment has been published to students. + Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers can't remove resources marked as 'distributeToStudents', after the assignment has been published to students. This API is available in the following national cloud deployments. 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/educationassignmentresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationAssignmentResourc async def get(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentResource]: """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResource] Find more info here: https://learn.microsoft.com/graph/api/educationassignmentresource-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationAssignmentResource] = None, request def to_delete_request_information(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers cannot remove resources marked as 'distributeToStudents', after the assignment has been published to students. + Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers can't remove resources marked as 'distributeToStudents', after the assignment has been published to students. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentResource] = None, request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignmentResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationAssignmentResourceItemRequestBuilderGetQueryParameters(): """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/resources/resources_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/resources/resources_request_builder.py index 4a94aa13de4..aaacb862149 100644 --- a/msgraph/generated/education/classes/item/assignments/item/resources/resources_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_assignment_resource_id(self,education_assignment_resource_id: s async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentResourceCollectionResponse]: """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-resources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetReq async def post(self,body: Optional[EducationAssignmentResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignmentResource]: """ - Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. + Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationAssignmentResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. + Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationAssignmentResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/rubric/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/rubric/ref/ref_request_builder.py index 8d8c935ba9f..1aee1fb9c32 100644 --- a/msgraph/generated/education/classes/item/assignments/item/rubric/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/rubric/ref/ref_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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/educationassignment-delete-rubric?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[str]: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[str] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get-rubric?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> None: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -91,38 +91,38 @@ async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,12 +130,12 @@ def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/classes/item/assignments/item/rubric/rubric_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/rubric/rubric_request_builder.py index aedb5ad2eb7..a95fd77ea93 100644 --- a/msgraph/generated/education/classes/item/assignments/item/rubric/rubric_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/rubric/rubric_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RubricRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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/educationassignment-delete-rubric?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[RubricRequestBuilderDelete async def get(self,request_configuration: Optional[RubricRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get-rubric?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[RubricRequestBuilderGetReques async def patch(self,body: Optional[EducationRubric] = None, request_configuration: Optional[RubricRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[EducationRubric] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[RubricRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RubricRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[RubricRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[EducationRubric] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class RubricRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class RubricRequestBuilderGetQueryParameters(): """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py index a1c7e64e330..4fda1876268 100644 --- a/msgraph/generated/education/classes/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpFeedbackResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. + Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-setupfeedbackresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpFeedbackResourcesFolder def to_post_request_information(self,request_configuration: Optional[SetUpFeedbackResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. + Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpFeedbackResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py index 67585386d18..1438a176221 100644 --- a/msgraph/generated/education/classes/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. + Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-setupresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestB def to_post_request_information(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. + Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/count/count_request_builder.py index 3cb3cb1281b..90042ebbbe2 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/education_submission_item_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/education_submission_item_request_builder.py index 4f8819bdce6..c7a3c1a823f 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/education_submission_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/education_submission_item_request_builder.py @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionItemReq async def get(self,request_configuration: Optional[EducationSubmissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-get?view=graph-rest-1.0 @@ -106,29 +106,29 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmission] = None, request_configuration: Optional[EducationSubmissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmission] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -246,7 +246,7 @@ class EducationSubmissionItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EducationSubmissionItemRequestBuilderGetQueryParameters(): """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py index eebff955af6..62cdd3c6a88 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py index ed5f327af0f..10f5acedf01 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a feedback resource from a submission. This can only be done by a teacher. + Delete a feedback resource from a submission. This can only be done by a teacher. This API is available in the following national cloud deployments. 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/educationfeedbackresourceoutcome-delete?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[EducationOutcomeItemRequestBu async def patch(self,body: Optional[EducationOutcome] = None, request_configuration: Optional[EducationOutcomeItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationOutcome]: """ - Update the properties of an educationOutcome object. Only teachers can perform this operation. + Update the properties of an educationOutcome object. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcome] @@ -94,17 +94,17 @@ async def patch(self,body: Optional[EducationOutcome] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a feedback resource from a submission. This can only be done by a teacher. + Delete a feedback resource from a submission. This can only be done by a teacher. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[EducationOut Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationOutcome] = None, request_configuration: Optional[EducationOutcomeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationOutcome object. Only teachers can perform this operation. + Update the properties of an educationOutcome object. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationOutcome] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py index 30957aec73e..bdda04ec0af 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py @@ -45,7 +45,7 @@ def by_education_outcome_id(self,education_outcome_id: str) -> EducationOutcomeI async def get(self,request_configuration: Optional[OutcomesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationOutcomeCollectionResponse]: """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcomeCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-outcomes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OutcomesRequestBuilderGetRequ async def post(self,body: Optional[EducationOutcome] = None, request_configuration: Optional[OutcomesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationOutcome]: """ - Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. + Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcome] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationOutcome] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OutcomesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationOutcome] = None, request_configuration: Optional[OutcomesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. + Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationOutcome] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OutcomesRequestBuilderGetQueryParameters(): """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/reassign/reassign_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/reassign/reassign_request_builder.py index 5707d71dc8c..eec506334ee 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/reassign/reassign_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/reassign/reassign_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReassignRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. + Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-reassign?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReassignRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[ReassignRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. + Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReassignRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/count/count_request_builder.py index 6b73625fa0a..aa737b39261 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py index 43cddef3e50..4b4f41e399a 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource was not copied from the assignment but was added from the student, the resource is simply deleted. + Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource wasn't copied from the assignment but was added from the student, the resource is deleted. This API is available in the following national cloud deployments. 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/educationsubmissionresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionResourc async def get(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] Find more info here: https://learn.microsoft.com/graph/api/educationsubmissionresource-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationSubmissionResource] = None, request def to_delete_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource was not copied from the assignment but was added from the student, the resource is simply deleted. + Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource wasn't copied from the assignment but was added from the student, the resource is deleted. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmissionResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationSubmissionResourceItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/resources_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/resources_request_builder.py index 23e5efd0c63..dd0c5e31e7b 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/resources_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_resource_id(self,education_submission_resource_id: s async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResourceCollectionResponse]: """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-resources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetReq async def post(self,body: Optional[EducationSubmissionResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. + Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationSubmissionResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. + Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationSubmissionResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/return_/return_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/return_/return_request_builder.py index 64c05233e07..7944dfe8b35 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/return_/return_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/return_/return_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReturnRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. + Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-return?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReturnRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[ReturnRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. + Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReturnRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py index 1662c297c41..a88dce39a74 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. + Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-setupresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestB def to_post_request_information(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. + Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submit/submit_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submit/submit_request_builder.py index 19db95af38d..0519da86e46 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submit/submit_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submit/submit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SubmitRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. + Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-submit?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SubmitRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[SubmitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. + Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SubmitRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py index 43f5398830e..06f6a99b6a1 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py index 9e89e856a44..d22251a7604 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionResourc async def get(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] Find more info here: https://learn.microsoft.com/graph/api/educationsubmittedsubmissionresource-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmissionResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationSubmissionResourceItemRequestBuilderGetQueryParameters(): """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py index 5ff375f6242..4bc1d550387 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_resource_id(self,education_submission_resource_id: s async def get(self,request_configuration: Optional[SubmittedResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResourceCollectionResponse]: """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-submittedresources?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[EducationSubmissionResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[SubmittedResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[SubmittedResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[EducationSubmissionResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubmittedResourcesRequestBuilderGetQueryParameters(): """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py index 3c00958a32e..ce80d75c62c 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnsubmitRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. + Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-unsubmit?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[UnsubmitRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[UnsubmitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. + Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UnsubmitRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/item/submissions/submissions_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/submissions/submissions_request_builder.py index 746b9887898..41bdf9eb87a 100644 --- a/msgraph/generated/education/classes/item/assignments/item/submissions/submissions_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/submissions/submissions_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_id(self,education_submission_id: str) -> EducationSu async def get(self,request_configuration: Optional[SubmissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionCollectionResponse]: """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-submissions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[EducationSubmission] = None, request_configur def to_get_request_information(self,request_configuration: Optional[SubmissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmission] = None, request_configuration: Optional[SubmissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[EducationSubmission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubmissionsRequestBuilderGetQueryParameters(): """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/education_class_item_request_builder.py b/msgraph/generated/education/classes/item/education_class_item_request_builder.py index bb3d89edb63..8848c3b6359 100644 --- a/msgraph/generated/education/classes/item/education_class_item_request_builder.py +++ b/msgraph/generated/education/classes/item/education_class_item_request_builder.py @@ -12,9 +12,9 @@ if TYPE_CHECKING: from ....models.education_class import EducationClass from ....models.o_data_errors.o_data_error import ODataError + from .assignments.assignments_request_builder import AssignmentsRequestBuilder from .assignment_categories.assignment_categories_request_builder import AssignmentCategoriesRequestBuilder from .assignment_defaults.assignment_defaults_request_builder import AssignmentDefaultsRequestBuilder - from .assignments.assignments_request_builder import AssignmentsRequestBuilder from .assignment_settings.assignment_settings_request_builder import AssignmentSettingsRequestBuilder from .group.group_request_builder import GroupRequestBuilder from .members.members_request_builder import MembersRequestBuilder @@ -36,7 +36,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationClassItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an educationClass. Because a class is also a universal group, deleting a class deletes the group. + Delete an educationClass. Because a class is also a universal group, deleting a class deletes the group. This API is available in the following national cloud deployments. 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/educationclass-delete?view=graph-rest-1.0 @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[EducationClassItemRequestB async def get(self,request_configuration: Optional[EducationClassItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClass]: """ - Retrieve a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members. + Retrieve a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClass] Find more info here: https://learn.microsoft.com/graph/api/educationclass-get?view=graph-rest-1.0 @@ -78,7 +78,7 @@ async def get(self,request_configuration: Optional[EducationClassItemRequestBuil async def patch(self,body: Optional[EducationClass] = None, request_configuration: Optional[EducationClassItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationClass]: """ - Update the properties of an educationClass object. + Update the properties of an educationClass object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClass] @@ -103,39 +103,39 @@ async def patch(self,body: Optional[EducationClass] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[EducationClassItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an educationClass. Because a class is also a universal group, deleting a class deletes the group. + Delete an educationClass. Because a class is also a universal group, deleting a class deletes the group. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationClassItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members. + Retrieve a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationClass] = None, request_configuration: Optional[EducationClassItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationClass object. + Update the properties of an educationClass object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -143,13 +143,13 @@ def to_patch_request_information(self,body: Optional[EducationClass] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -182,22 +182,22 @@ def assignment_defaults(self) -> AssignmentDefaultsRequestBuilder: return AssignmentDefaultsRequestBuilder(self.request_adapter, self.path_parameters) @property - def assignments(self) -> AssignmentsRequestBuilder: + def assignment_settings(self) -> AssignmentSettingsRequestBuilder: """ - Provides operations to manage the assignments property of the microsoft.graph.educationClass entity. + Provides operations to manage the assignmentSettings property of the microsoft.graph.educationClass entity. """ - from .assignments.assignments_request_builder import AssignmentsRequestBuilder + from .assignment_settings.assignment_settings_request_builder import AssignmentSettingsRequestBuilder - return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + return AssignmentSettingsRequestBuilder(self.request_adapter, self.path_parameters) @property - def assignment_settings(self) -> AssignmentSettingsRequestBuilder: + def assignments(self) -> AssignmentsRequestBuilder: """ - Provides operations to manage the assignmentSettings property of the microsoft.graph.educationClass entity. + Provides operations to manage the assignments property of the microsoft.graph.educationClass entity. """ - from .assignment_settings.assignment_settings_request_builder import AssignmentSettingsRequestBuilder + from .assignments.assignments_request_builder import AssignmentsRequestBuilder - return AssignmentSettingsRequestBuilder(self.request_adapter, self.path_parameters) + return AssignmentsRequestBuilder(self.request_adapter, self.path_parameters) @property def group(self) -> GroupRequestBuilder: @@ -248,7 +248,7 @@ class EducationClassItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class EducationClassItemRequestBuilderGetQueryParameters(): """ - Retrieve a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members. + Retrieve a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/group/group_request_builder.py b/msgraph/generated/education/classes/item/group/group_request_builder.py index 9adc2ed438e..55b7a071993 100644 --- a/msgraph/generated/education/classes/item/group/group_request_builder.py +++ b/msgraph/generated/education/classes/item/group/group_request_builder.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from .....models.group import Group from .....models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GroupRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GroupRequestBuilder: @@ -74,6 +75,15 @@ def with_url(self,raw_url: Optional[str] = None) -> GroupRequestBuilder: raise TypeError("raw_url cannot be null.") return GroupRequestBuilder(self.request_adapter, raw_url) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GroupRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/education/classes/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/education/classes/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..b708026f0aa --- /dev/null +++ b/msgraph/generated/education/classes/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/education/classes/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/education/classes/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..65bd1ffe486 --- /dev/null +++ b/msgraph/generated/education/classes/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /education/classes/{educationClass-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/education/classes/item/members/count/count_request_builder.py b/msgraph/generated/education/classes/item/members/count/count_request_builder.py index 1f4457d7686..7d0ecc8d4ce 100644 --- a/msgraph/generated/education/classes/item/members/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/members/item/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/members/item/ref/ref_request_builder.py index b4921007b2d..5b7d774ec9a 100644 --- a/msgraph/generated/education/classes/item/members/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/members/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationUser from an educationClass. + Remove an educationUser from an educationClass. This API is available in the following national cloud deployments. 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/educationclass-delete-members?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationUser from an educationClass. + Remove an educationUser from an educationClass. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an educationUser from an educationClass. + Remove an educationUser from an educationClass. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/members/members_request_builder.py b/msgraph/generated/education/classes/item/members/members_request_builder.py index 5da3b4880e7..78a5decfbd2 100644 --- a/msgraph/generated/education/classes/item/members/members_request_builder.py +++ b/msgraph/generated/education/classes/item/members/members_request_builder.py @@ -45,7 +45,7 @@ def by_education_user_id(self,education_user_id: str) -> EducationUserItemReques async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationUserCollectionResponse]: """ - Retrieves the educationUser members of an educationClass. + Retrieves the educationUser members of an educationClass. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-members?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieves the educationUser members of an educationClass. + Retrieves the educationUser members of an educationClass. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MembersRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieves the educationUser members of an educationClass. + Retrieves the educationUser members of an educationClass. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/members/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/members/ref/ref_request_builder.py index 81783fb9d02..bea341cd2dd 100644 --- a/msgraph/generated/education/classes/item/members/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/members/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieves the educationUser members of an educationClass. + Retrieves the educationUser members of an educationClass. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-members?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add an educationUser member to an educationClass. + Add an educationUser member to an educationClass. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieves the educationUser members of an educationClass. + Retrieves the educationUser members of an educationClass. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an educationUser member to an educationClass. + Add an educationUser member to an educationClass. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieves the educationUser members of an educationClass. + Retrieves the educationUser members of an educationClass. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/schools/count/count_request_builder.py b/msgraph/generated/education/classes/item/schools/count/count_request_builder.py index 0e171d2ec2e..309f7cafc2c 100644 --- a/msgraph/generated/education/classes/item/schools/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/schools/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/schools/item/education_school_item_request_builder.py b/msgraph/generated/education/classes/item/schools/item/education_school_item_request_builder.py index ee90ac56e40..e7a94db04b5 100644 --- a/msgraph/generated/education/classes/item/schools/item/education_school_item_request_builder.py +++ b/msgraph/generated/education/classes/item/schools/item/education_school_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationSch Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationSchoolItemRequestBuilder: diff --git a/msgraph/generated/education/classes/item/schools/schools_request_builder.py b/msgraph/generated/education/classes/item/schools/schools_request_builder.py index 7694b08d847..80e5570f11e 100644 --- a/msgraph/generated/education/classes/item/schools/schools_request_builder.py +++ b/msgraph/generated/education/classes/item/schools/schools_request_builder.py @@ -44,7 +44,7 @@ def by_education_school_id(self,education_school_id: str) -> EducationSchoolItem async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSchoolCollectionResponse]: """ - Retrieve a list of schools in which the class is taught. + Retrieve a list of schools in which the class is taught. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchoolCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-schools?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of schools in which the class is taught. + Retrieve a list of schools in which the class is taught. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SchoolsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchoolsRequestBuilderGetQueryParameters(): """ - Retrieve a list of schools in which the class is taught. + Retrieve a list of schools in which the class is taught. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/teachers/count/count_request_builder.py b/msgraph/generated/education/classes/item/teachers/count/count_request_builder.py index 232e5973a5d..524ede3202b 100644 --- a/msgraph/generated/education/classes/item/teachers/count/count_request_builder.py +++ b/msgraph/generated/education/classes/item/teachers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/teachers/item/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/teachers/item/ref/ref_request_builder.py index ca77a361eb6..14cd6463c8a 100644 --- a/msgraph/generated/education/classes/item/teachers/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/teachers/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove teacher from an educationClass. + Remove a teacher from an educationClass. This API is available in the following national cloud deployments. 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/educationclass-delete-teachers?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove teacher from an educationClass. + Remove a teacher from an educationClass. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove teacher from an educationClass. + Remove a teacher from an educationClass. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/teachers/ref/ref_request_builder.py b/msgraph/generated/education/classes/item/teachers/ref/ref_request_builder.py index 99ab34944a9..d48f970e59b 100644 --- a/msgraph/generated/education/classes/item/teachers/ref/ref_request_builder.py +++ b/msgraph/generated/education/classes/item/teachers/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list teachers for a class. Delegated tokens must be members of the class to get the teacher list. + Retrieve a list of teachers for a class. Delegated tokens must be members of the class to get the teacher list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-teachers?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a teacher to a class. + Add a teacher to a class. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list teachers for a class. Delegated tokens must be members of the class to get the teacher list. + Retrieve a list of teachers for a class. Delegated tokens must be members of the class to get the teacher list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a teacher to a class. + Add a teacher to a class. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list teachers for a class. Delegated tokens must be members of the class to get the teacher list. + Retrieve a list of teachers for a class. Delegated tokens must be members of the class to get the teacher list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/classes/item/teachers/teachers_request_builder.py b/msgraph/generated/education/classes/item/teachers/teachers_request_builder.py index 16bf1042c49..c0d25204495 100644 --- a/msgraph/generated/education/classes/item/teachers/teachers_request_builder.py +++ b/msgraph/generated/education/classes/item/teachers/teachers_request_builder.py @@ -45,7 +45,7 @@ def by_education_user_id(self,education_user_id: str) -> EducationUserItemReques async def get(self,request_configuration: Optional[TeachersRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationUserCollectionResponse]: """ - Retrieve a list teachers for a class. Delegated tokens must be members of the class to get the teacher list. + Retrieve a list of teachers for a class. Delegated tokens must be members of the class to get the teacher list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationclass-list-teachers?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[TeachersRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeachersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list teachers for a class. Delegated tokens must be members of the class to get the teacher list. + Retrieve a list of teachers for a class. Delegated tokens must be members of the class to get the teacher list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeachersRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class TeachersRequestBuilderGetQueryParameters(): """ - Retrieve a list teachers for a class. Delegated tokens must be members of the class to get the teacher list. + Retrieve a list of teachers for a class. Delegated tokens must be members of the class to get the teacher list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/education_request_builder.py b/msgraph/generated/education/education_request_builder.py index 379df169bbd..4cd4e008c95 100644 --- a/msgraph/generated/education/education_request_builder.py +++ b/msgraph/generated/education/education_request_builder.py @@ -82,14 +82,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRoot] = None, request_configuration: Optional[EducationRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -102,13 +102,13 @@ def to_patch_request_information(self,body: Optional[EducationRoot] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/me/assignments/assignments_request_builder.py b/msgraph/generated/education/me/assignments/assignments_request_builder.py index 20e470dd181..2b1a3c6957e 100644 --- a/msgraph/generated/education/me/assignments/assignments_request_builder.py +++ b/msgraph/generated/education/me/assignments/assignments_request_builder.py @@ -46,7 +46,7 @@ def by_education_assignment_id(self,education_assignment_id: str) -> EducationAs async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentCollectionResponse]: """ - Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. + Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-assignments?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[EducationAssignment] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. + Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class AssignmentsRequestBuilderGetQueryParameters(): """ - Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. + Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/count/count_request_builder.py b/msgraph/generated/education/me/assignments/count/count_request_builder.py index bfa1bae54a7..9cd1158d22a 100644 --- a/msgraph/generated/education/me/assignments/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/delta/delta_response.py b/msgraph/generated/education/me/assignments/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/me/assignments/delta/delta_response.py rename to msgraph/generated/education/me/assignments/delta/delta_get_response.py index 287e378f868..9b5ab707cb7 100644 --- a/msgraph/generated/education/me/assignments/delta/delta_response.py +++ b/msgraph/generated/education/me/assignments/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/me/assignments/delta/delta_request_builder.py b/msgraph/generated/education/me/assignments/delta/delta_request_builder.py index 2e65bf98561..dbf23263e7d 100644 --- a/msgraph/generated/education/me/assignments/delta/delta_request_builder.py +++ b/msgraph/generated/education/me/assignments/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/me/assignments/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/categories/categories_request_builder.py b/msgraph/generated/education/me/assignments/item/categories/categories_request_builder.py index 15cf851e14a..1a80dd72b93 100644 --- a/msgraph/generated/education/me/assignments/item/categories/categories_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/categories/categories_request_builder.py @@ -47,7 +47,7 @@ def by_education_category_id(self,education_category_id: str) -> EducationCatego async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationCategoryCollectionResponse]: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategoryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-categories?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRe async def post(self,body: Optional[EducationCategory] = None, request_configuration: Optional[CategoriesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationCategory]: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategory] @@ -94,24 +94,24 @@ async def post(self,body: Optional[EducationCategory] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationCategory] = None, request_configuration: Optional[CategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[EducationCategory] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +169,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class CategoriesRequestBuilderGetQueryParameters(): """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/categories/count/count_request_builder.py b/msgraph/generated/education/me/assignments/item/categories/count/count_request_builder.py index 1317d4c606a..22ed73ad96c 100644 --- a/msgraph/generated/education/me/assignments/item/categories/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/categories/delta/delta_response.py b/msgraph/generated/education/me/assignments/item/categories/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/me/assignments/item/categories/delta/delta_response.py rename to msgraph/generated/education/me/assignments/item/categories/delta/delta_get_response.py index 0859a17ac0d..a09fe66185c 100644 --- a/msgraph/generated/education/me/assignments/item/categories/delta/delta_response.py +++ b/msgraph/generated/education/me/assignments/item/categories/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationCategory]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/me/assignments/item/categories/delta/delta_request_builder.py b/msgraph/generated/education/me/assignments/item/categories/delta/delta_request_builder.py index ccb38cb9892..4b8d0a51972 100644 --- a/msgraph/generated/education/me/assignments/item/categories/delta/delta_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/categories/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/me/assignments/{educationAssignment%2Did}/categories/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/categories/item/ref/ref_request_builder.py b/msgraph/generated/education/me/assignments/item/categories/item/ref/ref_request_builder.py index 4989e61bf07..8c6df58f74f 100644 --- a/msgraph/generated/education/me/assignments/item/categories/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/categories/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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/educationassignment-remove-category?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/categories/ref/ref_request_builder.py b/msgraph/generated/education/me/assignments/item/categories/ref/ref_request_builder.py index d2c1061caef..386ab33eae6 100644 --- a/msgraph/generated/education/me/assignments/item/categories/ref/ref_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/categories/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-categories?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/education_assignment_item_request_builder.py b/msgraph/generated/education/me/assignments/item/education_assignment_item_request_builder.py index a23ef2277d0..df3a0299b1f 100644 --- a/msgraph/generated/education/me/assignments/item/education_assignment_item_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/education_assignment_item_request_builder.py @@ -104,12 +104,12 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -119,14 +119,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationAss Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignment] = None, request_configuration: Optional[EducationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignment] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py b/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py index 0c3393d8869..78715819cf0 100644 --- a/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-publish?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/resources/count/count_request_builder.py b/msgraph/generated/education/me/assignments/item/resources/count/count_request_builder.py index 5c148fed097..877f9874a46 100644 --- a/msgraph/generated/education/me/assignments/item/resources/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/resources/item/education_assignment_resource_item_request_builder.py b/msgraph/generated/education/me/assignments/item/resources/item/education_assignment_resource_item_request_builder.py index e4d41beac3c..bddfea944e4 100644 --- a/msgraph/generated/education/me/assignments/item/resources/item/education_assignment_resource_item_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/resources/item/education_assignment_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers cannot remove resources marked as 'distributeToStudents', after the assignment has been published to students. + Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers can't remove resources marked as 'distributeToStudents', after the assignment has been published to students. This API is available in the following national cloud deployments. 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/educationassignmentresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationAssignmentResourc async def get(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentResource]: """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResource] Find more info here: https://learn.microsoft.com/graph/api/educationassignmentresource-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationAssignmentResource] = None, request def to_delete_request_information(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers cannot remove resources marked as 'distributeToStudents', after the assignment has been published to students. + Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers can't remove resources marked as 'distributeToStudents', after the assignment has been published to students. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentResource] = None, request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignmentResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationAssignmentResourceItemRequestBuilderGetQueryParameters(): """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/resources/resources_request_builder.py b/msgraph/generated/education/me/assignments/item/resources/resources_request_builder.py index 88668937f9f..290bf905f33 100644 --- a/msgraph/generated/education/me/assignments/item/resources/resources_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_assignment_resource_id(self,education_assignment_resource_id: s async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentResourceCollectionResponse]: """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-resources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetReq async def post(self,body: Optional[EducationAssignmentResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignmentResource]: """ - Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. + Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationAssignmentResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. + Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationAssignmentResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/rubric/ref/ref_request_builder.py b/msgraph/generated/education/me/assignments/item/rubric/ref/ref_request_builder.py index a70ffc6003e..2c53949f2f5 100644 --- a/msgraph/generated/education/me/assignments/item/rubric/ref/ref_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/rubric/ref/ref_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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/educationassignment-delete-rubric?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[str]: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[str] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get-rubric?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> None: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -91,38 +91,38 @@ async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,12 +130,12 @@ def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/me/assignments/item/rubric/rubric_request_builder.py b/msgraph/generated/education/me/assignments/item/rubric/rubric_request_builder.py index 8d983f3cac7..f769e66542e 100644 --- a/msgraph/generated/education/me/assignments/item/rubric/rubric_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/rubric/rubric_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RubricRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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/educationassignment-delete-rubric?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[RubricRequestBuilderDelete async def get(self,request_configuration: Optional[RubricRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get-rubric?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[RubricRequestBuilderGetReques async def patch(self,body: Optional[EducationRubric] = None, request_configuration: Optional[RubricRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[EducationRubric] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[RubricRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RubricRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[RubricRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[EducationRubric] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class RubricRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class RubricRequestBuilderGetQueryParameters(): """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py b/msgraph/generated/education/me/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py index 78a60b651f8..722a35bbaf2 100644 --- a/msgraph/generated/education/me/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpFeedbackResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. + Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-setupfeedbackresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpFeedbackResourcesFolder def to_post_request_information(self,request_configuration: Optional[SetUpFeedbackResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. + Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpFeedbackResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py b/msgraph/generated/education/me/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py index 729cbf261c2..1fbb2fb64d9 100644 --- a/msgraph/generated/education/me/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. + Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-setupresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestB def to_post_request_information(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. + Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/count/count_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/count/count_request_builder.py index edc08a43f35..043379dc046 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/education_submission_item_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/education_submission_item_request_builder.py index 73042bfdd4c..f07a3e4cc53 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/education_submission_item_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/education_submission_item_request_builder.py @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionItemReq async def get(self,request_configuration: Optional[EducationSubmissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-get?view=graph-rest-1.0 @@ -106,29 +106,29 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmission] = None, request_configuration: Optional[EducationSubmissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmission] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -246,7 +246,7 @@ class EducationSubmissionItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EducationSubmissionItemRequestBuilderGetQueryParameters(): """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/count/count_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/count/count_request_builder.py index 7fa8a6bd894..5ee2cf8f06f 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py index 9b2ae8a1389..35906a9af4a 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a feedback resource from a submission. This can only be done by a teacher. + Delete a feedback resource from a submission. This can only be done by a teacher. This API is available in the following national cloud deployments. 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/educationfeedbackresourceoutcome-delete?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[EducationOutcomeItemRequestBu async def patch(self,body: Optional[EducationOutcome] = None, request_configuration: Optional[EducationOutcomeItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationOutcome]: """ - Update the properties of an educationOutcome object. Only teachers can perform this operation. + Update the properties of an educationOutcome object. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcome] @@ -94,17 +94,17 @@ async def patch(self,body: Optional[EducationOutcome] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a feedback resource from a submission. This can only be done by a teacher. + Delete a feedback resource from a submission. This can only be done by a teacher. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[EducationOut Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationOutcome] = None, request_configuration: Optional[EducationOutcomeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationOutcome object. Only teachers can perform this operation. + Update the properties of an educationOutcome object. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationOutcome] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/outcomes_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/outcomes_request_builder.py index a78158952e4..3acb29dded5 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/outcomes_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/outcomes/outcomes_request_builder.py @@ -45,7 +45,7 @@ def by_education_outcome_id(self,education_outcome_id: str) -> EducationOutcomeI async def get(self,request_configuration: Optional[OutcomesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationOutcomeCollectionResponse]: """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcomeCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-outcomes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OutcomesRequestBuilderGetRequ async def post(self,body: Optional[EducationOutcome] = None, request_configuration: Optional[OutcomesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationOutcome]: """ - Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. + Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcome] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationOutcome] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OutcomesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationOutcome] = None, request_configuration: Optional[OutcomesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. + Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationOutcome] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OutcomesRequestBuilderGetQueryParameters(): """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/reassign/reassign_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/reassign/reassign_request_builder.py index 5e2560e150a..626f0c869f2 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/reassign/reassign_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/reassign/reassign_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReassignRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. + Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-reassign?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReassignRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[ReassignRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. + Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReassignRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/resources/count/count_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/resources/count/count_request_builder.py index 4430c0fb9dd..3d622517f9c 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/resources/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py index 8c970ddbec3..9801d2c2b1f 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource was not copied from the assignment but was added from the student, the resource is simply deleted. + Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource wasn't copied from the assignment but was added from the student, the resource is deleted. This API is available in the following national cloud deployments. 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/educationsubmissionresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionResourc async def get(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] Find more info here: https://learn.microsoft.com/graph/api/educationsubmissionresource-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationSubmissionResource] = None, request def to_delete_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource was not copied from the assignment but was added from the student, the resource is simply deleted. + Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource wasn't copied from the assignment but was added from the student, the resource is deleted. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmissionResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationSubmissionResourceItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/resources/resources_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/resources/resources_request_builder.py index 69a848fc38f..9a90d80af55 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/resources/resources_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_resource_id(self,education_submission_resource_id: s async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResourceCollectionResponse]: """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-resources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetReq async def post(self,body: Optional[EducationSubmissionResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. + Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationSubmissionResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. + Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationSubmissionResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/return_/return_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/return_/return_request_builder.py index 4b73d48049d..ab7aff53545 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/return_/return_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/return_/return_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReturnRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. + Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-return?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReturnRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[ReturnRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. + Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReturnRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py index bad137acdef..3be69742b76 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. + Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-setupresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestB def to_post_request_information(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. + Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/submit/submit_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/submit/submit_request_builder.py index b9e5259fd81..e11e9cb2fdb 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/submit/submit_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/submit/submit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SubmitRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. + Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-submit?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SubmitRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[SubmitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. + Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SubmitRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py index 925a9371908..6992e10e1e5 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py index 9ce57a3c91f..ac756c64184 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionResourc async def get(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] Find more info here: https://learn.microsoft.com/graph/api/educationsubmittedsubmissionresource-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmissionResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationSubmissionResourceItemRequestBuilderGetQueryParameters(): """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py index b52415867c5..92cc952e2d3 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_resource_id(self,education_submission_resource_id: s async def get(self,request_configuration: Optional[SubmittedResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResourceCollectionResponse]: """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-submittedresources?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[EducationSubmissionResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[SubmittedResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[SubmittedResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[EducationSubmissionResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubmittedResourcesRequestBuilderGetQueryParameters(): """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py index 40af4cb1bf1..13d3859f3db 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnsubmitRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. + Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-unsubmit?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[UnsubmitRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[UnsubmitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. + Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UnsubmitRequestBuilder: diff --git a/msgraph/generated/education/me/assignments/item/submissions/submissions_request_builder.py b/msgraph/generated/education/me/assignments/item/submissions/submissions_request_builder.py index 3168f6fdb33..0c115450b87 100644 --- a/msgraph/generated/education/me/assignments/item/submissions/submissions_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/submissions/submissions_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_id(self,education_submission_id: str) -> EducationSu async def get(self,request_configuration: Optional[SubmissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionCollectionResponse]: """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-submissions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[EducationSubmission] = None, request_configur def to_get_request_information(self,request_configuration: Optional[SubmissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmission] = None, request_configuration: Optional[SubmissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[EducationSubmission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubmissionsRequestBuilderGetQueryParameters(): """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/classes/classes_request_builder.py b/msgraph/generated/education/me/classes/classes_request_builder.py index a43c4dccc27..cb5c3adc649 100644 --- a/msgraph/generated/education/me/classes/classes_request_builder.py +++ b/msgraph/generated/education/me/classes/classes_request_builder.py @@ -44,7 +44,7 @@ def by_education_class_id(self,education_class_id: str) -> EducationClassItemReq async def get(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClassCollectionResponse]: """ - Get the educationClass resources an educationUser is a member of. + Get the educationClass resources an educationUser is a member of. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClassCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-classes?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[ClassesRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationClass resources an educationUser is a member of. + Get the educationClass resources an educationUser is a member of. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ClassesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ClassesRequestBuilderGetQueryParameters(): """ - Get the educationClass resources an educationUser is a member of. + Get the educationClass resources an educationUser is a member of. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/classes/count/count_request_builder.py b/msgraph/generated/education/me/classes/count/count_request_builder.py index 718dee63777..170a7487b58 100644 --- a/msgraph/generated/education/me/classes/count/count_request_builder.py +++ b/msgraph/generated/education/me/classes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/classes/item/education_class_item_request_builder.py b/msgraph/generated/education/me/classes/item/education_class_item_request_builder.py index 2a3e809562e..bd1c6cf9c36 100644 --- a/msgraph/generated/education/me/classes/item/education_class_item_request_builder.py +++ b/msgraph/generated/education/me/classes/item/education_class_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationCla Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationClassItemRequestBuilder: diff --git a/msgraph/generated/education/me/me_request_builder.py b/msgraph/generated/education/me/me_request_builder.py index 67719ec115d..1a0e462fc06 100644 --- a/msgraph/generated/education/me/me_request_builder.py +++ b/msgraph/generated/education/me/me_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[MeRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[MeRequestBui Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationUser] = None, request_configuration: Optional[MeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[EducationUser] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/me/rubrics/count/count_request_builder.py b/msgraph/generated/education/me/rubrics/count/count_request_builder.py index 4352474bc3e..c17457cf8e4 100644 --- a/msgraph/generated/education/me/rubrics/count/count_request_builder.py +++ b/msgraph/generated/education/me/rubrics/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/rubrics/item/education_rubric_item_request_builder.py b/msgraph/generated/education/me/rubrics/item/education_rubric_item_request_builder.py index 01a75fa0922..bfa59d3eb5d 100644 --- a/msgraph/generated/education/me/rubrics/item/education_rubric_item_request_builder.py +++ b/msgraph/generated/education/me/rubrics/item/education_rubric_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationRubricItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an educationRubric object. Only teachers can perform this operation. + Delete an educationRubric object. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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/educationrubric-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationRubricItemRequest async def get(self,request_configuration: Optional[EducationRubricItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. + Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] Find more info here: https://learn.microsoft.com/graph/api/educationrubric-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[EducationRubricItemRequestBui async def patch(self,body: Optional[EducationRubric] = None, request_configuration: Optional[EducationRubricItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric, but it cannot be updated. + Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/{class-id}/assignments/{assignment-id}/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/{class-id}/assignments/{assignment-id}/rubric, but it cannot be updated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[EducationRubric] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[EducationRubricItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an educationRubric object. Only teachers can perform this operation. + Delete an educationRubric object. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationRubricItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. + Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[EducationRubricItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric, but it cannot be updated. + Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/{class-id}/assignments/{assignment-id}/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/{class-id}/assignments/{assignment-id}/rubric, but it cannot be updated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[EducationRubric] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class EducationRubricItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class EducationRubricItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. + Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/rubrics/rubrics_request_builder.py b/msgraph/generated/education/me/rubrics/rubrics_request_builder.py index b3f108d7122..79a622aa106 100644 --- a/msgraph/generated/education/me/rubrics/rubrics_request_builder.py +++ b/msgraph/generated/education/me/rubrics/rubrics_request_builder.py @@ -45,7 +45,7 @@ def by_education_rubric_id(self,education_rubric_id: str) -> EducationRubricItem async def get(self,request_configuration: Optional[RubricsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubricCollectionResponse]: """ - Retrieve a list of educationRubric objects. + Retrieve a list of educationRubric objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubricCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-rubrics?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RubricsRequestBuilderGetReque async def post(self,body: Optional[EducationRubric] = None, request_configuration: Optional[RubricsRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Create a new educationRubric object. + Create a new educationRubric object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationRubric] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RubricsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of educationRubric objects. + Retrieve a list of educationRubric objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[RubricsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new educationRubric object. + Create a new educationRubric object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationRubric] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RubricsRequestBuilderGetQueryParameters(): """ - Retrieve a list of educationRubric objects. + Retrieve a list of educationRubric objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/schools/count/count_request_builder.py b/msgraph/generated/education/me/schools/count/count_request_builder.py index c69800075c0..89340517a81 100644 --- a/msgraph/generated/education/me/schools/count/count_request_builder.py +++ b/msgraph/generated/education/me/schools/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/schools/item/education_school_item_request_builder.py b/msgraph/generated/education/me/schools/item/education_school_item_request_builder.py index 8e665bf9cfd..11c8028637b 100644 --- a/msgraph/generated/education/me/schools/item/education_school_item_request_builder.py +++ b/msgraph/generated/education/me/schools/item/education_school_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationSch Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationSchoolItemRequestBuilder: diff --git a/msgraph/generated/education/me/schools/schools_request_builder.py b/msgraph/generated/education/me/schools/schools_request_builder.py index f59c454e925..cfbea5411dd 100644 --- a/msgraph/generated/education/me/schools/schools_request_builder.py +++ b/msgraph/generated/education/me/schools/schools_request_builder.py @@ -44,7 +44,7 @@ def by_education_school_id(self,education_school_id: str) -> EducationSchoolItem async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSchoolCollectionResponse]: """ - Retrieve a list of schools for a user. + Retrieve a list of schools for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchoolCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-schools?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of schools for a user. + Retrieve a list of schools for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SchoolsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchoolsRequestBuilderGetQueryParameters(): """ - Retrieve a list of schools for a user. + Retrieve a list of schools for a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/taught_classes/count/count_request_builder.py b/msgraph/generated/education/me/taught_classes/count/count_request_builder.py index 2cceb3c0659..2e6b7f06cd3 100644 --- a/msgraph/generated/education/me/taught_classes/count/count_request_builder.py +++ b/msgraph/generated/education/me/taught_classes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/me/taught_classes/item/education_class_item_request_builder.py b/msgraph/generated/education/me/taught_classes/item/education_class_item_request_builder.py index ecac5721c81..06e834294ff 100644 --- a/msgraph/generated/education/me/taught_classes/item/education_class_item_request_builder.py +++ b/msgraph/generated/education/me/taught_classes/item/education_class_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationCla Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationClassItemRequestBuilder: diff --git a/msgraph/generated/education/me/taught_classes/taught_classes_request_builder.py b/msgraph/generated/education/me/taught_classes/taught_classes_request_builder.py index 7844ffe4d5e..3728471d1c9 100644 --- a/msgraph/generated/education/me/taught_classes/taught_classes_request_builder.py +++ b/msgraph/generated/education/me/taught_classes/taught_classes_request_builder.py @@ -44,7 +44,7 @@ def by_education_class_id(self,education_class_id: str) -> EducationClassItemReq async def get(self,request_configuration: Optional[TaughtClassesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClassCollectionResponse]: """ - Get the educationClass resources owned by an educationUser. + Get the educationClass resources owned by an educationUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClassCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-taughtclasses?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaughtClassesRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[TaughtClassesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationClass resources owned by an educationUser. + Get the educationClass resources owned by an educationUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaughtClassesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaughtClassesRequestBuilderGetQueryParameters(): """ - Get the educationClass resources owned by an educationUser. + Get the educationClass resources owned by an educationUser. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/me/user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/education/me/user/mailbox_settings/mailbox_settings_request_builder.py index 11e36faf445..8dc04a0f60f 100644 --- a/msgraph/generated/education/me/user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/education/me/user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/me/user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/education/me/user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..bec4f471513 --- /dev/null +++ b/msgraph/generated/education/me/user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/education/me/user/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/chats/item/permission_grants/delta/delta_request_builder.py b/msgraph/generated/education/me/user/service_provisioning_errors/service_provisioning_errors_request_builder.py similarity index 65% rename from msgraph/generated/chats/item/permission_grants/delta/delta_request_builder.py rename to msgraph/generated/education/me/user/service_provisioning_errors/service_provisioning_errors_request_builder.py index 93d5799ea4b..d7f682efd02 100644 --- a/msgraph/generated/chats/item/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/education/me/user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -11,26 +11,27 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder -class DeltaRequestBuilder(BaseRequestBuilder): +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Builds and executes requests for operations under /education/me/user/serviceProvisioningErrors """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + super().__init__(request_adapter, "{+baseurl}/education/me/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[ServiceProvisioningErrorCollectionResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +44,50 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> ServiceProvisioningErrorsRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: ServiceProvisioningErrorsRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): """ - Invoke function delta + Get serviceProvisioningErrors property value """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -89,6 +99,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: 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": @@ -106,6 +118,9 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: # 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 @@ -128,14 +143,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/education/me/user/user_request_builder.py b/msgraph/generated/education/me/user/user_request_builder.py index 1f4107d8789..c011800fd24 100644 --- a/msgraph/generated/education/me/user/user_request_builder.py +++ b/msgraph/generated/education/me/user/user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Retrieve the simple directory user that corresponds to this educationUser. + Retrieve the simple directory user that corresponds to this educationUser. This API is available in the following national cloud deployments. 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/educationuser-get-user?view=graph-rest-1.0 @@ -51,19 +52,19 @@ async def get(self,request_configuration: Optional[UserRequestBuilderGetRequestC def to_get_request_information(self,request_configuration: Optional[UserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the simple directory user that corresponds to this educationUser. + Retrieve the simple directory user that corresponds to this educationUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserRequestBuilder: @@ -85,10 +86,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class UserRequestBuilderGetQueryParameters(): """ - Retrieve the simple directory user that corresponds to this educationUser. + Retrieve the simple directory user that corresponds to this educationUser. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/count/count_request_builder.py b/msgraph/generated/education/schools/count/count_request_builder.py index 8047bd88a07..0e991b533dc 100644 --- a/msgraph/generated/education/schools/count/count_request_builder.py +++ b/msgraph/generated/education/schools/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/schools/delta/delta_response.py b/msgraph/generated/education/schools/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/schools/delta/delta_response.py rename to msgraph/generated/education/schools/delta/delta_get_response.py index f918f6bc109..a317b84a0b2 100644 --- a/msgraph/generated/education/schools/delta/delta_response.py +++ b/msgraph/generated/education/schools/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationSchool]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/schools/delta/delta_request_builder.py b/msgraph/generated/education/schools/delta/delta_request_builder.py index 642b4524da6..0633184b974 100644 --- a/msgraph/generated/education/schools/delta/delta_request_builder.py +++ b/msgraph/generated/education/schools/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/schools/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/schools/item/administrative_unit/administrative_unit_request_builder.py b/msgraph/generated/education/schools/item/administrative_unit/administrative_unit_request_builder.py index 2b1f7815ec2..195db964d8c 100644 --- a/msgraph/generated/education/schools/item/administrative_unit/administrative_unit_request_builder.py +++ b/msgraph/generated/education/schools/item/administrative_unit/administrative_unit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AdministrativeUnitRequestBuilderGetRequestConfiguration] = None) -> Optional[AdministrativeUnit]: """ - Get a list of administrativeUnits associated with an educationSchool object. + Get a list of administrativeUnits associated with an educationSchool object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AdministrativeUnit] Find more info here: https://learn.microsoft.com/graph/api/educationschool-list-administrativeunit?view=graph-rest-1.0 @@ -74,19 +74,19 @@ async def patch(self,body: Optional[AdministrativeUnit] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AdministrativeUnitRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of administrativeUnits associated with an educationSchool object. + Get a list of administrativeUnits associated with an educationSchool object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AdministrativeUnit] = None, request_configuration: Optional[AdministrativeUnitRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[AdministrativeUnit] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -122,7 +122,7 @@ def with_url(self,raw_url: Optional[str] = None) -> AdministrativeUnitRequestBui @dataclass class AdministrativeUnitRequestBuilderGetQueryParameters(): """ - Get a list of administrativeUnits associated with an educationSchool object. + Get a list of administrativeUnits associated with an educationSchool object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/classes/classes_request_builder.py b/msgraph/generated/education/schools/item/classes/classes_request_builder.py index 75e2e1df157..2b366cafacb 100644 --- a/msgraph/generated/education/schools/item/classes/classes_request_builder.py +++ b/msgraph/generated/education/schools/item/classes/classes_request_builder.py @@ -45,7 +45,7 @@ def by_education_class_id(self,education_class_id: str) -> EducationClassItemReq async def get(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClassCollectionResponse]: """ - Get the educationClass resources owned by an educationSchool. + Get the educationClass resources owned by an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClassCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationschool-list-classes?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[ClassesRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationClass resources owned by an educationSchool. + Get the educationClass resources owned by an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ClassesRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class ClassesRequestBuilderGetQueryParameters(): """ - Get the educationClass resources owned by an educationSchool. + Get the educationClass resources owned by an educationSchool. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/classes/count/count_request_builder.py b/msgraph/generated/education/schools/item/classes/count/count_request_builder.py index 3f4f449b627..656900055ce 100644 --- a/msgraph/generated/education/schools/item/classes/count/count_request_builder.py +++ b/msgraph/generated/education/schools/item/classes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/schools/item/classes/item/ref/ref_request_builder.py b/msgraph/generated/education/schools/item/classes/item/ref/ref_request_builder.py index 6e19bb49304..9d911cb1603 100644 --- a/msgraph/generated/education/schools/item/classes/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/schools/item/classes/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a class from a school. + Delete a class from a school. This API is available in the following national cloud deployments. 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/educationschool-delete-classes?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a class from a school. + Delete a class from a school. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Delete a class from a school. + Delete a class from a school. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/classes/ref/ref_request_builder.py b/msgraph/generated/education/schools/item/classes/ref/ref_request_builder.py index c3d335876a8..59ec5e96631 100644 --- a/msgraph/generated/education/schools/item/classes/ref/ref_request_builder.py +++ b/msgraph/generated/education/schools/item/classes/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Get the educationClass resources owned by an educationSchool. + Get the educationClass resources owned by an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationschool-list-classes?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a class to a school. + Add a class to a school. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationClass resources owned by an educationSchool. + Get the educationClass resources owned by an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a class to a school. + Add a class to a school. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Get the educationClass resources owned by an educationSchool. + Get the educationClass resources owned by an educationSchool. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/education_school_item_request_builder.py b/msgraph/generated/education/schools/item/education_school_item_request_builder.py index 041f308253a..9f5764890d3 100644 --- a/msgraph/generated/education/schools/item/education_school_item_request_builder.py +++ b/msgraph/generated/education/schools/item/education_school_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationSchoolItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a school. + Delete a school. This API is available in the following national cloud deployments. 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/educationschool-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[EducationSchoolItemRequest async def get(self,request_configuration: Optional[EducationSchoolItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSchool]: """ - Read the properties and relationships of an educationSchool object. + Read the properties and relationships of an educationSchool object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchool] Find more info here: https://learn.microsoft.com/graph/api/educationschool-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[EducationSchoolItemRequestBui async def patch(self,body: Optional[EducationSchool] = None, request_configuration: Optional[EducationSchoolItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationSchool]: """ - Update the properties of an educationSchool object. + Update the properties of an educationSchool object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchool] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[EducationSchool] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[EducationSchoolItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a school. + Delete a school. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSchoolItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an educationSchool object. + Read the properties and relationships of an educationSchool object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSchool] = None, request_configuration: Optional[EducationSchoolItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationSchool object. + Update the properties of an educationSchool object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[EducationSchool] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class EducationSchoolItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class EducationSchoolItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an educationSchool object. + Read the properties and relationships of an educationSchool object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/users/count/count_request_builder.py b/msgraph/generated/education/schools/item/users/count/count_request_builder.py index a346d993971..4a26845fe00 100644 --- a/msgraph/generated/education/schools/item/users/count/count_request_builder.py +++ b/msgraph/generated/education/schools/item/users/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/schools/item/users/item/ref/ref_request_builder.py b/msgraph/generated/education/schools/item/users/item/ref/ref_request_builder.py index 572052413cc..c4711df47b9 100644 --- a/msgraph/generated/education/schools/item/users/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/schools/item/users/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a user from a school. + Delete a user from a school. This API is available in the following national cloud deployments. 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/educationschool-delete-users?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a user from a school. + Delete a user from a school. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Delete a user from a school. + Delete a user from a school. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/users/ref/ref_request_builder.py b/msgraph/generated/education/schools/item/users/ref/ref_request_builder.py index c640ce6c10a..d643e6ab9a8 100644 --- a/msgraph/generated/education/schools/item/users/ref/ref_request_builder.py +++ b/msgraph/generated/education/schools/item/users/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Get the educationUser resources associated with an educationSchool. + Get the educationUser resources associated with an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationschool-list-users?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a user to a school. + Add a user to a school. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationUser resources associated with an educationSchool. + Get the educationUser resources associated with an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a user to a school. + Add a user to a school. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Get the educationUser resources associated with an educationSchool. + Get the educationUser resources associated with an educationSchool. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/item/users/users_request_builder.py b/msgraph/generated/education/schools/item/users/users_request_builder.py index 7a9c77e5b62..1d062a3c7fd 100644 --- a/msgraph/generated/education/schools/item/users/users_request_builder.py +++ b/msgraph/generated/education/schools/item/users/users_request_builder.py @@ -45,7 +45,7 @@ def by_education_user_id(self,education_user_id: str) -> EducationUserItemReques async def get(self,request_configuration: Optional[UsersRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationUserCollectionResponse]: """ - Get the educationUser resources associated with an educationSchool. + Get the educationUser resources associated with an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationschool-list-users?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[UsersRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[UsersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationUser resources associated with an educationSchool. + Get the educationUser resources associated with an educationSchool. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UsersRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class UsersRequestBuilderGetQueryParameters(): """ - Get the educationUser resources associated with an educationSchool. + Get the educationUser resources associated with an educationSchool. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/schools/schools_request_builder.py b/msgraph/generated/education/schools/schools_request_builder.py index 4d2a0988863..6862d0f2c8f 100644 --- a/msgraph/generated/education/schools/schools_request_builder.py +++ b/msgraph/generated/education/schools/schools_request_builder.py @@ -46,7 +46,7 @@ def by_education_school_id(self,education_school_id: str) -> EducationSchoolItem async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSchoolCollectionResponse]: """ - Get a list of the educationSchool objects and their properties. + Get a list of the educationSchool objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchoolCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationschool-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetReque async def post(self,body: Optional[EducationSchool] = None, request_configuration: Optional[SchoolsRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSchool]: """ - Create a new educationSchool object. + Create a new educationSchool object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchool] @@ -93,24 +93,24 @@ async def post(self,body: Optional[EducationSchool] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the educationSchool objects and their properties. + Get a list of the educationSchool objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSchool] = None, request_configuration: Optional[SchoolsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new educationSchool object. + Create a new educationSchool object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EducationSchool] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class SchoolsRequestBuilderGetQueryParameters(): """ - Get a list of the educationSchool objects and their properties. + Get a list of the educationSchool objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/count/count_request_builder.py b/msgraph/generated/education/users/count/count_request_builder.py index ac8d21b98c9..c1db82c948b 100644 --- a/msgraph/generated/education/users/count/count_request_builder.py +++ b/msgraph/generated/education/users/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/delta/delta_response.py b/msgraph/generated/education/users/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/users/delta/delta_response.py rename to msgraph/generated/education/users/delta/delta_get_response.py index 647358b0147..aac41fd7ffd 100644 --- a/msgraph/generated/education/users/delta/delta_response.py +++ b/msgraph/generated/education/users/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationUser]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/users/delta/delta_request_builder.py b/msgraph/generated/education/users/delta/delta_request_builder.py index f33054e4aa6..bae0e76f71f 100644 --- a/msgraph/generated/education/users/delta/delta_request_builder.py +++ b/msgraph/generated/education/users/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/users/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/assignments_request_builder.py b/msgraph/generated/education/users/item/assignments/assignments_request_builder.py index 6230cd0ebc2..c0306c20637 100644 --- a/msgraph/generated/education/users/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/assignments_request_builder.py @@ -46,7 +46,7 @@ def by_education_assignment_id(self,education_assignment_id: str) -> EducationAs async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentCollectionResponse]: """ - Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. + Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-assignments?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[EducationAssignment] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. + Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class AssignmentsRequestBuilderGetQueryParameters(): """ - Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. + Returns a list of educationAssignment assigned to a educationUser for all classes. Only teachers, students, and applications with application permissions can perform this operation. This method allows a caller to find all the assignments belonging to a student or a teacher in a single call rather than having to request assignments from each class. The assignment list contains what is needed to get the detailed information for the assignment from within the class namespace. Use the methods defined for the assignment for all other operations. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/count/count_request_builder.py index 44af8bfd77b..12dc6488d21 100644 --- a/msgraph/generated/education/users/item/assignments/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/classes/item/assignments/delta/delta_response.py b/msgraph/generated/education/users/item/assignments/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/classes/item/assignments/delta/delta_response.py rename to msgraph/generated/education/users/item/assignments/delta/delta_get_response.py index d815b641462..a473ac4ffe0 100644 --- a/msgraph/generated/education/classes/item/assignments/delta/delta_response.py +++ b/msgraph/generated/education/users/item/assignments/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/users/item/assignments/delta/delta_request_builder.py b/msgraph/generated/education/users/item/assignments/delta/delta_request_builder.py index b765c83e065..f0a47a85141 100644 --- a/msgraph/generated/education/users/item/assignments/delta/delta_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/users/{educationUser%2Did}/assignments/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/categories/categories_request_builder.py b/msgraph/generated/education/users/item/assignments/item/categories/categories_request_builder.py index ac1582e96fe..704a191b654 100644 --- a/msgraph/generated/education/users/item/assignments/item/categories/categories_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/categories/categories_request_builder.py @@ -47,7 +47,7 @@ def by_education_category_id(self,education_category_id: str) -> EducationCatego async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationCategoryCollectionResponse]: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategoryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-categories?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[CategoriesRequestBuilderGetRe async def post(self,body: Optional[EducationCategory] = None, request_configuration: Optional[CategoriesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationCategory]: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationCategory] @@ -94,24 +94,24 @@ async def post(self,body: Optional[EducationCategory] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[CategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationCategory] = None, request_configuration: Optional[CategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[EducationCategory] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +169,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class CategoriesRequestBuilderGetQueryParameters(): """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/categories/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/item/categories/count/count_request_builder.py index 9db2e010eea..dd6ad802d3e 100644 --- a/msgraph/generated/education/users/item/assignments/item/categories/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_response.py b/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/education/users/item/assignments/item/categories/delta/delta_response.py rename to msgraph/generated/education/users/item/assignments/item/categories/delta/delta_get_response.py index f8bb96b7c36..a1f80355041 100644 --- a/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_response.py +++ b/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[EducationCategory]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_request_builder.py b/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_request_builder.py index 19aa9fa943e..375964b2099 100644 --- a/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/categories/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/education/users/{educationUser%2Did}/assignments/{educationAssignment%2Did}/categories/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/categories/item/ref/ref_request_builder.py b/msgraph/generated/education/users/item/assignments/item/categories/item/ref/ref_request_builder.py index d963813b2c2..b655374122a 100644 --- a/msgraph/generated/education/users/item/assignments/item/categories/item/ref/ref_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/categories/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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/educationassignment-remove-category?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. + Remove an educationCategory from an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/categories/ref/ref_request_builder.py b/msgraph/generated/education/users/item/assignments/item/categories/ref/ref_request_builder.py index d3a05d647f3..4adade9c272 100644 --- a/msgraph/generated/education/users/item/assignments/item/categories/ref/ref_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/categories/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-categories?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. + Add one or more existing educationCategory objects to the specified educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + List all the categories associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/education_assignment_item_request_builder.py b/msgraph/generated/education/users/item/assignments/item/education_assignment_item_request_builder.py index e1400db514e..2eea4363a4e 100644 --- a/msgraph/generated/education/users/item/assignments/item/education_assignment_item_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/education_assignment_item_request_builder.py @@ -104,12 +104,12 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -119,14 +119,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationAss Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignment] = None, request_configuration: Optional[EducationAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignment] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py b/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py index 90507b05c30..242630d60c3 100644 --- a/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-publish?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/resources/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/item/resources/count/count_request_builder.py index 809184d1d83..8a27dce7fc9 100644 --- a/msgraph/generated/education/users/item/assignments/item/resources/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py b/msgraph/generated/education/users/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py index b21959566ad..1356c577245 100644 --- a/msgraph/generated/education/users/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/resources/item/education_assignment_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers cannot remove resources marked as 'distributeToStudents', after the assignment has been published to students. + Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers can't remove resources marked as 'distributeToStudents', after the assignment has been published to students. This API is available in the following national cloud deployments. 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/educationassignmentresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationAssignmentResourc async def get(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentResource]: """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResource] Find more info here: https://learn.microsoft.com/graph/api/educationassignmentresource-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationAssignmentResource] = None, request def to_delete_request_information(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers cannot remove resources marked as 'distributeToStudents', after the assignment has been published to students. + Delete a specific educationAssignmentResource attached to an assignment. In general, only teachers in the class can remove a resource. However, teachers can't remove resources marked as 'distributeToStudents', after the assignment has been published to students. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentResource] = None, request_configuration: Optional[EducationAssignmentResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationAssignmentResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationAssignmentResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationAssignmentResourceItemRequestBuilderGetQueryParameters(): """ - Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get the properties of an education assignment resource associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/resources/resources_request_builder.py b/msgraph/generated/education/users/item/assignments/item/resources/resources_request_builder.py index b322d98c76e..af829fc5a8d 100644 --- a/msgraph/generated/education/users/item/assignments/item/resources/resources_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_assignment_resource_id(self,education_assignment_resource_id: s async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationAssignmentResourceCollectionResponse]: """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-resources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetReq async def post(self,body: Optional[EducationAssignmentResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignmentResource]: """ - Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. + Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignmentResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationAssignmentResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationAssignmentResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. + Create an assignment resource. Only teachers can perform this operation. You can create the following types of assignment resources: Every resource has an @odata.type property to indicate which type of resource is being created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationAssignmentResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. + Get all the educationAssignmentResource objects associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/rubric/ref/ref_request_builder.py b/msgraph/generated/education/users/item/assignments/item/rubric/ref/ref_request_builder.py index 50fbfc5ec7d..ce9b70be65c 100644 --- a/msgraph/generated/education/users/item/assignments/item/rubric/ref/ref_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/rubric/ref/ref_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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/educationassignment-delete-rubric?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[str]: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[str] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get-rubric?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> None: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -91,38 +91,38 @@ async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,12 +130,12 @@ def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/users/item/assignments/item/rubric/rubric_request_builder.py b/msgraph/generated/education/users/item/assignments/item/rubric/rubric_request_builder.py index 5982e28d742..b880c9ae7f2 100644 --- a/msgraph/generated/education/users/item/assignments/item/rubric/rubric_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/rubric/rubric_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RubricRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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/educationassignment-delete-rubric?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[RubricRequestBuilderDelete async def get(self,request_configuration: Optional[RubricRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-get-rubric?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[RubricRequestBuilderGetReques async def patch(self,body: Optional[EducationRubric] = None, request_configuration: Optional[RubricRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[EducationRubric] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[RubricRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an educationRubric from an educationAssignment. This method does not delete the rubric itself and can only be performed by teachers. + Remove an educationRubric from an educationAssignment. This method doesn't delete the rubric itself and can only be performed by teachers. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RubricRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[RubricRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. + Attach an existing educationRubric object to an educationAssignment. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[EducationRubric] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class RubricRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class RubricRequestBuilderGetQueryParameters(): """ - Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. + Get the educationRubric object attached to an educationAssignment, if one exists. Only teachers, students, and applications with application permissions can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py b/msgraph/generated/education/users/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py index bbe84fcef05..0e0da69858e 100644 --- a/msgraph/generated/education/users/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/set_up_feedback_resources_folder/set_up_feedback_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpFeedbackResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. + Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-setupfeedbackresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpFeedbackResourcesFolder def to_post_request_information(self,request_configuration: Optional[SetUpFeedbackResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. + Create a SharePoint folder to upload feedback files for a given educationSubmission. Only teachers can perform this operation. The teacher determines the resources to upload in the feedback resources folder of a submission. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpFeedbackResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py b/msgraph/generated/education/users/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py index 03ecf754bd9..ccdea625290 100644 --- a/msgraph/generated/education/users/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/set_up_resources_folder/set_up_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationAssignment]: """ - Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. + Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-setupresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestB def to_post_request_information(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. + Create a SharePoint folder to upload files for a given educationAssignment. Only teachers can perform this operation. The teacher determines the resources to upload in the assignment's folder. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/count/count_request_builder.py index d3e67db91a0..c48a6069b58 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/education_submission_item_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/education_submission_item_request_builder.py index e2de0255edf..7b3823ae5ef 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/education_submission_item_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/education_submission_item_request_builder.py @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionItemReq async def get(self,request_configuration: Optional[EducationSubmissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-get?view=graph-rest-1.0 @@ -106,29 +106,29 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmission] = None, request_configuration: Optional[EducationSubmissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmission] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -246,7 +246,7 @@ class EducationSubmissionItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EducationSubmissionItemRequestBuilderGetQueryParameters(): """ - Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. + Retrieve a particular submission. Only teachers, students, and applications with application permissions can perform this operation. A submission object represents a student's work for an assignment. Resources associated with the submission represent this work. Only the assignedTo student can see and modify the submission. A teacher or application with application permissions has full access to all submissions. The grade and feedback from a teacher are part of the educationOutcome associated with this object. Only teachers or applications with application permissions can add or change grades and feedback. Students will not see the grade or feedback until the assignment has been released. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py index 83f67fc99ac..8ffe2a49f74 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py index 481f7e3bb55..37f16e8c6dd 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/item/education_outcome_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a feedback resource from a submission. This can only be done by a teacher. + Delete a feedback resource from a submission. This can only be done by a teacher. This API is available in the following national cloud deployments. 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/educationfeedbackresourceoutcome-delete?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[EducationOutcomeItemRequestBu async def patch(self,body: Optional[EducationOutcome] = None, request_configuration: Optional[EducationOutcomeItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationOutcome]: """ - Update the properties of an educationOutcome object. Only teachers can perform this operation. + Update the properties of an educationOutcome object. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcome] @@ -94,17 +94,17 @@ async def patch(self,body: Optional[EducationOutcome] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a feedback resource from a submission. This can only be done by a teacher. + Delete a feedback resource from a submission. This can only be done by a teacher. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationOutcomeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[EducationOut Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationOutcome] = None, request_configuration: Optional[EducationOutcomeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationOutcome object. Only teachers can perform this operation. + Update the properties of an educationOutcome object. Only teachers can perform this operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationOutcome] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py index bb2cbca1c90..1c7766f536b 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/outcomes/outcomes_request_builder.py @@ -45,7 +45,7 @@ def by_education_outcome_id(self,education_outcome_id: str) -> EducationOutcomeI async def get(self,request_configuration: Optional[OutcomesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationOutcomeCollectionResponse]: """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcomeCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-outcomes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OutcomesRequestBuilderGetRequ async def post(self,body: Optional[EducationOutcome] = None, request_configuration: Optional[OutcomesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationOutcome]: """ - Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. + Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationOutcome] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationOutcome] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OutcomesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationOutcome] = None, request_configuration: Optional[OutcomesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. + Create a new feedback resource for a submission. Only a teacher can perform this operation. To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or isn't in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationOutcome] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OutcomesRequestBuilderGetQueryParameters(): """ - Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. + Retrieve a list of educationOutcome objects. There are four types of outcomes: educationPointsOutcome, educationFeedbackOutcome, educationRubricOutcome, and educationFeedbackResourceOutcome. Only teachers, students, and applications with application permissions can perform this operation. A submission for a credit assignment (one that has no point value and no rubric) will have an educationFeedbackOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for a points assignment (one that has a point value assigned) will have both an educationFeedbackOutcome and an educationPointsOutcome. A submission for an assignment with an attached rubric, if the rubric is a credit rubric (no points), will have an educationFeedbackOutcome and an educationRubricOutcome. (It might also return an educationPointsOutcome, but that outcome is ignored.) A submission for an assignment with an attached rubric, if the rubric is a points rubric, will have an educationFeedbackOutcome, an educationPointsOutcome, and an educationRubricOutcome. A submission for a feedback resource will have an educationFeedbackResourceOutcome. All outcome types have a regular and a published property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. The regular property is the most recent value updated by the teacher; the published property is the most recent value returned to the student. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/reassign/reassign_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/reassign/reassign_request_builder.py index 4820da34bcf..34d8105c86d 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/reassign/reassign_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/reassign/reassign_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReassignRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. + Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-reassign?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReassignRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[ReassignRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. + Reassign the submission to the student with feedback for review. Only teachers can perform this action. Include the Prefer: include-unknown-enum-members header when you call this method; otherwise, a reassigned submission will be treated as a returned submission. This means that the reassigned status will be mapped to the returned status, and reassignedDateTime and reassignedBy properties will be mapped to returnedDateTime and returnedBy respectively. If the header Prefer: include-unknown-enum-members is provided, a reassigned submission retains the reassigned status. For details, see the examples section. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReassignRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/count/count_request_builder.py index d2b4df5a0bc..d674d3e8040 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py index ecfbedcdd1e..79261aaf0e2 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/item/education_submission_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource was not copied from the assignment but was added from the student, the resource is simply deleted. + Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource wasn't copied from the assignment but was added from the student, the resource is deleted. This API is available in the following national cloud deployments. 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/educationsubmissionresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionResourc async def get(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] Find more info here: https://learn.microsoft.com/graph/api/educationsubmissionresource-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[EducationSubmissionResource] = None, request def to_delete_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource was not copied from the assignment but was added from the student, the resource is simply deleted. + Delete an educationSubmissionResource from the submission. Only teachers and students can perform this operation. If the resource was copied from the assignment, a new copy of the resource will be created after the current copy is deleted. This allows you to 'reset' the resource to its original state. If the resource wasn't copied from the assignment but was added from the student, the resource is deleted. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmissionResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationSubmissionResourceItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. + Retrieve the properties of a specific resource associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. This resource is in the 'working' resource list and should be considered work in process by a student. This resource is wrapped with a possible pointer back to the assignment resource if it was copied from the assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/resources_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/resources_request_builder.py index bdb7ea0720c..fc540fb554b 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/resources_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_resource_id(self,education_submission_resource_id: s async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResourceCollectionResponse]: """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-resources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetReq async def post(self,body: Optional[EducationSubmissionResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. + Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationSubmissionResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. + Add an educationSubmissionResource to a submission resource list. Only teachers and students can perform this operation. The operation will not succeed if the allowStudentsToAddResources flag is not set to true. To create a new file-based resource, upload the file to the resources folder associated with the submission. If the file doesn't exist or is not in that folder, the POST request will fail. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationSubmissionResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. + List the resources associated with a submission. Only teachers, students, and applications with application permissions can perform this operation. The educationSubmissionResource object is a wrapper around the actual resource object the student is working on. The wrapper also includes a pointer to the resources on the assignment if this was copied from the assignment during the assign process. These resources are the working copy of the assignment. The submittedResources are the resources that have officially been submitted to be graded. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/return_/return_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/return_/return_request_builder.py index 7e7dc0ee50b..af25a82d63b 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/return_/return_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/return_/return_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReturnRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. + Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-return?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReturnRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[ReturnRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. + Make the grade and feedback associated with this submission available to the student. This action changes the status of the submission from 'submitted' to 'returned' and indicates that feedback is provided or grading is done. This action can only be done by the teacher. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReturnRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py index 2bbea9b1e8e..9ce90eaddcb 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/set_up_resources_folder/set_up_resources_folder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. + Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-setupresourcesfolder?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SetUpResourcesFolderRequestB def to_post_request_information(self,request_configuration: Optional[SetUpResourcesFolderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. + Trigger the creation of the SharePoint resource folder where all file-based resources (Word, Excel, and so on) should be uploaded for a given submission. Only teachers and students can perform this operation. Note that files must be located in this folder in order to be added as resources. Only a student in the class can determine what files to upload in a given submission-level resource folder. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetUpResourcesFolderRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/submit/submit_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/submit/submit_request_builder.py index 86d6b86d5b7..7d485f34835 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/submit/submit_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/submit/submit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SubmitRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. + Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-submit?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[SubmitRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[SubmitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. + Indicate that a student is done with the work and is ready to hand in the assignment. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from working to submitted. During the submit process, all the resources are copied to the submittedResources bucket. The teacher will be looking at the submitted resources list for grading. A teacher can also submit a student's assignment on their behalf. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SubmitRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py index 05981027dbc..6df2abb30a6 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py index c578ffd6dbb..500b49cf00a 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/item/education_submission_resource_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[EducationSubmissionResourc async def get(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResource]: """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResource] Find more info here: https://learn.microsoft.com/graph/api/educationsubmittedsubmissionresource-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Education Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[EducationSubmissionResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[EducationSubmissionResource if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class EducationSubmissionResourceItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class EducationSubmissionResourceItemRequestBuilderGetQueryParameters(): """ - Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Note that teachers can leave notes in some resources. + Retrieve a submitted resource. Only teachers, students, and applications with application permissions can perform this operation. Resources are available to a teacher or an application with application permissions after a student submits it, and are available to the student after the teacher returns the submission. Teachers can leave notes in some resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py index 7fd80f3903b..f2278fc81c8 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/submitted_resources/submitted_resources_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_resource_id(self,education_submission_resource_id: s async def get(self,request_configuration: Optional[SubmittedResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionResourceCollectionResponse]: """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-list-submittedresources?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[EducationSubmissionResource] = None, request_ def to_get_request_information(self,request_configuration: Optional[SubmittedResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmissionResource] = None, request_configuration: Optional[SubmittedResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[EducationSubmissionResource] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubmittedResourcesRequestBuilderGetQueryParameters(): """ - List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. + List the educationSubmissionResource objects that have officially been submitted for grading. Only teachers, students, and applications with application permissions can perform this operation. The student who owns the submission cannot change the submitted list without resubmitting the assignment. This is a wrapper around the real resource and can contain a pointer back to the actual assignment resource if this resource was copied from the assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py index 08c9b23cdf7..a946145983d 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/item/unsubmit/unsubmit_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnsubmitRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationSubmission]: """ - Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. + Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmission] Find more info here: https://learn.microsoft.com/graph/api/educationsubmission-unsubmit?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[UnsubmitRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[UnsubmitRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. + Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation. This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading. A teacher can also unsubmit a student's assignment on their behalf. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UnsubmitRequestBuilder: diff --git a/msgraph/generated/education/users/item/assignments/item/submissions/submissions_request_builder.py b/msgraph/generated/education/users/item/assignments/item/submissions/submissions_request_builder.py index 3d004d7b8d3..5a3923ceb56 100644 --- a/msgraph/generated/education/users/item/assignments/item/submissions/submissions_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/submissions/submissions_request_builder.py @@ -45,7 +45,7 @@ def by_education_submission_id(self,education_submission_id: str) -> EducationSu async def get(self,request_configuration: Optional[SubmissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSubmissionCollectionResponse]: """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSubmissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-list-submissions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[EducationSubmission] = None, request_configur def to_get_request_information(self,request_configuration: Optional[SubmissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationSubmission] = None, request_configuration: Optional[SubmissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[EducationSubmission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubmissionsRequestBuilderGetQueryParameters(): """ - List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. + List all the submissions associated with an assignment. Only teachers, students, and applications with application permissions can perform this operation. A teacher or an application with application permissions can get all the submissions while a student can only get submissions that they are associated with. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/classes/classes_request_builder.py b/msgraph/generated/education/users/item/classes/classes_request_builder.py index f9e87bb482c..56d1c315734 100644 --- a/msgraph/generated/education/users/item/classes/classes_request_builder.py +++ b/msgraph/generated/education/users/item/classes/classes_request_builder.py @@ -44,7 +44,7 @@ def by_education_class_id(self,education_class_id: str) -> EducationClassItemReq async def get(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClassCollectionResponse]: """ - Get the educationClass resources an educationUser is a member of. + Get the educationClass resources an educationUser is a member of. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClassCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-classes?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[ClassesRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[ClassesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationClass resources an educationUser is a member of. + Get the educationClass resources an educationUser is a member of. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ClassesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ClassesRequestBuilderGetQueryParameters(): """ - Get the educationClass resources an educationUser is a member of. + Get the educationClass resources an educationUser is a member of. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/classes/count/count_request_builder.py b/msgraph/generated/education/users/item/classes/count/count_request_builder.py index 886b7b15336..4ce8e35729a 100644 --- a/msgraph/generated/education/users/item/classes/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/classes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/classes/item/education_class_item_request_builder.py b/msgraph/generated/education/users/item/classes/item/education_class_item_request_builder.py index 8aabd70dffc..789d6eb9b40 100644 --- a/msgraph/generated/education/users/item/classes/item/education_class_item_request_builder.py +++ b/msgraph/generated/education/users/item/classes/item/education_class_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationCla Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationClassItemRequestBuilder: diff --git a/msgraph/generated/education/users/item/education_user_item_request_builder.py b/msgraph/generated/education/users/item/education_user_item_request_builder.py index 2a79596c7b3..16daa0dedbf 100644 --- a/msgraph/generated/education/users/item/education_user_item_request_builder.py +++ b/msgraph/generated/education/users/item/education_user_item_request_builder.py @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationUserItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a user. + Delete a user. This API is available in the following national cloud deployments. 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/educationuser-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[EducationUserItemRequestBu async def get(self,request_configuration: Optional[EducationUserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationUser]: """ - Read the properties and relationships of an educationUser object. + Read the properties and relationships of an educationUser object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUser] Find more info here: https://learn.microsoft.com/graph/api/educationuser-get?view=graph-rest-1.0 @@ -76,7 +76,7 @@ async def get(self,request_configuration: Optional[EducationUserItemRequestBuild async def patch(self,body: Optional[EducationUser] = None, request_configuration: Optional[EducationUserItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationUser]: """ - Update the properties of an educationUser object. + Update the properties of an educationUser object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUser] @@ -101,39 +101,39 @@ async def patch(self,body: Optional[EducationUser] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[EducationUserItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a user. + Delete a user. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationUserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an educationUser object. + Read the properties and relationships of an educationUser object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationUser] = None, request_configuration: Optional[EducationUserItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationUser object. + Update the properties of an educationUser object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[EducationUser] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -228,7 +228,7 @@ class EducationUserItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class EducationUserItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an educationUser object. + Read the properties and relationships of an educationUser object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/rubrics/count/count_request_builder.py b/msgraph/generated/education/users/item/rubrics/count/count_request_builder.py index e5ca8f5ad1a..e4862147fc1 100644 --- a/msgraph/generated/education/users/item/rubrics/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/rubrics/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/rubrics/item/education_rubric_item_request_builder.py b/msgraph/generated/education/users/item/rubrics/item/education_rubric_item_request_builder.py index 7fd4ddae67c..c4d4a27d501 100644 --- a/msgraph/generated/education/users/item/rubrics/item/education_rubric_item_request_builder.py +++ b/msgraph/generated/education/users/item/rubrics/item/education_rubric_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EducationRubricItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an educationRubric object. Only teachers can perform this operation. + Delete an educationRubric object. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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/educationrubric-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EducationRubricItemRequest async def get(self,request_configuration: Optional[EducationRubricItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. + Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] Find more info here: https://learn.microsoft.com/graph/api/educationrubric-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[EducationRubricItemRequestBui async def patch(self,body: Optional[EducationRubric] = None, request_configuration: Optional[EducationRubricItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric, but it cannot be updated. + Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/{class-id}/assignments/{assignment-id}/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/{class-id}/assignments/{assignment-id}/rubric, but it cannot be updated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[EducationRubric] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[EducationRubricItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an educationRubric object. Only teachers can perform this operation. + Delete an educationRubric object. Only teachers can perform this operation. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EducationRubricItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. + Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[EducationRubricItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/rubric, but it cannot be updated. + Update the properties of an educationRubric object. Only teachers can perform this operation. Updating a rubric attached to an assignment (PATCH /education/classes/{class-id}/assignments/{assignment-id}/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/{class-id}/assignments/{assignment-id}/rubric, but it cannot be updated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[EducationRubric] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class EducationRubricItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class EducationRubricItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. + Retrieve the properties and relationships of an educationRubric object. Only teachers and students can perform this operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/rubrics/rubrics_request_builder.py b/msgraph/generated/education/users/item/rubrics/rubrics_request_builder.py index 6e2c17b4b91..2b4ab2ec0b6 100644 --- a/msgraph/generated/education/users/item/rubrics/rubrics_request_builder.py +++ b/msgraph/generated/education/users/item/rubrics/rubrics_request_builder.py @@ -45,7 +45,7 @@ def by_education_rubric_id(self,education_rubric_id: str) -> EducationRubricItem async def get(self,request_configuration: Optional[RubricsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationRubricCollectionResponse]: """ - Retrieve a list of educationRubric objects. + Retrieve a list of educationRubric objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubricCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-rubrics?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RubricsRequestBuilderGetReque async def post(self,body: Optional[EducationRubric] = None, request_configuration: Optional[RubricsRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationRubric]: """ - Create a new educationRubric object. + Create a new educationRubric object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationRubric] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EducationRubric] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RubricsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of educationRubric objects. + Retrieve a list of educationRubric objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationRubric] = None, request_configuration: Optional[RubricsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new educationRubric object. + Create a new educationRubric object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EducationRubric] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RubricsRequestBuilderGetQueryParameters(): """ - Retrieve a list of educationRubric objects. + Retrieve a list of educationRubric objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/schools/count/count_request_builder.py b/msgraph/generated/education/users/item/schools/count/count_request_builder.py index 4f0d2e6f122..87d7604189b 100644 --- a/msgraph/generated/education/users/item/schools/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/schools/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/schools/item/education_school_item_request_builder.py b/msgraph/generated/education/users/item/schools/item/education_school_item_request_builder.py index 4e4d0863301..123228e6c43 100644 --- a/msgraph/generated/education/users/item/schools/item/education_school_item_request_builder.py +++ b/msgraph/generated/education/users/item/schools/item/education_school_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationSch Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationSchoolItemRequestBuilder: diff --git a/msgraph/generated/education/users/item/schools/schools_request_builder.py b/msgraph/generated/education/users/item/schools/schools_request_builder.py index bb7ceea6f8e..8b3c48491d8 100644 --- a/msgraph/generated/education/users/item/schools/schools_request_builder.py +++ b/msgraph/generated/education/users/item/schools/schools_request_builder.py @@ -44,7 +44,7 @@ def by_education_school_id(self,education_school_id: str) -> EducationSchoolItem async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationSchoolCollectionResponse]: """ - Retrieve a list of schools for a user. + Retrieve a list of schools for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationSchoolCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-schools?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SchoolsRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SchoolsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of schools for a user. + Retrieve a list of schools for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SchoolsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchoolsRequestBuilderGetQueryParameters(): """ - Retrieve a list of schools for a user. + Retrieve a list of schools for a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/taught_classes/count/count_request_builder.py b/msgraph/generated/education/users/item/taught_classes/count/count_request_builder.py index 8fc75b429a9..6cbf1d3bcf4 100644 --- a/msgraph/generated/education/users/item/taught_classes/count/count_request_builder.py +++ b/msgraph/generated/education/users/item/taught_classes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/education/users/item/taught_classes/item/education_class_item_request_builder.py b/msgraph/generated/education/users/item/taught_classes/item/education_class_item_request_builder.py index 3dda1a25ab6..62bd683dcf2 100644 --- a/msgraph/generated/education/users/item/taught_classes/item/education_class_item_request_builder.py +++ b/msgraph/generated/education/users/item/taught_classes/item/education_class_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EducationCla Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EducationClassItemRequestBuilder: diff --git a/msgraph/generated/education/users/item/taught_classes/taught_classes_request_builder.py b/msgraph/generated/education/users/item/taught_classes/taught_classes_request_builder.py index 2fda5ec8ffa..130123c1e89 100644 --- a/msgraph/generated/education/users/item/taught_classes/taught_classes_request_builder.py +++ b/msgraph/generated/education/users/item/taught_classes/taught_classes_request_builder.py @@ -44,7 +44,7 @@ def by_education_class_id(self,education_class_id: str) -> EducationClassItemReq async def get(self,request_configuration: Optional[TaughtClassesRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationClassCollectionResponse]: """ - Get the educationClass resources owned by an educationUser. + Get the educationClass resources owned by an educationUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationClassCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list-taughtclasses?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaughtClassesRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[TaughtClassesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the educationClass resources owned by an educationUser. + Get the educationClass resources owned by an educationUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaughtClassesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaughtClassesRequestBuilderGetQueryParameters(): """ - Get the educationClass resources owned by an educationUser. + Get the educationClass resources owned by an educationUser. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/item/user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/education/users/item/user/mailbox_settings/mailbox_settings_request_builder.py index 0debce0bff5..cae3d71bc46 100644 --- a/msgraph/generated/education/users/item/user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/education/users/item/user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/education/users/item/user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/education/users/item/user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..367477a9350 --- /dev/null +++ b/msgraph/generated/education/users/item/user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/education/users/item/user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/education/users/item/user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..1e9b29b4737 --- /dev/null +++ b/msgraph/generated/education/users/item/user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /education/users/{educationUser-id}/user/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/education/users/item/user/user_request_builder.py b/msgraph/generated/education/users/item/user/user_request_builder.py index e0dda66e3b3..c2ba22679c8 100644 --- a/msgraph/generated/education/users/item/user/user_request_builder.py +++ b/msgraph/generated/education/users/item/user/user_request_builder.py @@ -13,6 +13,7 @@ from .....models.o_data_errors.o_data_error import ODataError from .....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Retrieve the simple directory user that corresponds to this educationUser. + Retrieve the simple directory user that corresponds to this educationUser. This API is available in the following national cloud deployments. 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/educationuser-get-user?view=graph-rest-1.0 @@ -51,19 +52,19 @@ async def get(self,request_configuration: Optional[UserRequestBuilderGetRequestC def to_get_request_information(self,request_configuration: Optional[UserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the simple directory user that corresponds to this educationUser. + Retrieve the simple directory user that corresponds to this educationUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserRequestBuilder: @@ -85,10 +86,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class UserRequestBuilderGetQueryParameters(): """ - Retrieve the simple directory user that corresponds to this educationUser. + Retrieve the simple directory user that corresponds to this educationUser. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/education/users/users_request_builder.py b/msgraph/generated/education/users/users_request_builder.py index 6820e008ebd..1e9fd041fc6 100644 --- a/msgraph/generated/education/users/users_request_builder.py +++ b/msgraph/generated/education/users/users_request_builder.py @@ -46,7 +46,7 @@ def by_education_user_id(self,education_user_id: str) -> EducationUserItemReques async def get(self,request_configuration: Optional[UsersRequestBuilderGetRequestConfiguration] = None) -> Optional[EducationUserCollectionResponse]: """ - Get a list of the educationUser objects and their properties. + Get a list of the educationUser objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/educationuser-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[UsersRequestBuilderGetRequest async def post(self,body: Optional[EducationUser] = None, request_configuration: Optional[UsersRequestBuilderPostRequestConfiguration] = None) -> Optional[EducationUser]: """ - Create a new educationUser object. + Create a new educationUser object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationUser] @@ -93,24 +93,24 @@ async def post(self,body: Optional[EducationUser] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[UsersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the educationUser objects and their properties. + Get a list of the educationUser objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EducationUser] = None, request_configuration: Optional[UsersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new educationUser object. + Create a new educationUser object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EducationUser] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class UsersRequestBuilderGetQueryParameters(): """ - Get a list of the educationUser objects and their properties. + Get a list of the educationUser objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/employee_experience/employee_experience_request_builder.py b/msgraph/generated/employee_experience/employee_experience_request_builder.py index efb8bd59866..9590e507e2c 100644 --- a/msgraph/generated/employee_experience/employee_experience_request_builder.py +++ b/msgraph/generated/employee_experience/employee_experience_request_builder.py @@ -80,14 +80,14 @@ def to_get_request_information(self,request_configuration: Optional[EmployeeExpe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EmployeeExperience] = None, request_configuration: Optional[EmployeeExperienceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[EmployeeExperience] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/employee_experience/learning_course_activities/count/count_request_builder.py b/msgraph/generated/employee_experience/learning_course_activities/count/count_request_builder.py index 3f98eb812a3..60f7501c9d8 100644 --- a/msgraph/generated/employee_experience/learning_course_activities/count/count_request_builder.py +++ b/msgraph/generated/employee_experience/learning_course_activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py b/msgraph/generated/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py index 5cd39c31a41..7ffa1bc1060 100644 --- a/msgraph/generated/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py +++ b/msgraph/generated/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[LearningCourseActivityItem async def get(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderGetRequestConfiguration] = 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. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. 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 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[LearningC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningCourseActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[LearningCourseActivity] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class LearningCourseActivityItemRequestBuilderGetQueryParameters(): """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/employee_experience/learning_course_activities/learning_course_activities_request_builder.py b/msgraph/generated/employee_experience/learning_course_activities/learning_course_activities_request_builder.py index 94866c01190..464b2c67a7e 100644 --- a/msgraph/generated/employee_experience/learning_course_activities/learning_course_activities_request_builder.py +++ b/msgraph/generated/employee_experience/learning_course_activities/learning_course_activities_request_builder.py @@ -45,7 +45,7 @@ def by_learning_course_activity_id(self,learning_course_activity_id: str) -> Lea async def get(self,request_configuration: Optional[LearningCourseActivitiesRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningCourseActivityCollectionResponse]: """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningCourseActivityCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[LearningCourseActivity] = None, request_confi def to_get_request_information(self,request_configuration: Optional[LearningCourseActivitiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[LearningCourseActivity] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LearningCourseActivitiesRequestBuilderGetQueryParameters(): """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/employee_experience/learning_providers/count/count_request_builder.py b/msgraph/generated/employee_experience/learning_providers/count/count_request_builder.py index db90699acf4..08a740d8896 100644 --- a/msgraph/generated/employee_experience/learning_providers/count/count_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_contents/count/count_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_contents/count/count_request_builder.py index c2dd8f129ce..1caf5cb690f 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_contents/count/count_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_contents/item/learning_content_item_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_contents/item/learning_content_item_request_builder.py index 01daee513ea..61b0b014cde 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_contents/item/learning_content_item_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_contents/item/learning_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[LearningContentItemRequest async def get(self,request_configuration: Optional[LearningContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningContent]: """ - Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. + Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. This API is available in the following national cloud deployments. 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 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[LearningC Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LearningContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. + Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[LearningContent] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class LearningContentItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class LearningContentItemRequestBuilderGetQueryParameters(): """ - Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. + Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_contents/learning_contents_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_contents/learning_contents_request_builder.py index 8d94f6e083f..811d7a9fa9b 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_contents/learning_contents_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_contents/learning_contents_request_builder.py @@ -45,7 +45,7 @@ def by_learning_content_id(self,learning_content_id: str) -> LearningContentItem async def get(self,request_configuration: Optional[LearningContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningContentCollectionResponse]: """ - Get a list of the learningContent resources and their properties. This list represents the metadata of the specified provider's content in Viva Learning. + Get a list of the learningContent resources and their properties. This list represents the metadata of the specified provider's content in Viva Learning. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/learningprovider-list-learningcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[LearningContent] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[LearningContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the learningContent resources and their properties. This list represents the metadata of the specified provider's content in Viva Learning. + Get a list of the learningContent resources and their properties. This list represents the metadata of the specified provider's content in Viva Learning. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningContent] = None, request_configuration: Optional[LearningContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[LearningContent] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LearningContentsRequestBuilderGetQueryParameters(): """ - Get a list of the learningContent resources and their properties. This list represents the metadata of the specified provider's content in Viva Learning. + Get a list of the learningContent resources and their properties. This list represents the metadata of the specified provider's content in Viva Learning. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/count/count_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/count/count_request_builder.py index a3042f94714..f1169382a79 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/count/count_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/item/learning_course_activity_item_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/item/learning_course_activity_item_request_builder.py index 0a8faeff3bb..49c0ff1edac 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/item/learning_course_activity_item_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/item/learning_course_activity_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a learningCourseActivity object by using the course activity ID of either an assignment or a self-initiated activity. + Delete a learningCourseActivity object by using the course activity ID of either an assignment or a self-initiated activity. This API is available in the following national cloud deployments. 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 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[LearningCourseActivityItemReq async def patch(self,body: Optional[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivityItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LearningCourseActivity]: """ - Update the properties of a learningCourseActivity object. + Update the properties of a learningCourseActivity object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningCourseActivity] @@ -94,17 +94,17 @@ async def patch(self,body: Optional[LearningCourseActivity] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a learningCourseActivity object by using the course activity ID of either an assignment or a self-initiated activity. + Delete a learningCourseActivity object by using the course activity ID of either an assignment or a self-initiated activity. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[LearningCour Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningCourseActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a learningCourseActivity object. + Update the properties of a learningCourseActivity object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[LearningCourseActivity] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/learning_course_activities_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/learning_course_activities_request_builder.py index 9bd22f9625f..0a3e5238d84 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/learning_course_activities_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities/learning_course_activities_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[LearningCourseActivitiesReque async def post(self,body: Optional[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesRequestBuilderPostRequestConfiguration] = None) -> Optional[LearningCourseActivity]: """ - Create a new learningCourseActivity object. A learning course activity can be one of two types: - Assignment- Self-initiated Use this method to create either type of activity. + Create a new learningCourseActivity object. A learning course activity can be one of two types: - Assignment- Self-initiated Use this method to create either type of activity. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningCourseActivity] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[LearningCour Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new learningCourseActivity object. A learning course activity can be one of two types: - Assignment- Self-initiated Use this method to create either type of activity. + Create a new learningCourseActivity object. A learning course activity can be one of two types: - Assignment- Self-initiated Use this method to create either type of activity. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[LearningCourseActivity] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 2999d64b35c..4fd3dd85fb3 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 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[LearningProviderItemReques async def get(self,request_configuration: Optional[LearningProviderItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningProvider]: """ - Read the properties and relationships of a learningProvider object. + Read the properties and relationships of a learningProvider object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningProvider] Find more info here: https://learn.microsoft.com/graph/api/learningprovider-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[LearningProviderItemRequestBu async def patch(self,body: Optional[LearningProvider] = None, request_configuration: Optional[LearningProviderItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LearningProvider]: """ - Update the properties of a learningProvider object. + Update the properties of a learningProvider object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningProvider] @@ -102,34 +102,34 @@ def to_delete_request_information(self,request_configuration: Optional[LearningP Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LearningProviderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a learningProvider object. + Read the properties and relationships of a learningProvider object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningProvider] = None, request_configuration: Optional[LearningProviderItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a learningProvider object. + Update the properties of a learningProvider object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[LearningProvider] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class LearningProviderItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class LearningProviderItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a learningProvider object. + Read the properties and relationships of a learningProvider object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/employee_experience/learning_providers/learning_providers_request_builder.py b/msgraph/generated/employee_experience/learning_providers/learning_providers_request_builder.py index b9b07e417d8..850acec9408 100644 --- a/msgraph/generated/employee_experience/learning_providers/learning_providers_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/learning_providers_request_builder.py @@ -45,7 +45,7 @@ def by_learning_provider_id(self,learning_provider_id: str) -> LearningProviderI async def get(self,request_configuration: Optional[LearningProvidersRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningProviderCollectionResponse]: """ - Get a list of the learningProvider resources registered in Viva Learning for a tenant. + Get a list of the learningProvider resources registered in Viva Learning for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningProviderCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/employeeexperience-list-learningproviders?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[LearningProvidersRequestBuild async def post(self,body: Optional[LearningProvider] = None, request_configuration: Optional[LearningProvidersRequestBuilderPostRequestConfiguration] = None) -> Optional[LearningProvider]: """ - Create a new learningProvider object and register it with Viva Learning using the specified display name and logos for different themes. + Create a new learningProvider object and register it with Viva Learning using the specified display name and logos for different themes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningProvider] @@ -92,24 +92,24 @@ async def post(self,body: Optional[LearningProvider] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[LearningProvidersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the learningProvider resources registered in Viva Learning for a tenant. + Get a list of the learningProvider resources registered in Viva Learning for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LearningProvider] = None, request_configuration: Optional[LearningProvidersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new learningProvider object and register it with Viva Learning using the specified display name and logos for different themes. + Create a new learningProvider object and register it with Viva Learning using the specified display name and logos for different themes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[LearningProvider] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LearningProvidersRequestBuilderGetQueryParameters(): """ - Get a list of the learningProvider resources registered in Viva Learning for a tenant. + Get a list of the learningProvider resources registered in Viva Learning for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/connections_request_builder.py b/msgraph/generated/external/connections/connections_request_builder.py index 8e88f2dd6a1..0e78e9d6de8 100644 --- a/msgraph/generated/external/connections/connections_request_builder.py +++ b/msgraph/generated/external/connections/connections_request_builder.py @@ -45,7 +45,7 @@ def by_external_connection_id(self,external_connection_id: str) -> ExternalConne async def get(self,request_configuration: Optional[ConnectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalConnectionCollectionResponse]: """ - Get a list of the externalConnection objects and their properties. + Get a list of the externalConnection objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalConnectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ConnectionsRequestBuilderGetR async def post(self,body: Optional[ExternalConnection] = None, request_configuration: Optional[ConnectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[ExternalConnection]: """ - Create a new externalConnection object. + Create a new externalConnection object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalConnection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ExternalConnection] = None, request_configura def to_get_request_information(self,request_configuration: Optional[ConnectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the externalConnection objects and their properties. + Get a list of the externalConnection objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalConnection] = None, request_configuration: Optional[ConnectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new externalConnection object. + Create a new externalConnection object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ExternalConnection] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ConnectionsRequestBuilderGetQueryParameters(): """ - Get a list of the externalConnection objects and their properties. + Get a list of the externalConnection objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/count/count_request_builder.py b/msgraph/generated/external/connections/count/count_request_builder.py index f5ef814bfe8..10756df4c7f 100644 --- a/msgraph/generated/external/connections/count/count_request_builder.py +++ b/msgraph/generated/external/connections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/external/connections/item/external_connection_item_request_builder.py b/msgraph/generated/external/connections/item/external_connection_item_request_builder.py index b2054d5520d..2991ba12183 100644 --- a/msgraph/generated/external/connections/item/external_connection_item_request_builder.py +++ b/msgraph/generated/external/connections/item/external_connection_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExternalConnectionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes an externalConnection object. + Deletes an externalConnection object. This API is available in the following national cloud deployments. 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/externalconnectors-externalconnection-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ExternalConnectionItemRequ async def get(self,request_configuration: Optional[ExternalConnectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalConnection]: """ - Read the properties and relationships of an externalConnection object. + Read the properties and relationships of an externalConnection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalConnection] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-get?view=graph-rest-1.0 @@ -74,7 +74,7 @@ async def get(self,request_configuration: Optional[ExternalConnectionItemRequest async def patch(self,body: Optional[ExternalConnection] = None, request_configuration: Optional[ExternalConnectionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ExternalConnection]: """ - Update the properties of an externalConnection object. + Update the properties of an externalConnection object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalConnection] @@ -99,39 +99,39 @@ async def patch(self,body: Optional[ExternalConnection] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ExternalConnectionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes an externalConnection object. + Deletes an externalConnection object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalConnectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an externalConnection object. + Read the properties and relationships of an externalConnection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalConnection] = None, request_configuration: Optional[ExternalConnectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an externalConnection object. + Update the properties of an externalConnection object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[ExternalConnection] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class ExternalConnectionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ExternalConnectionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an externalConnection object. + Read the properties and relationships of an externalConnection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/groups/count/count_request_builder.py b/msgraph/generated/external/connections/item/groups/count/count_request_builder.py index c953e04dd7e..916f12aff62 100644 --- a/msgraph/generated/external/connections/item/groups/count/count_request_builder.py +++ b/msgraph/generated/external/connections/item/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/external/connections/item/groups/groups_request_builder.py b/msgraph/generated/external/connections/item/groups/groups_request_builder.py index f1617bb9ea7..3285e6785fe 100644 --- a/msgraph/generated/external/connections/item/groups/groups_request_builder.py +++ b/msgraph/generated/external/connections/item/groups/groups_request_builder.py @@ -45,7 +45,7 @@ def by_external_group_id(self,external_group_id: str) -> ExternalGroupItemReques async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalGroupCollectionResponse]: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroupCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[ExternalGroup] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[ExternalGroup]: """ - Create a new externalGroup object. + Create a new externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroup] @@ -91,24 +91,24 @@ async def post(self,body: Optional[ExternalGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalGroup] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new externalGroup object. + Create a new externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ExternalGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/groups/item/external_group_item_request_builder.py b/msgraph/generated/external/connections/item/groups/item/external_group_item_request_builder.py index d261ed96b1d..04fdbbfb9d0 100644 --- a/msgraph/generated/external/connections/item/groups/item/external_group_item_request_builder.py +++ b/msgraph/generated/external/connections/item/groups/item/external_group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExternalGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an externalGroup object. + Delete an externalGroup object. This API is available in the following national cloud deployments. 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/externalconnectors-externalgroup-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ExternalGroupItemRequestBu async def get(self,request_configuration: Optional[ExternalGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalGroup]: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroup] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalgroup-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ExternalGroupItemRequestBuild async def patch(self,body: Optional[ExternalGroup] = None, request_configuration: Optional[ExternalGroupItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ExternalGroup]: """ - Update the properties of an externalGroup object. + Update the properties of an externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalGroup] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ExternalGroup] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[ExternalGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an externalGroup object. + Delete an externalGroup object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalGroup] = None, request_configuration: Optional[ExternalGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an externalGroup object. + Update the properties of an externalGroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ExternalGroup] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ExternalGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ExternalGroupItemRequestBuilderGetQueryParameters(): """ - Get an externalGroup object. + Get an externalGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/groups/item/members/count/count_request_builder.py b/msgraph/generated/external/connections/item/groups/item/members/count/count_request_builder.py index 5331ca29cf3..0fe0354300e 100644 --- a/msgraph/generated/external/connections/item/groups/item/members/count/count_request_builder.py +++ b/msgraph/generated/external/connections/item/groups/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/external/connections/item/groups/item/members/item/identity_item_request_builder.py b/msgraph/generated/external/connections/item/groups/item/members/item/identity_item_request_builder.py index 1d76b15de9e..c7b437088f3 100644 --- a/msgraph/generated/external/connections/item/groups/item/members/item/identity_item_request_builder.py +++ b/msgraph/generated/external/connections/item/groups/item/members/item/identity_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[IdentityItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an identity resource to remove the corresponding member from an externalGroup. + Delete an identity resource to remove the corresponding member from an externalGroup. This API is available in the following national cloud deployments. 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/externalconnectors-identity-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalgroupmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -93,17 +93,17 @@ async def patch(self,body: Optional[Identity] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[IdentityItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an identity resource to remove the corresponding member from an externalGroup. + Delete an identity resource to remove the corresponding member from an externalGroup. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Identity] = None, request_configuration: Optional[IdentityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Identity] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/external/connections/item/groups/item/members/members_request_builder.py b/msgraph/generated/external/connections/item/groups/item/members/members_request_builder.py index 1ccdc57e322..cf55f76dac9 100644 --- a/msgraph/generated/external/connections/item/groups/item/members/members_request_builder.py +++ b/msgraph/generated/external/connections/item/groups/item/members/members_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[Identity] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[Identity]: """ - Create an identity resource for a new member in an externalGroup. + Create an identity resource for a new member in an externalGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Identity] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[MembersReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Identity] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an identity resource for a new member in an externalGroup. + Create an identity resource for a new member in an externalGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Identity] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/external/connections/item/items/count/count_request_builder.py b/msgraph/generated/external/connections/item/items/count/count_request_builder.py index 0574d8acd82..ab4f4954c1b 100644 --- a/msgraph/generated/external/connections/item/items/count/count_request_builder.py +++ b/msgraph/generated/external/connections/item/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/external/connections/item/items/item/activities/activities_request_builder.py b/msgraph/generated/external/connections/item/items/item/activities/activities_request_builder.py index fde58eeb242..57dfedbdf37 100644 --- a/msgraph/generated/external/connections/item/items/item/activities/activities_request_builder.py +++ b/msgraph/generated/external/connections/item/items/item/activities/activities_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivitiesRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalActivity] = None, request_configuration: Optional[ActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ExternalActivity] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/external/connections/item/items/item/activities/count/count_request_builder.py b/msgraph/generated/external/connections/item/items/item/activities/count/count_request_builder.py index 12cb7ec9ae6..89e9c703f0f 100644 --- a/msgraph/generated/external/connections/item/items/item/activities/count/count_request_builder.py +++ b/msgraph/generated/external/connections/item/items/item/activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/external/connections/item/items/item/activities/item/external_activity_item_request_builder.py b/msgraph/generated/external/connections/item/items/item/activities/item/external_activity_item_request_builder.py index a458ab3c230..80d403c5932 100644 --- a/msgraph/generated/external/connections/item/items/item/activities/item/external_activity_item_request_builder.py +++ b/msgraph/generated/external/connections/item/items/item/activities/item/external_activity_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ExternalA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ExternalActi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalActivity] = None, request_configuration: Optional[ExternalActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ExternalActivity] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/external/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py b/msgraph/generated/external/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py index 852c670cc94..a55c91ad82e 100644 --- a/msgraph/generated/external/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py +++ b/msgraph/generated/external/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PerformedByR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PerformedByRequestBuilder: diff --git a/msgraph/generated/external/connections/item/items/item/external_item_item_request_builder.py b/msgraph/generated/external/connections/item/items/item/external_item_item_request_builder.py index 71bb08c9f62..96869dbdda1 100644 --- a/msgraph/generated/external/connections/item/items/item/external_item_item_request_builder.py +++ b/msgraph/generated/external/connections/item/items/item/external_item_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExternalItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an externalItem object. + Delete an externalItem object. This API is available in the following national cloud deployments. 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/externalconnectors-externalitem-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[ExternalItemItemRequestBui async def get(self,request_configuration: Optional[ExternalItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalItem]: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalItem] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalitem-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def put(self,body: Optional[ExternalItem] = None, request_configuration: O def to_delete_request_information(self,request_configuration: Optional[ExternalItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an externalItem object. + Delete an externalItem object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExternalItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[ExternalItem] = None, request_configuration: Optional[ExternalItemItemRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_put_request_information(self,body: Optional[ExternalItem] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class ExternalItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class ExternalItemItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.py b/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.py similarity index 92% rename from msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.py rename to msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.py index 9c92a8ddb16..e9d96a906ef 100644 --- a/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.py +++ b/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddActivitiesResponse(BaseCollectionPaginationCountResponse): +class AddActivitiesPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ExternalActivityResult]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddActivitiesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddActivitiesPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddActivitiesResponse + Returns: AddActivitiesPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddActivitiesResponse() + return AddActivitiesPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py b/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py index 32bff8f90f2..61cb9296c95 100644 --- a/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py +++ b/msgraph/generated/external/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .add_activities_post_request_body import AddActivitiesPostRequestBody - from .add_activities_response import AddActivitiesResponse + from .add_activities_post_response import AddActivitiesPostResponse class MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/external/connections/{externalConnection%2Did}/items/{externalItem%2Did}/microsoft.graph.externalConnectors.addActivities", path_parameters) - async def post(self,body: Optional[AddActivitiesPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilderPostRequestConfiguration] = None) -> Optional[AddActivitiesResponse]: + async def post(self,body: Optional[AddActivitiesPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilderPostRequestConfiguration] = None) -> Optional[AddActivitiesPostResponse]: """ Invoke action addActivities param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddActivitiesResponse] + Returns: Optional[AddActivitiesPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[AddActivitiesPostRequestBody] = None, request } if not self.request_adapter: raise Exception("Http core is null") - from .add_activities_response import AddActivitiesResponse + from .add_activities_post_response import AddActivitiesPostResponse - return await self.request_adapter.send_async(request_info, AddActivitiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddActivitiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddActivitiesPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[AddActivitiesPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/external/connections/item/items/items_request_builder.py b/msgraph/generated/external/connections/item/items/items_request_builder.py index ae28b9b1be5..e4f467a7315 100644 --- a/msgraph/generated/external/connections/item/items/items_request_builder.py +++ b/msgraph/generated/external/connections/item/items/items_request_builder.py @@ -45,7 +45,7 @@ def by_external_item_id(self,external_item_id: str) -> ExternalItemItemRequestBu async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExternalItemCollectionResponse]: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExternalItemCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[ExternalItem] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ExternalItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ExternalItem] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ItemsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an externalItem object. + Read the properties and relationships of an externalItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/operations/count/count_request_builder.py b/msgraph/generated/external/connections/item/operations/count/count_request_builder.py index 696c169dc8f..33f2966be37 100644 --- a/msgraph/generated/external/connections/item/operations/count/count_request_builder.py +++ b/msgraph/generated/external/connections/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/external/connections/item/operations/item/connection_operation_item_request_builder.py b/msgraph/generated/external/connections/item/operations/item/connection_operation_item_request_builder.py index b54ce54a1cf..9fb8a32fa87 100644 --- a/msgraph/generated/external/connections/item/operations/item/connection_operation_item_request_builder.py +++ b/msgraph/generated/external/connections/item/operations/item/connection_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ConnectionOperationItemReq async def get(self,request_configuration: Optional[ConnectionOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConnectionOperation]: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectionOperation] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-connectionoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Connectio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConnectionOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConnectionOperation] = None, request_configuration: Optional[ConnectionOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ConnectionOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ConnectionOperationItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ConnectionOperationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/operations/operations_request_builder.py b/msgraph/generated/external/connections/item/operations/operations_request_builder.py index 5dc252780a0..e349622e93c 100644 --- a/msgraph/generated/external/connections/item/operations/operations_request_builder.py +++ b/msgraph/generated/external/connections/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_connection_operation_id(self,connection_operation_id: str) -> ConnectionO async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ConnectionOperationCollectionResponse]: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectionOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[ConnectionOperation] = None, request_configur def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConnectionOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ConnectionOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a connectionOperation object. + Read the properties and relationships of a connectionOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/connections/item/schema/schema_request_builder.py b/msgraph/generated/external/connections/item/schema/schema_request_builder.py index 0c49549d375..219c1b1147c 100644 --- a/msgraph/generated/external/connections/item/schema/schema_request_builder.py +++ b/msgraph/generated/external/connections/item/schema/schema_request_builder.py @@ -26,28 +26,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/external/connections/{externalConnection%2Did}/schema{?%24select,%24expand}", path_parameters) - async def delete(self,request_configuration: Optional[SchemaRequestBuilderDeleteRequestConfiguration] = None) -> None: - """ - Delete navigation property schema for external - 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[SchemaRequestBuilderGetRequestConfiguration] = None) -> Optional[Schema]: """ - Read the properties and relationships of a schema object. + Read the properties and relationships of a schema object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schema] Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-schema-get?view=graph-rest-1.0 @@ -69,10 +50,11 @@ async def get(self,request_configuration: Optional[SchemaRequestBuilderGetReques async def patch(self,body: Optional[Schema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> Optional[Schema]: """ - Update the navigation property schema in external + Create a new schema object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schema] + Find more info here: https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-patch-schema?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -91,41 +73,26 @@ async def patch(self,body: Optional[Schema] = None, request_configuration: Optio return await self.request_adapter.send_async(request_info, Schema, error_mapping) - def to_delete_request_information(self,request_configuration: Optional[SchemaRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Delete navigation property schema for external + Read the properties and relationships of a schema object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) - return request_info - - def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: - """ - Read the properties and relationships of a schema object. - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - request_info = RequestInformation() request_info.url_template = self.url_template request_info.path_parameters = self.path_parameters request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(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.headers.try_add("Accept", "application/json") return request_info def to_patch_request_information(self,body: Optional[Schema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the navigation property schema in external + Create a new schema object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +100,13 @@ def to_patch_request_information(self,body: Optional[Schema] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -153,20 +120,10 @@ def with_url(self,raw_url: Optional[str] = None) -> SchemaRequestBuilder: raise TypeError("raw_url cannot be null.") return SchemaRequestBuilder(self.request_adapter, raw_url) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class SchemaRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - """ - Configuration for the request such as headers, query parameters, and middleware options. - """ - @dataclass class SchemaRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a schema object. + Read the properties and relationships of a schema object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/external/external_request_builder.py b/msgraph/generated/external/external_request_builder.py index 2ec17d98b02..e316d8596ee 100644 --- a/msgraph/generated/external/external_request_builder.py +++ b/msgraph/generated/external/external_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[ExternalRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[External] = None, request_configuration: Optional[ExternalRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[External] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/filter_operators/count/count_request_builder.py b/msgraph/generated/filter_operators/count/count_request_builder.py index ec86192ac2c..d450e209d73 100644 --- a/msgraph/generated/filter_operators/count/count_request_builder.py +++ b/msgraph/generated/filter_operators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/filter_operators/filter_operators_request_builder.py b/msgraph/generated/filter_operators/filter_operators_request_builder.py index 5e9e68f0c56..b17cfb2bf9b 100644 --- a/msgraph/generated/filter_operators/filter_operators_request_builder.py +++ b/msgraph/generated/filter_operators/filter_operators_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterOperat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FilterOperatorSchema] = None, request_configuration: Optional[FilterOperatorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[FilterOperatorSchema] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/filter_operators/item/filter_operator_schema_item_request_builder.py b/msgraph/generated/filter_operators/item/filter_operator_schema_item_request_builder.py index 647472ec69e..5e46104df32 100644 --- a/msgraph/generated/filter_operators/item/filter_operator_schema_item_request_builder.py +++ b/msgraph/generated/filter_operators/item/filter_operator_schema_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FilterOpe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FilterOperatorSchemaItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterOperat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FilterOperatorSchema] = None, request_configuration: Optional[FilterOperatorSchemaItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FilterOperatorSchema] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/functions/count/count_request_builder.py b/msgraph/generated/functions/count/count_request_builder.py index c5aae2c58a1..bef9972fde6 100644 --- a/msgraph/generated/functions/count/count_request_builder.py +++ b/msgraph/generated/functions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/functions/functions_request_builder.py b/msgraph/generated/functions/functions_request_builder.py index c6c4847c81b..cf93d4bc6fc 100644 --- a/msgraph/generated/functions/functions_request_builder.py +++ b/msgraph/generated/functions/functions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[FunctionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttributeMappingFunctionSchema] = None, request_configuration: Optional[FunctionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AttributeMappingFunctionSche if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/functions/item/attribute_mapping_function_schema_item_request_builder.py b/msgraph/generated/functions/item/attribute_mapping_function_schema_item_request_builder.py index 3b5a5c274e8..00e8e31bb64 100644 --- a/msgraph/generated/functions/item/attribute_mapping_function_schema_item_request_builder.py +++ b/msgraph/generated/functions/item/attribute_mapping_function_schema_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attribute Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttributeMappingFunctionSchemaItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AttributeMap Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttributeMappingFunctionSchema] = None, request_configuration: Optional[AttributeMappingFunctionSchemaItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AttributeMappingFunctionSch if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_lifecycle_policies/count/count_request_builder.py b/msgraph/generated/group_lifecycle_policies/count/count_request_builder.py index 8be3300e41d..e0269d7046e 100644 --- a/msgraph/generated/group_lifecycle_policies/count/count_request_builder.py +++ b/msgraph/generated/group_lifecycle_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/group_lifecycle_policies/group_lifecycle_policies_request_builder.py b/msgraph/generated/group_lifecycle_policies/group_lifecycle_policies_request_builder.py index 1dc146aae4f..33979e7f245 100644 --- a/msgraph/generated/group_lifecycle_policies/group_lifecycle_policies_request_builder.py +++ b/msgraph/generated/group_lifecycle_policies/group_lifecycle_policies_request_builder.py @@ -45,7 +45,7 @@ def by_group_lifecycle_policy_id(self,group_lifecycle_policy_id: str) -> GroupLi async def get(self,request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupLifecyclePolicyCollectionResponse]: """ - List all the groupLifecyclePolicies. + List all the groupLifecyclePolicies. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupLifecyclePolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/grouplifecyclepolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[GroupLifecyclePoliciesRequest async def post(self,body: Optional[GroupLifecyclePolicy] = None, request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[GroupLifecyclePolicy]: """ - Creates a new groupLifecyclePolicy. + Creates a new groupLifecyclePolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupLifecyclePolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[GroupLifecyclePolicy] = None, request_configu def to_get_request_information(self,request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the groupLifecyclePolicies. + List all the groupLifecyclePolicies. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupLifecyclePolicy] = None, request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Creates a new groupLifecyclePolicy. + Creates a new groupLifecyclePolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[GroupLifecyclePolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupLifecyclePoliciesRequestBuilderGetQueryParameters(): """ - List all the groupLifecyclePolicies. + List all the groupLifecyclePolicies. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_response.py b/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_post_response.py similarity index 91% rename from msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_response.py rename to msgraph/generated/group_lifecycle_policies/item/add_group/add_group_post_response.py index f9b145e0025..235f55a3e40 100644 --- a/msgraph/generated/admin/service_announcement/messages/mark_read/mark_read_response.py +++ b/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class MarkReadResponse(AdditionalDataHolder, BackedModel, Parsable): +class AddGroupPostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class MarkReadResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MarkReadResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddGroupPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: MarkReadResponse + Returns: AddGroupPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return MarkReadResponse() + return AddGroupPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_request_builder.py b/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_request_builder.py index 831063ee5a9..e3a2e664311 100644 --- a/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_request_builder.py +++ b/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .add_group_post_request_body import AddGroupPostRequestBody - from .add_group_response import AddGroupResponse + from .add_group_post_response import AddGroupPostResponse class AddGroupRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupLifecyclePolicies/{groupLifecyclePolicy%2Did}/addGroup", path_parameters) - async def post(self,body: Optional[AddGroupPostRequestBody] = None, request_configuration: Optional[AddGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[AddGroupResponse]: + async def post(self,body: Optional[AddGroupPostRequestBody] = None, request_configuration: Optional[AddGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[AddGroupPostResponse]: """ - Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. + Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddGroupResponse] + Returns: Optional[AddGroupPostResponse] Find more info here: https://learn.microsoft.com/graph/api/grouplifecyclepolicy-addgroup?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddGroupPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .add_group_response import AddGroupResponse + from .add_group_post_response import AddGroupPostResponse - return await self.request_adapter.send_async(request_info, AddGroupResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddGroupPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddGroupPostRequestBody] = None, request_configuration: Optional[AddGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. + Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddGroupPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_response.py b/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_response.py deleted file mode 100644 index 5f12d0c2766..00000000000 --- a/msgraph/generated/group_lifecycle_policies/item/add_group/add_group_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 AddGroupResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddGroupResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddGroupResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return AddGroupResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py b/msgraph/generated/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py index d21e0c722eb..3d99fd60bb0 100644 --- a/msgraph/generated/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py +++ b/msgraph/generated/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a groupLifecyclePolicy. + Delete a groupLifecyclePolicy. This API is available in the following national cloud deployments. 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/grouplifecyclepolicy-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[GroupLifecyclePolicyItemRe async def get(self,request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupLifecyclePolicy]: """ - Retrieve the properties and relationships of a groupLifecyclePolicies object. + Retrieve the properties and relationships of a groupLifecyclePolicies object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupLifecyclePolicy] Find more info here: https://learn.microsoft.com/graph/api/grouplifecyclepolicy-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[GroupLifecyclePolicyItemReque async def patch(self,body: Optional[GroupLifecyclePolicy] = None, request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[GroupLifecyclePolicy]: """ - Update the properties of a groupLifecyclePolicygroupLifecyclePolicy resource type object. + Update the properties of a groupLifecyclePolicygroupLifecyclePolicy resource type object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupLifecyclePolicy] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[GroupLifecyclePolicy] = None, request_config def to_delete_request_information(self,request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a groupLifecyclePolicy. + Delete a groupLifecyclePolicy. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a groupLifecyclePolicies object. + Retrieve the properties and relationships of a groupLifecyclePolicies object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupLifecyclePolicy] = None, request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a groupLifecyclePolicygroupLifecyclePolicy resource type object. + Update the properties of a groupLifecyclePolicygroupLifecyclePolicy resource type object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[GroupLifecyclePolicy] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class GroupLifecyclePolicyItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class GroupLifecyclePolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a groupLifecyclePolicies object. + Retrieve the properties and relationships of a groupLifecyclePolicies object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_post_response.py b/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_post_response.py new file mode 100644 index 00000000000..4180cc5f009 --- /dev/null +++ b/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_post_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 RemoveGroupPostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemoveGroupPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RemoveGroupPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RemoveGroupPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py b/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py index 0bd6e83d87a..56effc3e7cf 100644 --- a/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py +++ b/msgraph/generated/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .remove_group_post_request_body import RemoveGroupPostRequestBody - from .remove_group_response import RemoveGroupResponse + from .remove_group_post_response import RemoveGroupPostResponse class RemoveGroupRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupLifecyclePolicies/{groupLifecyclePolicy%2Did}/removeGroup", path_parameters) - async def post(self,body: Optional[RemoveGroupPostRequestBody] = None, request_configuration: Optional[RemoveGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[RemoveGroupResponse]: + async def post(self,body: Optional[RemoveGroupPostRequestBody] = None, request_configuration: Optional[RemoveGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[RemoveGroupPostResponse]: """ - Removes a group from a lifecycle policy. + Removes a group from a lifecycle policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RemoveGroupResponse] + Returns: Optional[RemoveGroupPostResponse] Find more info here: https://learn.microsoft.com/graph/api/grouplifecyclepolicy-removegroup?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[RemoveGroupPostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .remove_group_response import RemoveGroupResponse + from .remove_group_post_response import RemoveGroupPostResponse - return await self.request_adapter.send_async(request_info, RemoveGroupResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RemoveGroupPostResponse, error_mapping) def to_post_request_information(self,body: Optional[RemoveGroupPostRequestBody] = None, request_configuration: Optional[RemoveGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Removes a group from a lifecycle policy. + Removes a group from a lifecycle policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RemoveGroupPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/count/count_request_builder.py b/msgraph/generated/group_setting_templates/count/count_request_builder.py index 5cfd3b7d582..a34c0f48ea9 100644 --- a/msgraph/generated/group_setting_templates/count/count_request_builder.py +++ b/msgraph/generated/group_setting_templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/group_setting_templates/delta/delta_response.py b/msgraph/generated/group_setting_templates/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/group_setting_templates/delta/delta_response.py rename to msgraph/generated/group_setting_templates/delta/delta_get_response.py index 41ac4f7e1c6..9896959749d 100644 --- a/msgraph/generated/group_setting_templates/delta/delta_response.py +++ b/msgraph/generated/group_setting_templates/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[DirectoryObject]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/group_setting_templates/delta/delta_request_builder.py b/msgraph/generated/group_setting_templates/delta/delta_request_builder.py index 3369e341ae3..c3f839abbdf 100644 --- a/msgraph/generated/group_setting_templates/delta/delta_request_builder.py +++ b/msgraph/generated/group_setting_templates/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/group_setting_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py index a00b4d1a6ad..4e139e64b94 100644 --- a/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/group_setting_templates/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/group_setting_templates/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/group_setting_templates/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_request_builder.py index fbb010c707d..381680a8324 100644 --- a/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_response.py b/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/group_setting_templates/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/group_setting_templates/group_setting_templates_request_builder.py b/msgraph/generated/group_setting_templates/group_setting_templates_request_builder.py index 6872cc36413..b3cbc644450 100644 --- a/msgraph/generated/group_setting_templates/group_setting_templates_request_builder.py +++ b/msgraph/generated/group_setting_templates/group_setting_templates_request_builder.py @@ -49,7 +49,7 @@ def by_group_setting_template_id(self,group_setting_template_id: str) -> GroupSe async def get(self,request_configuration: Optional[GroupSettingTemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupSettingTemplateCollectionResponse]: """ - Group setting templates represents a set of templates from which group settings may be created and used within a tenant. This operation retrieves the list of available groupSettingTemplates objects. + Group setting templates represents a set of templates from which group settings may be created and used within a tenant. This operation retrieves the list of available groupSettingTemplates objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSettingTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/groupsettingtemplate-list?view=graph-rest-1.0 @@ -95,19 +95,19 @@ async def post(self,body: Optional[GroupSettingTemplate] = None, request_configu def to_get_request_information(self,request_configuration: Optional[GroupSettingTemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Group setting templates represents a set of templates from which group settings may be created and used within a tenant. This operation retrieves the list of available groupSettingTemplates objects. + Group setting templates represents a set of templates from which group settings may be created and used within a tenant. This operation retrieves the list of available groupSettingTemplates objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupSettingTemplate] = None, request_configuration: Optional[GroupSettingTemplatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[GroupSettingTemplate] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class GroupSettingTemplatesRequestBuilderGetQueryParameters(): """ - Group setting templates represents a set of templates from which group settings may be created and used within a tenant. This operation retrieves the list of available groupSettingTemplates objects. + Group setting templates represents a set of templates from which group settings may be created and used within a tenant. This operation retrieves the list of available groupSettingTemplates objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_request_builder.py index 8284d42b000..36ecc257f1f 100644 --- a/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/{groupSettingTemplate%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/group_setting_templates/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_request_builder.py index 9a7dfae119a..86242ce6905 100644 --- a/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/{groupSettingTemplate%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/group_setting_templates/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_request_builder.py index c5e57fe784b..1b51eec5dcb 100644 --- a/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/{groupSettingTemplate%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/group_setting_templates/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_request_builder.py index ec9c51cf04f..2eb60079aaf 100644 --- a/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groupSettingTemplates/{groupSettingTemplate%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/group_setting_templates/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/group_setting_templates/item/group_setting_template_item_request_builder.py b/msgraph/generated/group_setting_templates/item/group_setting_template_item_request_builder.py index a292a708255..83e5907081d 100644 --- a/msgraph/generated/group_setting_templates/item/group_setting_template_item_request_builder.py +++ b/msgraph/generated/group_setting_templates/item/group_setting_template_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[GroupSettingTemplateItemRe async def get(self,request_configuration: Optional[GroupSettingTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupSettingTemplate]: """ - A group setting template represents a template of settings from which settings may be created within a tenant. This operation allows retrieval of the properties of the groupSettingTemplate object, including the available settings and their defaults. + A group setting template represents a template of settings from which settings may be created within a tenant. This operation allows retrieval of the properties of the groupSettingTemplate object, including the available settings and their defaults. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSettingTemplate] Find more info here: https://learn.microsoft.com/graph/api/groupsettingtemplate-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[GroupSett Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupSettingTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - A group setting template represents a template of settings from which settings may be created within a tenant. This operation allows retrieval of the properties of the groupSettingTemplate object, including the available settings and their defaults. + A group setting template represents a template of settings from which settings may be created within a tenant. This operation allows retrieval of the properties of the groupSettingTemplate object, including the available settings and their defaults. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupSettingTemplate] = None, request_configuration: Optional[GroupSettingTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[GroupSettingTemplate] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class GroupSettingTemplateItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class GroupSettingTemplateItemRequestBuilderGetQueryParameters(): """ - A group setting template represents a template of settings from which settings may be created within a tenant. This operation allows retrieval of the properties of the groupSettingTemplate object, including the available settings and their defaults. + A group setting template represents a template of settings from which settings may be created within a tenant. This operation allows retrieval of the properties of the groupSettingTemplate object, including the available settings and their defaults. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/group_setting_templates/item/restore/restore_request_builder.py b/msgraph/generated/group_setting_templates/item/restore/restore_request_builder.py index 5b40eea12ff..7c820da8060 100644 --- a/msgraph/generated/group_setting_templates/item/restore/restore_request_builder.py +++ b/msgraph/generated/group_setting_templates/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/group_setting_templates/validate_properties/validate_properties_request_builder.py b/msgraph/generated/group_setting_templates/validate_properties/validate_properties_request_builder.py index db7a8edfbfb..a7ddd3d41d5 100644 --- a/msgraph/generated/group_setting_templates/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/group_setting_templates/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/group_settings/count/count_request_builder.py b/msgraph/generated/group_settings/count/count_request_builder.py index 3c55c1f4b42..db9f869f35b 100644 --- a/msgraph/generated/group_settings/count/count_request_builder.py +++ b/msgraph/generated/group_settings/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/group_settings/group_settings_request_builder.py b/msgraph/generated/group_settings/group_settings_request_builder.py index a4aa3b4c0bb..6b78538cfc3 100644 --- a/msgraph/generated/group_settings/group_settings_request_builder.py +++ b/msgraph/generated/group_settings/group_settings_request_builder.py @@ -45,7 +45,7 @@ def by_group_setting_id(self,group_setting_id: str) -> GroupSettingItemRequestBu async def get(self,request_configuration: Optional[GroupSettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupSettingCollectionResponse]: """ - Retrieve a list of tenant-level or group-specific group settings objects. + Retrieve a list of tenant-level or group-specific group settings objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSettingCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-settings?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[GroupSettingsRequestBuilderGe async def post(self,body: Optional[GroupSetting] = None, request_configuration: Optional[GroupSettingsRequestBuilderPostRequestConfiguration] = None) -> Optional[GroupSetting]: """ - Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. + Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSetting] @@ -92,24 +92,24 @@ async def post(self,body: Optional[GroupSetting] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[GroupSettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tenant-level or group-specific group settings objects. + Retrieve a list of tenant-level or group-specific group settings objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupSetting] = None, request_configuration: Optional[GroupSettingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. + Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[GroupSetting] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupSettingsRequestBuilderGetQueryParameters(): """ - Retrieve a list of tenant-level or group-specific group settings objects. + Retrieve a list of tenant-level or group-specific group settings objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/group_settings/item/group_setting_item_request_builder.py b/msgraph/generated/group_settings/item/group_setting_item_request_builder.py index f90846dfb75..3d90075e64c 100644 --- a/msgraph/generated/group_settings/item/group_setting_item_request_builder.py +++ b/msgraph/generated/group_settings/item/group_setting_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupSettingItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a tenant-level or group-specific groupSetting object. + Delete a tenant-level or group-specific groupSetting object. This API is available in the following national cloud deployments. 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/groupsetting-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[GroupSettingItemRequestBui async def get(self,request_configuration: Optional[GroupSettingItemRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupSetting]: """ - Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. + Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSetting] Find more info here: https://learn.microsoft.com/graph/api/groupsetting-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[GroupSettingItemRequestBuilde async def patch(self,body: Optional[GroupSetting] = None, request_configuration: Optional[GroupSettingItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[GroupSetting]: """ - Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. + Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSetting] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[GroupSetting] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[GroupSettingItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a tenant-level or group-specific groupSetting object. + Delete a tenant-level or group-specific groupSetting object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupSettingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. + Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupSetting] = None, request_configuration: Optional[GroupSettingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. + Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[GroupSetting] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class GroupSettingItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class GroupSettingItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. + Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/count/count_request_builder.py b/msgraph/generated/groups/count/count_request_builder.py index 1d76fb0b5a0..19c1ff91447 100644 --- a/msgraph/generated/groups/count/count_request_builder.py +++ b/msgraph/generated/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/delta/delta_response.py b/msgraph/generated/groups/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/delta/delta_response.py rename to msgraph/generated/groups/delta/delta_get_response.py index 8a0d03c16d5..4a01b55ab84 100644 --- a/msgraph/generated/groups/delta/delta_response.py +++ b/msgraph/generated/groups/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Group]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/delta/delta_request_builder.py b/msgraph/generated/groups/delta/delta_request_builder.py index 7924bdd48fb..93eb0736f68 100644 --- a/msgraph/generated/groups/delta/delta_request_builder.py +++ b/msgraph/generated/groups/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_request_builder.py index 461e0c9648a..1145a273494 100644 --- a/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/groups/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/groups/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/groups/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/groups/get_by_ids/get_by_ids_request_builder.py index b3b186143c6..7cfe1c3b714 100644 --- a/msgraph/generated/groups/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/groups/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/get_by_ids/get_by_ids_response.py b/msgraph/generated/groups/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/groups/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/groups_request_builder.py b/msgraph/generated/groups/groups_request_builder.py index 2a8cf82c434..2bd7a8ddcbf 100644 --- a/msgraph/generated/groups/groups_request_builder.py +++ b/msgraph/generated/groups/groups_request_builder.py @@ -49,7 +49,7 @@ def by_group_id(self,group_id: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - List all the groups available in an organization, excluding dynamic distribution groups. To retrieve dynamic distribution groups, use the Exchange admin center. This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the group and specify the properties in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. + List all the groups available in an organization, excluding dynamic distribution groups. To retrieve dynamic distribution groups, use the Exchange admin center. This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the group and specify the properties in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[Group]: """ - Create a new group as specified in the request body. You can create the following types of groups: This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. + Create a new group as specified in the request body. You can create the following types of groups: This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -96,24 +96,24 @@ async def post(self,body: Optional[Group] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the groups available in an organization, excluding dynamic distribution groups. To retrieve dynamic distribution groups, use the Exchange admin center. This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the group and specify the properties in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. + List all the groups available in an organization, excluding dynamic distribution groups. To retrieve dynamic distribution groups, use the Exchange admin center. This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the group and specify the properties in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new group as specified in the request body. You can create the following types of groups: This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. + Create a new group as specified in the request body. You can create the following types of groups: This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -121,13 +121,13 @@ def to_post_request_information(self,body: Optional[Group] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -189,7 +189,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - List all the groups available in an organization, excluding dynamic distribution groups. To retrieve dynamic distribution groups, use the Exchange admin center. This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the group and specify the properties in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. + List all the groups available in an organization, excluding dynamic distribution groups. To retrieve dynamic distribution groups, use the Exchange admin center. This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the group and specify the properties in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/accepted_senders/accepted_senders_request_builder.py b/msgraph/generated/groups/item/accepted_senders/accepted_senders_request_builder.py index 96e5ea10a8f..ab0b15dac08 100644 --- a/msgraph/generated/groups/item/accepted_senders/accepted_senders_request_builder.py +++ b/msgraph/generated/groups/item/accepted_senders/accepted_senders_request_builder.py @@ -45,7 +45,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[AcceptedSendersRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. + Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-acceptedsenders?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[AcceptedSendersRequestBuilder def to_get_request_information(self,request_configuration: Optional[AcceptedSendersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. + Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AcceptedSendersRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class AcceptedSendersRequestBuilderGetQueryParameters(): """ - Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. + Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/accepted_senders/count/count_request_builder.py b/msgraph/generated/groups/item/accepted_senders/count/count_request_builder.py index 68ed75e6e6a..71da3b21a2b 100644 --- a/msgraph/generated/groups/item/accepted_senders/count/count_request_builder.py +++ b/msgraph/generated/groups/item/accepted_senders/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/accepted_senders/item/ref/ref_request_builder.py b/msgraph/generated/groups/item/accepted_senders/item/ref/ref_request_builder.py index c2cdcc590fc..2430156de45 100644 --- a/msgraph/generated/groups/item/accepted_senders/item/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/accepted_senders/item/ref/ref_request_builder.py @@ -52,13 +52,13 @@ def to_delete_request_information(self,request_configuration: Optional[RefReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: diff --git a/msgraph/generated/groups/item/accepted_senders/ref/ref_request_builder.py b/msgraph/generated/groups/item/accepted_senders/ref/ref_request_builder.py index 7e79af57905..ba020bca38d 100644 --- a/msgraph/generated/groups/item/accepted_senders/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/accepted_senders/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. + Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-acceptedsenders?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Specify the user or group in @odata.id in the request body. Users in the accepted senders list can post to conversations of the group. Make sure you don't specify the same user or group in the accepted senders and rejected senders lists, otherwise you'll get an error. + Specify the user or group in @odata.id in the request body. Users in the accepted senders list can post to conversations of the group. Make sure you don't specify the same user or group in the accepted senders and rejected senders lists, otherwise you'll get an error. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. + Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Specify the user or group in @odata.id in the request body. Users in the accepted senders list can post to conversations of the group. Make sure you don't specify the same user or group in the accepted senders and rejected senders lists, otherwise you'll get an error. + Specify the user or group in @odata.id in the request body. Users in the accepted senders list can post to conversations of the group. Make sure you don't specify the same user or group in the accepted senders and rejected senders lists, otherwise you'll get an error. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. + Users in the accepted senders list can post to conversations of the group (identified in the GET request URL).Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/add_favorite/add_favorite_request_builder.py b/msgraph/generated/groups/item/add_favorite/add_favorite_request_builder.py index 8f0c00e175b..de8c8ef169f 100644 --- a/msgraph/generated/groups/item/add_favorite/add_favorite_request_builder.py +++ b/msgraph/generated/groups/item/add_favorite/add_favorite_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[AddFavoriteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add the group to the list of the current user's favorite groups. Supported for Microsoft 365 groups only. + Add the group to the list of the current user's favorite groups. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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-addfavorite?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[AddFavoriteRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[AddFavoriteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add the group to the list of the current user's favorite groups. Supported for Microsoft 365 groups only. + Add the group to the list of the current user's favorite groups. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> AddFavoriteRequestBuilder: diff --git a/msgraph/generated/groups/item/app_role_assignments/app_role_assignments_request_builder.py b/msgraph/generated/groups/item/app_role_assignments/app_role_assignments_request_builder.py index 5e182d38543..37fcc954d3e 100644 --- a/msgraph/generated/groups/item/app_role_assignments/app_role_assignments_request_builder.py +++ b/msgraph/generated/groups/item/app_role_assignments/app_role_assignments_request_builder.py @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AppRoleAssignmentsRequestBuil async def post(self,body: Optional[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[AppRoleAssignment]: """ - Use this API to assign an app role to a security group. All direct members of the group will be considered assigned. Security groups with dynamic memberships are supported. To grant an app role assignment to a group, you need three identifiers: Additional licenses might be required to use a group to manage access to applications. + Use this API to assign an app role to a security group. All direct members of the group will be considered assigned. Security groups with dynamic memberships are supported. To grant an app role assignment to a group, you need three identifiers: Additional licenses might be required to use a group to manage access to applications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppRoleAssignment] @@ -97,19 +97,19 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to assign an app role to a security group. All direct members of the group will be considered assigned. Security groups with dynamic memberships are supported. To grant an app role assignment to a group, you need three identifiers: Additional licenses might be required to use a group to manage access to applications. + Use this API to assign an app role to a security group. All direct members of the group will be considered assigned. Security groups with dynamic memberships are supported. To grant an app role assignment to a group, you need three identifiers: Additional licenses might be required to use a group to manage access to applications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AppRoleAssignment] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/app_role_assignments/count/count_request_builder.py b/msgraph/generated/groups/item/app_role_assignments/count/count_request_builder.py index 18dbb207860..ec00b5c39b4 100644 --- a/msgraph/generated/groups/item/app_role_assignments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/app_role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/app_role_assignments/item/app_role_assignment_item_request_builder.py b/msgraph/generated/groups/item/app_role_assignments/item/app_role_assignment_item_request_builder.py index 2e377824ba1..3bfc2bdd163 100644 --- a/msgraph/generated/groups/item/app_role_assignments/item/app_role_assignment_item_request_builder.py +++ b/msgraph/generated/groups/item/app_role_assignments/item/app_role_assignment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes an appRoleAssignment that a group has been granted. + Deletes an appRoleAssignment that a group has been granted. This API is available in the following national cloud deployments. 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-approleassignments?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[AppRoleAssignment] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes an appRoleAssignment that a group has been granted. + Deletes an appRoleAssignment that a group has been granted. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AppRoleAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/assign_license/assign_license_request_builder.py b/msgraph/generated/groups/item/assign_license/assign_license_request_builder.py index 91af85c98d8..0433171f172 100644 --- a/msgraph/generated/groups/item/assign_license/assign_license_request_builder.py +++ b/msgraph/generated/groups/item/assign_license/assign_license_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssignLicensePostRequestBody] = None, request_configuration: Optional[AssignLicenseRequestBuilderPostRequestConfiguration] = None) -> Optional[Group]: """ - Add or remove licenses on the group. Licenses assigned to the group will be assigned to all users in the group. To learn more about group-based licensing, see What is group-based licensing in Azure Active Directory. To get the subscriptions available in the directory, perform a GET subscribedSkus request. + Add or remove licenses on the group. Licenses assigned to the group will be assigned to all users in the group. To learn more about group-based licensing, see What is group-based licensing in Microsoft Entra ID. To get the subscriptions available in the directory, perform a GET subscribedSkus request. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AssignLicensePostRequestBody] = None, request def to_post_request_information(self,body: Optional[AssignLicensePostRequestBody] = None, request_configuration: Optional[AssignLicenseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or remove licenses on the group. Licenses assigned to the group will be assigned to all users in the group. To learn more about group-based licensing, see What is group-based licensing in Azure Active Directory. To get the subscriptions available in the directory, perform a GET subscribedSkus request. + Add or remove licenses on the group. Licenses assigned to the group will be assigned to all users in the group. To learn more about group-based licensing, see What is group-based licensing in Microsoft Entra ID. To get the subscriptions available in the directory, perform a GET subscribedSkus request. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AssignLicensePostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py b/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py similarity index 88% rename from msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py rename to msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py index a4f8bf3fb28..3aae46844ac 100644 --- a/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py +++ b/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AllowedCalendarSharingRolesWithUserResponse(BaseCollectionPaginationCountResponse): +class AllowedCalendarSharingRolesWithUserGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[CalendarRoleType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AllowedCalendarSharingRolesWithUserResponse + Returns: AllowedCalendarSharingRolesWithUserGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AllowedCalendarSharingRolesWithUserResponse() + return AllowedCalendarSharingRolesWithUserGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py b/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py index 64513f472e4..61d9e470f9b 100644 --- a/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py +++ b/msgraph/generated/groups/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse class AllowedCalendarSharingRolesWithUserRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param user: Usage: User='{User}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['user'] = str(user) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendar/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserResponse]: + async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserGetResponse]: """ Invoke function allowedCalendarSharingRoles param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AllowedCalendarSharingRolesWithUserResponse] + Returns: Optional[AllowedCalendarSharingRolesWithUserGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWi } if not self.request_adapter: raise Exception("Http core is null") - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse - return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[AllowedCalen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedCalendarSharingRolesWithUserRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_permissions/calendar_permissions_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_permissions/calendar_permissions_request_builder.py index d7e5443e79d..35fa8abd086 100644 --- a/msgraph/generated/groups/item/calendar/calendar_permissions/calendar_permissions_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_permissions/calendar_permissions_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_permission_id(self,calendar_permission_id: str) -> CalendarPermi async def get(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermissionCollectionResponse]: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionsRequestBui async def post(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CalendarPermission] = None, request_configura def to_get_request_information(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarPermissionsRequestBuilderGetQueryParameters(): """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_permissions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_permissions/count/count_request_builder.py index 6262f685bbf..8a585b3a55c 100644 --- a/msgraph/generated/groups/item/calendar/calendar_permissions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py index ac9155f9a38..d9dfad80e37 100644 --- a/msgraph/generated/groups/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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/calendarpermission-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CalendarPermissionItemRequ async def get(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] Find more info here: https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionItemRequest async def patch(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[CalendarPermission] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class CalendarPermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class CalendarPermissionItemRequestBuilderGetQueryParameters(): """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_request_builder.py index 0ade594586e..91eb310bbdd 100644 --- a/msgraph/generated/groups/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_request_builder.py @@ -71,14 +71,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/calendar_view_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/calendar_view_request_builder.py index 3d4bc3ba52d..d27f59ecafc 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/calendar_view_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarViewRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/count/count_request_builder.py index ab3ec4e3f0c..75aeed93f77 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/delta/delta_response.py b/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar/calendar_view/delta/delta_response.py rename to msgraph/generated/groups/item/calendar/calendar_view/delta/delta_get_response.py index e02d92cfdea..40f1053595b 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/delta/delta_response.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_request_builder.py index 85c67ac64c1..4550446c092 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendar/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/accept/accept_request_builder.py index d948e5ba0d8..8fb9b4650e0 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/attachments_request_builder.py index b595d13d759..e3ec9b98f99 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/count/count_request_builder.py index 403a61cacf6..15812c55247 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py index 5f0ac7368fb..14645dc90b4 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py index 8c2eecb8b28..55a59d43243 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/calendar/calendar_request_builder.py index d5a3fcbcb18..d61a798d09c 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/cancel/cancel_request_builder.py index fec2b9ccced..a48ec7fc96d 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/decline/decline_request_builder.py index d25a69d6bcd..5ba1f7768ea 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py index 0e2b7fcd20e..0154873ce9d 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/event_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/event_item_request_builder.py index 04bb21631b7..5f615b37246 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/event_item_request_builder.py @@ -65,14 +65,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/count/count_request_builder.py index f54bc5b9167..746e2361b2c 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/extensions_request_builder.py index ec2e075ce0e..0825219bd81 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py index f0c43cdcc87..f5a1677e122 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/forward/forward_request_builder.py index 1ba90050118..966ec62c0fb 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/count/count_request_builder.py index 10af08104f8..fd469e864ba 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_response.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_response.py rename to msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_get_response.py index 82d9e2cdabc..2328074de4d 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_response.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py index f63a9d411fb..a1ce2ad77a9 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendar/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/instances_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/instances_request_builder.py index d3902c17375..cef653e26b0 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/instances_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py index e86587c1cd4..83777d148b7 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py index 35f745cf7e4..c622c84159e 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py index 59660a0552a..474698afa0d 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 10cdf6199bc..eb51530d3e1 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py index fb538fa45db..ee66e2726ea 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py index 25c9d5aa111..8871881c87c 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py index 124b3d5bf60..015bfe52990 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py index 51dcea119d4..3a6031a6e84 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index b926e040ddc..fdb7d936993 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py index 7580a267cb1..674fa89b867 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py index e1c89e577c0..25d1739c1b2 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py index 9f712530ac1..fd921b08958 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py index 0b9311b6a6d..5180d4a5be5 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py index 0e1921d19e7..23d4ecaa458 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index efc82f56c47..af73bc3e03d 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index a3699b82010..96f8721cdd7 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py index 796b8ba40c0..d97c55313ba 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py index e497b97b198..1ae30ee1827 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/events/count/count_request_builder.py index 5dd8f3db715..508f3a710bd 100644 --- a/msgraph/generated/groups/item/calendar/events/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_response.py b/msgraph/generated/groups/item/calendar/events/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/calendar/calendar_view/delta/delta_response.py rename to msgraph/generated/groups/item/calendar/events/delta/delta_get_response.py index e02d92cfdea..40f1053595b 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/delta/delta_response.py +++ b/msgraph/generated/groups/item/calendar/events/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar/events/delta/delta_request_builder.py b/msgraph/generated/groups/item/calendar/events/delta/delta_request_builder.py index 67f193daccf..3e31d347953 100644 --- a/msgraph/generated/groups/item/calendar/events/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendar/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/events_request_builder.py b/msgraph/generated/groups/item/calendar/events/events_request_builder.py index 095412bc0f4..82e34acb9a8 100644 --- a/msgraph/generated/groups/item/calendar/events/events_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/events_request_builder.py @@ -46,7 +46,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[EventsRequestBuilderGetReques async def post(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> Optional[Event]: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Event] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Event] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class EventsRequestBuilderGetQueryParameters(): """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/accept/accept_request_builder.py index eb8dc9adbfa..8f07e063a24 100644 --- a/msgraph/generated/groups/item/calendar/events/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/attachments/attachments_request_builder.py index 6f07131f724..3f6712006a2 100644 --- a/msgraph/generated/groups/item/calendar/events/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/attachments/count/count_request_builder.py index 1bd35962a52..060ff22a0e9 100644 --- a/msgraph/generated/groups/item/calendar/events/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py index c5591e60cd3..805f7a97d27 100644 --- a/msgraph/generated/groups/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/attachments/item/attachment_item_request_builder.py index 2a034be7fba..5c79fb24e3f 100644 --- a/msgraph/generated/groups/item/calendar/events/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/calendar/calendar_request_builder.py index d8c0742543c..a24bb33d002 100644 --- a/msgraph/generated/groups/item/calendar/events/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/cancel/cancel_request_builder.py index ec763254d19..5ad484456ca 100644 --- a/msgraph/generated/groups/item/calendar/events/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/decline/decline_request_builder.py index 0557fb746a5..917ef8bcbcf 100644 --- a/msgraph/generated/groups/item/calendar/events/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py index e7a5e409f9c..59eabad266d 100644 --- a/msgraph/generated/groups/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/event_item_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/event_item_request_builder.py index 084d62cd033..c207333dc92 100644 --- a/msgraph/generated/groups/item/calendar/events/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/event_item_request_builder.py @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[EventItemRequestBuilderGetReq async def patch(self,body: Optional[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Event]: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[EventItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,19 +124,19 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Event] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/extensions/count/count_request_builder.py index cba108cc204..7fdebda9dea 100644 --- a/msgraph/generated/groups/item/calendar/events/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/extensions/extensions_request_builder.py index 87fc126e43d..9704642c087 100644 --- a/msgraph/generated/groups/item/calendar/events/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/extensions/item/extension_item_request_builder.py index b8bb2b0a615..98c6f8169ad 100644 --- a/msgraph/generated/groups/item/calendar/events/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/forward/forward_request_builder.py index ddcc786afba..b4674ad0ca4 100644 --- a/msgraph/generated/groups/item/calendar/events/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/count/count_request_builder.py index 0699a4ada30..1f95fbc0573 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_response.py b/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_response.py rename to msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_get_response.py index 82d9e2cdabc..2328074de4d 100644 --- a/msgraph/generated/groups/item/calendar/calendar_view/item/instances/delta/delta_response.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_request_builder.py index ea8b8210b56..09c03590dab 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendar/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/instances_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/instances_request_builder.py index ff9e4cfb01e..6751f5bcec5 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/instances_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/accept/accept_request_builder.py index 7a7890a598a..f20416992a7 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py index b1a502d4de2..975b9c26507 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py index 896671fbf34..8b16f09251b 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 28f91d8766a..90b32bdd7de 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py index bbd1239dc91..43379dece3d 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py index e391e29b124..2cc3ea4cb12 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py index 7abbd16974c..9d184456909 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/decline/decline_request_builder.py index 47521a57679..a9336d54402 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index 3744b4c0a06..c1363d96a8e 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/event_item_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/event_item_request_builder.py index dda324c420b..4960b5fbda0 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py index 5381e2daf24..9a81c73352e 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py index 82fae7997c2..0abb757d507 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py index c91b63260af..8b4d5f1802a 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/forward/forward_request_builder.py index f84b0839621..c8414f85546 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 2373b69fde9..e0a0f56b745 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index b8afd259e8b..1eff7ccb945 100644 --- a/msgraph/generated/groups/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py index be9491eb2d5..12eecb2eaa7 100644 --- a/msgraph/generated/groups/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py index f7c6d8e0c96..0621042d53c 100644 --- a/msgraph/generated/groups/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_response.py b/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_post_response.py similarity index 92% rename from msgraph/generated/groups/item/calendar/get_schedule/get_schedule_response.py rename to msgraph/generated/groups/item/calendar/get_schedule/get_schedule_post_response.py index 89a1497eab9..934e25a0b38 100644 --- a/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_response.py +++ b/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetScheduleResponse(BaseCollectionPaginationCountResponse): +class GetSchedulePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ScheduleInformation]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetScheduleResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetSchedulePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetScheduleResponse + Returns: GetSchedulePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetScheduleResponse() + return GetSchedulePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_request_builder.py b/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_request_builder.py index 2caacca938f..31029a39209 100644 --- a/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_request_builder.py +++ b/msgraph/generated/groups/item/calendar/get_schedule/get_schedule_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .get_schedule_post_request_body import GetSchedulePostRequestBody - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse class GetScheduleRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendar/getSchedule", path_parameters) - async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetScheduleResponse]: + async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetSchedulePostResponse]: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetScheduleResponse] + Returns: Optional[GetSchedulePostResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse - return await self.request_adapter.send_async(request_info, GetScheduleResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetSchedulePostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/calendar_view_request_builder.py b/msgraph/generated/groups/item/calendar_view/calendar_view_request_builder.py index 465eaa88c25..c0b3c5af768 100644 --- a/msgraph/generated/groups/item/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/calendar_view_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarViewRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/count/count_request_builder.py b/msgraph/generated/groups/item/calendar_view/count/count_request_builder.py index eeeb5c96a69..8a3186ca1ea 100644 --- a/msgraph/generated/groups/item/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/delta/delta_response.py b/msgraph/generated/groups/item/calendar_view/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/calendar_view/delta/delta_response.py rename to msgraph/generated/groups/item/calendar_view/delta/delta_get_response.py index 1b1ec66ac9e..7b78757d973 100644 --- a/msgraph/generated/groups/item/calendar_view/delta/delta_response.py +++ b/msgraph/generated/groups/item/calendar_view/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar_view/delta/delta_request_builder.py b/msgraph/generated/groups/item/calendar_view/delta/delta_request_builder.py index b66fc7dfd0a..92d6e31cbce 100644 --- a/msgraph/generated/groups/item/calendar_view/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/accept/accept_request_builder.py index 6020bc3f007..8511628a065 100644 --- a/msgraph/generated/groups/item/calendar_view/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/attachments/attachments_request_builder.py index c3b27272137..f1bdb71c56d 100644 --- a/msgraph/generated/groups/item/calendar_view/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/attachments/count/count_request_builder.py index e0bbe393271..e761e87cb68 100644 --- a/msgraph/generated/groups/item/calendar_view/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py index e51c70ff4b3..245af0e57b8 100644 --- a/msgraph/generated/groups/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/attachments/item/attachment_item_request_builder.py index 461f6f7ad35..84f859c8737 100644 --- a/msgraph/generated/groups/item/calendar_view/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/calendar/calendar_request_builder.py index d1a2921c0c1..79a802c4075 100644 --- a/msgraph/generated/groups/item/calendar_view/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/cancel/cancel_request_builder.py index 49585e1e2e2..300fe58cee0 100644 --- a/msgraph/generated/groups/item/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/decline/decline_request_builder.py index ee199993e04..c59dd92b854 100644 --- a/msgraph/generated/groups/item/calendar_view/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py index f7c944ba071..3472387f401 100644 --- a/msgraph/generated/groups/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/event_item_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/event_item_request_builder.py index d206b512fe9..256a064e13e 100644 --- a/msgraph/generated/groups/item/calendar_view/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/event_item_request_builder.py @@ -65,14 +65,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/extensions/count/count_request_builder.py index 48b27e54b89..43ac63d5aa2 100644 --- a/msgraph/generated/groups/item/calendar_view/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/extensions/extensions_request_builder.py index ec71b1e0c10..6653fc18e95 100644 --- a/msgraph/generated/groups/item/calendar_view/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/extensions/item/extension_item_request_builder.py index 4da58e0a880..a558d7cbd61 100644 --- a/msgraph/generated/groups/item/calendar_view/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/forward/forward_request_builder.py index 0c66446e1e3..45a37aa38d5 100644 --- a/msgraph/generated/groups/item/calendar_view/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/count/count_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/count/count_request_builder.py index 7096ab45087..78f4d807634 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_response.py b/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar_view/item/instances/delta/delta_response.py rename to msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_get_response.py index c806fd1d94b..c1a84de4868 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_response.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_request_builder.py index 832928627e0..3777c9781fc 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/instances_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/instances_request_builder.py index 29e136cda36..452368af89d 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/instances_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/accept/accept_request_builder.py index 58a0fc094aa..2163af220e4 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py index fb913c35d9c..165f8802e39 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py index 27c9896dec4..5eadf96aaa9 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 147947866a3..cc3ff5d71f6 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py index 43c48eb98a0..7b455cb4a5b 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py index 8da2fd886e7..1184faeb210 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py index a21f5a3ff55..051ac559c82 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/decline/decline_request_builder.py index 3c0195d9386..b680d181c0d 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index acbd2ee4234..f305a7b3f0f 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/event_item_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/event_item_request_builder.py index dc1df803d4e..36125eab73d 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py index 23aba7ba9b4..b99675cc288 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py index 0c9e38f4ee2..1decf258afd 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py index 64efa0121a2..02a7f431f9e 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/forward/forward_request_builder.py index cda91907df9..706b0af1b2d 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 5ceec60498f..96776ec5757 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 2d86282c44b..1df36e12fda 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py index 968cc70c467..7fd61b7ae98 100644 --- a/msgraph/generated/groups/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py index c851e446568..a105158ae61 100644 --- a/msgraph/generated/groups/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_response.py b/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_post_response.py similarity index 90% rename from msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_response.py rename to msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_post_response.py index 6bb31c2e115..162094d6e24 100644 --- a/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_response.py +++ b/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_post_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class CheckGrantedPermissionsForAppResponse(BaseCollectionPaginationCountResponse): +class CheckGrantedPermissionsForAppPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ResourceSpecificPermissionGrant]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckGrantedPermissionsForAppResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckGrantedPermissionsForAppPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckGrantedPermissionsForAppResponse + Returns: CheckGrantedPermissionsForAppPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CheckGrantedPermissionsForAppResponse() + return CheckGrantedPermissionsForAppPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_request_builder.py b/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_request_builder.py index f3a99771f2c..fce589bb240 100644 --- a/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_request_builder.py +++ b/msgraph/generated/groups/item/check_granted_permissions_for_app/check_granted_permissions_for_app_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .check_granted_permissions_for_app_response import CheckGrantedPermissionsForAppResponse + from .check_granted_permissions_for_app_post_response import CheckGrantedPermissionsForAppPostResponse class CheckGrantedPermissionsForAppRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/checkGrantedPermissionsForApp", path_parameters) - async def post(self,request_configuration: Optional[CheckGrantedPermissionsForAppRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckGrantedPermissionsForAppResponse]: + async def post(self,request_configuration: Optional[CheckGrantedPermissionsForAppRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckGrantedPermissionsForAppPostResponse]: """ Invoke action checkGrantedPermissionsForApp param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckGrantedPermissionsForAppResponse] + Returns: Optional[CheckGrantedPermissionsForAppPostResponse] """ request_info = self.to_post_request_information( request_configuration @@ -43,9 +43,9 @@ async def post(self,request_configuration: Optional[CheckGrantedPermissionsForAp } if not self.request_adapter: raise Exception("Http core is null") - from .check_granted_permissions_for_app_response import CheckGrantedPermissionsForAppResponse + from .check_granted_permissions_for_app_post_response import CheckGrantedPermissionsForAppPostResponse - return await self.request_adapter.send_async(request_info, CheckGrantedPermissionsForAppResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckGrantedPermissionsForAppPostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[CheckGrantedPermissionsForAppRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[CheckGrante Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CheckGrantedPermissionsForAppRequestBuilder: diff --git a/msgraph/generated/groups/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/groups/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/groups/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/groups/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/groups/item/check_member_groups/check_member_groups_request_builder.py index 4255e5f0e7d..0f9c5ffcd38 100644 --- a/msgraph/generated/groups/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/groups/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/groups/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/groups/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/groups/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/groups/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/groups/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/groups/item/check_member_objects/check_member_objects_request_builder.py index 9869afc3274..6b585af7b63 100644 --- a/msgraph/generated/groups/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/groups/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/groups/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/groups/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/conversations/conversations_request_builder.py b/msgraph/generated/groups/item/conversations/conversations_request_builder.py index c1786a1d94e..b3e0a5526a7 100644 --- a/msgraph/generated/groups/item/conversations/conversations_request_builder.py +++ b/msgraph/generated/groups/item/conversations/conversations_request_builder.py @@ -45,7 +45,7 @@ def by_conversation_id(self,conversation_id: str) -> ConversationItemRequestBuil async def get(self,request_configuration: Optional[ConversationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationCollectionResponse]: """ - Retrieve the list of conversations in this group. + Retrieve the list of conversations in this group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-conversations?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ConversationsRequestBuilderGe async def post(self,body: Optional[Conversation] = None, request_configuration: Optional[ConversationsRequestBuilderPostRequestConfiguration] = None) -> Optional[Conversation]: """ - Use reply thread or reply post to further post to that conversation. + Use reply thread or reply post to further post to that conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Conversation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Conversation] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ConversationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of conversations in this group. + Retrieve the list of conversations in this group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Conversation] = None, request_configuration: Optional[ConversationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use reply thread or reply post to further post to that conversation. + Use reply thread or reply post to further post to that conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Conversation] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ConversationsRequestBuilderGetQueryParameters(): """ - Retrieve the list of conversations in this group. + Retrieve the list of conversations in this group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/count/count_request_builder.py index 056183361ea..c334f217627 100644 --- a/msgraph/generated/groups/item/conversations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 a1c671ddfa6..91126988849 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 @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete conversation. + This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/group-delete-conversation?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ConversationItemRequestBui async def get(self,request_configuration: Optional[ConversationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Conversation]: """ - Retrieve the properties and relationships of conversation object. + Retrieve the properties and relationships of conversation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Conversation] Find more info here: https://learn.microsoft.com/graph/api/conversation-get?view=graph-rest-1.0 @@ -71,34 +71,34 @@ async def get(self,request_configuration: Optional[ConversationItemRequestBuilde def to_delete_request_information(self,request_configuration: Optional[ConversationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete conversation. + This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of conversation object. + Retrieve the properties and relationships of conversation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationItemRequestBuilder: @@ -133,7 +133,7 @@ class ConversationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class ConversationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of conversation object. + Retrieve the properties and relationships of conversation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/count/count_request_builder.py index 4d748ef43e3..4e8f590dcdc 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/conversation_thread_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/conversation_thread_item_request_builder.py index c1c38f4a928..f4363e1a037 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/conversation_thread_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/conversation_thread_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[Conversat Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationThreadItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationThread] = None, request_configuration: Optional[ConversationThreadItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ConversationThread] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/count/count_request_builder.py index 11a0be00a77..4ca52e7df0d 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/attachments_request_builder.py index 0913b1a86fc..287fcd007d0 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/post-list-attachments?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/count/count_request_builder.py index 9aec0bd6b94..7f8780f4fc9 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py index 5f50c482c5c..1211d0e2af1 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py index e1e36b2491b..8d2ef1a9820 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py @@ -73,12 +73,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -88,14 +88,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/count/count_request_builder.py index 604577e928e..aba4f11d742 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/extensions_request_builder.py index 6b0ec7554ba..beccee0881e 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py index 1f523484b04..52543cfb9f7 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGe async def patch(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Extension]: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/forward/forward_request_builder.py index 549d91bfaa8..912119db35f 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py index 28f52f52132..029b4d5b04c 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/post-list-attachments?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py index 8d3ab3cd728..1e868cb68ae 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py index 6a7665eae37..2ec754a2b83 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py index 93a52f520cc..5255920658b 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py @@ -73,12 +73,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -88,14 +88,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py index 9ad831e54b6..f36394ec5fb 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py index 90cc49826f2..61e9b6699f0 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py index 94a9a88d769..0a9a47d3302 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGe async def patch(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Extension]: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py index ecf1e555fe1..144a54ec1c0 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py index 108f095d219..8eb8011ebf0 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py @@ -58,14 +58,14 @@ def to_get_request_information(self,request_configuration: Optional[InReplyToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InReplyToRequestBuilder: 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 0114373fe92..c80349b9692 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,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + 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. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/post_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/post_item_request_builder.py index 7d637dd9406..acde50d412e 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/post_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/post_item_request_builder.py @@ -59,14 +59,14 @@ def to_get_request_information(self,request_configuration: Optional[PostItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PostItemRequestBuilder: 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 dc532ce2bf7..d0edf394237 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,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + 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. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/posts_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/posts_request_builder.py index 8589285855f..fc62fad1ff3 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/posts_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/posts_request_builder.py @@ -44,7 +44,7 @@ def by_post_id(self,post_id: str) -> PostItemRequestBuilder: async def get(self,request_configuration: Optional[PostsRequestBuilderGetRequestConfiguration] = None) -> Optional[PostCollectionResponse]: """ - Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PostCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationthread-list-posts?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[PostsRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[PostsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PostsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PostsRequestBuilderGetQueryParameters(): """ - Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 b284b26f56a..f5572889544 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,7 +28,7 @@ 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. + 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. This API is available in the following national cloud deployments. 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[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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/conversations/item/threads/threads_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/threads_request_builder.py index 5e8f85e5eea..abe564ca8ad 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/threads_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/threads_request_builder.py @@ -45,7 +45,7 @@ def by_conversation_thread_id(self,conversation_thread_id: str) -> ConversationT async def get(self,request_configuration: Optional[ThreadsRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationThreadCollectionResponse]: """ - Get all the threads in a group conversation. Note: You can also get all the threads of a group. + Get all the threads in a group conversation. Note: You can also get all the threads of a group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationThreadCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conversation-list-threads?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ThreadsRequestBuilderGetReque async def post(self,body: Optional[ConversationThread] = None, request_configuration: Optional[ThreadsRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationThread]: """ - Create a new thread in the specified conversation. A thread and post are created as specified. Use reply thread to further post to that thread. Or, if you get the post ID, you can also reply to that post in that thread. Note: You can also start a new conversation by first creating a thread. + Create a new thread in the specified conversation. A thread and post are created as specified. Use reply thread to further post to that thread. Or, if you get the post ID, you can also reply to that post in that thread. Note: You can also start a new conversation by first creating a thread. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationThread] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ConversationThread] = None, request_configura def to_get_request_information(self,request_configuration: Optional[ThreadsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the threads in a group conversation. Note: You can also get all the threads of a group. + Get all the threads in a group conversation. Note: You can also get all the threads of a group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationThread] = None, request_configuration: Optional[ThreadsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new thread in the specified conversation. A thread and post are created as specified. Use reply thread to further post to that thread. Or, if you get the post ID, you can also reply to that post in that thread. Note: You can also start a new conversation by first creating a thread. + Create a new thread in the specified conversation. A thread and post are created as specified. Use reply thread to further post to that thread. Or, if you get the post ID, you can also reply to that post in that thread. Note: You can also start a new conversation by first creating a thread. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ConversationThread] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ThreadsRequestBuilderGetQueryParameters(): """ - Get all the threads in a group conversation. Note: You can also get all the threads of a group. + Get all the threads in a group conversation. Note: You can also get all the threads of a group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/created_on_behalf_of/created_on_behalf_of_request_builder.py b/msgraph/generated/groups/item/created_on_behalf_of/created_on_behalf_of_request_builder.py index 5082851f702..5e2dadce447 100644 --- a/msgraph/generated/groups/item/created_on_behalf_of/created_on_behalf_of_request_builder.py +++ b/msgraph/generated/groups/item/created_on_behalf_of/created_on_behalf_of_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedOnBeh Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedOnBehalfOfRequestBuilder: diff --git a/msgraph/generated/groups/item/drive/drive_request_builder.py b/msgraph/generated/groups/item/drive/drive_request_builder.py index 9030259df70..f891267926b 100644 --- a/msgraph/generated/groups/item/drive/drive_request_builder.py +++ b/msgraph/generated/groups/item/drive/drive_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/drives/count/count_request_builder.py b/msgraph/generated/groups/item/drives/count/count_request_builder.py index 10c5294f201..a56eb92fa0f 100644 --- a/msgraph/generated/groups/item/drives/count/count_request_builder.py +++ b/msgraph/generated/groups/item/drives/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/drives/drives_request_builder.py b/msgraph/generated/groups/item/drives/drives_request_builder.py index 43c35bf4a00..bdaac9ef599 100644 --- a/msgraph/generated/groups/item/drives/drives_request_builder.py +++ b/msgraph/generated/groups/item/drives/drives_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[DrivesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/drives/item/drive_item_request_builder.py b/msgraph/generated/groups/item/drives/item/drive_item_request_builder.py index b6c9fe31749..eafea0c3911 100644 --- a/msgraph/generated/groups/item/drives/item/drive_item_request_builder.py +++ b/msgraph/generated/groups/item/drives/item/drive_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/groups/item/events/count/count_request_builder.py b/msgraph/generated/groups/item/events/count/count_request_builder.py index 9975af4dd7e..53692aaeaa3 100644 --- a/msgraph/generated/groups/item/events/count/count_request_builder.py +++ b/msgraph/generated/groups/item/events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/events/delta/delta_response.py b/msgraph/generated/groups/item/events/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/events/delta/delta_response.py rename to msgraph/generated/groups/item/events/delta/delta_get_response.py index 1b1ec66ac9e..7b78757d973 100644 --- a/msgraph/generated/groups/item/events/delta/delta_response.py +++ b/msgraph/generated/groups/item/events/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/events/delta/delta_request_builder.py b/msgraph/generated/groups/item/events/delta/delta_request_builder.py index c99e11900e1..8bf3406449e 100644 --- a/msgraph/generated/groups/item/events/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/events/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/events_request_builder.py b/msgraph/generated/groups/item/events/events_request_builder.py index a00d87e9028..b0aab3aaa4d 100644 --- a/msgraph/generated/groups/item/events/events_request_builder.py +++ b/msgraph/generated/groups/item/events/events_request_builder.py @@ -46,7 +46,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Retrieve a list of event objects. + Retrieve a list of event objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-events?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[EventsRequestBuilderGetReques async def post(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> Optional[Event]: """ - Use this API to create a new event. + Use this API to create a new event. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Event] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of event objects. + Retrieve a list of event objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new event. + Use this API to create a new event. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Event] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class EventsRequestBuilderGetQueryParameters(): """ - Retrieve a list of event objects. + Retrieve a list of event objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/events/item/accept/accept_request_builder.py index be3b18ddc0f..8f43c371dab 100644 --- a/msgraph/generated/groups/item/events/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/events/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/events/item/attachments/attachments_request_builder.py index c0a4791b2ce..67fa6c8e18c 100644 --- a/msgraph/generated/groups/item/events/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/events/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/events/item/attachments/count/count_request_builder.py index f86b1dd2400..a3cfe6c41b5 100644 --- a/msgraph/generated/groups/item/events/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/events/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py index 7a9fe13f8bf..95b9512f16f 100644 --- a/msgraph/generated/groups/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/events/item/attachments/item/attachment_item_request_builder.py index b606d78174c..2f2a3a86b4c 100644 --- a/msgraph/generated/groups/item/events/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/events/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/events/item/calendar/calendar_request_builder.py index b1fa5cbc70e..90adf2a8ec0 100644 --- a/msgraph/generated/groups/item/events/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/events/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/events/item/cancel/cancel_request_builder.py index 1665f33baec..e3d6db562d5 100644 --- a/msgraph/generated/groups/item/events/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/events/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/events/item/decline/decline_request_builder.py index 4e529b9177e..de3f3aac2ad 100644 --- a/msgraph/generated/groups/item/events/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/events/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py index f0d157c84d0..4245b8f83c6 100644 --- a/msgraph/generated/groups/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/event_item_request_builder.py b/msgraph/generated/groups/item/events/item/event_item_request_builder.py index e81940131ec..6a77e65a6db 100644 --- a/msgraph/generated/groups/item/events/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/events/item/event_item_request_builder.py @@ -39,7 +39,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EventItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an event object. + Delete an event object. This API is available in the following national cloud deployments. 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-event?view=graph-rest-1.0 @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[EventItemRequestBuilderDel async def get(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Event]: """ - Get an event object. + Get an event object. This API is available in the following national cloud deployments. 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/group-get-event?view=graph-rest-1.0 @@ -105,34 +105,34 @@ async def patch(self,body: Optional[Event] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[EventItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an event object. + Delete an event object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an event object. + Get an event object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -145,13 +145,13 @@ def to_patch_request_information(self,body: Optional[Event] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -277,7 +277,7 @@ class EventItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class EventItemRequestBuilderGetQueryParameters(): """ - Get an event object. + Get an event object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/events/item/extensions/count/count_request_builder.py index b68df448c67..a9564307783 100644 --- a/msgraph/generated/groups/item/events/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/events/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/events/item/extensions/extensions_request_builder.py index 80171126486..b5e0269edf9 100644 --- a/msgraph/generated/groups/item/events/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/events/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/events/item/extensions/item/extension_item_request_builder.py index 3725ebe46ae..d635789dc3d 100644 --- a/msgraph/generated/groups/item/events/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/events/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/events/item/forward/forward_request_builder.py index dce771870f5..5694c7392cf 100644 --- a/msgraph/generated/groups/item/events/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/events/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/count/count_request_builder.py b/msgraph/generated/groups/item/events/item/instances/count/count_request_builder.py index 2dbfbd470a4..aecbad86ce6 100644 --- a/msgraph/generated/groups/item/events/item/instances/count/count_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_response.py b/msgraph/generated/groups/item/events/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_response.py rename to msgraph/generated/groups/item/events/item/instances/delta/delta_get_response.py index c806fd1d94b..c1a84de4868 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_response.py +++ b/msgraph/generated/groups/item/events/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/events/item/instances/delta/delta_request_builder.py b/msgraph/generated/groups/item/events/item/instances/delta/delta_request_builder.py index 661ace0d155..635cff8c767 100644 --- a/msgraph/generated/groups/item/events/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/instances/instances_request_builder.py b/msgraph/generated/groups/item/events/item/instances/instances_request_builder.py index 5e764e272b8..6c45a4a4b57 100644 --- a/msgraph/generated/groups/item/events/item/instances/instances_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/accept/accept_request_builder.py index 22420fbeb5d..3e032f3b47c 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/attachments/attachments_request_builder.py index 463c951a5ba..d037b84f5a0 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/attachments/count/count_request_builder.py index 98bb594816d..9b3a3c0ad97 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 89cf96e7f51..7a7fe072046 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py index c4a64496a95..74783659697 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/calendar/calendar_request_builder.py index c1800ba92b9..690406f8af4 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/cancel/cancel_request_builder.py index 27c3bbfbff8..254d9128580 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/decline/decline_request_builder.py index 14ae0e5de8f..e5627b2c48e 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index 7fb7443d260..65004f74530 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/event_item_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/event_item_request_builder.py index 598a832fed0..2bfb8fc6353 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/extensions/count/count_request_builder.py index 5f8711407d2..0c2797e7c07 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/extensions/extensions_request_builder.py index 2e8a026a00a..16371d4ae5a 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/extensions/item/extension_item_request_builder.py index 46caf4ffb8e..f0e0fd99b9b 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/events/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/forward/forward_request_builder.py index 027635eb6c3..715738234f4 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 887ba0604dd..fa236f47b89 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index d1786709039..d6da0c81fd3 100644 --- a/msgraph/generated/groups/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/groups/item/events/item/snooze_reminder/snooze_reminder_request_builder.py index c2fbb38c341..fd539134613 100644 --- a/msgraph/generated/groups/item/events/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/groups/item/events/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/events/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/groups/item/events/item/tentatively_accept/tentatively_accept_request_builder.py index 2a06e894641..cf09bc3dafc 100644 --- a/msgraph/generated/groups/item/events/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/groups/item/events/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/extensions/count/count_request_builder.py index 115e6f31518..fe973278bdf 100644 --- a/msgraph/generated/groups/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/extensions/extensions_request_builder.py index 5eb19b45a45..f12f16fe518 100644 --- a/msgraph/generated/groups/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/extensions/item/extension_item_request_builder.py index 52ac8876fce..6c6d673e7ce 100644 --- a/msgraph/generated/groups/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/groups/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/groups/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/groups/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/groups/item/get_member_groups/get_member_groups_request_builder.py index c09bdc6b3e2..7dab8d486a8 100644 --- a/msgraph/generated/groups/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/groups/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/groups/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/groups/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/groups/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/groups/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/groups/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/groups/item/get_member_objects/get_member_objects_request_builder.py index 858458f9a3d..3028888bd1a 100644 --- a/msgraph/generated/groups/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/groups/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/groups/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/groups/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/group_item_request_builder.py b/msgraph/generated/groups/item/group_item_request_builder.py index 92f8ca259f4..6d3eee211ab 100644 --- a/msgraph/generated/groups/item/group_item_request_builder.py +++ b/msgraph/generated/groups/item/group_item_request_builder.py @@ -30,9 +30,9 @@ from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder from .group_lifecycle_policies.group_lifecycle_policies_request_builder import GroupLifecyclePoliciesRequestBuilder - from .member_of.member_of_request_builder import MemberOfRequestBuilder from .members.members_request_builder import MembersRequestBuilder from .members_with_license_errors.members_with_license_errors_request_builder import MembersWithLicenseErrorsRequestBuilder + from .member_of.member_of_request_builder import MemberOfRequestBuilder from .onenote.onenote_request_builder import OnenoteRequestBuilder from .owners.owners_request_builder import OwnersRequestBuilder from .permission_grants.permission_grants_request_builder import PermissionGrantsRequestBuilder @@ -45,13 +45,14 @@ from .reset_unseen_count.reset_unseen_count_request_builder import ResetUnseenCountRequestBuilder from .restore.restore_request_builder import RestoreRequestBuilder from .retry_service_provisioning.retry_service_provisioning_request_builder import RetryServiceProvisioningRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder from .settings.settings_request_builder import SettingsRequestBuilder from .sites.sites_request_builder import SitesRequestBuilder from .subscribe_by_mail.subscribe_by_mail_request_builder import SubscribeByMailRequestBuilder from .team.team_request_builder import TeamRequestBuilder from .threads.threads_request_builder import ThreadsRequestBuilder - from .transitive_member_of.transitive_member_of_request_builder import TransitiveMemberOfRequestBuilder from .transitive_members.transitive_members_request_builder import TransitiveMembersRequestBuilder + from .transitive_member_of.transitive_member_of_request_builder import TransitiveMemberOfRequestBuilder from .unsubscribe_by_mail.unsubscribe_by_mail_request_builder import UnsubscribeByMailRequestBuilder from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder @@ -70,7 +71,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete group. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they're permanently deleted. This isn't applicable to Security groups and Distribution groups which are permanently deleted immediately. To learn more, see deletedItems. + Delete group. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they're permanently deleted. This isn't applicable to Security groups and Distribution groups which are permanently deleted immediately. To learn more, see deletedItems. This API is available in the following national cloud deployments. 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?view=graph-rest-1.0 @@ -90,7 +91,7 @@ async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDel async def get(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: """ - Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that are not returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. + Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that aren't_ returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and aren't returned in the $select query. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -112,7 +113,7 @@ 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -137,39 +138,39 @@ async def patch(self,body: Optional[Group] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete group. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they're permanently deleted. This isn't applicable to Security groups and Distribution groups which are permanently deleted immediately. To learn more, see deletedItems. + Delete group. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they're permanently deleted. This isn't applicable to Security groups and Distribution groups which are permanently deleted immediately. To learn more, see deletedItems. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that are not returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. + Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that aren't_ returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and aren't returned in the $select query. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -177,13 +178,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -494,6 +495,15 @@ def retry_service_provisioning(self) -> RetryServiceProvisioningRequestBuilder: return RetryServiceProvisioningRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @property def settings(self) -> SettingsRequestBuilder: """ @@ -588,7 +598,7 @@ class GroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class GroupItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that are not returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query. + Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that aren't_ returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and aren't returned in the $select query. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/count/count_request_builder.py b/msgraph/generated/groups/item/group_lifecycle_policies/count/count_request_builder.py index 321e538dfbc..987049451ec 100644 --- a/msgraph/generated/groups/item/group_lifecycle_policies/count/count_request_builder.py +++ b/msgraph/generated/groups/item/group_lifecycle_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/group_lifecycle_policies_request_builder.py b/msgraph/generated/groups/item/group_lifecycle_policies/group_lifecycle_policies_request_builder.py index 372481d2514..3a832931b5f 100644 --- a/msgraph/generated/groups/item/group_lifecycle_policies/group_lifecycle_policies_request_builder.py +++ b/msgraph/generated/groups/item/group_lifecycle_policies/group_lifecycle_policies_request_builder.py @@ -45,7 +45,7 @@ def by_group_lifecycle_policy_id(self,group_lifecycle_policy_id: str) -> GroupLi async def get(self,request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupLifecyclePolicyCollectionResponse]: """ - Retrieves a list of groupLifecyclePolicy objects to which a group belongs. + Retrieves a list of groupLifecyclePolicy objects to which a group belongs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupLifecyclePolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-grouplifecyclepolicies?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[GroupLifecyclePolicy] = None, request_configu def to_get_request_information(self,request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieves a list of groupLifecyclePolicy objects to which a group belongs. + Retrieves a list of groupLifecyclePolicy objects to which a group belongs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupLifecyclePolicy] = None, request_configuration: Optional[GroupLifecyclePoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[GroupLifecyclePolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupLifecyclePoliciesRequestBuilderGetQueryParameters(): """ - Retrieves a list of groupLifecyclePolicy objects to which a group belongs. + Retrieves a list of groupLifecyclePolicy objects to which a group belongs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_response.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_post_response.py similarity index 91% rename from msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_response.py rename to msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_post_response.py index ec1b4c52661..235f55a3e40 100644 --- a/msgraph/generated/admin/service_announcement/messages/mark_unread/mark_unread_response.py +++ b/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class MarkUnreadResponse(AdditionalDataHolder, BackedModel, Parsable): +class AddGroupPostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class MarkUnreadResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MarkUnreadResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddGroupPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: MarkUnreadResponse + Returns: AddGroupPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return MarkUnreadResponse() + return AddGroupPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_request_builder.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_request_builder.py index 44a6cd2b723..3e9ee48b8b1 100644 --- a/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_request_builder.py +++ b/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .add_group_post_request_body import AddGroupPostRequestBody - from .add_group_response import AddGroupResponse + from .add_group_post_response import AddGroupPostResponse class AddGroupRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/groupLifecyclePolicies/{groupLifecyclePolicy%2Did}/addGroup", path_parameters) - async def post(self,body: Optional[AddGroupPostRequestBody] = None, request_configuration: Optional[AddGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[AddGroupResponse]: + async def post(self,body: Optional[AddGroupPostRequestBody] = None, request_configuration: Optional[AddGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[AddGroupPostResponse]: """ - Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. + Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddGroupResponse] + Returns: Optional[AddGroupPostResponse] Find more info here: https://learn.microsoft.com/graph/api/grouplifecyclepolicy-addgroup?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddGroupPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .add_group_response import AddGroupResponse + from .add_group_post_response import AddGroupPostResponse - return await self.request_adapter.send_async(request_info, AddGroupResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddGroupPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddGroupPostRequestBody] = None, request_configuration: Optional[AddGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. + Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddGroupPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_response.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_response.py deleted file mode 100644 index 5f12d0c2766..00000000000 --- a/msgraph/generated/groups/item/group_lifecycle_policies/item/add_group/add_group_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 AddGroupResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddGroupResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddGroupResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return AddGroupResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py index 86bb7ac628a..30de964e63b 100644 --- a/msgraph/generated/groups/item/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py +++ b/msgraph/generated/groups/item/group_lifecycle_policies/item/group_lifecycle_policy_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[GroupLife Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[GroupLifecyc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupLifecyclePolicy] = None, request_configuration: Optional[GroupLifecyclePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[GroupLifecyclePolicy] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_post_response.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_post_response.py new file mode 100644 index 00000000000..4180cc5f009 --- /dev/null +++ b/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_post_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 RemoveGroupPostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemoveGroupPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RemoveGroupPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RemoveGroupPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py index 362fc77e723..3cf789fc876 100644 --- a/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py +++ b/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .remove_group_post_request_body import RemoveGroupPostRequestBody - from .remove_group_response import RemoveGroupResponse + from .remove_group_post_response import RemoveGroupPostResponse class RemoveGroupRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/groupLifecyclePolicies/{groupLifecyclePolicy%2Did}/removeGroup", path_parameters) - async def post(self,body: Optional[RemoveGroupPostRequestBody] = None, request_configuration: Optional[RemoveGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[RemoveGroupResponse]: + async def post(self,body: Optional[RemoveGroupPostRequestBody] = None, request_configuration: Optional[RemoveGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[RemoveGroupPostResponse]: """ - Removes a group from a lifecycle policy. + Removes a group from a lifecycle policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RemoveGroupResponse] + Returns: Optional[RemoveGroupPostResponse] Find more info here: https://learn.microsoft.com/graph/api/grouplifecyclepolicy-removegroup?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[RemoveGroupPostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .remove_group_response import RemoveGroupResponse + from .remove_group_post_response import RemoveGroupPostResponse - return await self.request_adapter.send_async(request_info, RemoveGroupResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RemoveGroupPostResponse, error_mapping) def to_post_request_information(self,body: Optional[RemoveGroupPostRequestBody] = None, request_configuration: Optional[RemoveGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Removes a group from a lifecycle policy. + Removes a group from a lifecycle policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RemoveGroupPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_response.py b/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_response.py deleted file mode 100644 index e52ce0585e5..00000000000 --- a/msgraph/generated/groups/item/group_lifecycle_policies/item/remove_group/remove_group_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 RemoveGroupResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemoveGroupResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RemoveGroupResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return RemoveGroupResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/member_of/count/count_request_builder.py b/msgraph/generated/groups/item/member_of/count/count_request_builder.py index def6ef44e01..31446719786 100644 --- a/msgraph/generated/groups/item/member_of/count/count_request_builder.py +++ b/msgraph/generated/groups/item/member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/groups/item/member_of/graph_administrative_unit/count/count_request_builder.py index 27f16aa614d..29004dcca40 100644 --- a/msgraph/generated/groups/item/member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/groups/item/member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/groups/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index f1aeccc34b4..3ee8412e7da 100644 --- a/msgraph/generated/groups/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/groups/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/graph_group/count/count_request_builder.py b/msgraph/generated/groups/item/member_of/graph_group/count/count_request_builder.py index dfb5c3571f5..aa0a6c1e9e8 100644 --- a/msgraph/generated/groups/item/member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/groups/item/member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/member_of/graph_group/graph_group_request_builder.py index eb73ecf3f7f..f5cc00e1000 100644 --- a/msgraph/generated/groups/item/member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/item/directory_object_item_request_builder.py b/msgraph/generated/groups/item/member_of/item/directory_object_item_request_builder.py index de8334c58a5..1525c0d9d20 100644 --- a/msgraph/generated/groups/item/member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/groups/item/member_of/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/groups/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index 3a1b703b4a8..e57bcf45975 100644 --- a/msgraph/generated/groups/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/groups/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/member_of/item/graph_group/graph_group_request_builder.py index adf187cc021..b04b0a1bf4d 100644 --- a/msgraph/generated/groups/item/member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/member_of/member_of_request_builder.py b/msgraph/generated/groups/item/member_of/member_of_request_builder.py index bccc86207ac..9a2b0ed5fad 100644 --- a/msgraph/generated/groups/item/member_of/member_of_request_builder.py +++ b/msgraph/generated/groups/item/member_of/member_of_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[MemberOfRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MemberOfRequestBuilder: diff --git a/msgraph/generated/groups/item/members/count/count_request_builder.py b/msgraph/generated/groups/item/members/count/count_request_builder.py index 4017120f169..eccfac5591a 100644 --- a/msgraph/generated/groups/item/members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_application/count/count_request_builder.py b/msgraph/generated/groups/item/members/graph_application/count/count_request_builder.py index e9e312b3924..c634ccd68fa 100644 --- a/msgraph/generated/groups/item/members/graph_application/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/members/graph_application/graph_application_request_builder.py index 08140ad3a74..82c446db788 100644 --- a/msgraph/generated/groups/item/members/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_device/count/count_request_builder.py b/msgraph/generated/groups/item/members/graph_device/count/count_request_builder.py index cb875a5c8ef..b220abecc3b 100644 --- a/msgraph/generated/groups/item/members/graph_device/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/members/graph_device/graph_device_request_builder.py index 1bd89f97593..124075edbfc 100644 --- a/msgraph/generated/groups/item/members/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_group/count/count_request_builder.py b/msgraph/generated/groups/item/members/graph_group/count/count_request_builder.py index ba9434f1e2a..c38eb0a309b 100644 --- a/msgraph/generated/groups/item/members/graph_group/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/members/graph_group/graph_group_request_builder.py index 897c0afc31f..dc24938915b 100644 --- a/msgraph/generated/groups/item/members/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_org_contact/count/count_request_builder.py b/msgraph/generated/groups/item/members/graph_org_contact/count/count_request_builder.py index bdc53425b95..09b0aa2a065 100644 --- a/msgraph/generated/groups/item/members/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/members/graph_org_contact/graph_org_contact_request_builder.py index eff3ee339cc..8e7c0e59fea 100644 --- a/msgraph/generated/groups/item/members/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_service_principal/count/count_request_builder.py b/msgraph/generated/groups/item/members/graph_service_principal/count/count_request_builder.py index 1e69937ef6c..72ddcba5146 100644 --- a/msgraph/generated/groups/item/members/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/members/graph_service_principal/graph_service_principal_request_builder.py index 2305f4024e4..6c7e7757b0e 100644 --- a/msgraph/generated/groups/item/members/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_user/count/count_request_builder.py b/msgraph/generated/groups/item/members/graph_user/count/count_request_builder.py index 905b69e7122..1b1babe98c2 100644 --- a/msgraph/generated/groups/item/members/graph_user/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/members/graph_user/graph_user_request_builder.py index 3ec7f94694e..cd20a418d8d 100644 --- a/msgraph/generated/groups/item/members/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/members/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/members/item/graph_application/graph_application_request_builder.py index ebf19485a8a..a6173808b0b 100644 --- a/msgraph/generated/groups/item/members/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/members/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/members/item/graph_device/graph_device_request_builder.py index f8f85af70c4..cc44c78c9dc 100644 --- a/msgraph/generated/groups/item/members/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/members/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/members/item/graph_group/graph_group_request_builder.py index 29b3aa90b6a..9fcf4c3e716 100644 --- a/msgraph/generated/groups/item/members/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/members/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/members/item/graph_org_contact/graph_org_contact_request_builder.py index 42271137629..db9baa8cec7 100644 --- a/msgraph/generated/groups/item/members/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/members/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/members/item/graph_service_principal/graph_service_principal_request_builder.py index 6788cd78274..495d8c40ddb 100644 --- a/msgraph/generated/groups/item/members/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/members/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/members/item/graph_user/graph_user_request_builder.py index 5f5024435dc..f09815ea53f 100644 --- a/msgraph/generated/groups/item/members/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/members/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/members/item/ref/ref_request_builder.py b/msgraph/generated/groups/item/members/item/ref/ref_request_builder.py index fb3c433c261..d530d8e08a1 100644 --- a/msgraph/generated/groups/item/members/item/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/members/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a member from a group via the members navigation property. You can't remove a member from groups with dynamic memberships. + Remove a member from a group via the members navigation property. You can't remove a member from groups with dynamic memberships. This API is available in the following national cloud deployments. 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-members?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a member from a group via the members navigation property. You can't remove a member from groups with dynamic memberships. + Remove a member from a group via the members navigation property. You can't remove a member from groups with dynamic memberships. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a member from a group via the members navigation property. You can't remove a member from groups with dynamic memberships. + Remove a member from a group via the members navigation property. You can't remove a member from groups with dynamic memberships. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/members/members_request_builder.py b/msgraph/generated/groups/item/members/members_request_builder.py index 3e190b9bd65..d3804f540b8 100644 --- a/msgraph/generated/groups/item/members/members_request_builder.py +++ b/msgraph/generated/groups/item/members/members_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MembersReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MembersRequestBuilder: diff --git a/msgraph/generated/groups/item/members/ref/ref_request_builder.py b/msgraph/generated/groups/item/members/ref/ref_request_builder.py index 23069e70a5e..806edf1f687 100644 --- a/msgraph/generated/groups/item/members/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/members/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/members_with_license_errors/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/count/count_request_builder.py index 9bc08540539..575cc685252 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_application/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_application/count/count_request_builder.py index 502c2cb1deb..43b7dee79c0 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_application/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_application/graph_application_request_builder.py index 0e7efe9e6db..a0a76591a6e 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_device/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_device/count/count_request_builder.py index 3f0091a6381..02edd21ff42 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_device/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_device/graph_device_request_builder.py index e57db3b3542..6ee747a903c 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_group/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_group/count/count_request_builder.py index 9bccacd35c7..da232fd035f 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_group/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_group/graph_group_request_builder.py index 660b67c6786..775a6b0f717 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/count/count_request_builder.py index ffc3d645282..457271457f1 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/graph_org_contact_request_builder.py index 77e896d63de..cc991f3e705 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/count/count_request_builder.py index fd295af919f..9b16ce87b0d 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/graph_service_principal_request_builder.py index 9ec2e74f181..bbb9e863b27 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_user/count/count_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_user/count/count_request_builder.py index 2850a1063db..1c9d003ed46 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_user/count/count_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/graph_user/graph_user_request_builder.py index 4fecbfb19c4..4773661bf6d 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/directory_object_item_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/directory_object_item_request_builder.py index fa65bcfbbc4..433089e500b 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/directory_object_item_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/directory_object_item_request_builder.py @@ -60,14 +60,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/graph_application/graph_application_request_builder.py index 6150a09874c..441e37c0b96 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/graph_device/graph_device_request_builder.py index 0f9bae38b9a..3c8027b156a 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/graph_group/graph_group_request_builder.py index 9ffeae2c6d0..5cc5631dc36 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/graph_org_contact/graph_org_contact_request_builder.py index 19b6573fe68..fa8b461b065 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/graph_service_principal/graph_service_principal_request_builder.py index 2fb399644c9..3829bb42159 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/item/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/item/graph_user/graph_user_request_builder.py index 5151938f447..caf52eabf48 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/members_with_license_errors/members_with_license_errors_request_builder.py b/msgraph/generated/groups/item/members_with_license_errors/members_with_license_errors_request_builder.py index ddfe1ab8ffe..63f3b7e1771 100644 --- a/msgraph/generated/groups/item/members_with_license_errors/members_with_license_errors_request_builder.py +++ b/msgraph/generated/groups/item/members_with_license_errors/members_with_license_errors_request_builder.py @@ -76,14 +76,14 @@ def to_get_request_information(self,request_configuration: Optional[MembersWithL Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MembersWithLicenseErrorsRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/count/count_request_builder.py index 210cda13f55..47f987ee695 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py index 13f80ae4fff..0aad17a5702 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CopyNotebookModel]: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CopyNotebookModel] @@ -54,7 +54,7 @@ async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py b/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py similarity index 89% rename from msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py rename to msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py index ffb2677ba0e..127f0785384 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py +++ b/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetRecentNotebooksWithIncludePersonalNotebooksResponse(BaseCollectionPaginationCountResponse): +class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[RecentNotebook]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetRecentNotebooksWithIncludePersonalNotebooksResponse + Returns: GetRecentNotebooksWithIncludePersonalNotebooksGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetRecentNotebooksWithIncludePersonalNotebooksResponse() + return GetRecentNotebooksWithIncludePersonalNotebooksGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py index 1868f2b9620..9e5fbd69d1c 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse class GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['include_personal_notebooks'] = str(include_personal_notebooks) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse]: + async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse]: """ Invoke function getRecentNotebooks param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse] + Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetRecentNotebooksWithInclude } if not self.request_adapter: raise Exception("Http core is null") - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse - return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetRecentNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py index f2dbc1c921e..b398ab4feaa 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_notebook_post_request_body import CopyNotebookPostRequestBody class CopyNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/notebook_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/notebook_item_request_builder.py index a31b637b5fb..204d92a1857 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/notebook_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/notebook_item_request_builder.py @@ -13,8 +13,8 @@ from ......models.notebook import Notebook from ......models.o_data_errors.o_data_error import ODataError from .copy_notebook.copy_notebook_request_builder import CopyNotebookRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class NotebookItemRequestBuilder(BaseRequestBuilder): """ @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[NotebookItemRequestBuilder async def get(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Notebook]: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] Find more info here: https://learn.microsoft.com/graph/api/notebook-get?view=graph-rest-1.0 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[NotebookI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebookItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Notebook] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class NotebookItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class NotebookItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/count/count_request_builder.py index 7eeb6bb0c69..07b404f6b4a 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py index 845e276fdcc..ac25c13731e 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py index e0901b27baf..753380f15c8 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py index fc7312d692f..bdaddd8a89b 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ........models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py index abd1eecd4a8..2a18ba0f4a3 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py index 78d51a4cf20..2195648f8e4 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py index 384db304167..17fb3f1d45f 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py index 558247aad14..db4bcadbb14 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 5e411f111fe..21d9d385d93 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index b044f8bb58a..18f3877f96b 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py index 82423f98cec..f81313c7442 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ..........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py index 0c5c8f98edc..b121751c10d 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py index e48a5927b2d..4765516fa0d 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .............models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index f37cccaef8b..c0e7a78fb0b 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index cd96206c500..fdeb8500590 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ............models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 11bf2e52e22..efc94f64802 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index c41078699ab..b19133e0657 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 10bb3ee63a1..5c252f0a2c4 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .............models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index ed846a4ea24..f184617b6e7 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .............models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py index 99611b749c8..54947ca921c 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from ...........models.onenote_page_collection_response import OnenotePageCollectionResponse + from ...........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 9797ae43962..b0ee8dd0603 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 768e6016727..5e7f9879f99 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py index 0fe69c87d88..2adf6d12ae6 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .........models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py index 9cfcffb38e5..78088ba4580 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sectiongroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe async def post(self,body: Optional[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/count/count_request_builder.py index e2ec0bec0d3..41476f8a483 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index f4aee172d76..a7c4b7499b4 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 229eaba7afc..c5af3c188f1 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py index 339c35776f5..2f7a05b9b6d 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py index 281db1889be..59fb11c8478 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py index be7d70cac4d..8e7d718ad0e 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index e7072eac356..1f6e8c368d1 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py index f3a2d88ee9c..ae1002e0bd9 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 39b0a97c345..4465b048f31 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 08d39c16014..06d5bbcd7b6 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index c9ac8ac0b75..396592aef35 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py index 2c44110c3ec..8336e61d555 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py index 29bf3b7e8a2..289f98f9aeb 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py index eacc83b3e67..b4873b967d9 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 98e27983632..ef901e23f46 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/notebooks/item/sections/sections_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/item/sections/sections_request_builder.py index 0e5bee7cfba..e82722f07d5 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/item/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/notebooks/notebooks_request_builder.py b/msgraph/generated/groups/item/onenote/notebooks/notebooks_request_builder.py index 556944368de..686697b4be7 100644 --- a/msgraph/generated/groups/item/onenote/notebooks/notebooks_request_builder.py +++ b/msgraph/generated/groups/item/onenote/notebooks/notebooks_request_builder.py @@ -47,7 +47,7 @@ def by_notebook_id(self,notebook_id: str) -> NotebookItemRequestBuilder: async def get(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[NotebookCollectionResponse]: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NotebookCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-notebooks?view=graph-rest-1.0 @@ -81,7 +81,7 @@ def get_recent_notebooks_with_include_personal_notebooks(self,include_personal_n async def post(self,body: Optional[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> Optional[Notebook]: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] @@ -106,24 +106,24 @@ async def post(self,body: Optional[Notebook] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[Notebook] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def get_notebook_from_web_url(self) -> GetNotebookFromWebUrlRequestBuilder: @dataclass class NotebooksRequestBuilderGetQueryParameters(): """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/onenote_request_builder.py b/msgraph/generated/groups/item/onenote/onenote_request_builder.py index ee6144f52bc..17967b0a830 100644 --- a/msgraph/generated/groups/item/onenote/onenote_request_builder.py +++ b/msgraph/generated/groups/item/onenote/onenote_request_builder.py @@ -10,14 +10,14 @@ 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.onenote import Onenote + from ....models.o_data_errors.o_data_error import ODataError from .notebooks.notebooks_request_builder import NotebooksRequestBuilder from .operations.operations_request_builder import OperationsRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder from .resources.resources_request_builder import ResourcesRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class OnenoteRequestBuilder(BaseRequestBuilder): """ @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Onenote] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/operations/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/operations/count/count_request_builder.py index b80dc87427d..0a59e71d31e 100644 --- a/msgraph/generated/groups/item/onenote/operations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/operations/item/onenote_operation_item_request_builder.py b/msgraph/generated/groups/item/onenote/operations/item/onenote_operation_item_request_builder.py index 60b2ed20cea..219934cbd9a 100644 --- a/msgraph/generated/groups/item/onenote/operations/item/onenote_operation_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/operations/item/onenote_operation_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ......models.o_data_errors.o_data_error import ODataError class OnenoteOperationItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OnenoteOperationItemReques async def get(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] Find more info here: https://learn.microsoft.com/graph/api/onenoteoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteOp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OnenoteOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteOperation] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OnenoteOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class OnenoteOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/operations/operations_request_builder.py b/msgraph/generated/groups/item/onenote/operations/operations_request_builder.py index 64ca2c5e83a..7fef0ea444d 100644 --- a/msgraph/generated/groups/item/onenote/operations/operations_request_builder.py +++ b/msgraph/generated/groups/item/onenote/operations/operations_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_operation import OnenoteOperation from .....models.onenote_operation_collection_response import OnenoteOperationCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_operation_item_request_builder import OnenoteOperationItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_operation_id(self,onenote_operation_id: str) -> OnenoteOperationI async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperationCollectionResponse]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteOperation] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteOperation] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/pages/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/pages/count/count_request_builder.py index 368415d7602..043dfaab077 100644 --- a/msgraph/generated/groups/item/onenote/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/content/content_request_builder.py index 61f150c39e9..caea1a9104f 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .......models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py index bf7171dd33d..35b553a7639 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/onenote_page_item_request_builder.py index fa66e9354f0..faa980b9a2c 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ......models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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/page-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuil async def get(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] Find more info here: https://learn.microsoft.com/graph/api/page-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[OnenotePage] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class OnenotePageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class OnenotePageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index dda8443d4bd..bf504d0b60c 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py index b0dae8eec0f..fc3d4336866 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/parent_section/parent_section_request_builder.py index ee97de11957..9b64ce1c42e 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .......models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/onenote/pages/item/preview/preview_request_builder.py index 187f02b966c..c974203dc16 100644 --- a/msgraph/generated/groups/item/onenote/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .......models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/pages/pages_request_builder.py b/msgraph/generated/groups/item/onenote/pages/pages_request_builder.py index 017b384f148..e6ce788e280 100644 --- a/msgraph/generated/groups/item/onenote/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/onenote/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .....models.onenote_page_collection_response import OnenotePageCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/resources/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/resources/count/count_request_builder.py index 7b0fff45605..736b7025a6c 100644 --- a/msgraph/generated/groups/item/onenote/resources/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/resources/item/content/content_request_builder.py b/msgraph/generated/groups/item/onenote/resources/item/content/content_request_builder.py index 1a458e3f14e..0439aea02f0 100644 --- a/msgraph/generated/groups/item/onenote/resources/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/resources/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from .......models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/onenote/resources/item/onenote_resource_item_request_builder.py b/msgraph/generated/groups/item/onenote/resources/item/onenote_resource_item_request_builder.py index 950a8674005..22cb72d83c1 100644 --- a/msgraph/generated/groups/item/onenote/resources/item/onenote_resource_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/resources/item/onenote_resource_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from ......models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder class OnenoteResourceItemRequestBuilder(BaseRequestBuilder): @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OnenoteResourceItemRequest async def get(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResource]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResource] """ @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[OnenoteResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteResource] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -175,7 +175,7 @@ class OnenoteResourceItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class OnenoteResourceItemRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/resources/resources_request_builder.py b/msgraph/generated/groups/item/onenote/resources/resources_request_builder.py index c8626e37877..cdd3464537c 100644 --- a/msgraph/generated/groups/item/onenote/resources/resources_request_builder.py +++ b/msgraph/generated/groups/item/onenote/resources/resources_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_resource import OnenoteResource from .....models.onenote_resource_collection_response import OnenoteResourceCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_resource_item_request_builder import OnenoteResourceItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_resource_id(self,onenote_resource_id: str) -> OnenoteResourceItem async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResourceCollectionResponse]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResourceCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteResource] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteResource] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/count/count_request_builder.py index 479881907ef..deb3b86a3db 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py index e500bcbe257..8d71a44be82 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py index 614bc1822e6..66bae4760c1 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/section_group_item_request_builder.py index c07926d9afb..f8b99b143c5 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ......models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SectionGroupItemRequestBui async def get(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class SectionGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class SectionGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/count/count_request_builder.py index 6b09023d7e2..4c11555b678 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py index 47c1546d965..0d4040b678f 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py index 03edb42af41..5ed96bf32a8 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/count/count_request_builder.py index 704d03df860..a92696e660e 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index ca8d3457e31..90690c4063d 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 34d547eca38..54c315b92b5 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py index 1f833edf065..6a45c88e739 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py index c89ac5e6b14..000909615db 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py index 0a497eb5d0c..1a94114bc8f 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index d3428b61c81..73eae300f2c 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index da90be767d9..04b2e4e2b8c 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index a0a9f09d000..2a1e7d1c55c 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index f21bf62bc0d..9c5db7b977f 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 3541466793d..34b1d8040cf 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index ccdac71cad8..0664d69256d 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py index e2ee2ee65f7..5e7cddac692 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index c9f4689c72a..6ac9af98adc 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 5c99f59948d..38441151125 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/item/sections/sections_request_builder.py index a6d6ab57db0..9f115c88db8 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/onenote/section_groups/section_groups_request_builder.py index 61ee58b9b1d..ff0b314b955 100644 --- a/msgraph/generated/groups/item/onenote/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/onenote/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sectiongroups?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/sections/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/sections/count/count_request_builder.py index 149d6822e73..74d7a197daa 100644 --- a/msgraph/generated/groups/item/onenote/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 994fc5e9cbf..614f16a9266 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index eef891411a6..4a0f5232c63 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/onenote_section_item_request_builder.py index 847afb6a7ca..232047365a4 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ......models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[OnenoteSectionItemRequestB async def get(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] Find more info here: https://learn.microsoft.com/graph/api/section-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class OnenoteSectionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class OnenoteSectionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/count/count_request_builder.py index 4348da43a11..e77a06a6585 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/content/content_request_builder.py index d5c64aa3574..9e2f96ea473 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index a536cf50fe1..59e7dd43848 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py index 7532605ea98..a08ea1fd4be 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 4458abe0d69..9a228f5046c 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index a48a9566575..8e2726e7794 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py index 35593fe8964..a3f4459779d 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/item/preview/preview_request_builder.py index c9eb8aca1fa..9020157f8e8 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/pages/pages_request_builder.py index d2fc20d1573..f54bbf52d5a 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .......models.onenote_page_collection_response import OnenotePageCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py index e4ced67ddfe..edb26f1d925 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py index 48d692faa0e..6a4fe04a076 100644 --- a/msgraph/generated/groups/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/onenote/sections/sections_request_builder.py b/msgraph/generated/groups/item/onenote/sections/sections_request_builder.py index e429404a126..41cadd9bcdc 100644 --- a/msgraph/generated/groups/item/onenote/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/onenote/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .....models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sections?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/owners/count/count_request_builder.py b/msgraph/generated/groups/item/owners/count/count_request_builder.py index 3e8fd6fee5a..7ad1f0bd16e 100644 --- a/msgraph/generated/groups/item/owners/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_application/count/count_request_builder.py b/msgraph/generated/groups/item/owners/graph_application/count/count_request_builder.py index eb9413bd2e9..80dbca67a7f 100644 --- a/msgraph/generated/groups/item/owners/graph_application/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/owners/graph_application/graph_application_request_builder.py index c74588cdf17..afd12f40bc8 100644 --- a/msgraph/generated/groups/item/owners/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_device/count/count_request_builder.py b/msgraph/generated/groups/item/owners/graph_device/count/count_request_builder.py index 190f9765c65..799f953d7db 100644 --- a/msgraph/generated/groups/item/owners/graph_device/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/owners/graph_device/graph_device_request_builder.py index e019ab6501b..fedd332b533 100644 --- a/msgraph/generated/groups/item/owners/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_group/count/count_request_builder.py b/msgraph/generated/groups/item/owners/graph_group/count/count_request_builder.py index e2a50702047..68658dca343 100644 --- a/msgraph/generated/groups/item/owners/graph_group/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/owners/graph_group/graph_group_request_builder.py index 6850928ce6f..8031b15b608 100644 --- a/msgraph/generated/groups/item/owners/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_org_contact/count/count_request_builder.py b/msgraph/generated/groups/item/owners/graph_org_contact/count/count_request_builder.py index 4a53497a531..ec76281b34e 100644 --- a/msgraph/generated/groups/item/owners/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/owners/graph_org_contact/graph_org_contact_request_builder.py index 796753e963b..2c379e90c79 100644 --- a/msgraph/generated/groups/item/owners/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_service_principal/count/count_request_builder.py b/msgraph/generated/groups/item/owners/graph_service_principal/count/count_request_builder.py index d6cbc8dbc25..35d0404a800 100644 --- a/msgraph/generated/groups/item/owners/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/owners/graph_service_principal/graph_service_principal_request_builder.py index 006897c85d8..95c73d00fa1 100644 --- a/msgraph/generated/groups/item/owners/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_user/count/count_request_builder.py b/msgraph/generated/groups/item/owners/graph_user/count/count_request_builder.py index 84aa03baaca..bcf94e24dda 100644 --- a/msgraph/generated/groups/item/owners/graph_user/count/count_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/owners/graph_user/graph_user_request_builder.py index 6cc7ea1733a..ed685b19bfc 100644 --- a/msgraph/generated/groups/item/owners/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/owners/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/owners/item/graph_application/graph_application_request_builder.py index 9badc3d6689..e978345e80d 100644 --- a/msgraph/generated/groups/item/owners/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/owners/item/graph_device/graph_device_request_builder.py index d3d30448652..b0b8d9a6064 100644 --- a/msgraph/generated/groups/item/owners/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/owners/item/graph_group/graph_group_request_builder.py index 8989447aa31..0272c92bc5e 100644 --- a/msgraph/generated/groups/item/owners/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/owners/item/graph_org_contact/graph_org_contact_request_builder.py index 42be52a455b..46f7bb6b6c9 100644 --- a/msgraph/generated/groups/item/owners/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py index 1f8d9322c0a..77c57ed63ca 100644 --- a/msgraph/generated/groups/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/owners/item/graph_user/graph_user_request_builder.py index 70553ba9ae2..589ac8c32c3 100644 --- a/msgraph/generated/groups/item/owners/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/item/ref/ref_request_builder.py b/msgraph/generated/groups/item/owners/item/ref/ref_request_builder.py index 33c59b078ad..83d8d07a582 100644 --- a/msgraph/generated/groups/item/owners/item/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/owners/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. + Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. This API is available in the following national cloud deployments. 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-owners?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. + Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. + Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/owners/owners_request_builder.py b/msgraph/generated/groups/item/owners/owners_request_builder.py index a5a82c47636..986ba7974a0 100644 --- a/msgraph/generated/groups/item/owners/owners_request_builder.py +++ b/msgraph/generated/groups/item/owners/owners_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[OwnersReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OwnersRequestBuilder: diff --git a/msgraph/generated/groups/item/owners/ref/ref_request_builder.py b/msgraph/generated/groups/item/owners/ref/ref_request_builder.py index 37029c1552d..9b30a18b264 100644 --- a/msgraph/generated/groups/item/owners/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/owners/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a user or service principal to a Microsoft 365 or security group's owners. The owners are a set of users or service principals who are allowed to modify the group object. + Add a user or service principal to a Microsoft 365 or security group's owners. The owners are a set of users or service principals who are allowed to modify the group object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a user or service principal to a Microsoft 365 or security group's owners. The owners are a set of users or service principals who are allowed to modify the group object. + Add a user or service principal to a Microsoft 365 or security group's owners. The owners are a set of users or service principals who are allowed to modify the group object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/permission_grants/count/count_request_builder.py b/msgraph/generated/groups/item/permission_grants/count/count_request_builder.py index 3830c9742ff..e7eada5e5bf 100644 --- a/msgraph/generated/groups/item/permission_grants/count/count_request_builder.py +++ b/msgraph/generated/groups/item/permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/permission_grants/delta/delta_response.py b/msgraph/generated/groups/item/permission_grants/delta/delta_response.py deleted file mode 100644 index cb883a33a6d..00000000000 --- a/msgraph/generated/groups/item/permission_grants/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject - -from .....models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject - - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 2be97abb53a..00000000000 --- a/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/permissionGrants/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 6cc0362e04b..00000000000 --- a/msgraph/generated/groups/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .....models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/permission_grants/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index 97d7615e01f..00000000000 --- a/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/permissionGrants/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_response.py deleted file mode 100644 index fc436e4387d..00000000000 --- a/msgraph/generated/groups/item/permission_grants/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .....models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py b/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py deleted file mode 100644 index a5fc2c2476e..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The groupIds property - group_ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsPostRequestBody() - - 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]] = { - "groupIds": lambda n : setattr(self, 'group_ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("groupIds", self.group_ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py deleted file mode 100644 index e9cc7d8abf4..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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 .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse - -class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?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 .check_member_groups_response import CheckMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberGroupsRequestBuilderPostRequestConfiguration(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/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 37d1b2933a0..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py b/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py deleted file mode 100644 index 5f48b8577ec..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index 5405d07e36b..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py b/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py deleted file mode 100644 index 1a3308bfb6c..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py deleted file mode 100644 index 25c6a22152c..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse - -class GetMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?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 .get_member_groups_response import GetMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberGroupsRequestBuilderPostRequestConfiguration(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/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 171e61b95e6..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py b/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py deleted file mode 100644 index 7552e02e441..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py deleted file mode 100644 index e526d8c4d95..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse - -class GetMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?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 .get_member_objects_response import GetMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberObjectsRequestBuilderPostRequestConfiguration(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/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index d78b936af0e..00000000000 --- a/msgraph/generated/groups/item/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/groups/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index 761b3bfa11c..6acdef496d1 100644 --- a/msgraph/generated/groups/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/groups/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -12,11 +12,6 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - from .restore.restore_request_builder import RestoreRequestBuilder class ResourceSpecificPermissionGrantItemRequestBuilder(BaseRequestBuilder): """ @@ -102,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -157,51 +152,6 @@ def with_url(self,raw_url: Optional[str] = None) -> ResourceSpecificPermissionGr raise TypeError("raw_url cannot be null.") return ResourceSpecificPermissionGrantItemRequestBuilder(self.request_adapter, raw_url) - @property - def check_member_groups(self) -> CheckMemberGroupsRequestBuilder: - """ - Provides operations to call the checkMemberGroups method. - """ - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - - return CheckMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def check_member_objects(self) -> CheckMemberObjectsRequestBuilder: - """ - Provides operations to call the checkMemberObjects method. - """ - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - - return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_groups(self) -> GetMemberGroupsRequestBuilder: - """ - Provides operations to call the getMemberGroups method. - """ - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - - return GetMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_objects(self) -> GetMemberObjectsRequestBuilder: - """ - Provides operations to call the getMemberObjects method. - """ - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - - return GetMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def restore(self) -> RestoreRequestBuilder: - """ - Provides operations to call the restore method. - """ - from .restore.restore_request_builder import RestoreRequestBuilder - - return RestoreRequestBuilder(self.request_adapter, self.path_parameters) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/groups/item/permission_grants/permission_grants_request_builder.py b/msgraph/generated/groups/item/permission_grants/permission_grants_request_builder.py index 2af4f5d3f8c..79bdf7d530e 100644 --- a/msgraph/generated/groups/item/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/groups/item/permission_grants/permission_grants_request_builder.py @@ -14,11 +14,7 @@ from ....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant from ....models.resource_specific_permission_grant_collection_response import ResourceSpecificPermissionGrantCollectionResponse from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.resource_specific_permission_grant_item_request_builder import ResourceSpecificPermissionGrantItemRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class PermissionGrantsRequestBuilder(BaseRequestBuilder): """ @@ -49,7 +45,7 @@ def by_resource_specific_permission_grant_id(self,resource_specific_permission_g async def get(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ResourceSpecificPermissionGrantCollectionResponse]: """ - List all resource-specific permission grants on the group. This list specifies the Azure AD apps that have access to the group, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the group. This list specifies the Microsoft Entra apps that have access to the group, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ResourceSpecificPermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-permissiongrants?view=graph-rest-1.0 @@ -95,19 +91,19 @@ async def post(self,body: Optional[ResourceSpecificPermissionGrant] = None, requ def to_get_request_information(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all resource-specific permission grants on the group. This list specifies the Azure AD apps that have access to the group, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the group. This list specifies the Microsoft Entra apps that have access to the group, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +116,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,46 +145,10 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class PermissionGrantsRequestBuilderGetQueryParameters(): """ - List all resource-specific permission grants on the group. This list specifies the Azure AD apps that have access to the group, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the group. This list specifies the Microsoft Entra apps that have access to the group, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index 6298d728a4a..00000000000 --- a/msgraph/generated/groups/item/permission_grants/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/permissionGrants/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/photo/photo_request_builder.py b/msgraph/generated/groups/item/photo/photo_request_builder.py index 460b6a4892d..23b6c3eea80 100644 --- a/msgraph/generated/groups/item/photo/photo_request_builder.py +++ b/msgraph/generated/groups/item/photo/photo_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[PhotoRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PhotoRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/photo/value/content_request_builder.py b/msgraph/generated/groups/item/photo/value/content_request_builder.py index a8e9196e404..742fb78d1e1 100644 --- a/msgraph/generated/groups/item/photo/value/content_request_builder.py +++ b/msgraph/generated/groups/item/photo/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/photos/count/count_request_builder.py b/msgraph/generated/groups/item/photos/count/count_request_builder.py index 92d094cf715..ba71fa87afa 100644 --- a/msgraph/generated/groups/item/photos/count/count_request_builder.py +++ b/msgraph/generated/groups/item/photos/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/photos/item/profile_photo_item_request_builder.py b/msgraph/generated/groups/item/photos/item/profile_photo_item_request_builder.py index 714a5f48e1c..e48705b39f5 100644 --- a/msgraph/generated/groups/item/photos/item/profile_photo_item_request_builder.py +++ b/msgraph/generated/groups/item/photos/item/profile_photo_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[ProfilePhoto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ProfilePhotoItemRequestBuilder: diff --git a/msgraph/generated/groups/item/photos/item/value/content_request_builder.py b/msgraph/generated/groups/item/photos/item/value/content_request_builder.py index a82d3c12ce9..d80cbf93df5 100644 --- a/msgraph/generated/groups/item/photos/item/value/content_request_builder.py +++ b/msgraph/generated/groups/item/photos/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/photos/photos_request_builder.py b/msgraph/generated/groups/item/photos/photos_request_builder.py index 7cc99f3ab52..9718325129a 100644 --- a/msgraph/generated/groups/item/photos/photos_request_builder.py +++ b/msgraph/generated/groups/item/photos/photos_request_builder.py @@ -44,7 +44,7 @@ def by_profile_photo_id(self,profile_photo_id: str) -> ProfilePhotoItemRequestBu async def get(self,request_configuration: Optional[PhotosRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfilePhotoCollectionResponse]: """ - Retrieve a list of profilePhoto objects. + Retrieve a list of profilePhoto objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProfilePhotoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-photos?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[PhotosRequestBuilderGetReques def to_get_request_information(self,request_configuration: Optional[PhotosRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of profilePhoto objects. + Retrieve a list of profilePhoto objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PhotosRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PhotosRequestBuilderGetQueryParameters(): """ - Retrieve a list of profilePhoto objects. + Retrieve a list of profilePhoto objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/planner_request_builder.py b/msgraph/generated/groups/item/planner/planner_request_builder.py index 1b1181955b9..1910409b710 100644 --- a/msgraph/generated/groups/item/planner/planner_request_builder.py +++ b/msgraph/generated/groups/item/planner/planner_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerGroup] = None, request_configuration: Optional[PlannerRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PlannerGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/planner/plans/count/count_request_builder.py b/msgraph/generated/groups/item/planner/plans/count/count_request_builder.py index 95fd947d351..6308e906f67 100644 --- a/msgraph/generated/groups/item/planner/plans/count/count_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/buckets_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/buckets_request_builder.py index cd9a7bae8d4..e78be68b098 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/buckets_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/buckets_request_builder.py @@ -45,7 +45,7 @@ def by_planner_bucket_id(self,planner_bucket_id: str) -> PlannerBucketItemReques async def get(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketCollectionResponse]: """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-list-buckets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerBucket] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[BucketsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerBucket] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class BucketsRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/count/count_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/count/count_request_builder.py index 89aca51e797..23b9da7dfe2 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py index efc8af510d2..3f6a68d8e75 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerBucketItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerBucke Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[PlannerBucketItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucket] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py index 84b8e912f83..4265ce19877 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index 4cf43a3688a..e86822cf594 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index 61795c3fa09..cbaec69a1cf 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py index b4ebd923411..f0b590499fa 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py index ed8109752ae..e95cb39f4f3 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 1126af7f95f..5de2b26b9fc 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py index 771490d92df..a0bf36f115e 100644 --- a/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerbucket-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/details/details_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/details/details_request_builder.py index dec317d910f..ef146688077 100644 --- a/msgraph/generated/groups/item/planner/plans/item/details/details_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlanDetails]: """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlanDetails] Find more info here: https://learn.microsoft.com/graph/api/plannerplandetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlanDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerPlanDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/planner_plan_item_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/planner_plan_item_request_builder.py index 2de8def2697..51087cfc173 100644 --- a/msgraph/generated/groups/item/planner/plans/item/planner_plan_item_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/planner_plan_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerPl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerPlanItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerPlanI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlan] = None, request_configuration: Optional[PlannerPlanItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[PlannerPlan] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/count/count_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/count/count_request_builder.py index ad6b4d58110..8d267b0bd79 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index ff7ea2b15b6..595bb3bbb6c 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index a4f03573112..edc558590c8 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/item/details/details_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/item/details/details_request_builder.py index 9d3735e2d3d..8f6984411d9 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py index 207f5d912f2..b234b3a0ed3 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 989bd718860..317cbb4c9c4 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/item/tasks/tasks_request_builder.py b/msgraph/generated/groups/item/planner/plans/item/tasks/tasks_request_builder.py index 533254972e9..3dcbb2ec322 100644 --- a/msgraph/generated/groups/item/planner/plans/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/planner/plans/plans_request_builder.py b/msgraph/generated/groups/item/planner/plans/plans_request_builder.py index 5a835f88f45..3b038fc43c7 100644 --- a/msgraph/generated/groups/item/planner/plans/plans_request_builder.py +++ b/msgraph/generated/groups/item/planner/plans/plans_request_builder.py @@ -45,7 +45,7 @@ def by_planner_plan_id(self,planner_plan_id: str) -> PlannerPlanItemRequestBuild async def get(self,request_configuration: Optional[PlansRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlanCollectionResponse]: """ - Retrieve a list of plannerPlan objects owned by a group object. + Retrieve a list of plannerPlan objects owned by a group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlanCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannergroup-list-plans?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerPlan] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PlansRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerPlan objects owned by a group object. + Retrieve a list of plannerPlan objects owned by a group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlan] = None, request_configuration: Optional[PlansRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerPlan] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PlansRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerPlan objects owned by a group object. + Retrieve a list of plannerPlan objects owned by a group object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/rejected_senders/count/count_request_builder.py b/msgraph/generated/groups/item/rejected_senders/count/count_request_builder.py index 4ee58800893..03625c05980 100644 --- a/msgraph/generated/groups/item/rejected_senders/count/count_request_builder.py +++ b/msgraph/generated/groups/item/rejected_senders/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/rejected_senders/item/ref/ref_request_builder.py b/msgraph/generated/groups/item/rejected_senders/item/ref/ref_request_builder.py index 12ed245b6d8..ad9f5c8c81d 100644 --- a/msgraph/generated/groups/item/rejected_senders/item/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/rejected_senders/item/ref/ref_request_builder.py @@ -52,13 +52,13 @@ def to_delete_request_information(self,request_configuration: Optional[RefReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: diff --git a/msgraph/generated/groups/item/rejected_senders/ref/ref_request_builder.py b/msgraph/generated/groups/item/rejected_senders/ref/ref_request_builder.py index b9ceddcf846..9f103851dbe 100644 --- a/msgraph/generated/groups/item/rejected_senders/ref/ref_request_builder.py +++ b/msgraph/generated/groups/item/rejected_senders/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Users in the rejected senders list cannot post to conversations of the group (identified in the GET request URL). Make sure you do not specify the same user or group in the rejected senders and accepted senders lists, otherwise you will get an error. + Users in the rejected senders list can't post to conversations of the group (identified in the GET request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-rejectedsenders?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Specify the user or group in @odata.id in the request body. Users in the rejected senders list can't post to conversations of the group (identified in the POST request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you'll get an error. + Specify the user or group in @odata.id in the request body. Users in the rejected senders list can't post to conversations of the group (identified in the POST request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you'll get an error. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Users in the rejected senders list cannot post to conversations of the group (identified in the GET request URL). Make sure you do not specify the same user or group in the rejected senders and accepted senders lists, otherwise you will get an error. + Users in the rejected senders list can't post to conversations of the group (identified in the GET request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Specify the user or group in @odata.id in the request body. Users in the rejected senders list can't post to conversations of the group (identified in the POST request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you'll get an error. + Specify the user or group in @odata.id in the request body. Users in the rejected senders list can't post to conversations of the group (identified in the POST request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you'll get an error. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Users in the rejected senders list cannot post to conversations of the group (identified in the GET request URL). Make sure you do not specify the same user or group in the rejected senders and accepted senders lists, otherwise you will get an error. + Users in the rejected senders list can't post to conversations of the group (identified in the GET request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you get an error. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/rejected_senders/rejected_senders_request_builder.py b/msgraph/generated/groups/item/rejected_senders/rejected_senders_request_builder.py index 479a199cb9d..ab18871d9b1 100644 --- a/msgraph/generated/groups/item/rejected_senders/rejected_senders_request_builder.py +++ b/msgraph/generated/groups/item/rejected_senders/rejected_senders_request_builder.py @@ -45,7 +45,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[RejectedSendersRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Users in the rejected senders list cannot post to conversations of the group (identified in the GET request URL). Make sure you do not specify the same user or group in the rejected senders and accepted senders lists, otherwise you will get an error. + Users in the rejected senders list can't post to conversations of the group (identified in the GET request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-rejectedsenders?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[RejectedSendersRequestBuilder def to_get_request_information(self,request_configuration: Optional[RejectedSendersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Users in the rejected senders list cannot post to conversations of the group (identified in the GET request URL). Make sure you do not specify the same user or group in the rejected senders and accepted senders lists, otherwise you will get an error. + Users in the rejected senders list can't post to conversations of the group (identified in the GET request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you get an error. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RejectedSendersRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class RejectedSendersRequestBuilderGetQueryParameters(): """ - Users in the rejected senders list cannot post to conversations of the group (identified in the GET request URL). Make sure you do not specify the same user or group in the rejected senders and accepted senders lists, otherwise you will get an error. + Users in the rejected senders list can't post to conversations of the group (identified in the GET request URL). Make sure you don't specify the same user or group in the rejected senders and accepted senders lists, otherwise you get an error. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/remove_favorite/remove_favorite_request_builder.py b/msgraph/generated/groups/item/remove_favorite/remove_favorite_request_builder.py index 12182df9e65..ce720195d77 100644 --- a/msgraph/generated/groups/item/remove_favorite/remove_favorite_request_builder.py +++ b/msgraph/generated/groups/item/remove_favorite/remove_favorite_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveFavoriteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the group from the list of the current user's favorite groups. Supported for Microsoft 365 groups only. + Remove the group from the list of the current user's favorite groups. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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-removefavorite?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveFavoriteRequestBuilder def to_post_request_information(self,request_configuration: Optional[RemoveFavoriteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the group from the list of the current user's favorite groups. Supported for Microsoft 365 groups only. + Remove the group from the list of the current user's favorite groups. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveFavoriteRequestBuilder: diff --git a/msgraph/generated/groups/item/renew/renew_request_builder.py b/msgraph/generated/groups/item/renew/renew_request_builder.py index 4c21e672740..77dac9b3b53 100644 --- a/msgraph/generated/groups/item/renew/renew_request_builder.py +++ b/msgraph/generated/groups/item/renew/renew_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RenewRequestBuilderPostRequestConfiguration] = None) -> None: """ - Renews a group's expiration. When a group is renewed, the group expiration is extended by the number of days defined in the policy. + Renews a group's expiration. When a group is renewed, the group expiration is extended by the number of days defined in the policy. This API is available in the following national cloud deployments. 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-renew?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RenewRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[RenewRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Renews a group's expiration. When a group is renewed, the group expiration is extended by the number of days defined in the policy. + Renews a group's expiration. When a group is renewed, the group expiration is extended by the number of days defined in the policy. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RenewRequestBuilder: diff --git a/msgraph/generated/groups/item/reset_unseen_count/reset_unseen_count_request_builder.py b/msgraph/generated/groups/item/reset_unseen_count/reset_unseen_count_request_builder.py index b707abce32e..834a6ad0235 100644 --- a/msgraph/generated/groups/item/reset_unseen_count/reset_unseen_count_request_builder.py +++ b/msgraph/generated/groups/item/reset_unseen_count/reset_unseen_count_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ResetUnseenCountRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reset the unseenCount of all the posts that the current user has not seen since their last visit. Supported for Microsoft 365 groups only. + Reset the unseenCount of all the posts that the current user hasn't seen since their last visit. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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-resetunseencount?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ResetUnseenCountRequestBuild def to_post_request_information(self,request_configuration: Optional[ResetUnseenCountRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reset the unseenCount of all the posts that the current user has not seen since their last visit. Supported for Microsoft 365 groups only. + Reset the unseenCount of all the posts that the current user hasn't seen since their last visit. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ResetUnseenCountRequestBuilder: diff --git a/msgraph/generated/groups/item/restore/restore_request_builder.py b/msgraph/generated/groups/item/restore/restore_request_builder.py index 70598546c21..24bcf7edd91 100644 --- a/msgraph/generated/groups/item/restore/restore_request_builder.py +++ b/msgraph/generated/groups/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/groups/item/retry_service_provisioning/retry_service_provisioning_request_builder.py b/msgraph/generated/groups/item/retry_service_provisioning/retry_service_provisioning_request_builder.py index 980074779da..7f1a5d9403b 100644 --- a/msgraph/generated/groups/item/retry_service_provisioning/retry_service_provisioning_request_builder.py +++ b/msgraph/generated/groups/item/retry_service_provisioning/retry_service_provisioning_request_builder.py @@ -51,12 +51,12 @@ def to_post_request_information(self,request_configuration: Optional[RetryServic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RetryServiceProvisioningRequestBuilder: diff --git a/msgraph/generated/groups/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..9eb3508243b --- /dev/null +++ b/msgraph/generated/groups/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,108 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/serviceProvisioningErrors/$count{?%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..4f0e2747323 --- /dev/null +++ b/msgraph/generated/groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/settings/count/count_request_builder.py b/msgraph/generated/groups/item/settings/count/count_request_builder.py index dd5d0ced197..752fd83f5b4 100644 --- a/msgraph/generated/groups/item/settings/count/count_request_builder.py +++ b/msgraph/generated/groups/item/settings/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/settings/item/group_setting_item_request_builder.py b/msgraph/generated/groups/item/settings/item/group_setting_item_request_builder.py index 08ac58b2958..5a444526ddc 100644 --- a/msgraph/generated/groups/item/settings/item/group_setting_item_request_builder.py +++ b/msgraph/generated/groups/item/settings/item/group_setting_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[GroupSettingItemRequestBui async def get(self,request_configuration: Optional[GroupSettingItemRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupSetting]: """ - Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. + Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSetting] Find more info here: https://learn.microsoft.com/graph/api/groupsetting-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[GroupSettingItemRequestBuilde async def patch(self,body: Optional[GroupSetting] = None, request_configuration: Optional[GroupSettingItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[GroupSetting]: """ - Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. + Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSetting] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[GroupSett Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupSettingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. + Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupSetting] = None, request_configuration: Optional[GroupSettingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. + Update the properties of a groupSetting object for tenant-wide group settings or a specific group setting. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[GroupSetting] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class GroupSettingItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class GroupSettingItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. + Retrieve the properties of a specific group setting object. The setting can be a tenant-level or group-specific setting. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/settings/settings_request_builder.py b/msgraph/generated/groups/item/settings/settings_request_builder.py index c3864975983..df86640dc8d 100644 --- a/msgraph/generated/groups/item/settings/settings_request_builder.py +++ b/msgraph/generated/groups/item/settings/settings_request_builder.py @@ -45,7 +45,7 @@ def by_group_setting_id(self,group_setting_id: str) -> GroupSettingItemRequestBu async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupSettingCollectionResponse]: """ - Retrieve a list of tenant-level or group-specific group settings objects. + Retrieve a list of tenant-level or group-specific group settings objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSettingCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-settings?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequ async def post(self,body: Optional[GroupSetting] = None, request_configuration: Optional[SettingsRequestBuilderPostRequestConfiguration] = None) -> Optional[GroupSetting]: """ - Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. + Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupSetting] @@ -92,24 +92,24 @@ async def post(self,body: Optional[GroupSetting] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tenant-level or group-specific group settings objects. + Retrieve a list of tenant-level or group-specific group settings objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GroupSetting] = None, request_configuration: Optional[SettingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. + Create a new setting based on the templates available in groupSettingTemplates. These settings can be at the tenant-level or at the group level. Group settings apply to only Microsoft 365 groups. The template named Group.Unified can be used to configure tenant-wide Microsoft 365 group settings, while the template named Group.Unified.Guest can be used to configure group-specific settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[GroupSetting] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SettingsRequestBuilderGetQueryParameters(): """ - Retrieve a list of tenant-level or group-specific group settings objects. + Retrieve a list of tenant-level or group-specific group settings objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/add/add_response.py b/msgraph/generated/groups/item/sites/add/add_post_response.py similarity index 93% rename from msgraph/generated/groups/item/sites/add/add_response.py rename to msgraph/generated/groups/item/sites/add/add_post_response.py index f429081ba61..4718fa63294 100644 --- a/msgraph/generated/groups/item/sites/add/add_response.py +++ b/msgraph/generated/groups/item/sites/add/add_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Site]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/add/add_request_builder.py b/msgraph/generated/groups/item/sites/add/add_request_builder.py index 6110db16cde..7008eaee566 100644 --- a/msgraph/generated/groups/item/sites/add/add_request_builder.py +++ b/msgraph/generated/groups/item/sites/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ Follow a user's site or multiple sites. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/site-follow?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/count/count_request_builder.py b/msgraph/generated/groups/item/sites/count/count_request_builder.py index 6c6c7c1c6a6..2a8e973f714 100644 --- a/msgraph/generated/groups/item/sites/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_response.py b/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_get_response.py similarity index 91% rename from msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_response.py rename to msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_get_response.py index 46a3da184cc..64e333c82f7 100644 --- a/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_response.py +++ b/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllSitesResponse(BaseCollectionPaginationCountResponse): +class GetAllSitesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Site]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllSitesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllSitesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllSitesResponse + Returns: GetAllSitesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllSitesResponse() + return GetAllSitesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_request_builder.py b/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_request_builder.py index 1183b395bda..8ea3abbe907 100644 --- a/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_request_builder.py +++ b/msgraph/generated/groups/item/sites/get_all_sites/get_all_sites_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_all_sites_response import GetAllSitesResponse + from .get_all_sites_get_response import GetAllSitesGetResponse class GetAllSitesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/getAllSites(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllSitesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllSitesResponse]: + async def get(self,request_configuration: Optional[GetAllSitesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllSitesGetResponse]: """ Invoke function getAllSites param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllSitesResponse] + Returns: Optional[GetAllSitesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllSitesRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_sites_response import GetAllSitesResponse + from .get_all_sites_get_response import GetAllSitesGetResponse - return await self.request_adapter.send_async(request_info, GetAllSitesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllSitesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllSitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllSitesR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllSitesRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/analytics/all_time/all_time_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/all_time/all_time_request_builder.py index afa47eed6c7..afa2bbe4ebd 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/all_time/all_time_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/all_time/all_time_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AllTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemActivityStat]: """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ItemActivityStat] Find more info here: https://learn.microsoft.com/graph/api/itemanalytics-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[AllTimeRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[AllTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllTimeRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> AllTimeRequestBuilder: @dataclass class AllTimeRequestBuilderGetQueryParameters(): """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/analytics/analytics_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/analytics_request_builder.py index 7ad075da7a7..34c6771f32c 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/analytics_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Analytics Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/count/count_request_builder.py index b4ccbc215c8..ce96f78e1c6 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py index 865e0527e1b..e1983fbb0a2 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivitiesRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivity] = None, request_configuration: Optional[ActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ItemActivity] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py index 3ef3df1e1e2..aedb2ca0c25 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py index b9d00b5bea1..7e80f9e7a29 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py index c18ecb4a700..50023bc535f 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py index 9cd3b12dd69..9e7c435c04e 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ItemActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ItemActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivity] = None, request_configuration: Optional[ItemActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ItemActivity] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py index 3e351147dd4..80332eb5de0 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ItemActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ItemActivityStatItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivityStat] = None, request_configuration: Optional[ItemActivityStatItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ItemActivityStat] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py index 375a8b4793b..8c32abdf422 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivityStat] = None, request_configuration: Optional[ItemActivityStatsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ItemActivityStat] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py b/msgraph/generated/groups/item/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py index 5571cf67b59..0757121c0ec 100644 --- a/msgraph/generated/groups/item/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[LastSevenDay Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastSevenDaysRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/columns/columns_request_builder.py b/msgraph/generated/groups/item/sites/item/columns/columns_request_builder.py index 95fbdc1bd76..ccb0bab9ee6 100644 --- a/msgraph/generated/groups/item/sites/item/columns/columns_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI 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]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [site][site]. This API is available in the following [national cloud deployments. 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 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque 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]. + Create a column for a site][site] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati 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]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [site][site]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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]. + Create a column for a site][site] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [site][site]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/columns/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/columns/count/count_request_builder.py index 7b8e74b65ab..7c44e4432d5 100644 --- a/msgraph/generated/groups/item/sites/item/columns/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/columns/item/column_definition_item_request_builder.py index 22848ac40b3..8ffaf630797 100644 --- a/msgraph/generated/groups/item/sites/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/columns/item/column_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnDef Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/groups/item/sites/item/columns/item/source_column/source_column_request_builder.py index fb60000ecfb..3e80c70fe28 100644 --- a/msgraph/generated/groups/item/sites/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/add_copy/add_copy_request_builder.py index d7dc44fd87d..05a70ef6c3b 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/add_copy/add_copy_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/add_copy/add_copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py index f1112f91633..3d1c3c23c7d 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = N def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/content_types/content_types_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/content_types_request_builder.py index 8ca5c8b521e..91ba4de3546 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/content_types_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/content_types_request_builder.py @@ -48,7 +48,7 @@ def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuild async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: """ - Get the collection of [contentType][contentType] resources in a [site][]. + Get the collection of contentType][contentType] resources in a [site][]. This API is available in the following [national cloud deployments. 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 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGet async def post(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Create a new [contentType][] in a [site][]. + Create a new contentType][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -95,24 +95,24 @@ async def post(self,body: Optional[ContentType] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [contentType][contentType] resources in a [site][]. + Get the collection of contentType][contentType] resources in a [site][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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][]. + Create a new contentType][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[ContentType] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -179,7 +179,7 @@ def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesReques @dataclass class ContentTypesRequestBuilderGetQueryParameters(): """ - Get the collection of [contentType][contentType] resources in a [site][]. + Get the collection of contentType][contentType] resources in a [site][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/content_types/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/count/count_request_builder.py index ee33ddab35b..0505e36ac6e 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py b/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py similarity index 89% rename from msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py rename to msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py index 18a2c046e26..8d8f52c2fcd 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py +++ b/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetCompatibleHubContentTypesResponse(BaseCollectionPaginationCountResponse): +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetCompatibleHubContentTypesResponse + Returns: GetCompatibleHubContentTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetCompatibleHubContentTypesResponse() + return GetCompatibleHubContentTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py index 553fc5cb2be..d671464c33c 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesResponse]: + async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: """ Invoke function getCompatibleHubContentTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetCompatibleHubContentTypesResponse] + Returns: Optional[GetCompatibleHubContentTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesR } if not self.request_adapter: raise Exception("Http core is null") - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse - return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetCompatibl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetCompatibleHubContentTypesRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py index 35ba4fe2242..d20a8fc97a3 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. 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[AssociateWithHubSitesPostRequestBody] = None, def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/base/base_request_builder_.py b/msgraph/generated/groups/item/sites/item/content_types/item/base/base_request_builder_.py index 809c394e604..5d4fd18fc24 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/base/base_request_builder_.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/base/base_request_builder_.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseRequestBuilder_: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/base_types/base_types_request_builder.py index 8b4f0178b8a..0c7332c5daa 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/base_types/base_types_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/base_types/base_types_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseTypesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseTypesRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/base_types/count/count_request_builder.py index 10a8e5e9359..dd3d6998838 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/base_types/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/base_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py index 3bb93f2d059..83514bab925 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ContentTypeItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/column_links/column_links_request_builder.py index ebaabc0a0aa..1ca66b1fd45 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/column_links/column_links_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/column_links/column_links_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinksR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ColumnLink] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/column_links/count/count_request_builder.py index 0c9c1306260..bc6f351dfdb 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/column_links/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/column_links/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py index 304cb16c525..e598b832cf6 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnLin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnLinkItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinkIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinkItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ColumnLink] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/column_positions_request_builder.py index 9b9cec921a6..b9c77213a44 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/column_positions_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/column_positions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnPositi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnPositionsRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/count/count_request_builder.py index 22a6e69b38c..5ced293345f 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py index 2907ae87df5..7bc5ad6340e 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/columns/columns_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/columns/columns_request_builder.py index 8eef79bccb6..9a3be755472 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/columns/columns_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. 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/contenttype-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/columns/count/count_request_builder.py index ecc74d57ec8..1df448f1580 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/columns/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py index d7643de295f..b6775303c2c 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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/columndefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ColumnDefinitionItemReques async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. 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/columndefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBu async def patch(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ColumnDefinition] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ColumnDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py index 563626dafab..cce7a7fc953 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/content_type_item_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/content_type_item_request_builder.py index 83fe585c2ed..1af0e1f6402 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/content_type_item_request_builder.py @@ -15,9 +15,9 @@ from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder from .column_links.column_links_request_builder import ColumnLinksRequestBuilder from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder - from .columns.columns_request_builder import ColumnsRequestBuilder from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder from .is_published.is_published_request_builder import IsPublishedRequestBuilder from .publish.publish_request_builder import PublishRequestBuilder @@ -38,7 +38,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ContentTypeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [content type][contentType] from a [list][] or a [site][]. + Remove a content type][contentType] from a [list][] or a [site][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-delete?view=graph-rest-1.0 @@ -58,7 +58,7 @@ async def delete(self,request_configuration: Optional[ContentTypeItemRequestBuil async def get(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentType]: """ - Retrieve the metadata for a [content type][contentType] in a [site][] or a [list][]. + Retrieve the metadata for a content type][contentType] in a [site][] or a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] Find more info here: https://learn.microsoft.com/graph/api/contenttype-get?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[ContentTypeItemRequestBuilder async def patch(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ContentType]: """ - Update a [content type][contentType]. + Update a content type][contentType]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -105,39 +105,39 @@ async def patch(self,body: Optional[ContentType] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [content type][contentType] from a [list][] or a [site][]. + Remove a content type][contentType] from a [list][] or a [site][]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [content type][contentType] in a [site][] or a [list][]. + Retrieve the metadata for a content type][contentType] in a [site][] or a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [content type][contentType]. + Update a content type][contentType]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -145,13 +145,13 @@ def to_patch_request_information(self,body: Optional[ContentType] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -268,7 +268,7 @@ class ContentTypeItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ContentTypeItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [content type][contentType] in a [site][] or a [list][]. + Retrieve the metadata for a content type][contentType] in a [site][] or a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py index c68dbc1041f..3495dfa0d77 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. 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[CopyToDefaultContentLocationPostRequestBody] def to_post_request_information(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CopyToDefaultContentLocation if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..97dd03cb77a --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_request_builder.py index 8fea26961aa..675ab24776a 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse class IsPublishedRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/isPublished()", path_parameters) - async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedResponse]: + async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedGetResponse]: """ Invoke function isPublished param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[IsPublishedResponse] + Returns: Optional[IsPublishedGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse - return await self.request_adapter.send_async(request_info, IsPublishedResponse, error_mapping) + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[IsPublishedR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> IsPublishedRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_response.py b/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_response.py deleted file mode 100644 index 7e0c9f380cc..00000000000 --- a/msgraph/generated/groups/item/sites/item/content_types/item/is_published/is_published_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: IsPublishedResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return IsPublishedResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/publish/publish_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/publish/publish_request_builder.py index c739ffa474e..0e0000c9849 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/publish/publish_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/groups/item/sites/item/content_types/item/unpublish/unpublish_request_builder.py index ac8ac6ca24b..3dfdb86d00c 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/content_types/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/created_by_user/created_by_user_request_builder.py index 6535649be58..b77596e9aed 100644 --- a/msgraph/generated/groups/item/sites/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/groups/item/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index c662bb3fc08..a87b11e10c6 100644 --- a/msgraph/generated/groups/item/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..5262e475948 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..084b3d31e9b --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/sites/{site-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/drive/drive_request_builder.py b/msgraph/generated/groups/item/sites/item/drive/drive_request_builder.py index 9f3f10bc9e6..19d7b83f1d4 100644 --- a/msgraph/generated/groups/item/sites/item/drive/drive_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/drive/drive_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/drives/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/drives/count/count_request_builder.py index 4d0a05cdf82..d0e68bdf712 100644 --- a/msgraph/generated/groups/item/sites/item/drives/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/drives/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/drives/drives_request_builder.py b/msgraph/generated/groups/item/sites/item/drives/drives_request_builder.py index 3253435f1e1..572ef1ee1de 100644 --- a/msgraph/generated/groups/item/sites/item/drives/drives_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/drives/drives_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[DrivesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/drives/item/drive_item_request_builder.py b/msgraph/generated/groups/item/sites/item/drives/item/drive_item_request_builder.py index 0c3206a3940..67c431b7777 100644 --- a/msgraph/generated/groups/item/sites/item/drives/item/drive_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/drives/item/drive_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/external_columns/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/external_columns/count/count_request_builder.py index d472daf3522..899d2f5b733 100644 --- a/msgraph/generated/groups/item/sites/item/external_columns/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/external_columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/external_columns/external_columns_request_builder.py b/msgraph/generated/groups/item/sites/item/external_columns/external_columns_request_builder.py index 128fa2df7d6..25e37fcb4a8 100644 --- a/msgraph/generated/groups/item/sites/item/external_columns/external_columns_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/external_columns/external_columns_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ExternalColu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/external_columns/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/external_columns/item/column_definition_item_request_builder.py index 205ac22299c..b7f75a689f3 100644 --- a/msgraph/generated/groups/item/sites/item/external_columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/external_columns/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py index f0931b13fb7..a76c6042283 100644 --- a/msgraph/generated/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index b6a72ad04fc..3bcc3cfa55c 100644 --- a/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index f9d6720f828..d71cab1fb1b 100644 --- a/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index 33ec9656f50..b231010ae10 100644 --- a/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_response.py b/msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py similarity index 87% rename from msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_response.py rename to msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py index 6b3aed14eec..256cd80244c 100644 --- a/msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_response.py +++ b/msgraph/generated/groups/item/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetApplicableContentTypesForListWithListIdResponse(BaseCollectionPaginationCountResponse): +class GetApplicableContentTypesForListWithListIdGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetApplicableContentTypesForListWithListIdResponse: + 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: GetApplicableContentTypesForListWithListIdResponse + Returns: GetApplicableContentTypesForListWithListIdGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetApplicableContentTypesForListWithListIdResponse() + return GetApplicableContentTypesForListWithListIdGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/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_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py index caf6152652c..f605b30655a 100644 --- a/msgraph/generated/groups/item/sites/item/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_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_applicable_content_types_for_list_with_list_id_response import GetApplicableContentTypesForListWithListIdResponse + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse class GetApplicableContentTypesForListWithListIdRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['list_id'] = str(list_id) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getApplicableContentTypesForList(listId='{listId}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> Optional[GetApplicableContentTypesForListWithListIdResponse]: + 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[GetApplicableContentTypesForListWithListIdResponse] + Returns: Optional[GetApplicableContentTypesForListWithListIdGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetApplicableContentTypesForL } if not self.request_adapter: raise Exception("Http core is null") - from .get_applicable_content_types_for_list_with_list_id_response import GetApplicableContentTypesForListWithListIdResponse + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse - return await self.request_adapter.send_async(request_info, GetApplicableContentTypesForListWithListIdResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetApplicableContentTypesForListWithListIdGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetApplicabl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: 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 cdc2fa48964..dad531ac8d8 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['path'] = str(path) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')", path_parameters) async def get(self,request_configuration: Optional[GetByPathWithPathRequestBuilderGetRequestConfiguration] = None) -> Optional[Site]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[GetByPathWit Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetByPathWithPathRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/items/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/items/count/count_request_builder.py index 89397139ab6..6b0856b8e36 100644 --- a/msgraph/generated/groups/item/sites/item/items/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/items/item/base_item_item_request_builder.py b/msgraph/generated/groups/item/sites/item/items/item/base_item_item_request_builder.py index 8e3a62045a0..2f260586bb9 100644 --- a/msgraph/generated/groups/item/sites/item/items/item/base_item_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/items/item/base_item_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseItemItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseItemItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/items/items_request_builder.py b/msgraph/generated/groups/item/sites/item/items/items_request_builder.py index 5c76b36b04e..346fa041cbc 100644 --- a/msgraph/generated/groups/item/sites/item/items/items_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/items/items_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemsRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py index eee0ba624a1..12c98ac0337 100644 --- a/msgraph/generated/groups/item/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/groups/item/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 8b16b29c887..410b901c513 100644 --- a/msgraph/generated/groups/item/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..adcbcdd0c8e --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..1b2b720e2e0 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/sites/{site-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/count/count_request_builder.py index 9fb6654c44b..96946dfcdad 100644 --- a/msgraph/generated/groups/item/sites/item/lists/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/columns/columns_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/columns/columns_request_builder.py index bae408affe7..d9053c0e3ce 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/columns/columns_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. 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/list-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Create a column for a [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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 [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/columns/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/columns/count/count_request_builder.py index 4bbcd5b9fc2..4eebd29f4d9 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/columns/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/columns/item/column_definition_item_request_builder.py index e3b51b56841..8064083cfd9 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/columns/item/column_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnDef Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py index 3801ca5010f..33bd748faca 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py index 619f046c181..fb3a69d01d7 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py index 6bd953bf2d7..18968d44c7f 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = N def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/content_types_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/content_types_request_builder.py index 411614d9893..438895ea042 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/content_types_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/content_types_request_builder.py @@ -48,7 +48,7 @@ def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuild async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. 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/list-list-contenttypes?view=graph-rest-1.0 @@ -94,19 +94,19 @@ async def post(self,body: Optional[ContentType] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[ContentType] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesReques @dataclass class ContentTypesRequestBuilderGetQueryParameters(): """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/count/count_request_builder.py index 890c782a03c..b4f0c0927ed 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py similarity index 89% rename from msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py rename to msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py index caa8d66ccfa..8afd27023ca 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -10,20 +10,20 @@ from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetCompatibleHubContentTypesResponse(BaseCollectionPaginationCountResponse): +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetCompatibleHubContentTypesResponse + Returns: GetCompatibleHubContentTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetCompatibleHubContentTypesResponse() + return GetCompatibleHubContentTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py index 05ed17d0eb3..2d7a0bc63ec 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/contentTypes/getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesResponse]: + async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: """ Invoke function getCompatibleHubContentTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetCompatibleHubContentTypesResponse] + Returns: Optional[GetCompatibleHubContentTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesR } if not self.request_adapter: raise Exception("Http core is null") - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse - return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetCompatibl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetCompatibleHubContentTypesRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py index 29fc1753474..5287ddc63dd 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. 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[AssociateWithHubSitesPostRequestBody] = None, def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base/base_request_builder_.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base/base_request_builder_.py index eed9afd3c03..61d6d23fcd9 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base/base_request_builder_.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base/base_request_builder_.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseRequestBuilder_: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py index 0118391a395..f37dc999f4b 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseTypesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseTypesRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py index f4e7ec98288..01fe9cc15be 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py index 57e0dfc9176..b0c12a51adc 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ContentTypeItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py index 58d1c3c6446..eb56a8099ec 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinksR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ColumnLink] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py index 19f6646b6a3..f46c488c903 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py index 27061da4da9..a49166934e3 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnLin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnLinkItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinkIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinkItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ColumnLink] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py index da4ae433406..e7975dbeddf 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnPositi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnPositionsRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py index 2dc21760bda..3a86b168e53 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py index 6ddcfa73db4..0840eb694d9 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/columns_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/columns_request_builder.py index 99d5709f38d..10f5f1bb594 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/columns_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. 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/contenttype-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py index e1cd26917a1..8fed45a11c8 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py index 81f0f8d183c..b81941568f5 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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/columndefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ColumnDefinitionItemReques async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. 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/columndefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBu async def patch(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ColumnDefinition] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ColumnDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py index 5a4a20d712e..0b281b3076b 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/content_type_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/content_type_item_request_builder.py index 301e8e12ac0..d7e6afaa4d8 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/content_type_item_request_builder.py @@ -15,9 +15,9 @@ from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder from .column_links.column_links_request_builder import ColumnLinksRequestBuilder from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder - from .columns.columns_request_builder import ColumnsRequestBuilder from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder from .is_published.is_published_request_builder import IsPublishedRequestBuilder from .publish.publish_request_builder import PublishRequestBuilder @@ -107,12 +107,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContentTy Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -122,14 +122,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[ContentType] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py index 7ff2f3e065e..9731c6ddc8d 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. 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[CopyToDefaultContentLocationPostRequestBody] def to_post_request_information(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CopyToDefaultContentLocation if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..97dd03cb77a --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py index a4c0bad459b..2fbd2c5044e 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse class IsPublishedRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/contentTypes/{contentType%2Did}/isPublished()", path_parameters) - async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedResponse]: + async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedGetResponse]: """ Invoke function isPublished param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[IsPublishedResponse] + Returns: Optional[IsPublishedGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse - return await self.request_adapter.send_async(request_info, IsPublishedResponse, error_mapping) + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[IsPublishedR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> IsPublishedRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_response.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_response.py deleted file mode 100644 index 7e0c9f380cc..00000000000 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/is_published/is_published_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: IsPublishedResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return IsPublishedResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/publish/publish_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/publish/publish_request_builder.py index 9ca961e22eb..dbc209da1c1 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/publish/publish_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py index 90004422471..e51450095e2 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/created_by_user_request_builder.py index 113a34c60f7..6602fe8498d 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 5614a0c696c..8f36c499667 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..6d0b8417667 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..8ae520098d2 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/sites/{site-id}/lists/{list-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/drive/drive_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/drive/drive_request_builder.py index 2a37f4879c6..9b217d48e48 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/drive/drive_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/drive/drive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Drive] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DriveRequestBuilder: @dataclass class DriveRequestBuilderGetQueryParameters(): """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/analytics/analytics_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/analytics/analytics_request_builder.py index eddf828b952..1850b299e3f 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/analytics/analytics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AnalyticsRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py index 879db46b4c2..40d9660ca18 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index c181624e5bb..e1f76136fe9 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..cde4cf508a0 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..42451bb2667 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/sites/{site-id}/lists/{list-id}/items/{listItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py index 5f07004d682..11f7f9f2ff9 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py index 781e1090fb9..bfcc8117f16 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py @@ -45,7 +45,7 @@ def by_document_set_version_id(self,document_set_version_id: str) -> DocumentSet async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersionCollectionResponse]: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-documentsetversions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBui async def post(self,body: Optional[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DocumentSetVersion] = None, request_configura def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DocumentSetVersionsRequestBuilderGetQueryParameters(): """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py index 7c0d89104f6..ee1c3155dae 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequ async def get(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[DocumentSetVersion] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class DocumentSetVersionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py index 76ddf84328c..88004828c9c 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py index 8d6b46800d7..fa6b9042b37 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py index 4177206bd05..5f5a6191b35 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py index 1b33de27722..adc40cc88d3 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/fields/fields_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/fields/fields_request_builder.py index 31f9a2c3abe..2a8ea31c914 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/fields/fields_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/fields/fields_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[FieldsRequestBuilderGetReques async def patch(self,body: Optional[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> Optional[FieldValueSet]: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FieldValueSet] @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,19 +113,19 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py index cfe9b048ddb..1e9a317f34a 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index bbdd38cc0eb..4ce32287e7a 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index 4935b0bfecc..2c42e356246 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index 99e57a0b094..39eae909161 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py index 8eb4b19bddc..4db9e72b375 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 29a092a08d1..9823c0f3a71 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..ec2693f75c0 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..9eaa7b11f8f --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/sites/{site-id}/lists/{list-id}/items/{listItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/list_item_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/list_item_item_request_builder.py index a59a0a716ec..8207861a7f6 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/list_item_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/list_item_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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/listitem-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ListItemItemRequestBuilder async def get(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItem]: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] Find more info here: https://learn.microsoft.com/graph/api/listitem-get?view=graph-rest-1.0 @@ -121,34 +121,34 @@ async def patch(self,body: Optional[ListItem] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ListItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -161,13 +161,13 @@ def to_patch_request_information(self,body: Optional[ListItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ListItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class ListItemItemRequestBuilderGetQueryParameters(): """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/count/count_request_builder.py index ff4ea91dedb..fb7864e6d10 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py index db4f80ac2b9..14707f98b7e 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py index 91f2741fd2c..ce2f02c67c2 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ListItemVersionItemRequest async def get(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersion]: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersion] Find more info here: https://learn.microsoft.com/graph/api/listitemversion-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemV Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[ListItemVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ListItemVersion] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class ListItemVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class ListItemVersionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py index b1db35ee4e2..3af64d341b3 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/listitemversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreVersionRequestBuilder def to_post_request_information(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreVersionRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/versions_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/versions_request_builder.py index 6a34eb0de42..398871c880b 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/versions_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_list_item_version_id(self,list_item_version_id: str) -> ListItemVersionIt async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersionCollectionResponse]: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-versions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ListItemVersion] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItemVersion] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/items/items_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/items/items_request_builder.py index 5453137f9ab..4ecf68db988 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/items/items_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/items/items_request_builder.py @@ -44,7 +44,7 @@ def by_list_item_id(self,list_item_id: str) -> ListItemItemRequestBuilder: async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemCollectionResponse]: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list?view=graph-rest-1.0 @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequest async def post(self,body: Optional[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> Optional[ListItem]: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] @@ -91,24 +91,24 @@ async def post(self,body: Optional[ListItem] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItem] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -139,7 +139,7 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemsRequestBuilder: @dataclass class ItemsRequestBuilderGetQueryParameters(): """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py index 84bcf8b2229..61d4c76e75d 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 604a5e5fb91..aa0181cb109 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..6bc48646823 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..1c10fa848f3 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/sites/{site-id}/lists/{list-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + 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 dad9ec832ec..8291fbac47c 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,7 +55,7 @@ async def delete(self,request_configuration: Optional[ListItemRequestBuilderDele async def get(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> Optional[List_]: """ - Returns the metadata for a [list][]. + Returns the metadata for a list][]. This API is available in the following [national cloud deployments. 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-get?view=graph-rest-1.0 @@ -106,29 +106,29 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the metadata for a [list][]. + Returns the metadata for a list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[List_] = None, request_configuration: Optional[ListItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[List_] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -246,7 +246,7 @@ class ListItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ListItemRequestBuilderGetQueryParameters(): """ - Returns the metadata for a [list][]. + Returns the metadata for a list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/lists/item/operations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/operations/count/count_request_builder.py index 469ae3ea277..d7314aed598 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/operations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py index 26ef6fca104..9ca502f09c2 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[RichLongR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[RichLongRunn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RichLongRunningOperation] = None, request_configuration: Optional[RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/operations/operations_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/operations/operations_request_builder.py index 9d59826d4df..e8f4b70822d 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/operations/operations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/count/count_request_builder.py index 9e0d657f21c..0340dc79585 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py index 4ccfa5cbf2e..196222d8721 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReauthorizeRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py index 5a3c87fb04f..27419a2b71b 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Subscript Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Subscription] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/subscriptions_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/subscriptions_request_builder.py index eff6aa8d879..21483e42769 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/subscriptions_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/subscriptions/subscriptions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Subscription] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/lists/lists_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/lists_request_builder.py index 366572b2696..8aa189e523f 100644 --- a/msgraph/generated/groups/item/sites/item/lists/lists_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/lists_request_builder.py @@ -10,8 +10,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.list_collection_response import ListCollectionResponse from ......models.list_ import List_ + from ......models.list_collection_response import ListCollectionResponse from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.list_item_request_builder import ListItemRequestBuilder @@ -45,7 +45,7 @@ def by_list_id(self,list_id: str) -> ListItemRequestBuilder: 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. + 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. This API is available in the following national cloud deployments. 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 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequest async def post(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[List_]: """ - Create a new [list][] in a [site][]. + Create a new list][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[List_] @@ -92,24 +92,24 @@ async def post(self,body: Optional[List_] = None, request_configuration: Optiona 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. + 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. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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][]. + Create a new list][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[List_] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @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. + 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. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/count/count_request_builder.py index 975531e605b..c7c77ec18f8 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py index 56298ae5081..4dd4b3d8809 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CopyNotebookModel]: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CopyNotebookModel] @@ -54,7 +54,7 @@ async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py similarity index 89% rename from msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py rename to msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py index ab393ea0463..73f30fa8d95 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetRecentNotebooksWithIncludePersonalNotebooksResponse(BaseCollectionPaginationCountResponse): +class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[RecentNotebook]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetRecentNotebooksWithIncludePersonalNotebooksResponse + Returns: GetRecentNotebooksWithIncludePersonalNotebooksGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetRecentNotebooksWithIncludePersonalNotebooksResponse() + return GetRecentNotebooksWithIncludePersonalNotebooksGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py index c38aea01c04..da3da011694 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse class GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['include_personal_notebooks'] = str(include_personal_notebooks) super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse]: + async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse]: """ Invoke function getRecentNotebooks param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse] + Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetRecentNotebooksWithInclude } if not self.request_adapter: raise Exception("Http core is null") - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse - return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetRecentNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py index 06781e33d54..51900ad6dc4 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_notebook_post_request_body import CopyNotebookPostRequestBody class CopyNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/notebook_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/notebook_item_request_builder.py index 11d3860d8b6..76659ade95a 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/notebook_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/notebook_item_request_builder.py @@ -13,8 +13,8 @@ from ........models.notebook import Notebook from ........models.o_data_errors.o_data_error import ODataError from .copy_notebook.copy_notebook_request_builder import CopyNotebookRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class NotebookItemRequestBuilder(BaseRequestBuilder): """ @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[NotebookItemRequestBuilder async def get(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Notebook]: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] Find more info here: https://learn.microsoft.com/graph/api/notebook-get?view=graph-rest-1.0 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[NotebookI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebookItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Notebook] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class NotebookItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class NotebookItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py index 0d3772f6956..3792f4a9634 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py index 3d95c5e3d79..60462867bae 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py index 3f66c1580af..b375000ed05 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py index f514da4cf4c..ee819b3de34 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ..........models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py index 6e4206ccf1f..cb5333cbbed 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py index 88e3e9e55c2..d907fe7118d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py index 0f68d878a77..9aedaad3890 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py index 4d4d97a0f89..e51209e2bb6 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 868a17cb48f..2f455f7dabf 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 151a16d65c5..1a54aadc7a6 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py index a1b4f93cbbd..e625686820b 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ............models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py index 25f70b94fac..102b43ef2de 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py index 70a40c736d6..005dbd38d2a 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...............models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 8203a201607..0f00f765d3c 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...............models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index 56e8ed505e8..cef917e68f5 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..............models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 639ab0909e3..bf50e610213 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 892220628e5..0b9f86a293c 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 5982efa6905..747719a014e 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...............models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index 92bd6fa3ec6..6a57064b125 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...............models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py index d4ffbd58229..2da4421448d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .............models.onenote_page_collection_response import OnenotePageCollectionResponse + from .............models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 6d924516fdd..4700c2e4624 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 29ef54f983b..7b9fc28814e 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py index 4aff125df85..84d4902bd7c 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from ...........models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from ...........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py index 24ced6db14a..15a55ca6d18 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sectiongroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe async def post(self,body: Optional[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py index 0a65408e485..79aafa8587e 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index ceef68d8d06..653ce554728 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index cacfcf04950..2df9accf8e7 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py index 4bfe0b19539..85652a409b3 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ..........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py index 1976bba71e6..aa21149bc40 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py index c2f0ddc2af3..17935c1dce3 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .............models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index dd41dd15f67..cd12866b848 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py index 765fa3c4537..9cce0e4d0c8 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ............models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index eace3ce9fcb..e2988880ae8 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 4f66f9bb437..6d1fff6aeed 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 752d9a54735..fb96cb18ca7 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .............models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py index d410b43d320..702df343016 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .............models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py index 13e33b15ece..326b69648c5 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from ...........models.onenote_page_collection_response import OnenotePageCollectionResponse + from ...........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 848f9e5541b..5c991a05bf0 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 54f1a5cc5be..c7830598bc4 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/sections_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/sections_request_builder.py index bbb3df33e71..e37c94fa64d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .........models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/notebooks/notebooks_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/notebooks/notebooks_request_builder.py index 681245c8809..451b12a37a8 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/notebooks/notebooks_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/notebooks/notebooks_request_builder.py @@ -47,7 +47,7 @@ def by_notebook_id(self,notebook_id: str) -> NotebookItemRequestBuilder: async def get(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[NotebookCollectionResponse]: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NotebookCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-notebooks?view=graph-rest-1.0 @@ -81,7 +81,7 @@ def get_recent_notebooks_with_include_personal_notebooks(self,include_personal_n async def post(self,body: Optional[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> Optional[Notebook]: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] @@ -106,24 +106,24 @@ async def post(self,body: Optional[Notebook] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[Notebook] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def get_notebook_from_web_url(self) -> GetNotebookFromWebUrlRequestBuilder: @dataclass class NotebooksRequestBuilderGetQueryParameters(): """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/onenote_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/onenote_request_builder.py index 45ffdbd5bd6..7acefe969f7 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/onenote_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/onenote_request_builder.py @@ -10,14 +10,14 @@ 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.onenote import Onenote + from ......models.o_data_errors.o_data_error import ODataError from .notebooks.notebooks_request_builder import NotebooksRequestBuilder from .operations.operations_request_builder import OperationsRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder from .resources.resources_request_builder import ResourcesRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class OnenoteRequestBuilder(BaseRequestBuilder): """ @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Onenote] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/operations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/operations/count/count_request_builder.py index 328e5c2c36d..a3f746e26e3 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/operations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py index fe51dbdbd98..43ac30b2e57 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ........models.o_data_errors.o_data_error import ODataError class OnenoteOperationItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OnenoteOperationItemReques async def get(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] Find more info here: https://learn.microsoft.com/graph/api/onenoteoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteOp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OnenoteOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteOperation] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OnenoteOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class OnenoteOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/operations/operations_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/operations/operations_request_builder.py index ba3990095f6..b41d99684b1 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/operations/operations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/operations/operations_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_operation import OnenoteOperation from .......models.onenote_operation_collection_response import OnenoteOperationCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_operation_item_request_builder import OnenoteOperationItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_operation_id(self,onenote_operation_id: str) -> OnenoteOperationI async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperationCollectionResponse]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteOperation] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteOperation] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/count/count_request_builder.py index c592d0ed15d..35e80c3c5e2 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/content/content_request_builder.py index a2e4e3f532b..de1cf10b6aa 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py index 20e459abc66..63381a7f953 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_page_item_request_builder.py index 8546c48775a..c1cbeef611b 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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/page-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuil async def get(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] Find more info here: https://learn.microsoft.com/graph/api/page-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[OnenotePage] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class OnenotePageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class OnenotePageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 1df76a89667..c14d3a8c109 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py index a944e09e535..a8a1a858823 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py index 2d850cf6eda..1a81d98f88b 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/item/preview/preview_request_builder.py index 4983e830ef9..3de1b438e54 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/pages/pages_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/pages/pages_request_builder.py index 148f5363a6c..993716dade1 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .......models.onenote_page_collection_response import OnenotePageCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/resources/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/resources/count/count_request_builder.py index 16a5035d2d7..e24fe36078e 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/resources/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/resources/item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/resources/item/content/content_request_builder.py index 88c851939e2..0eaf92897cb 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/resources/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/resources/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from .........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py index 47ac31770ad..adb9df91c7d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from ........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder class OnenoteResourceItemRequestBuilder(BaseRequestBuilder): @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OnenoteResourceItemRequest async def get(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResource]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResource] """ @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[OnenoteResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteResource] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -175,7 +175,7 @@ class OnenoteResourceItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class OnenoteResourceItemRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/resources/resources_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/resources/resources_request_builder.py index 85d9f3512ea..b50219bc415 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/resources/resources_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/resources/resources_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_resource import OnenoteResource from .......models.onenote_resource_collection_response import OnenoteResourceCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_resource_item_request_builder import OnenoteResourceItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_resource_id(self,onenote_resource_id: str) -> OnenoteResourceItem async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResourceCollectionResponse]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResourceCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteResource] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteResource] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/count/count_request_builder.py index 5430408aa08..1731560b2be 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py index 4dd191098b7..f06d4d251ed 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py index 22cb2cdb3ca..ff7681167f8 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_group_item_request_builder.py index 05c09ba9206..cd8e0814bef 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ........models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SectionGroupItemRequestBui async def get(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class SectionGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class SectionGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py index a6176e4ef82..9e4e36fcd53 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py index b05b8e855ba..f0a15bdb561 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py index f7f8d709d51..c191f16860a 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py index 67b7f5852cf..2de95ee566d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 3f405abd6f5..6e4b046f378 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index b53e70fb205..97435849695 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py index 8e1b1f0b2b2..e88e666a2e0 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ..........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py index 5e90ae67bcb..8c342b64974 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py index 37fa66cab91..808d76d8f2b 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .............models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 228530e6098..11e7b617894 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index 1642a0bd7e7..8cc2c0bbd8d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ............models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 6e6077b1542..4e9f662c4bb 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 8429b090156..d9840f36fe3 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 0e9a7e991c8..924b8bcc461 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .............models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index d8cb3da64fd..5c27a564286 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .............models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py index 83cace27cb3..01982eb22cb 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from ...........models.onenote_page_collection_response import OnenotePageCollectionResponse + from ...........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 3fa6d707c09..f78bd2c9d09 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index ef262171045..76d30702bde 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/sections_request_builder.py index 9c51f7d382c..a1c61ba4f0a 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .........models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/section_groups/section_groups_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/section_groups/section_groups_request_builder.py index 4ec96e2b717..38878735772 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sectiongroups?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/count/count_request_builder.py index 1b6baa8d8c2..310c734079d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 481269a953b..8cadc098c6e 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 1d3519642d1..e9fea6866db 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/onenote_section_item_request_builder.py index 2b2ac55dee5..bfd070be6cf 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[OnenoteSectionItemRequestB async def get(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] Find more info here: https://learn.microsoft.com/graph/api/section-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class OnenoteSectionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class OnenoteSectionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/count/count_request_builder.py index 2aa4042df65..ec9fc55c4e6 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py index dc299e6db5c..b1f57f3268d 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 7ec1650939b..a1fd0fe16a2 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py index 8c5c007f08f..91a06022c95 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 32b40c48188..a6b3402d083 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 8bc97c9cc80..e34a8f82053 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py index cf4510b0525..ea69495a71c 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py index 4dc63c5e24a..2cc23ba900f 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/pages_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/pages_request_builder.py index 12639c43e62..d4736e3b794 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py index 66988538325..91a5c9777e3 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py index 34a479971e0..1773ad8fc49 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/onenote/sections/sections_request_builder.py b/msgraph/generated/groups/item/sites/item/onenote/sections/sections_request_builder.py index ab29779b56d..56292986c22 100644 --- a/msgraph/generated/groups/item/sites/item/onenote/sections/sections_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/onenote/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sections?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/operations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/operations/count/count_request_builder.py index 738f7243498..76759119249 100644 --- a/msgraph/generated/groups/item/sites/item/operations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/operations/item/rich_long_running_operation_item_request_builder.py index 816f9cb8ac9..49fdfda50f9 100644 --- a/msgraph/generated/groups/item/sites/item/operations/item/rich_long_running_operation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/operations/item/rich_long_running_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[RichLongRunningOperationIt async def get(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperation]: """ - Get the status of a rich long-running operation on a site or a list. + Get the status of a rich long-running operation on a site or a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RichLongRunningOperation] Find more info here: https://learn.microsoft.com/graph/api/richlongrunningoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[RichLongR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a rich long-running operation on a site or a list. + Get the status of a rich long-running operation on a site or a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RichLongRunningOperation] = None, request_configuration: Optional[RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class RichLongRunningOperationItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class RichLongRunningOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of a rich long-running operation on a site or a list. + Get the status of a rich long-running operation on a site or a list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/operations/operations_request_builder.py b/msgraph/generated/groups/item/sites/item/operations/operations_request_builder.py index 93457d82070..f15827e5457 100644 --- a/msgraph/generated/groups/item/sites/item/operations/operations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_rich_long_running_operation_id(self,rich_long_running_operation_id: str) async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperationCollectionResponse]: """ - Get a list of rich long-running operations associated with a site. + Get a list of rich long-running operations associated with a site. This API is available in the following national cloud deployments. 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 @@ -91,19 +91,19 @@ async def post(self,body: Optional[RichLongRunningOperation] = None, request_con def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of rich long-running operations associated with a site. + Get a list of rich long-running operations associated with a site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get a list of rich long-running operations associated with a site. + Get a list of rich long-running operations associated with a site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/permissions/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/permissions/count/count_request_builder.py index 18c0088a770..4d210182708 100644 --- a/msgraph/generated/groups/item/sites/item/permissions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_response.py b/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_post_response.py similarity index 92% rename from msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_response.py rename to msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_post_response.py index 00b25da2591..f0fd631a02d 100644 --- a/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_response.py +++ b/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_post_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GrantResponse(BaseCollectionPaginationCountResponse): +class GrantPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Permission]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GrantResponse + Returns: GrantPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GrantResponse() + return GrantPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_request_builder.py b/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_request_builder.py index 69393d5be8a..f3a6746d12d 100644 --- a/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/permissions/item/grant/grant_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError from .grant_post_request_body import GrantPostRequestBody - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse class GrantRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/permissions/{permission%2Did}/grant", path_parameters) - async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantResponse]: + async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantPostResponse]: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GrantResponse] + Returns: Optional[GrantPostResponse] Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GrantPostRequestBody] = None, request_configu } if not self.request_adapter: raise Exception("Http core is null") - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse - return await self.request_adapter.send_async(request_info, GrantResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/permissions/item/permission_item_request_builder.py b/msgraph/generated/groups/item/sites/item/permissions/item/permission_item_request_builder.py index 8ad5848888f..c4b2b1a7998 100644 --- a/msgraph/generated/groups/item/sites/item/permissions/item/permission_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/permissions/item/permission_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a permission object on a site. + Delete a permission object on a site. This API is available in the following national cloud deployments. 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/site-delete-permission?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PermissionItemRequestBuild async def get(self,request_configuration: Optional[PermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Permission]: """ - Retrieve the properties and relationships of a permission object on a site. + Retrieve the properties and relationships of a permission object on a site. This API is available in the following national cloud deployments. 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-get-permission?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[PermissionItemRequestBuilderG async def patch(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Permission]: """ - Update an application permission object on a site. + Update an application permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Permission] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[Permission] = None, request_configuration: O def to_delete_request_information(self,request_configuration: Optional[PermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a permission object on a site. + Delete a permission object on a site. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a permission object on a site. + Retrieve the properties and relationships of a permission object on a site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Permission] = None, request_configuration: Optional[PermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an application permission object on a site. + Update an application permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Permission] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class PermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class PermissionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a permission object on a site. + Retrieve the properties and relationships of a permission object on a site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/permissions/permissions_request_builder.py b/msgraph/generated/groups/item/sites/item/permissions/permissions_request_builder.py index fecf685f322..d09c78c571e 100644 --- a/msgraph/generated/groups/item/sites/item/permissions/permissions_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/permissions/permissions_request_builder.py @@ -45,7 +45,7 @@ def by_permission_id(self,permission_id: str) -> PermissionItemRequestBuilder: async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: """ - Get the permission resources from the permissions navigation property on a site. + Get the permission resources from the permissions navigation property on a site. This API is available in the following national cloud deployments. 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 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetR async def post(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: """ - Create a new permission object on a site. + Create a new permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Permission] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Permission] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the permission resources from the permissions navigation property on a site. + Get the permission resources from the permissions navigation property on a site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Create a new permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Permission] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PermissionsRequestBuilderGetQueryParameters(): """ - Get the permission resources from the permissions navigation property on a site. + Get the permission resources from the permissions navigation property on a site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/site_item_request_builder.py b/msgraph/generated/groups/item/sites/item/site_item_request_builder.py index 0662d379dbb..7f98b6dbad4 100644 --- a/msgraph/generated/groups/item/sites/item/site_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/site_item_request_builder.py @@ -140,14 +140,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Site] = None, request_configuration: Optional[SiteItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -160,13 +160,13 @@ def to_patch_request_information(self,body: Optional[Site] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/sites/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/sites/count/count_request_builder.py index e31b50563de..b38cdf51898 100644 --- a/msgraph/generated/groups/item/sites/item/sites/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/sites/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/sites/item/site_item_request_builder.py b/msgraph/generated/groups/item/sites/item/sites/item/site_item_request_builder.py index f6b21cfefd9..03e1f61080a 100644 --- a/msgraph/generated/groups/item/sites/item/sites/item/site_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/sites/item/site_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SiteItemRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/sites/sites_request_builder.py b/msgraph/generated/groups/item/sites/item/sites/sites_request_builder.py index 87c469e28a4..ee67b561da8 100644 --- a/msgraph/generated/groups/item/sites/item/sites/sites_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/sites/sites_request_builder.py @@ -44,7 +44,7 @@ def by_site_id1(self,site_id1: str) -> SiteItemRequestBuilder: async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: """ - Get a collection of subsites defined for a [site][]. + Get a collection of subsites defined for a site][]. This API is available in the following [national cloud deployments. 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 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of subsites defined for a [site][]. + Get a collection of subsites defined for a site][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SitesRequestBuilderGetQueryParameters(): """ - Get a collection of subsites defined for a [site][]. + Get a collection of subsites defined for a site][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/count/count_request_builder.py index 3b669d83808..112e20ff547 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/groups_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/groups_request_builder.py index a9b0cfbefa1..061054f1305 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/groups_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/groups_request_builder.py @@ -45,7 +45,7 @@ def by_group_id1(self,group_id1: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-list-groups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[Group]: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Group] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Group] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/group_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/group_item_request_builder.py index 4873875603a..15d078662f6 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/group_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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/termstore-group-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDel async def get(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. 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/termstore-group-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Group] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class GroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class GroupItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/count/count_request_builder.py index 4e57eb6e1c2..9e77a1d8c5f 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py index b876b015d0d..b91df9e5f37 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py index 7ab1357a030..e35474c795f 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py index 7fce90952c3..0acf7203c1d 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py index 3d2b77d3318..7b5bc691dd3 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py index cf8635ab326..431a563954a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 4f68b518a87..b122e0255e2 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index c4f98f792b9..d010eb1f755 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 48d5e24143f..503aac3b9a3 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index 34aa01d9220..fffe67b8a7b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py index 3c52db18d68..f6b4be4022b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py index 2a0c6069acb..d898b15189d 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py index ca23d81dfe5..ac788bd8582 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py index 296b96d72f5..9fe61868cd9 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index 8b002dc4d6d..95fb181b59f 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py index ac3577cfdc3..79c4fa69a87 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py index e532e6ff584..00680e2d50a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 8929b8b0bf9..128ffe961c8 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py index 28f71a8ef5b..9617fb0c22e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py index 8b53492ac66..3f8f5185473 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py index db19ed33730..252033a2197 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py index deda17af7e5..1eaf609d461 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py index 55c2617104e..b56196445d1 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py index b105168c4ab..eac0740514e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py index 9ae1b3b37e1..b58a2ab6207 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py index 10a6c0aceae..1985dd84a0d 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py index 16fe0cd52b2..ebdcd844c4e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py index 4b8e9d48fd4..e63301b9699 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py index 6307dd6437d..a1bcedbe176 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py index 33cda2706c4..6d71d0bd3ee 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py index e967a4e0084..6fd3bb13a27 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py index 2eadeffcdd0..204fb1533a6 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 3e2c1803df0..43d537a14b4 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 01c515d989f..d72be48067a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index e23cfac12c5..68dd1b8efec 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index e076da79d6f..07eb56bb41e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 1ea0f2a9096..4ddc872508e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py index ed8168956d2..4091be4ad43 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py index c5cefae5aef..6707d7d8988 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py index 545df88cded..408b9678c59 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py index 48dde77a839..fc37e0f1a1e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 59819517633..8db54d3f6d5 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py index 7813b2fdb08..1c5f86fe069 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py index 85e8b9cf779..85ed7f85740 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index f49e212af5f..e625f4ae28c 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py index 43097055eaa..844676d5248 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py index 7345f693ff2..de3af820457 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py index 15c5d82181f..93561238de2 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py index 5d9302427f6..d2eda18be03 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/sets_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/sets_request_builder.py index 69518b33768..37e813b492b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/sets_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/groups/item/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/count/count_request_builder.py index c894bcadcf6..6b5921118b4 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/children_request_builder.py index fa13756a2f0..77aca1ad30a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/count/count_request_builder.py index 3c6c31f57f2..2a10d573641 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/children_request_builder.py index 5ceaa606adc..3111322b3cb 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py index db9060bec2c..b2d3bf609b6 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py index 30e81887efc..595f24e263c 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 7f2df2742bb..1f6c399a669 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 81bf3bc0c09..c1f0cf6ddae 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 710ff453586..9af2dcd5901 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index f92e0886bff..40a61891c94 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py index e8d8425b575..2a4854b3c17 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py index de3fe0faba0..3b541deb5d1 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py index dffb060d1f1..186ae0e3b87 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py index b4f6c3e7668..c91f76f33dd 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index 1790b08e177..bf888e66666 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py index 35bdcc3c6d8..65dba49a7f7 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py index d030d40ceb1..c8319f09e65 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 44ee7e39d99..8c93cbc351d 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py index 4d121325307..d0c23a70a97 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/set/set_request_builder.py index 5f953847255..29917fdc0ab 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/term_item_request_builder.py index 34dc7b05bb0..37999e9aaca 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py index d5b9d7376b2..7e2150a40c0 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py index 3394481e79d..edf53d7d267 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py index 2bcc924362d..b4ae1ed72ee 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py index 3d889ebbf41..2feeb729213 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py index 478ddf25cbb..0d1c7cbbf6b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py index 995d1a742d2..50c7eae75f4 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py index acef1c294d3..fec92d31007 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index b9d07c94083..50c6fbca532 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 7fd23b557e6..f2bb3f7dc3c 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index f5048674627..1e409649938 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index 7f0761fb89c..bc5eca571d1 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py index 73e168443bc..7db109cb1e4 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py index 7ff51c0849b..be568566202 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py index e85c8bfbf76..e1dde447e7d 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py index 52c4f1c8510..23252be263e 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index e8c65d20c77..331fcdc3baf 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py index 4f5999e3e7e..cf63c80b024 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py index d22ace6488c..3fe57257d52 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 766eefd2d56..baee69e1343 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py index 466804482cb..2fbfe458357 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py index bbbaff01904..7dc8f554e09 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py index 80cbcc29cf9..cf85328e3d3 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py index 5c48a73af07..d60ed5e2eac 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py index e26ce3b2a8b..d9a737b8364 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py index a5f03ec0583..892c60c7590 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py index 4cafe7dc76b..2a38beaf6e3 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py index 6d17881e9f8..6a148cd5a93 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py index 3b290810cd1..c1138915937 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py index 023cf374e99..7e55ab9bf35 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py index bea6d41def6..0aa50ee156b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py index 86b082d2c69..77ce7e3c8ff 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py index 904d9791d9a..bc5e4ae0d83 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 02b1351ee36..a1cdb0999ee 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 0675f05d830..cccb82711e4 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index 4db41b06277..9217555daae 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 53e8ad0358c..b2118dd2e95 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 628b304e886..785d212db5b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py index f4112192c0b..4ff1b059bd0 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py index 343cac23e8b..b699e8e82e1 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py index ad320455c86..34129ec7fa7 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py index 9cea1ecae11..d59f63bc391 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 098e6269b4d..782bbd7fe36 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py index 69ad1f91fd1..c3146aec7c2 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py index f645dbcde8c..f33e4bf41ab 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index da4267c87b4..b431c533c19 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py index 073d242a379..bdadd499c4a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py index 1f5a4f78e14..92aee88e209 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py index d560a9ede4d..e6ab65ffc0b 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py index 3bd70b627d6..705be050f3a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py index 37d5c43f6c4..4ec8e6c4c53 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id1(self,set_id1: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/count/count_request_builder.py index 180b5e57fd6..3df79d5beea 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py index 030033be3b7..f1c89d1a687 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py index 1f6a3bea1a4..0ba478e3199 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py index 5deee6f3f89..1b96beccc3a 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py index 3397357a2c2..10979d73a47 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/relations_request_builder.py index d68b49f0be6..1f524fd59d8 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/set_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/set_item_request_builder.py index 39ef35cdeaa..552a98b78d9 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/set_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/set_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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/termstore-set-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[SetItemRequestBuilderDelet async def get(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Set]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] Find more info here: https://learn.microsoft.com/graph/api/termstore-set-get?view=graph-rest-1.0 @@ -74,7 +74,7 @@ async def get(self,request_configuration: Optional[SetItemRequestBuilderGetReque async def patch(self,body: Optional[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Set]: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -99,39 +99,39 @@ async def patch(self,body: Optional[Set] = None, request_configuration: Optional def to_delete_request_information(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class SetItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SetItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/count/count_request_builder.py index 0cec1e23170..89639d3bcac 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py index 64d0c1d60ed..805c16368bf 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py index 5fcd1df362f..076f2cffe15 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py index bf392e16f6c..08e98491c03 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 81adf1e5ba3..423bdd4a29c 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index 64170597128..386af2be053 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 70b325dab4e..f962fe6572f 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index add31081104..a2be76c1919 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py index 1a188b74ff7..618a5b3ff5f 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py index 702201db32f..0f570a1a32d 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py index e109bb5c734..8950630b746 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py index 5a798486486..7f98e34d5b0 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index e66dada3355..2c4a0ea8104 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py index e61ce0fa879..a28c885560f 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py index 793e0fb62bf..24b384ca6f1 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index 7611d14ec04..1cb4a72fce2 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py index 50fb874f7a0..e6093d9c1bf 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py index 4b4d172622b..0dd629a5a32 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py index b5743da5e3d..8b1c3ab3adf 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/terms_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/terms_request_builder.py index 1e594234a6a..98a7034c5d0 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/sets/sets_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/sets/sets_request_builder.py index 4fd48b130a2..20fd16ab2af 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/sets/sets_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestC async def post(self,body: Optional[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> Optional[Set]: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_store/term_store_request_builder.py b/msgraph/generated/groups/item/sites/item/term_store/term_store_request_builder.py index cd24a459237..003bb72d440 100644 --- a/msgraph/generated/groups/item/sites/item/term_store/term_store_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_store/term_store_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TermStoreRequestBuilderDel async def get(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> Optional[Store]: """ - Read the properties and relationships of a store object. + Read the properties and relationships of a store object. This API is available in the following national cloud deployments. 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 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TermStoreRequestBuilderGetReq async def patch(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> Optional[Store]: """ - Update the properties of a store object. + Update the properties of a store object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Store] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[TermStore Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a store object. + Read the properties and relationships of a store object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Update the properties of a store object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Store] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class TermStoreRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class TermStoreRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a store object. + Read the properties and relationships of a store object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/count/count_request_builder.py index 719c4ddc0d3..6ddf32de470 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/count/count_request_builder.py index 6da50b6a574..9612044f02d 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/groups_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/groups_request_builder.py index 59d0406066c..3d1bcfc33ec 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/groups_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/groups_request_builder.py @@ -45,7 +45,7 @@ def by_group_id1(self,group_id1: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-list-groups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[Group]: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Group] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Group] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/group_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/group_item_request_builder.py index ea510b96396..ddea787501d 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/group_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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/termstore-group-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDel async def get(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. 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/termstore-group-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Group] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class GroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class GroupItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py index ef4a68fae57..bba606341f0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py index a548a82f15f..2457efc40df 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py index 9a970723ad3..7077dbfb664 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py index 8dee9bacaa6..702dce9882e 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py index 6bd1dbbf2c2..a009ad5e7d6 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py index 8ab7cd0d638..e005776188b 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 6f1b8689178..9432332094a 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 5f2a13a1c11..db3566b934d 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 303b64739ab..a9c7c054d1b 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index 6e35dbef7a5..7ab8772b54c 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py index f616aed0405..8d324c40d8f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py index d2d5be0f08a..ef76f1755d9 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py index 4e1a781879e..2413358189c 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py index 62b2db5c2df..20a7cdd575e 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index d7c74765181..be5ad93cbb2 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py index 542922180ec..2c99ff1f523 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py index 8087ce024da..98e0f796df8 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 1e01fe07b00..7ec446db051 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py index 9715d43db51..903614e62f1 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py index 73e1b9f3f6e..8b4ca53c4a6 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py index cbc49404e97..a244259245e 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py index 7bc9fa792b4..089fd2ff29a 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py index 7c235117e8c..bce5965eb36 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py index 397ab23a181..161b76f6bcb 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py index 574d2511763..929df397b34 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py index b414d772a48..2d9ff494c27 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py index e35b568385b..c7d7bdec61a 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py index b90cd52c5c5..198dc3fa4fb 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py index da1abd4cab1..8a1d7c731aa 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py index d7e003531d6..81c1e744b94 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py index a223fc8d7d7..de6b92a534f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py index 925de07f7d5..8df7c277fcc 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 1b7115a80b2..c0ce165f461 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 68e7f6090a5..699ed1ed73b 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index 78567658562..135640631c9 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 19deee36e8d..469a8717713 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index eea4beb8c61..12012ffbddd 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py index 8e81dc83fa3..1301de2663a 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py index a769591b526..2ad3858d8fe 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py index f0a3c426d41..7747f304d80 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py index e63adb52dfb..e80cef8ccf0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index fa217985362..41f9f1d5a47 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py index 2ec241c6adb..2391172cac2 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py index feba33b9915..4803d4724f0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index e9638e8c8c3..2b7b1e897c6 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py index bd06cbbf49f..585f6425eb3 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py index c7f62337ac9..22d458f94ec 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py index af4983412a7..0fe4a50713c 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py index 1ce9498eeca..dc63f28ceb0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py index 29a9b72bc3f..9b80182d94a 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/count/count_request_builder.py index 2c9185a2e61..f6b8079a478 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/children_request_builder.py index f1162364bcd..d2732395ab1 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py index f18421de03e..d3a2b5e59c5 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py index 85998daacee..0661ca0033c 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py index b1d02b17d5a..4683233faf4 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py index 1775afa9083..29b9e3162f2 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 9b3f8f312b0..07e519d30eb 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 51d72180a93..c7e36eeacfc 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index d297d05041d..1ae7f2eb142 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index df79eaaf29b..76b94b16553 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py index f9224808441..30276763ad3 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py index a72b5aaa0ba..5407e994127 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py index 2e9ac19384e..c32276d73d0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py index 3d3e41b7873..d2e76a3c293 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index 29ff576e6e3..64318d04d7c 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py index e9c0fc1b594..3ef304e7944 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py index faffbfe0ea8..d95d631723d 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 47f2fcf8571..ada66aa89a3 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py index 3d81bcbb769..e7707db4ca5 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py index ea48505f499..ab6dd4e4f7e 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py index 4a43c795c4f..77437727266 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py index 7ec90f0decf..a3d55319ff0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py index b0a7890502d..1b4b9347bd5 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py index 18c71520aca..ebd87941375 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py index e00fee426a9..4f012353a25 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py index 3b6d82472f9..6411b060686 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py index 9a821c0cacd..231b10d7954 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py index 2f2d0a4ac2d..8fbf291e394 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index e37caff4aad..07a88587032 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 40de1243b4a..77764ef0548 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 361ca3f5a26..2342b7f062f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index c5845e2703e..2b20afef3cc 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py index 74ea6873f98..50e17fa1d4d 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py index 39922563670..dd04f815486 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py index d0872202a15..5661591a747 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py index 350f33a4e8c..3ae867d8cf4 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index e619a220a5c..45d8dc71c18 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py index a6b647e2c43..4acc07c187f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py index e8e6a1fea57..746464d1a4b 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 79364eb53cb..c498923beed 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py index 968f1e89eaa..da8e906a399 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py index 0de09738d93..042b44bef98 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py index 9838c31fe84..affdb84bf46 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py index 06d8c62c69b..bebd7e7d12e 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py index b6142f70cd6..232b07fb583 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py index 116544ca3fe..52f5b2d4061 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py index ce318f3dd17..f74f7943822 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py index cec0d5ff5b7..49307dbfafa 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py index 1ee3e4cfda5..3e3db1e22b1 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py index d12ba0c9b56..792b4b2467e 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py index 4b1641ea173..82edfb94d65 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py index 5274000dc3b..4c8b84270d4 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py index 400f28d0aa3..f976a5131df 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 226849f14cf..fa1a733c5d1 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 962f84d2714..06028e04e8d 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index 086007c6850..d22eed91f22 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 299a553e897..d6bd8123ee2 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index fdc50fe146d..324cc5f27b2 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py index 022ea8a4014..35447f28bed 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py index eb5e2d9853d..ec5ef895c05 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py index ba5b67df36e..e34c7846e50 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py index 497124d449f..798a04436ae 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 239c3815bec..9b46471d21c 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py index 10eeda1a1c5..f13bd94df93 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py index bf537fae55a..921a74ab9e4 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index 845ad58b4c7..04dbe833730 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py index 8e0fe2e63b4..15f622e35fa 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py index 26522bdec18..5c5f61b39e0 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py index d9d022883b1..debf4e62019 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py index bab79afc74a..47ffca97ed5 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py index e24f36bd97a..edf15b31e0b 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id1(self,set_id1: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py index b52a2763c89..bc99e923160 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py index 12706965d2b..e8f3a35c025 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py index f10b46b1f6b..368bcb476d6 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py index e1a1531d467..0a9c97a6757 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py index 992b96705cf..e13311755b8 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py index 632808588e0..38eb335f76f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/set_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/set_item_request_builder.py index 10de2796a53..0f89bcfdadf 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/set_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/set_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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/termstore-set-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[SetItemRequestBuilderDelet async def get(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Set]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] Find more info here: https://learn.microsoft.com/graph/api/termstore-set-get?view=graph-rest-1.0 @@ -74,7 +74,7 @@ async def get(self,request_configuration: Optional[SetItemRequestBuilderGetReque async def patch(self,body: Optional[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Set]: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -99,39 +99,39 @@ async def patch(self,body: Optional[Set] = None, request_configuration: Optional def to_delete_request_information(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class SetItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SetItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py index 35a20a1488a..4af2bbe9715 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py index 2455c4ef5e8..a6a5cd21d30 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py index 9e9fb658e4d..35875ff0994 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 5b906e333dc..1960c7d68b6 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index b272d45a53b..d9aa4e808cb 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index d9855405c68..3bf53e73fbf 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index f773a9c884a..802e5bc4288 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 0df04a869bb..9d21618c41f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py index 115ad8533f6..a4ab278a0b9 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py index 06288474746..5557ed7b0f1 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py index d62de4c54cc..b875fe70126 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py index ce4295dbb2e..98ebbea0256 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 904ba91bf85..e176c13473f 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py index 5c77ce2b320..bd65555fd4b 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py index c4fa520d3c5..aed082e64de 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index 97854f1207a..94a2a257ba1 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py index 20b042be463..e3cec4b6b35 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py index 698ae11773c..bb53afdb392 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py index 814c18a0579..6fb9e9432c8 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py index abb135b144d..b6ba4faddd6 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/sets_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/sets_request_builder.py index 257019fb52c..bbe9f44ed50 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/sets/sets_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestC async def post(self,body: Optional[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> Optional[Set]: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/sites/item/term_stores/item/store_item_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/item/store_item_request_builder.py index b10085fc623..04548ffc7e2 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/item/store_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/item/store_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[StoreItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[StoreItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[StoreItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[StoreItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Store] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/item/term_stores/term_stores_request_builder.py b/msgraph/generated/groups/item/sites/item/term_stores/term_stores_request_builder.py index 23fe154a9fa..150c5817513 100644 --- a/msgraph/generated/groups/item/sites/item/term_stores/term_stores_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/term_stores/term_stores_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TermStoresRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Store] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/remove/remove_response.py b/msgraph/generated/groups/item/sites/remove/remove_post_response.py similarity index 92% rename from msgraph/generated/groups/item/sites/remove/remove_response.py rename to msgraph/generated/groups/item/sites/remove/remove_post_response.py index bb9ad7a77d7..ce786872884 100644 --- a/msgraph/generated/groups/item/sites/remove/remove_response.py +++ b/msgraph/generated/groups/item/sites/remove/remove_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class RemoveResponse(BaseCollectionPaginationCountResponse): +class RemovePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Site]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemoveResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemovePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RemoveResponse + Returns: RemovePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return RemoveResponse() + return RemovePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/sites/remove/remove_request_builder.py b/msgraph/generated/groups/item/sites/remove/remove_request_builder.py index e50f2ed0f18..716ec7beb32 100644 --- a/msgraph/generated/groups/item/sites/remove/remove_request_builder.py +++ b/msgraph/generated/groups/item/sites/remove/remove_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .remove_post_request_body import RemovePostRequestBody - from .remove_response import RemoveResponse + from .remove_post_response import RemovePostResponse class RemoveRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/remove", path_parameters) - async def post(self,body: Optional[RemovePostRequestBody] = None, request_configuration: Optional[RemoveRequestBuilderPostRequestConfiguration] = None) -> Optional[RemoveResponse]: + async def post(self,body: Optional[RemovePostRequestBody] = None, request_configuration: Optional[RemoveRequestBuilderPostRequestConfiguration] = None) -> Optional[RemovePostResponse]: """ Unfollow a user's site or multiple sites. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RemoveResponse] + Returns: Optional[RemovePostResponse] Find more info here: https://learn.microsoft.com/graph/api/site-unfollow?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[RemovePostRequestBody] = None, request_config } if not self.request_adapter: raise Exception("Http core is null") - from .remove_response import RemoveResponse + from .remove_post_response import RemovePostResponse - return await self.request_adapter.send_async(request_info, RemoveResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RemovePostResponse, error_mapping) def to_post_request_information(self,body: Optional[RemovePostRequestBody] = None, request_configuration: Optional[RemoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RemovePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/sites/sites_request_builder.py b/msgraph/generated/groups/item/sites/sites_request_builder.py index 3d339a452f5..1547d999956 100644 --- a/msgraph/generated/groups/item/sites/sites_request_builder.py +++ b/msgraph/generated/groups/item/sites/sites_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[SitesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/groups/item/subscribe_by_mail/subscribe_by_mail_request_builder.py b/msgraph/generated/groups/item/subscribe_by_mail/subscribe_by_mail_request_builder.py index 80335ce9fe8..644cf38dd02 100644 --- a/msgraph/generated/groups/item/subscribe_by_mail/subscribe_by_mail_request_builder.py +++ b/msgraph/generated/groups/item/subscribe_by_mail/subscribe_by_mail_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SubscribeByMailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Calling this method will enable the current user to receive email notifications for this group, about new posts, events, and files in that group. Supported for Microsoft 365 groups only. + Calling this method will enable the current user to receive email notifications for this group, about new posts, events, and files in that group. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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-subscribebymail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SubscribeByMailRequestBuilde def to_post_request_information(self,request_configuration: Optional[SubscribeByMailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Calling this method will enable the current user to receive email notifications for this group, about new posts, events, and files in that group. Supported for Microsoft 365 groups only. + Calling this method will enable the current user to receive email notifications for this group, about new posts, events, and files in that group. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SubscribeByMailRequestBuilder: diff --git a/msgraph/generated/groups/item/team/all_channels/all_channels_request_builder.py b/msgraph/generated/groups/item/team/all_channels/all_channels_request_builder.py index b6584f12373..c5a8a4c03ff 100644 --- a/msgraph/generated/groups/item/team/all_channels/all_channels_request_builder.py +++ b/msgraph/generated/groups/item/team/all_channels/all_channels_request_builder.py @@ -44,7 +44,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[AllChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-allchannels?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllChannelsRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[AllChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllChannelsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllChannelsRequestBuilderGetQueryParameters(): """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/all_channels/count/count_request_builder.py b/msgraph/generated/groups/item/team/all_channels/count/count_request_builder.py index 41ea9001498..37bc37819e7 100644 --- a/msgraph/generated/groups/item/team/all_channels/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/all_channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/all_channels/item/channel_item_request_builder.py b/msgraph/generated/groups/item/team/all_channels/item/channel_item_request_builder.py index 2ef351f82ab..8cf58298fc1 100644 --- a/msgraph/generated/groups/item/team/all_channels/item/channel_item_request_builder.py +++ b/msgraph/generated/groups/item/team/all_channels/item/channel_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChannelItemRequestBuilder: diff --git a/msgraph/generated/groups/item/team/archive/archive_request_builder.py b/msgraph/generated/groups/item/team/archive/archive_request_builder.py index a7b8e8c3894..c8dba222416 100644 --- a/msgraph/generated/groups/item/team/archive/archive_request_builder.py +++ b/msgraph/generated/groups/item/team/archive/archive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. + Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. This API is available in the following national cloud deployments. 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[ArchivePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. + Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/channels_request_builder.py b/msgraph/generated/groups/item/team/channels/channels_request_builder.py index aa8af103ee8..ce5d12c9980 100644 --- a/msgraph/generated/groups/item/team/channels/channels_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/channels_request_builder.py @@ -46,7 +46,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[ChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ChannelsRequestBuilderGetRequ async def post(self,body: Optional[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> Optional[Channel]: """ - Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. + Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Channel] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. + Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Channel] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class ChannelsRequestBuilderGetQueryParameters(): """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/count/count_request_builder.py index b4e853d4c53..61ddad52fa4 100644 --- a/msgraph/generated/groups/item/team/channels/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_response.py b/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_response.py rename to msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_get_response.py index 80295e1ea0e..c6fd0a0c3cc 100644 --- a/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_request_builder.py index ed2b376fe9c..31f646827cc 100644 --- a/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/channels/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/channel_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/channel_item_request_builder.py index 0b22cd00256..4e520bff428 100644 --- a/msgraph/generated/groups/item/team/channels/item/channel_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/channel_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ChannelItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the channel. + Delete the channel. This API is available in the following national cloud deployments. 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/channel-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ChannelItemRequestBuilderD async def get(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Channel]: """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] Find more info here: https://learn.microsoft.com/graph/api/channel-get?view=graph-rest-1.0 @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[ChannelItemRequestBuilderGetR async def patch(self,body: Optional[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Channel]: """ - Update the properties of the specified channel. + Update the properties of the specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] @@ -104,39 +104,39 @@ async def patch(self,body: Optional[Channel] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the channel. + Delete the channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified channel. + Update the properties of the specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -258,7 +258,7 @@ class ChannelItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class ChannelItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/complete_migration/complete_migration_request_builder.py b/msgraph/generated/groups/item/team/channels/item/complete_migration/complete_migration_request_builder.py index 44da2099e0a..b2a9cfd7d3e 100644 --- a/msgraph/generated/groups/item/team/channels/item/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py similarity index 91% rename from msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename to msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py index 1aa3df0306e..349bf1b33ed 100644 --- a/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ b/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): +class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincip value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index 2e43f7f796f..132923603ef 100644 --- a/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/files_folder/content/content_request_builder.py b/msgraph/generated/groups/item/team/channels/item/files_folder/content/content_request_builder.py index e1628083f85..45e81839f6e 100644 --- a/msgraph/generated/groups/item/team/channels/item/files_folder/content/content_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/item/files_folder/files_folder_request_builder.py b/msgraph/generated/groups/item/team/channels/item/files_folder/files_folder_request_builder.py index 6f6b695585c..2e96d897f72 100644 --- a/msgraph/generated/groups/item/team/channels/item/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/members/add/add_response.py b/msgraph/generated/groups/item/team/channels/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/groups/item/team/channels/item/members/add/add_response.py rename to msgraph/generated/groups/item/team/channels/item/members/add/add_post_response.py index bf7f1aca1fd..0ae8263f494 100644 --- a/msgraph/generated/groups/item/team/channels/item/members/add/add_response.py +++ b/msgraph/generated/groups/item/team/channels/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/channels/item/members/add/add_request_builder.py b/msgraph/generated/groups/item/team/channels/item/members/add/add_request_builder.py index 7abfe547a7f..e8d13d05ee2 100644 --- a/msgraph/generated/groups/item/team/channels/item/members/add/add_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/item/members/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/members/count/count_request_builder.py index ee0f0b3d8c2..5f9bbcfb870 100644 --- a/msgraph/generated/groups/item/team/channels/item/members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 e16f4cdba16..be652d354e8 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/members/members_request_builder.py b/msgraph/generated/groups/item/team/channels/item/members/members_request_builder.py index 88d74e1f193..763953de63d 100644 --- a/msgraph/generated/groups/item/team/channels/item/members/members_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/count/count_request_builder.py index 06af9ffac03..561a75948fc 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_response.py b/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/team/channels/item/messages/delta/delta_response.py rename to msgraph/generated/groups/item/team/channels/item/messages/delta/delta_get_response.py index b172edeb11a..fe1e2d1e0db 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_response.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_request_builder.py index 5cc7ab39955..e2f894849e7 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/chat_message_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/chat_message_item_request_builder.py index d9a8be88f37..5a2474f067d 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/count/count_request_builder.py index d12649db24b..6e1f33bd485 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py index eb8980f81b7..632f81ecc92 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 45c208e6ff7..cb6f2f78fc0 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py index 0cf057740f5..c5c782df64a 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/count/count_request_builder.py index a287130da68..5fab33b4866 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_response.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_response.py rename to msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_get_response.py index eb3db87a02e..215b257baaf 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ..........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_request_builder.py index 1bb17907f19..d83823ce1ab 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/chat_message_item_request_builder.py index 2df55bbeb9c..5c3f47bf6a8 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py index e7357416982..3bc61e7e530 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index 5d848c7245d..6449f067846 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index f9fb149b053..a661ede1af9 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index c28870cc718..cb85804f03f 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index ad982161a21..b200f72ff4e 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index 14a9ff1fbe1..a7352a08750 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index fd4ea2289dd..e5d969da558 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index 5ab35cabd33..f3e8219fa34 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 b559992feb0..34486d5fa2d 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/set_reaction/set_reaction_request_builder.py index 34f6785bbfc..fb825ccb38c 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/soft_delete/soft_delete_request_builder.py index 4021e504c20..c85f467fd21 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index db6285a777b..0f8f3592450 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py index 36ef3914dc9..3bcec8d4fa1 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 e16e93a210c..ca3210d3a8b 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/provision_email/provision_email_request_builder.py b/msgraph/generated/groups/item/team/channels/item/provision_email/provision_email_request_builder.py index 0816bdc63b9..11ff5d8fc35 100644 --- a/msgraph/generated/groups/item/team/channels/item/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/remove_email/remove_email_request_builder.py b/msgraph/generated/groups/item/team/channels/item/remove_email/remove_email_request_builder.py index fd9a441bf1e..bbaf1da831c 100644 --- a/msgraph/generated/groups/item/team/channels/item/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/count/count_request_builder.py index be08451c876..8d7c00b4360 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index faf2fd8972b..43a03bab9e5 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py index 7c93cfd8a5c..19212d5809a 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index 0c510b12108..46d2413a99f 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index 744e0c1866d..c1219c304bc 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/team/team_request_builder.py index c3a8c8891d5..4e667da945b 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/shared_with_teams_request_builder.py index b1da4c5ac10..faf1fcbd13f 100644 --- a/msgraph/generated/groups/item/team/channels/item/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/tabs/count/count_request_builder.py b/msgraph/generated/groups/item/team/channels/item/tabs/count/count_request_builder.py index 441768fe6dd..10a650dab2c 100644 --- a/msgraph/generated/groups/item/team/channels/item/tabs/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_app/teams_app_request_builder.py index 47cdfd78d87..69228f79c87 100644 --- a/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_tab_item_request_builder.py index 57a56b9ddca..4f216955b87 100644 --- a/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/tabs/tabs_request_builder.py b/msgraph/generated/groups/item/team/channels/item/tabs/tabs_request_builder.py index 0aab00f744f..6b60f8f6a99 100644 --- a/msgraph/generated/groups/item/team/channels/item/tabs/tabs_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/clone/clone_request_builder.py b/msgraph/generated/groups/item/team/clone/clone_request_builder.py index 391ac1e0df1..b62d990b840 100644 --- a/msgraph/generated/groups/item/team/clone/clone_request_builder.py +++ b/msgraph/generated/groups/item/team/clone/clone_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ClonePostRequestBody] = None, request_configuration: Optional[CloneRequestBuilderPostRequestConfiguration] = None) -> None: """ - Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. + Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. This API is available in the following national cloud deployments. 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[ClonePostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ClonePostRequestBody] = None, request_configuration: Optional[CloneRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. + Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ClonePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/complete_migration/complete_migration_request_builder.py b/msgraph/generated/groups/item/team/complete_migration/complete_migration_request_builder.py index a9a2b10cb30..de6ab43865c 100644 --- a/msgraph/generated/groups/item/team/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/groups/item/team/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/team-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/groups/item/team/group/group_request_builder.py b/msgraph/generated/groups/item/team/group/group_request_builder.py index f8dcd465ba4..4c62dc5879b 100644 --- a/msgraph/generated/groups/item/team/group/group_request_builder.py +++ b/msgraph/generated/groups/item/team/group/group_request_builder.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from .....models.group import Group from .....models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GroupRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GroupRequestBuilder: @@ -74,6 +75,15 @@ def with_url(self,raw_url: Optional[str] = None) -> GroupRequestBuilder: raise TypeError("raw_url cannot be null.") return GroupRequestBuilder(self.request_adapter, raw_url) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GroupRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/groups/item/team/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/groups/item/team/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..d781cc7a6b1 --- /dev/null +++ b/msgraph/generated/groups/item/team/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/team/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/groups/item/team/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..fbd87678c9d --- /dev/null +++ b/msgraph/generated/groups/item/team/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /groups/{group-id}/team/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/team/incoming_channels/count/count_request_builder.py b/msgraph/generated/groups/item/team/incoming_channels/count/count_request_builder.py index ff19c7cbb6f..2b640ff7a6a 100644 --- a/msgraph/generated/groups/item/team/incoming_channels/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/incoming_channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/incoming_channels/incoming_channels_request_builder.py b/msgraph/generated/groups/item/team/incoming_channels/incoming_channels_request_builder.py index 83a04a9e670..52210cd7db3 100644 --- a/msgraph/generated/groups/item/team/incoming_channels/incoming_channels_request_builder.py +++ b/msgraph/generated/groups/item/team/incoming_channels/incoming_channels_request_builder.py @@ -44,7 +44,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[IncomingChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-incomingchannels?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[IncomingChannelsRequestBuilde def to_get_request_information(self,request_configuration: Optional[IncomingChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IncomingChannelsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IncomingChannelsRequestBuilderGetQueryParameters(): """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/incoming_channels/item/channel_item_request_builder.py b/msgraph/generated/groups/item/team/incoming_channels/item/channel_item_request_builder.py index c5c8331abc6..117d2c4390a 100644 --- a/msgraph/generated/groups/item/team/incoming_channels/item/channel_item_request_builder.py +++ b/msgraph/generated/groups/item/team/incoming_channels/item/channel_item_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[ChannelIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChannelItemRequestBuilder: diff --git a/msgraph/generated/groups/item/team/installed_apps/count/count_request_builder.py b/msgraph/generated/groups/item/team/installed_apps/count/count_request_builder.py index 73051f49df6..c43b053aa21 100644 --- a/msgraph/generated/groups/item/team/installed_apps/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/installed_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/installed_apps/installed_apps_request_builder.py b/msgraph/generated/groups/item/team/installed_apps/installed_apps_request_builder.py index f7f0c332a38..4c204e37a10 100644 --- a/msgraph/generated/groups/item/team/installed_apps/installed_apps_request_builder.py +++ b/msgraph/generated/groups/item/team/installed_apps/installed_apps_request_builder.py @@ -45,7 +45,7 @@ def by_teams_app_installation_id(self,teams_app_installation_id: str) -> TeamsAp async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallationCollectionResponse]: """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-installedapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGe async def post(self,body: Optional[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Install an app to the specified team. + Install an app to the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsAppInstallation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Install an app to the specified team. + Install an app to the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsAppInstallation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstalledAppsRequestBuilderGetQueryParameters(): """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/installed_apps/item/teams_app/teams_app_request_builder.py b/msgraph/generated/groups/item/team/installed_apps/item/teams_app/teams_app_request_builder.py index c85ec33ad47..5b3b6ff47e2 100644 --- a/msgraph/generated/groups/item/team/installed_apps/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/groups/item/team/installed_apps/item/teams_app/teams_app_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: diff --git a/msgraph/generated/groups/item/team/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py b/msgraph/generated/groups/item/team/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py index b0e0f2b882c..d8c20707fb3 100644 --- a/msgraph/generated/groups/item/team/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py +++ b/msgraph/generated/groups/item/team/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppDefinitionRequestBuilder: diff --git a/msgraph/generated/groups/item/team/installed_apps/item/teams_app_installation_item_request_builder.py b/msgraph/generated/groups/item/team/installed_apps/item/teams_app_installation_item_request_builder.py index 64bcc622147..847d6ae43cc 100644 --- a/msgraph/generated/groups/item/team/installed_apps/item/teams_app_installation_item_request_builder.py +++ b/msgraph/generated/groups/item/team/installed_apps/item/teams_app_installation_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Uninstalls an app from the specified team. + Uninstalls an app from the specified team. This API is available in the following national cloud deployments. 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/team-delete-installedapps?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRe async def get(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] Find more info here: https://learn.microsoft.com/graph/api/team-get-installedapps?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[TeamsAppInstallation] = None, request_config def to_delete_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Uninstalls an app from the specified team. + Uninstalls an app from the specified team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[TeamsAppInstallationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppInstallation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class TeamsAppInstallationItemRequestBuilderGetQueryParameters(): """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/installed_apps/item/upgrade/upgrade_request_builder.py b/msgraph/generated/groups/item/team/installed_apps/item/upgrade/upgrade_request_builder.py index e25b474c69e..426bdf0b953 100644 --- a/msgraph/generated/groups/item/team/installed_apps/item/upgrade/upgrade_request_builder.py +++ b/msgraph/generated/groups/item/team/installed_apps/item/upgrade/upgrade_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. 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[UpgradePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/members/add/add_response.py b/msgraph/generated/groups/item/team/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/teams/item/primary_channel/members/add/add_response.py rename to msgraph/generated/groups/item/team/members/add/add_post_response.py index 4cb34efc7b6..f5a61d6276d 100644 --- a/msgraph/generated/teams/item/primary_channel/members/add/add_response.py +++ b/msgraph/generated/groups/item/team/members/add/add_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/members/add/add_request_builder.py b/msgraph/generated/groups/item/team/members/add/add_request_builder.py index 8252b92d8ff..81121c04741 100644 --- a/msgraph/generated/groups/item/team/members/add/add_request_builder.py +++ b/msgraph/generated/groups/item/team/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/members/count/count_request_builder.py b/msgraph/generated/groups/item/team/members/count/count_request_builder.py index a10dff0cb8b..b863ef41a78 100644 --- a/msgraph/generated/groups/item/team/members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/members/item/conversation_member_item_request_builder.py b/msgraph/generated/groups/item/team/members/item/conversation_member_item_request_builder.py index 293c8ddd62d..a8fd985b7ca 100644 --- a/msgraph/generated/groups/item/team/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/groups/item/team/members/item/conversation_member_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a conversationMember from a team. + Remove a conversationMember from a team. This API is available in the following national cloud deployments. 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/team-delete-members?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. 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/team-get-members?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a team. + Update the role of a conversationMember in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a conversationMember from a team. + Remove a conversationMember from a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a team. + Update the role of a conversationMember in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/members/members_request_builder.py b/msgraph/generated/groups/item/team/members/members_request_builder.py index eeeab840433..c91fd095a46 100644 --- a/msgraph/generated/groups/item/team/members/members_request_builder.py +++ b/msgraph/generated/groups/item/team/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-members?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a new conversationMember to a team. + Add a new conversationMember to a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a new conversationMember to a team. + Add a new conversationMember to a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/operations/count/count_request_builder.py b/msgraph/generated/groups/item/team/operations/count/count_request_builder.py index 05e735b1f5a..45f5e21bc1e 100644 --- a/msgraph/generated/groups/item/team/operations/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/operations/item/teams_async_operation_item_request_builder.py b/msgraph/generated/groups/item/team/operations/item/teams_async_operation_item_request_builder.py index 83a9150533d..e5ba8b59c46 100644 --- a/msgraph/generated/groups/item/team/operations/item/teams_async_operation_item_request_builder.py +++ b/msgraph/generated/groups/item/team/operations/item/teams_async_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamsAsyn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAsyncOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAsyncOp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAsyncOperation] = None, request_configuration: Optional[TeamsAsyncOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TeamsAsyncOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/operations/operations_request_builder.py b/msgraph/generated/groups/item/team/operations/operations_request_builder.py index 4e39abb385d..c3996997524 100644 --- a/msgraph/generated/groups/item/team/operations/operations_request_builder.py +++ b/msgraph/generated/groups/item/team/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAsyncOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TeamsAsyncOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/permission_grants/count/count_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/count/count_request_builder.py index 8073445aece..ed014cc69de 100644 --- a/msgraph/generated/groups/item/team/permission_grants/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/permission_grants/delta/delta_response.py b/msgraph/generated/groups/item/team/permission_grants/delta/delta_response.py deleted file mode 100644 index 52ae1e97709..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from ......models.base_delta_function_response import BaseDeltaFunctionResponse - from ......models.directory_object import DirectoryObject - -from ......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from ......models.base_delta_function_response import BaseDeltaFunctionResponse - from ......models.directory_object import DirectoryObject - - from ......models.base_delta_function_response import BaseDeltaFunctionResponse - from ......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/team/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 77dc0da249c..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/team/permissionGrants/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/team/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index d555917bbea..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ......models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/team/permission_grants/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index f2961deb784..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/team/permissionGrants/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/team/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py deleted file mode 100644 index a5fc2c2476e..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The groupIds property - group_ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsPostRequestBody() - - 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]] = { - "groupIds": lambda n : setattr(self, 'group_ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("groupIds", self.group_ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_request_builder.py deleted file mode 100644 index 4ef89d4d72a..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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 .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse - -class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/team/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?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 .check_member_groups_response import CheckMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberGroupsRequestBuilderPostRequestConfiguration(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/team/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index f14b90a4d6f..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py deleted file mode 100644 index 5f48b8577ec..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index bb56fa9dbee..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py deleted file mode 100644 index 1a3308bfb6c..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_request_builder.py deleted file mode 100644 index b5b444671e6..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse - -class GetMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/team/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?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 .get_member_groups_response import GetMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberGroupsRequestBuilderPostRequestConfiguration(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/team/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 908b2b9d48f..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py deleted file mode 100644 index 7552e02e441..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_request_builder.py deleted file mode 100644 index 08cf5e7d4ed..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse - -class GetMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/team/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?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 .get_member_objects_response import GetMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberObjectsRequestBuilderPostRequestConfiguration(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/team/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index a3d0f95f9ce..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index 3bb4989096f..09d6e1b3838 100644 --- a/msgraph/generated/groups/item/team/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/groups/item/team/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -12,11 +12,6 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from ......models.resource_specific_permission_grant import ResourceSpecificPermissionGrant - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - from .restore.restore_request_builder import RestoreRequestBuilder class ResourceSpecificPermissionGrantItemRequestBuilder(BaseRequestBuilder): """ @@ -102,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -157,51 +152,6 @@ def with_url(self,raw_url: Optional[str] = None) -> ResourceSpecificPermissionGr raise TypeError("raw_url cannot be null.") return ResourceSpecificPermissionGrantItemRequestBuilder(self.request_adapter, raw_url) - @property - def check_member_groups(self) -> CheckMemberGroupsRequestBuilder: - """ - Provides operations to call the checkMemberGroups method. - """ - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - - return CheckMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def check_member_objects(self) -> CheckMemberObjectsRequestBuilder: - """ - Provides operations to call the checkMemberObjects method. - """ - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - - return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_groups(self) -> GetMemberGroupsRequestBuilder: - """ - Provides operations to call the getMemberGroups method. - """ - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - - return GetMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_objects(self) -> GetMemberObjectsRequestBuilder: - """ - Provides operations to call the getMemberObjects method. - """ - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - - return GetMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def restore(self) -> RestoreRequestBuilder: - """ - Provides operations to call the restore method. - """ - from .restore.restore_request_builder import RestoreRequestBuilder - - return RestoreRequestBuilder(self.request_adapter, self.path_parameters) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/groups/item/team/permission_grants/permission_grants_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/permission_grants_request_builder.py index 982a7b7e961..2d9b97f5632 100644 --- a/msgraph/generated/groups/item/team/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/groups/item/team/permission_grants/permission_grants_request_builder.py @@ -14,11 +14,7 @@ from .....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant from .....models.resource_specific_permission_grant_collection_response import ResourceSpecificPermissionGrantCollectionResponse from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.resource_specific_permission_grant_item_request_builder import ResourceSpecificPermissionGrantItemRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class PermissionGrantsRequestBuilder(BaseRequestBuilder): """ @@ -49,7 +45,7 @@ def by_resource_specific_permission_grant_id(self,resource_specific_permission_g async def get(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ResourceSpecificPermissionGrantCollectionResponse]: """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ResourceSpecificPermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-permissiongrants?view=graph-rest-1.0 @@ -95,19 +91,19 @@ async def post(self,body: Optional[ResourceSpecificPermissionGrant] = None, requ def to_get_request_information(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +116,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,46 +145,10 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class PermissionGrantsRequestBuilderGetQueryParameters(): """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index 77cbf0fd693..00000000000 --- a/msgraph/generated/groups/item/team/permission_grants/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url 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}/team/permissionGrants/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/team/photo/photo_request_builder.py b/msgraph/generated/groups/item/team/photo/photo_request_builder.py index c5fd247c4fd..ad538874a1b 100644 --- a/msgraph/generated/groups/item/team/photo/photo_request_builder.py +++ b/msgraph/generated/groups/item/team/photo/photo_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfilePhoto]: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProfilePhoto] Find more info here: https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0 @@ -75,19 +75,19 @@ async def patch(self,body: Optional[ProfilePhoto] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -132,7 +132,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class PhotoRequestBuilderGetQueryParameters(): """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/photo/value/content_request_builder.py b/msgraph/generated/groups/item/team/photo/value/content_request_builder.py index 42072e75071..e4a72df7330 100644 --- a/msgraph/generated/groups/item/team/photo/value/content_request_builder.py +++ b/msgraph/generated/groups/item/team/photo/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/complete_migration/complete_migration_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/complete_migration/complete_migration_request_builder.py index a17a3e1db71..e7bbb6f0819 100644 --- a/msgraph/generated/groups/item/team/primary_channel/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py similarity index 91% rename from msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename to msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py index 1aa3df0306e..349bf1b33ed 100644 --- a/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ b/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): +class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincip value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index 568676a055a..c5fd617aea8 100644 --- a/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/files_folder/content/content_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/files_folder/content/content_request_builder.py index f648390ff90..e3d4f9cc4d8 100644 --- a/msgraph/generated/groups/item/team/primary_channel/files_folder/content/content_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/files_folder/files_folder_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/files_folder/files_folder_request_builder.py index b73f7007f52..48781b4074f 100644 --- a/msgraph/generated/groups/item/team/primary_channel/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/members/add/add_response.py b/msgraph/generated/groups/item/team/primary_channel/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/teams/item/channels/item/members/add/add_response.py rename to msgraph/generated/groups/item/team/primary_channel/members/add/add_post_response.py index 73509a849f5..77f0fa0e9e4 100644 --- a/msgraph/generated/teams/item/channels/item/members/add/add_response.py +++ b/msgraph/generated/groups/item/team/primary_channel/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/members/add/add_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/members/add/add_request_builder.py index 3cfa17d2b70..0c59f777937 100644 --- a/msgraph/generated/groups/item/team/primary_channel/members/add/add_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/members/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/members/count/count_request_builder.py index 99866d05591..ac13248e959 100644 --- a/msgraph/generated/groups/item/team/primary_channel/members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 d05432aa53c..b4c284adb8b 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/members/members_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/members/members_request_builder.py index 018b7e5028a..e08a482b649 100644 --- a/msgraph/generated/groups/item/team/primary_channel/members/members_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/count/count_request_builder.py index 952175f3c85..7d0b60be857 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/delta/delta_response.py b/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/teams/item/channels/item/messages/delta/delta_response.py rename to msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_get_response.py index b52bac4c1d4..59ba7b29309 100644 --- a/msgraph/generated/teams/item/channels/item/messages/delta/delta_response.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_request_builder.py index e39fa863c63..0b4a28b65b9 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/chat_message_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/chat_message_item_request_builder.py index 221b6e8d059..031b4bba4d3 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/count/count_request_builder.py index d087bdc2764..7446ea45ea1 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py index 9316f659c2f..3af6b92113d 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index d964f7fec7f..3873d2b5563 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py index 31196f90519..e1a7aac9f31 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/count/count_request_builder.py index 1837285e953..ffde68ada46 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_response.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_response.py rename to msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_get_response.py index b2b0589aadb..0842f9f0387 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_request_builder.py index f65bacc6294..16949edeca8 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py index 3b29bb7b7c0..310ef9d9bcd 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py index f7d34798a1c..8970f9b37b5 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index bc1de188df4..2b626332932 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 8f57612dda1..1cc0d853ead 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index e485ef938f4..02137ebcd11 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index e1755c1f370..825007d4ce9 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index 8f3a857c35b..8eae668b793 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index 8013ffeb59d..a7a10907420 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index fd64d384341..3b810393d7c 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 918d76f02c8..3a182c5150c 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py index 33711f7e863..5bdc533e021 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py index 7da02d5792a..9146143412c 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index 28d24c4d200..6df8b74f03a 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py index b83f0ce02eb..a6a681575c6 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 44748d15bba..d3452b8d7c8 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/primary_channel_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/primary_channel_request_builder.py index 71a210f35a2..b06699d9be8 100644 --- a/msgraph/generated/groups/item/team/primary_channel/primary_channel_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/primary_channel_request_builder.py @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[PrimaryChannelRequestBuild async def get(self,request_configuration: Optional[PrimaryChannelRequestBuilderGetRequestConfiguration] = None) -> Optional[Channel]: """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] Find more info here: https://learn.microsoft.com/graph/api/team-get-primarychannel?view=graph-rest-1.0 @@ -107,29 +107,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrimaryCh Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrimaryChannelRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[PrimaryChannelRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -256,7 +256,7 @@ class PrimaryChannelRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class PrimaryChannelRequestBuilderGetQueryParameters(): """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/provision_email/provision_email_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/provision_email/provision_email_request_builder.py index 4aeeac304ce..9263e0af6bb 100644 --- a/msgraph/generated/groups/item/team/primary_channel/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/remove_email/remove_email_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/remove_email/remove_email_request_builder.py index 1e249ca19e1..c51c880b372 100644 --- a/msgraph/generated/groups/item/team/primary_channel/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/count/count_request_builder.py index 61c32cd2591..5772c42fa43 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index 83a901ef912..6c6018a71d6 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py index a976c402fc8..00f32e4b1ab 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index c1265244daa..5dc6786b84f 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index 51ba57ebe87..7b3bca13e13 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/team/team_request_builder.py index 6e46baa0982..c9ade39d283 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/shared_with_teams_request_builder.py index b8f2ee7f93b..330e4b2dda4 100644 --- a/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/tabs/count/count_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/tabs/count/count_request_builder.py index 1b6047dd2ec..561a1ab7fb2 100644 --- a/msgraph/generated/groups/item/team/primary_channel/tabs/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_app/teams_app_request_builder.py index d6bdde95908..46724ffd5b2 100644 --- a/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_tab_item_request_builder.py index dbe817a76cd..532a4466a76 100644 --- a/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/primary_channel/tabs/tabs_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/tabs/tabs_request_builder.py index 80670c2fd8a..777fdec3541 100644 --- a/msgraph/generated/groups/item/team/primary_channel/tabs/tabs_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/offer_shift_requests/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/offer_shift_requests/count/count_request_builder.py index 4bacb43abf9..e457d420438 100644 --- a/msgraph/generated/groups/item/team/schedule/offer_shift_requests/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/offer_shift_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py index 6cd4140529c..63f7f8b6f8f 100644 --- a/msgraph/generated/groups/item/team/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py @@ -10,8 +10,8 @@ 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.offer_shift_request import OfferShiftRequest + from .......models.o_data_errors.o_data_error import ODataError class OfferShiftRequestItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OfferShiftRequestItemReque async def get(self,request_configuration: Optional[OfferShiftRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OfferShiftRequest]: """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequest] Find more info here: https://learn.microsoft.com/graph/api/offershiftrequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OfferShif Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OfferShiftRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OfferShiftRequest] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OfferShiftRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class OfferShiftRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/offer_shift_requests/offer_shift_requests_request_builder.py b/msgraph/generated/groups/item/team/schedule/offer_shift_requests/offer_shift_requests_request_builder.py index 740f036d5dd..1469f2f556f 100644 --- a/msgraph/generated/groups/item/team/schedule/offer_shift_requests/offer_shift_requests_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/offer_shift_requests/offer_shift_requests_request_builder.py @@ -10,9 +10,9 @@ 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.offer_shift_request import OfferShiftRequest from ......models.offer_shift_request_collection_response import OfferShiftRequestCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.offer_shift_request_item_request_builder import OfferShiftRequestItemRequestBuilder @@ -45,7 +45,7 @@ def by_offer_shift_request_id(self,offer_shift_request_id: str) -> OfferShiftReq async def get(self,request_configuration: Optional[OfferShiftRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[OfferShiftRequestCollectionResponse]: """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/offershiftrequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OfferShiftRequestsRequestBuil async def post(self,body: Optional[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[OfferShiftRequest]: """ - Create an instance of an offerShiftRequest. + Create an instance of an offerShiftRequest. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OfferShiftRequest] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[OfferShiftRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of an offerShiftRequest. + Create an instance of an offerShiftRequest. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OfferShiftRequest] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OfferShiftRequestsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/count/count_request_builder.py index bbce340dda2..b23694cb5b5 100644 --- a/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py index b36258823a4..e750c790686 100644 --- a/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py @@ -10,8 +10,8 @@ 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.open_shift_change_request import OpenShiftChangeRequest + from .......models.o_data_errors.o_data_error import ODataError class OpenShiftChangeRequestItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OpenShiftChangeRequestItem async def get(self,request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftChangeRequest]: """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequest] Find more info here: https://learn.microsoft.com/graph/api/openshiftchangerequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OpenShift Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OpenShiftChangeRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OpenShiftChangeRequestItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class OpenShiftChangeRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py b/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py index 460fd3422f0..0821b8a346b 100644 --- a/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py @@ -10,9 +10,9 @@ 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.open_shift_change_request import OpenShiftChangeRequest from ......models.open_shift_change_request_collection_response import OpenShiftChangeRequestCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.open_shift_change_request_item_request_builder import OpenShiftChangeRequestItemRequestBuilder @@ -45,7 +45,7 @@ def by_open_shift_change_request_id(self,open_shift_change_request_id: str) -> O async def get(self,request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftChangeRequestCollectionResponse]: """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/openshiftchangerequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OpenShiftChangeRequestsReques async def post(self,body: Optional[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[OpenShiftChangeRequest]: """ - Create instance of an openShiftChangeRequest object. + Create instance of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OpenShiftChangeRequest] = None, request_confi def to_get_request_information(self,request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create instance of an openShiftChangeRequest object. + Create instance of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OpenShiftChangeRequest] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OpenShiftChangeRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/open_shifts/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/open_shifts/count/count_request_builder.py index 908f93a15d6..4bd8af8c478 100644 --- a/msgraph/generated/groups/item/team/schedule/open_shifts/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/open_shifts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/open_shifts/item/open_shift_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/open_shifts/item/open_shift_item_request_builder.py index 3eb1e3caeb1..1d1e9486564 100644 --- a/msgraph/generated/groups/item/team/schedule/open_shifts/item/open_shift_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/open_shifts/item/open_shift_item_request_builder.py @@ -10,8 +10,8 @@ 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.open_shift import OpenShift + from .......models.o_data_errors.o_data_error import ODataError class OpenShiftItemRequestBuilder(BaseRequestBuilder): """ @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OpenShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an openShift object. + Delete an openShift object. This API is available in the following national cloud deployments. 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/openshift-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OpenShiftItemRequestBuilde async def get(self,request_configuration: Optional[OpenShiftItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShift]: """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShift] Find more info here: https://learn.microsoft.com/graph/api/openshift-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[OpenShift] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[OpenShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an openShift object. + Delete an openShift object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OpenShiftItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShift] = None, request_configuration: Optional[OpenShiftItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[OpenShift] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class OpenShiftItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class OpenShiftItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/open_shifts/open_shifts_request_builder.py b/msgraph/generated/groups/item/team/schedule/open_shifts/open_shifts_request_builder.py index 38704a3ff85..98c41e8adc3 100644 --- a/msgraph/generated/groups/item/team/schedule/open_shifts/open_shifts_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/open_shifts/open_shifts_request_builder.py @@ -10,9 +10,9 @@ 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.open_shift import OpenShift from ......models.open_shift_collection_response import OpenShiftCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.open_shift_item_request_builder import OpenShiftItemRequestBuilder @@ -45,7 +45,7 @@ def by_open_shift_id(self,open_shift_id: str) -> OpenShiftItemRequestBuilder: async def get(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftCollectionResponse]: """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/openshift-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRe async def post(self,body: Optional[OpenShift] = None, request_configuration: Optional[OpenShiftsRequestBuilderPostRequestConfiguration] = None) -> Optional[OpenShift]: """ - Create an instance of an openShift object. + Create an instance of an openShift object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShift] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OpenShift] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShift] = None, request_configuration: Optional[OpenShiftsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of an openShift object. + Create an instance of an openShift object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OpenShift] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OpenShiftsRequestBuilderGetQueryParameters(): """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/schedule_request_builder.py b/msgraph/generated/groups/item/team/schedule/schedule_request_builder.py index 2c3a30b60aa..76e84d741e8 100644 --- a/msgraph/generated/groups/item/team/schedule/schedule_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/schedule_request_builder.py @@ -13,15 +13,15 @@ from .....models.o_data_errors.o_data_error import ODataError from .....models.schedule import Schedule from .offer_shift_requests.offer_shift_requests_request_builder import OfferShiftRequestsRequestBuilder - from .open_shift_change_requests.open_shift_change_requests_request_builder import OpenShiftChangeRequestsRequestBuilder from .open_shifts.open_shifts_request_builder import OpenShiftsRequestBuilder + from .open_shift_change_requests.open_shift_change_requests_request_builder import OpenShiftChangeRequestsRequestBuilder from .scheduling_groups.scheduling_groups_request_builder import SchedulingGroupsRequestBuilder from .share.share_request_builder import ShareRequestBuilder from .shifts.shifts_request_builder import ShiftsRequestBuilder from .swap_shifts_change_requests.swap_shifts_change_requests_request_builder import SwapShiftsChangeRequestsRequestBuilder + from .times_off.times_off_request_builder import TimesOffRequestBuilder from .time_off_reasons.time_off_reasons_request_builder import TimeOffReasonsRequestBuilder from .time_off_requests.time_off_requests_request_builder import TimeOffRequestsRequestBuilder - from .times_off.times_off_request_builder import TimesOffRequestBuilder class ScheduleRequestBuilder(BaseRequestBuilder): """ @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ScheduleRequestBuilderDele async def get(self,request_configuration: Optional[ScheduleRequestBuilderGetRequestConfiguration] = None) -> Optional[Schedule]: """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schedule] Find more info here: https://learn.microsoft.com/graph/api/schedule-get?view=graph-rest-1.0 @@ -108,29 +108,29 @@ def to_delete_request_information(self,request_configuration: Optional[ScheduleR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScheduleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[Schedule] = None, request_configuration: Optional[ScheduleRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +143,13 @@ def to_put_request_information(self,body: Optional[Schedule] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ScheduleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ScheduleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/scheduling_groups/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/scheduling_groups/count/count_request_builder.py index d4b081cd336..add5dce5a7f 100644 --- a/msgraph/generated/groups/item/team/schedule/scheduling_groups/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/scheduling_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py index 51b73db300c..0930be8daaa 100644 --- a/msgraph/generated/groups/item/team/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. + Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. This API is available in the following national cloud deployments. 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/schedulinggroup-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SchedulingGroupItemRequest async def get(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SchedulingGroup]: """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroup] Find more info here: https://learn.microsoft.com/graph/api/schedulinggroup-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[SchedulingGroup] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. + Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[SchedulingGroup] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class SchedulingGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class SchedulingGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/scheduling_groups/scheduling_groups_request_builder.py b/msgraph/generated/groups/item/team/schedule/scheduling_groups/scheduling_groups_request_builder.py index 989805a86dc..ddb89b7e137 100644 --- a/msgraph/generated/groups/item/team/schedule/scheduling_groups/scheduling_groups_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/scheduling_groups/scheduling_groups_request_builder.py @@ -45,7 +45,7 @@ def by_scheduling_group_id(self,scheduling_group_id: str) -> SchedulingGroupItem async def get(self,request_configuration: Optional[SchedulingGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SchedulingGroupCollectionResponse]: """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-schedulinggroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SchedulingGroupsRequestBuilde async def post(self,body: Optional[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SchedulingGroup]: """ - Create a new schedulingGroup. + Create a new schedulingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SchedulingGroup] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SchedulingGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new schedulingGroup. + Create a new schedulingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SchedulingGroup] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchedulingGroupsRequestBuilderGetQueryParameters(): """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 8206eecbc2f..e60fed35125 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.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. This API is available in the following national cloud deployments. 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.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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SharePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/schedule/shifts/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/shifts/count/count_request_builder.py index 995384e1072..a4a1bfcdd40 100644 --- a/msgraph/generated/groups/item/team/schedule/shifts/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/shifts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/shifts/item/shift_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/shifts/item/shift_item_request_builder.py index 52b5798f2d3..13c01f98501 100644 --- a/msgraph/generated/groups/item/team/schedule/shifts/item/shift_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/shifts/item/shift_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a shift from the schedule. + Delete a shift from the schedule. This API is available in the following national cloud deployments. 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/shift-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ShiftItemRequestBuilderDel async def get(self,request_configuration: Optional[ShiftItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Shift]: """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Shift] Find more info here: https://learn.microsoft.com/graph/api/shift-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Shift] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[ShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a shift from the schedule. + Delete a shift from the schedule. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ShiftItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Shift] = None, request_configuration: Optional[ShiftItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Shift] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ShiftItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class ShiftItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/shifts/shifts_request_builder.py b/msgraph/generated/groups/item/team/schedule/shifts/shifts_request_builder.py index 85364cb7759..ce36275ed4d 100644 --- a/msgraph/generated/groups/item/team/schedule/shifts/shifts_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/shifts/shifts_request_builder.py @@ -45,7 +45,7 @@ def by_shift_id(self,shift_id: str) -> ShiftItemRequestBuilder: async def get(self,request_configuration: Optional[ShiftsRequestBuilderGetRequestConfiguration] = None) -> Optional[ShiftCollectionResponse]: """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ShiftCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-shifts?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ShiftsRequestBuilderGetReques async def post(self,body: Optional[Shift] = None, request_configuration: Optional[ShiftsRequestBuilderPostRequestConfiguration] = None) -> Optional[Shift]: """ - Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. + Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Shift] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Shift] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[ShiftsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Shift] = None, request_configuration: Optional[ShiftsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. + Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Shift] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ShiftsRequestBuilderGetQueryParameters(): """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/count/count_request_builder.py index f981e5bae99..244f0a1dfa9 100644 --- a/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py index 67eb004c101..87463da19a0 100644 --- a/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SwapShiftsChangeRequestIte async def get(self,request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequest]: """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequest] Find more info here: https://learn.microsoft.com/graph/api/swapshiftschangerequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[SwapShift Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SwapShiftsChangeRequest] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class SwapShiftsChangeRequestItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class SwapShiftsChangeRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py b/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py index d0f5e93c436..4ca0c83a3c0 100644 --- a/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py @@ -45,7 +45,7 @@ def by_swap_shifts_change_request_id(self,swap_shifts_change_request_id: str) -> async def get(self,request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequestCollectionResponse]: """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/swapshiftschangerequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SwapShiftsChangeRequestsReque async def post(self,body: Optional[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequest]: """ - Create an instance of a swapShiftsChangeRequest object. + Create an instance of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SwapShiftsChangeRequest] = None, request_conf def to_get_request_information(self,request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of a swapShiftsChangeRequest object. + Create an instance of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SwapShiftsChangeRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SwapShiftsChangeRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/time_off_reasons/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/time_off_reasons/count/count_request_builder.py index c2ed620ed0b..1e90610b53e 100644 --- a/msgraph/generated/groups/item/team/schedule/time_off_reasons/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/time_off_reasons/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py index 1f4901d7e9d..4d82f342326 100644 --- a/msgraph/generated/groups/item/team/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. + Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. This API is available in the following national cloud deployments. 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/timeoffreason-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffReasonItemRequestBu async def get(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffReason]: """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReason] Find more info here: https://learn.microsoft.com/graph/api/timeoffreason-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[TimeOffReason] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. + Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TimeOffReason] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class TimeOffReasonItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class TimeOffReasonItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/time_off_reasons/time_off_reasons_request_builder.py b/msgraph/generated/groups/item/team/schedule/time_off_reasons/time_off_reasons_request_builder.py index 3c13d8c65b9..cb6166f2b64 100644 --- a/msgraph/generated/groups/item/team/schedule/time_off_reasons/time_off_reasons_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/time_off_reasons/time_off_reasons_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_reason_id(self,time_off_reason_id: str) -> TimeOffReasonItemRequ async def get(self,request_configuration: Optional[TimeOffReasonsRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffReasonCollectionResponse]: """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReasonCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-timeoffreasons?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TimeOffReasonsRequestBuilderG async def post(self,body: Optional[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonsRequestBuilderPostRequestConfiguration] = None) -> Optional[TimeOffReason]: """ - Create a new timeOffReason. + Create a new timeOffReason. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReason] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TimeOffReason] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[TimeOffReasonsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new timeOffReason. + Create a new timeOffReason. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TimeOffReason] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimeOffReasonsRequestBuilderGetQueryParameters(): """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/time_off_requests/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/time_off_requests/count/count_request_builder.py index 888f9ec45bc..cd8f557687c 100644 --- a/msgraph/generated/groups/item/team/schedule/time_off_requests/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/time_off_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/time_off_requests/item/time_off_request_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/time_off_requests/item/time_off_request_item_request_builder.py index bc7d248c9d7..2753427e332 100644 --- a/msgraph/generated/groups/item/team/schedule/time_off_requests/item/time_off_request_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/time_off_requests/item/time_off_request_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a timeOffRequest object. + Delete a timeOffRequest object. This API is available in the following national cloud deployments. 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/timeoffrequest-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffRequestItemRequestB async def get(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffRequest]: """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffRequest] Find more info here: https://learn.microsoft.com/graph/api/timeoffrequest-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[TimeOffRequest] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a timeOffRequest object. + Delete a timeOffRequest object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffRequest] = None, request_configuration: Optional[TimeOffRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TimeOffRequest] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class TimeOffRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class TimeOffRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/time_off_requests/time_off_requests_request_builder.py b/msgraph/generated/groups/item/team/schedule/time_off_requests/time_off_requests_request_builder.py index 344dfe456e8..2081cdb661e 100644 --- a/msgraph/generated/groups/item/team/schedule/time_off_requests/time_off_requests_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/time_off_requests/time_off_requests_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_request_id(self,time_off_request_id: str) -> TimeOffRequestItemR async def get(self,request_configuration: Optional[TimeOffRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffRequestCollectionResponse]: """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/timeoffrequest-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[TimeOffRequest] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[TimeOffRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffRequest] = None, request_configuration: Optional[TimeOffRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[TimeOffRequest] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimeOffRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/times_off/count/count_request_builder.py b/msgraph/generated/groups/item/team/schedule/times_off/count/count_request_builder.py index 444612b0001..2ffb31b4d8f 100644 --- a/msgraph/generated/groups/item/team/schedule/times_off/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/times_off/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/schedule/times_off/item/time_off_item_request_builder.py b/msgraph/generated/groups/item/team/schedule/times_off/item/time_off_item_request_builder.py index 643fe049974..5e4286d9f7a 100644 --- a/msgraph/generated/groups/item/team/schedule/times_off/item/time_off_item_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/times_off/item/time_off_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a timeOff instance from a schedule. + Delete a timeOff instance from a schedule. This API is available in the following national cloud deployments. 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/timeoff-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffItemRequestBuilderD async def get(self,request_configuration: Optional[TimeOffItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOff]: """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOff] Find more info here: https://learn.microsoft.com/graph/api/timeoff-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[TimeOff] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[TimeOffItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a timeOff instance from a schedule. + Delete a timeOff instance from a schedule. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOff] = None, request_configuration: Optional[TimeOffItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TimeOff] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class TimeOffItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class TimeOffItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/schedule/times_off/times_off_request_builder.py b/msgraph/generated/groups/item/team/schedule/times_off/times_off_request_builder.py index e1e80bb08d7..56a75e27b42 100644 --- a/msgraph/generated/groups/item/team/schedule/times_off/times_off_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/times_off/times_off_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_id(self,time_off_id: str) -> TimeOffItemRequestBuilder: async def get(self,request_configuration: Optional[TimesOffRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffCollectionResponse]: """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-timesoff?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TimesOffRequestBuilderGetRequ async def post(self,body: Optional[TimeOff] = None, request_configuration: Optional[TimesOffRequestBuilderPostRequestConfiguration] = None) -> Optional[TimeOff]: """ - Create a new timeOff instance in a schedule. + Create a new timeOff instance in a schedule. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOff] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TimeOff] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[TimesOffRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOff] = None, request_configuration: Optional[TimesOffRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new timeOff instance in a schedule. + Create a new timeOff instance in a schedule. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TimeOff] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimesOffRequestBuilderGetQueryParameters(): """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/send_activity_notification/send_activity_notification_request_builder.py b/msgraph/generated/groups/item/team/send_activity_notification/send_activity_notification_request_builder.py index 92f6b702fba..2e99d2a9d69 100644 --- a/msgraph/generated/groups/item/team/send_activity_notification/send_activity_notification_request_builder.py +++ b/msgraph/generated/groups/item/team/send_activity_notification/send_activity_notification_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationPostRequestBody] = No def to_post_request_information(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/tags/count/count_request_builder.py b/msgraph/generated/groups/item/team/tags/count/count_request_builder.py index fd601d22ef0..bd4e3d25aef 100644 --- a/msgraph/generated/groups/item/team/tags/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/tags/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/tags/item/members/count/count_request_builder.py b/msgraph/generated/groups/item/team/tags/item/members/count/count_request_builder.py index 38989d124c5..dac0560fb0c 100644 --- a/msgraph/generated/groups/item/team/tags/item/members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/team/tags/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/team/tags/item/members/item/teamwork_tag_member_item_request_builder.py b/msgraph/generated/groups/item/team/tags/item/members/item/teamwork_tag_member_item_request_builder.py index bca9e99a5d5..7ad71856a52 100644 --- a/msgraph/generated/groups/item/team/tags/item/members/item/teamwork_tag_member_item_request_builder.py +++ b/msgraph/generated/groups/item/team/tags/item/members/item/teamwork_tag_member_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a member from a standard tag in a team. + Delete a member from a standard tag in a team. This API is available in the following national cloud deployments. 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/teamworktagmember-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TeamworkTagMemberItemReque async def get(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagMember]: """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMember] Find more info here: https://learn.microsoft.com/graph/api/teamworktagmember-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[TeamworkTagMember] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a member from a standard tag in a team. + Delete a member from a standard tag in a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTagMember] = None, request_configuration: Optional[TeamworkTagMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TeamworkTagMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class TeamworkTagMemberItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/tags/item/members/members_request_builder.py b/msgraph/generated/groups/item/team/tags/item/members/members_request_builder.py index 3a451fcd158..7446187d87f 100644 --- a/msgraph/generated/groups/item/team/tags/item/members/members_request_builder.py +++ b/msgraph/generated/groups/item/team/tags/item/members/members_request_builder.py @@ -45,7 +45,7 @@ def by_teamwork_tag_member_id(self,teamwork_tag_member_id: str) -> TeamworkTagMe async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagMemberCollectionResponse]: """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamworktagmember-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[TeamworkTagMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamworkTagMember]: """ - Create a new teamworkTagMember object in a team. + Create a new teamworkTagMember object in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMember] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamworkTagMember] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTagMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new teamworkTagMember object in a team. + Create a new teamworkTagMember object in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamworkTagMember] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/tags/item/teamwork_tag_item_request_builder.py b/msgraph/generated/groups/item/team/tags/item/teamwork_tag_item_request_builder.py index a865f8c9417..cddf82b0d67 100644 --- a/msgraph/generated/groups/item/team/tags/item/teamwork_tag_item_request_builder.py +++ b/msgraph/generated/groups/item/team/tags/item/teamwork_tag_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamworkTagItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a tag object permanently. + Delete a tag object permanently. This API is available in the following national cloud deployments. 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/teamworktag-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamworkTagItemRequestBuil async def get(self,request_configuration: Optional[TeamworkTagItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] Find more info here: https://learn.microsoft.com/graph/api/teamworktag-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamworkTagItemRequestBuilder async def patch(self,body: Optional[TeamworkTag] = None, request_configuration: Optional[TeamworkTagItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Update the properties of a tag object. + Update the properties of a tag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamworkTag] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[TeamworkTagItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a tag object permanently. + Delete a tag object permanently. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkTagItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTag] = None, request_configuration: Optional[TeamworkTagItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a tag object. + Update the properties of a tag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamworkTag] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamworkTagItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class TeamworkTagItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/tags/tags_request_builder.py b/msgraph/generated/groups/item/team/tags/tags_request_builder.py index 19de17283e3..60ae3c50e11 100644 --- a/msgraph/generated/groups/item/team/tags/tags_request_builder.py +++ b/msgraph/generated/groups/item/team/tags/tags_request_builder.py @@ -45,7 +45,7 @@ def by_teamwork_tag_id(self,teamwork_tag_id: str) -> TeamworkTagItemRequestBuild async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagCollectionResponse]: """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamworktag-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestC async def post(self,body: Optional[TeamworkTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Create a standard tag for members in a team. + Create a standard tag for members in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamworkTag] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a standard tag for members in a team. + Create a standard tag for members in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamworkTag] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TagsRequestBuilderGetQueryParameters(): """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/team_request_builder.py b/msgraph/generated/groups/item/team/team_request_builder.py index 6e976d17089..f3d28087b8b 100644 --- a/msgraph/generated/groups/item/team/team_request_builder.py +++ b/msgraph/generated/groups/item/team/team_request_builder.py @@ -115,12 +115,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -130,14 +130,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[Team] = None, request_configuration: Optional[TeamRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -150,13 +150,13 @@ def to_put_request_information(self,body: Optional[Team] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/template/template_request_builder.py b/msgraph/generated/groups/item/team/template/template_request_builder.py index 28c2b8fb8e9..441f35b1925 100644 --- a/msgraph/generated/groups/item/team/template/template_request_builder.py +++ b/msgraph/generated/groups/item/team/template/template_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TemplateRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TemplateRequestBuilder: diff --git a/msgraph/generated/groups/item/team/unarchive/unarchive_request_builder.py b/msgraph/generated/groups/item/team/unarchive/unarchive_request_builder.py index e4437ee5050..aaf08adc897 100644 --- a/msgraph/generated/groups/item/team/unarchive/unarchive_request_builder.py +++ b/msgraph/generated/groups/item/team/unarchive/unarchive_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. + Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. This API is available in the following national cloud deployments. 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/team-unarchive?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnarchiveRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. + Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnarchiveRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/count/count_request_builder.py b/msgraph/generated/groups/item/threads/count/count_request_builder.py index 71bc989c1fe..d0a0b9e49be 100644 --- a/msgraph/generated/groups/item/threads/count/count_request_builder.py +++ b/msgraph/generated/groups/item/threads/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 fd5027c9ba6..6285fad5494 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 @@ -30,10 +30,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationThreadItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete conversationThread. + This API is available in the following national cloud deployments. 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/conversationthread-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/group-delete-thread?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[ConversationThreadItemRequ async def get(self,request_configuration: Optional[ConversationThreadItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationThread]: """ - 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. + 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. This API is available in the following national cloud deployments. 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/conversationthread-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[ConversationThreadItemRequest async def patch(self,body: Optional[ConversationThread] = None, request_configuration: Optional[ConversationThreadItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationThread]: """ - Update conversation thread + This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationThread] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[ConversationThread] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationThreadItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete conversationThread. + This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationThreadItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - 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. + 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. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationThread] = None, request_configuration: Optional[ConversationThreadItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update conversation thread + This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[ConversationThread] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class ConversationThreadItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationThreadItemRequestBuilderGetQueryParameters(): """ - 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. + 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. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/posts/count/count_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/count/count_request_builder.py index 74460fd6702..283b9c0cd4b 100644 --- a/msgraph/generated/groups/item/threads/item/posts/count/count_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/attachments/attachments_request_builder.py index 76171ef86ba..d4fc7f7c59e 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/post-list-attachments?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/posts/item/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/attachments/count/count_request_builder.py index 42169af32f6..f28b3382856 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py index e8242e5fc90..d40166622d3 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py index 3edc9e43ff7..33d394e15c6 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/attachments/item/attachment_item_request_builder.py @@ -73,12 +73,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -88,14 +88,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/extensions/count/count_request_builder.py index 786c304ed1c..1980f8b44ee 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/extensions/extensions_request_builder.py index a2adfc00815..9bdeb0351eb 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py index 1c72d348e00..f949fd82b8d 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGe async def patch(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Extension]: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/posts/item/forward/forward_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/forward/forward_request_builder.py index f593a1b198e..0b856799032 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py index 97fd122597d..69eee28c6b6 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/post-list-attachments?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to a post. + Retrieve a list of attachment objects attached to a post. This API is available in the following national cloud deployments. """ 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/attachments/count/count_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py index bfff8149cfa..9c34240e69f 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py index f2f0ecd4c8d..7ea4b1dcec4 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py index a8a8f28e494..af6c7d1078d 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/attachments/item/attachment_item_request_builder.py @@ -73,12 +73,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -88,14 +88,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py index 3bff7acc235..9d3d17fa8f3 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py index 20c1d7fa783..b567eaa80bc 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ 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/extensions/item/extension_item_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py index 8957545e048..074f4670fd2 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGe async def patch(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Extension]: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. + Update an open extension (openTypeExtension object) with the properties in the request body: The data in an extension can be primitive types, or arrays of primitive types. See the table in the Permissions section for the list of resources that support open extensions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ 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/forward/forward_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py index 8202f6e5350..76aae606f74 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + Forward a post to a recipient. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py index 6073f2546ab..f222adb837b 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/in_reply_to_request_builder.py @@ -58,14 +58,14 @@ def to_get_request_information(self,request_configuration: Optional[InReplyToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InReplyToRequestBuilder: 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 f45ef1c206b..dcef8174262 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,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + 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. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/item/posts/item/post_item_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/post_item_request_builder.py index f85af5bd6fc..ac5b8033ac3 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/post_item_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/post_item_request_builder.py @@ -59,14 +59,14 @@ def to_get_request_information(self,request_configuration: Optional[PostItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PostItemRequestBuilder: 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 0d97ee52e5a..074b49c75fe 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,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + 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. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py index 3a8f4bdef4d..a372c7581e4 100644 --- a/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py @@ -44,7 +44,7 @@ def by_post_id(self,post_id: str) -> PostItemRequestBuilder: async def get(self,request_configuration: Optional[PostsRequestBuilderGetRequestConfiguration] = None) -> Optional[PostCollectionResponse]: """ - Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PostCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationthread-list-posts?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[PostsRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[PostsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PostsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PostsRequestBuilderGetQueryParameters(): """ - Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 efb4fa7cad7..cd41282492f 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,7 +28,7 @@ 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. + 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. This API is available in the following national cloud deployments. 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[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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/threads/threads_request_builder.py b/msgraph/generated/groups/item/threads/threads_request_builder.py index e8f2f92fe0e..038f426e110 100644 --- a/msgraph/generated/groups/item/threads/threads_request_builder.py +++ b/msgraph/generated/groups/item/threads/threads_request_builder.py @@ -45,7 +45,7 @@ def by_conversation_thread_id(self,conversation_thread_id: str) -> ConversationT async def get(self,request_configuration: Optional[ThreadsRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationThreadCollectionResponse]: """ - Get all the threads of a group. + Get all the threads of a group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationThreadCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/group-list-threads?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ThreadsRequestBuilderGetReque async def post(self,body: Optional[ConversationThread] = None, request_configuration: Optional[ThreadsRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationThread]: """ - Start a new group conversation by first creating a thread. A new conversation, conversation thread, and post are created in the group.Use reply thread or reply post to further post to that thread. Note: You can also start a new thread in an existing conversation. + Start a new group conversation by first creating a thread. A new conversation, conversation thread, and post are created in the group.Use reply thread or reply post to further post to that thread. Note: You can also start a new thread in an existing conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationThread] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ConversationThread] = None, request_configura def to_get_request_information(self,request_configuration: Optional[ThreadsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the threads of a group. + Get all the threads of a group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationThread] = None, request_configuration: Optional[ThreadsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start a new group conversation by first creating a thread. A new conversation, conversation thread, and post are created in the group.Use reply thread or reply post to further post to that thread. Note: You can also start a new thread in an existing conversation. + Start a new group conversation by first creating a thread. A new conversation, conversation thread, and post are created in the group.Use reply thread or reply post to further post to that thread. Note: You can also start a new thread in an existing conversation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ConversationThread] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ThreadsRequestBuilderGetQueryParameters(): """ - Get all the threads of a group. + Get all the threads of a group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/transitive_member_of/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/count/count_request_builder.py index f8ab4c48d20..59f79cb3f50 100644 --- a/msgraph/generated/groups/item/transitive_member_of/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py index d492cf53e60..4c9335915e8 100644 --- a/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index 282836135e2..e294cba2177 100644 --- a/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/graph_group/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/graph_group/count/count_request_builder.py index 4dae867a57c..09b53ce3a3a 100644 --- a/msgraph/generated/groups/item/transitive_member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/graph_group/graph_group_request_builder.py index f2087447613..30fd96e2d2a 100644 --- a/msgraph/generated/groups/item/transitive_member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/item/directory_object_item_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/item/directory_object_item_request_builder.py index 669ecf89eb9..7e1e3d9d866 100644 --- a/msgraph/generated/groups/item/transitive_member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index dceeacd6ae0..eb4b1aacbd3 100644 --- a/msgraph/generated/groups/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/item/graph_group/graph_group_request_builder.py index bff60727a78..f22b751ac95 100644 --- a/msgraph/generated/groups/item/transitive_member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_member_of/transitive_member_of_request_builder.py b/msgraph/generated/groups/item/transitive_member_of/transitive_member_of_request_builder.py index 844b8be6565..c056d723412 100644 --- a/msgraph/generated/groups/item/transitive_member_of/transitive_member_of_request_builder.py +++ b/msgraph/generated/groups/item/transitive_member_of/transitive_member_of_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[TransitiveMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TransitiveMemberOfRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/count/count_request_builder.py index cfbb8c4cf56..0a9f0f9add5 100644 --- a/msgraph/generated/groups/item/transitive_members/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_application/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_application/count/count_request_builder.py index 69896d1360f..525028b09c7 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_application/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_application/graph_application_request_builder.py index b38b8b7c5e4..ec75bed8bec 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_device/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_device/count/count_request_builder.py index 84ff3cf1212..ec71f21f16b 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_device/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_device/graph_device_request_builder.py index 70e9344058f..c13e4ae738a 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_group/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_group/count/count_request_builder.py index 145250f1a54..49d5a871934 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_group/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_group/graph_group_request_builder.py index 47281eeea4c..fb232bbd79d 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_org_contact/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_org_contact/count/count_request_builder.py index 9fe85b7a637..bf12e94f74f 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_org_contact/graph_org_contact_request_builder.py index ace95ebc697..e9a29bd4ba3 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_service_principal/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_service_principal/count/count_request_builder.py index 4296f5d8af8..f944e65fbf9 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_service_principal/graph_service_principal_request_builder.py index b1fbc592d68..6170ecdc875 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_user/count/count_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_user/count/count_request_builder.py index 6f25d24b27b..5b6065764a2 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_user/count/count_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/transitive_members/graph_user/graph_user_request_builder.py index 9bd74ff0f07..542d2eec2fc 100644 --- a/msgraph/generated/groups/item/transitive_members/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/directory_object_item_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/directory_object_item_request_builder.py index 2f46efd7fad..daf18c44d90 100644 --- a/msgraph/generated/groups/item/transitive_members/item/directory_object_item_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/directory_object_item_request_builder.py @@ -60,14 +60,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/graph_application/graph_application_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/graph_application/graph_application_request_builder.py index 6f889dfb03d..bb41a2ddd98 100644 --- a/msgraph/generated/groups/item/transitive_members/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/graph_device/graph_device_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/graph_device/graph_device_request_builder.py index 39eee410ea8..a826c507878 100644 --- a/msgraph/generated/groups/item/transitive_members/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/graph_group/graph_group_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/graph_group/graph_group_request_builder.py index 7d9105ba815..97c625032b0 100644 --- a/msgraph/generated/groups/item/transitive_members/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/graph_org_contact/graph_org_contact_request_builder.py index f0024d4f771..4b55dc82872 100644 --- a/msgraph/generated/groups/item/transitive_members/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/graph_service_principal/graph_service_principal_request_builder.py index 864624b95b3..99536e0536a 100644 --- a/msgraph/generated/groups/item/transitive_members/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/item/graph_user/graph_user_request_builder.py b/msgraph/generated/groups/item/transitive_members/item/graph_user/graph_user_request_builder.py index 65bc3f43edb..f0be900e46b 100644 --- a/msgraph/generated/groups/item/transitive_members/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/groups/item/transitive_members/transitive_members_request_builder.py b/msgraph/generated/groups/item/transitive_members/transitive_members_request_builder.py index e6604f07086..bca5b777ceb 100644 --- a/msgraph/generated/groups/item/transitive_members/transitive_members_request_builder.py +++ b/msgraph/generated/groups/item/transitive_members/transitive_members_request_builder.py @@ -77,14 +77,14 @@ def to_get_request_information(self,request_configuration: Optional[TransitiveMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TransitiveMembersRequestBuilder: diff --git a/msgraph/generated/groups/item/unsubscribe_by_mail/unsubscribe_by_mail_request_builder.py b/msgraph/generated/groups/item/unsubscribe_by_mail/unsubscribe_by_mail_request_builder.py index 0994654c90a..e09f45e1fdb 100644 --- a/msgraph/generated/groups/item/unsubscribe_by_mail/unsubscribe_by_mail_request_builder.py +++ b/msgraph/generated/groups/item/unsubscribe_by_mail/unsubscribe_by_mail_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnsubscribeByMailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Calling this method will prevent the current user from receiving email notifications for this group about new posts, events, and files in that group. Supported for Microsoft 365 groups only. + Calling this method prevents the current user from receiving email notifications for this group about new posts, events, and files in that group. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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-unsubscribebymail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnsubscribeByMailRequestBuil def to_post_request_information(self,request_configuration: Optional[UnsubscribeByMailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Calling this method will prevent the current user from receiving email notifications for this group about new posts, events, and files in that group. Supported for Microsoft 365 groups only. + Calling this method prevents the current user from receiving email notifications for this group about new posts, events, and files in that group. Supported for Microsoft 365 groups only. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnsubscribeByMailRequestBuilder: diff --git a/msgraph/generated/groups/item/validate_properties/validate_properties_request_builder.py b/msgraph/generated/groups/item/validate_properties/validate_properties_request_builder.py index 7506acb786c..b5ff7c5617f 100644 --- a/msgraph/generated/groups/item/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/groups/item/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to update a Microsoft 365 group. To validate the properties before creating a group, use the directoryobject:validateProperties function. The following policy validations are performed for the display name and mail nickname properties: This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to update a Microsoft 365 group. To validate the properties before creating a group, use the directoryobject:validateProperties function. The following policy validations are performed for the display name and mail nickname properties: This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to update a Microsoft 365 group. To validate the properties before creating a group, use the directoryobject:validateProperties function. The following policy validations are performed for the display name and mail nickname properties: This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to update a Microsoft 365 group. To validate the properties before creating a group, use the directoryobject:validateProperties function. The following policy validations are performed for the display name and mail nickname properties: This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/validate_properties/validate_properties_request_builder.py b/msgraph/generated/groups/validate_properties/validate_properties_request_builder.py index 735a6b051f6..f157d857751 100644 --- a/msgraph/generated/groups/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/groups/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/api_connectors/api_connectors_request_builder.py b/msgraph/generated/identity/api_connectors/api_connectors_request_builder.py index db82b79e277..d5ff1140755 100644 --- a/msgraph/generated/identity/api_connectors/api_connectors_request_builder.py +++ b/msgraph/generated/identity/api_connectors/api_connectors_request_builder.py @@ -45,7 +45,7 @@ def by_identity_api_connector_id(self,identity_api_connector_id: str) -> Identit async def get(self,request_configuration: Optional[ApiConnectorsRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityApiConnectorCollectionResponse]: """ - Read the properties of an identityApiConnector object. + Read the properties of an identityApiConnector object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnectorCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identityapiconnector-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ApiConnectorsRequestBuilderGe async def post(self,body: Optional[IdentityApiConnector] = None, request_configuration: Optional[ApiConnectorsRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityApiConnector]: """ - Create a new identityApiConnector object. + Create a new identityApiConnector object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnector] @@ -92,24 +92,24 @@ async def post(self,body: Optional[IdentityApiConnector] = None, request_configu def to_get_request_information(self,request_configuration: Optional[ApiConnectorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of an identityApiConnector object. + Read the properties of an identityApiConnector object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityApiConnector] = None, request_configuration: Optional[ApiConnectorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new identityApiConnector object. + Create a new identityApiConnector object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[IdentityApiConnector] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ApiConnectorsRequestBuilderGetQueryParameters(): """ - Read the properties of an identityApiConnector object. + Read the properties of an identityApiConnector object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/api_connectors/count/count_request_builder.py b/msgraph/generated/identity/api_connectors/count/count_request_builder.py index fc0e7874042..f313cf5ecf9 100644 --- a/msgraph/generated/identity/api_connectors/count/count_request_builder.py +++ b/msgraph/generated/identity/api_connectors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/api_connectors/item/identity_api_connector_item_request_builder.py b/msgraph/generated/identity/api_connectors/item/identity_api_connector_item_request_builder.py index 96ad6b582c0..b52eb5517d5 100644 --- a/msgraph/generated/identity/api_connectors/item/identity_api_connector_item_request_builder.py +++ b/msgraph/generated/identity/api_connectors/item/identity_api_connector_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentityApiConnectorItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an identityApiConnector object. + Delete an identityApiConnector object. This API is available in the following national cloud deployments. 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/identityapiconnector-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[IdentityApiConnectorItemRe async def get(self,request_configuration: Optional[IdentityApiConnectorItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityApiConnector]: """ - Read the properties of an identityApiConnector object. + Read the properties of an identityApiConnector object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnector] Find more info here: https://learn.microsoft.com/graph/api/identityapiconnector-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[IdentityApiConnectorItemReque async def patch(self,body: Optional[IdentityApiConnector] = None, request_configuration: Optional[IdentityApiConnectorItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[IdentityApiConnector]: """ - Update the properties of an identityApiConnector object. + Update the properties of an identityApiConnector object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnector] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[IdentityApiConnector] = None, request_config def to_delete_request_information(self,request_configuration: Optional[IdentityApiConnectorItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an identityApiConnector object. + Delete an identityApiConnector object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityApiConnectorItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of an identityApiConnector object. + Read the properties of an identityApiConnector object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityApiConnector] = None, request_configuration: Optional[IdentityApiConnectorItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an identityApiConnector object. + Update the properties of an identityApiConnector object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[IdentityApiConnector] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class IdentityApiConnectorItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class IdentityApiConnectorItemRequestBuilderGetQueryParameters(): """ - Read the properties of an identityApiConnector object. + Read the properties of an identityApiConnector object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/api_connectors/item/upload_client_certificate/upload_client_certificate_request_builder.py b/msgraph/generated/identity/api_connectors/item/upload_client_certificate/upload_client_certificate_request_builder.py index f4bf51f0298..15a9f5149d9 100644 --- a/msgraph/generated/identity/api_connectors/item/upload_client_certificate/upload_client_certificate_request_builder.py +++ b/msgraph/generated/identity/api_connectors/item/upload_client_certificate/upload_client_certificate_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UploadClientCertificatePostRequestBody] = None, request_configuration: Optional[UploadClientCertificateRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityApiConnector]: """ - Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. + Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnector] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UploadClientCertificatePostRequestBody] = Non def to_post_request_information(self,body: Optional[UploadClientCertificatePostRequestBody] = None, request_configuration: Optional[UploadClientCertificateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. + Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UploadClientCertificatePostR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/b2x_user_flows_request_builder.py b/msgraph/generated/identity/b2x_user_flows/b2x_user_flows_request_builder.py index 1686600063e..c0956b94131 100644 --- a/msgraph/generated/identity/b2x_user_flows/b2x_user_flows_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/b2x_user_flows_request_builder.py @@ -45,7 +45,7 @@ def by_b2x_identity_user_flow_id(self,b2x_identity_user_flow_id: str) -> B2xIden async def get(self,request_configuration: Optional[B2xUserFlowsRequestBuilderGetRequestConfiguration] = None) -> Optional[B2xIdentityUserFlowCollectionResponse]: """ - Retrieve a list of b2xIdentityUserFlow objects. + Retrieve a list of b2xIdentityUserFlow objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[B2xIdentityUserFlowCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitycontainer-list-b2xuserflows?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[B2xUserFlowsRequestBuilderGet async def post(self,body: Optional[B2xIdentityUserFlow] = None, request_configuration: Optional[B2xUserFlowsRequestBuilderPostRequestConfiguration] = None) -> Optional[B2xIdentityUserFlow]: """ - Create a new b2xIdentityUserFlow object. + Create a new b2xIdentityUserFlow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[B2xIdentityUserFlow] @@ -92,24 +92,24 @@ async def post(self,body: Optional[B2xIdentityUserFlow] = None, request_configur def to_get_request_information(self,request_configuration: Optional[B2xUserFlowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of b2xIdentityUserFlow objects. + Retrieve a list of b2xIdentityUserFlow objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[B2xIdentityUserFlow] = None, request_configuration: Optional[B2xUserFlowsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new b2xIdentityUserFlow object. + Create a new b2xIdentityUserFlow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[B2xIdentityUserFlow] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class B2xUserFlowsRequestBuilderGetQueryParameters(): """ - Retrieve a list of b2xIdentityUserFlow objects. + Retrieve a list of b2xIdentityUserFlow objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/count/count_request_builder.py index b3b4cf8f5ce..fe8f2d4bb0f 100644 --- a/msgraph/generated/identity/b2x_user_flows/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/api_connector_configuration_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/api_connector_configuration_request_builder.py index 4bcbc74ae4e..46ecc3ca0a1 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/api_connector_configuration_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/api_connector_configuration_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[ApiConnector Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ApiConnectorConfigurationRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/post_attribute_collection_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/post_attribute_collection_request_builder.py index bcb4c1d8624..ffb66581f32 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/post_attribute_collection_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/post_attribute_collection_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PostAttri Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PostAttributeCollectionRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PostAttribut Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityApiConnector] = None, request_configuration: Optional[PostAttributeCollectionRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[IdentityApiConnector] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/ref/ref_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/ref/ref_request_builder.py index fca2f1ebcea..3bc949e31aa 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/ref/ref_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/ref/ref_request_builder.py @@ -93,12 +93,12 @@ def to_delete_request_information(self,request_configuration: Optional[RefReques Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -108,13 +108,13 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -127,12 +127,12 @@ def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/upload_client_certificate/upload_client_certificate_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/upload_client_certificate/upload_client_certificate_request_builder.py index 38e58a126fd..fa4d7ac7fb0 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/upload_client_certificate/upload_client_certificate_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_attribute_collection/upload_client_certificate/upload_client_certificate_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UploadClientCertificatePostRequestBody] = None, request_configuration: Optional[UploadClientCertificateRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityApiConnector]: """ - Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. + Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnector] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UploadClientCertificatePostRequestBody] = Non def to_post_request_information(self,body: Optional[UploadClientCertificatePostRequestBody] = None, request_configuration: Optional[UploadClientCertificateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. + Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UploadClientCertificatePostR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/post_federation_signup_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/post_federation_signup_request_builder.py index 48ac38afa64..4aecde861f6 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/post_federation_signup_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/post_federation_signup_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PostFeder Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PostFederationSignupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PostFederati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityApiConnector] = None, request_configuration: Optional[PostFederationSignupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[IdentityApiConnector] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/ref/ref_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/ref/ref_request_builder.py index 6c196254a1f..43d4a1c09b1 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/ref/ref_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/ref/ref_request_builder.py @@ -93,12 +93,12 @@ def to_delete_request_information(self,request_configuration: Optional[RefReques Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -108,13 +108,13 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -127,12 +127,12 @@ def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/upload_client_certificate/upload_client_certificate_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/upload_client_certificate/upload_client_certificate_request_builder.py index 9d718a79844..a9fe2074f6d 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/upload_client_certificate/upload_client_certificate_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/api_connector_configuration/post_federation_signup/upload_client_certificate/upload_client_certificate_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UploadClientCertificatePostRequestBody] = None, request_configuration: Optional[UploadClientCertificateRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityApiConnector]: """ - Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. + Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityApiConnector] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UploadClientCertificatePostRequestBody] = Non def to_post_request_information(self,body: Optional[UploadClientCertificatePostRequestBody] = None, request_configuration: Optional[UploadClientCertificateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. + Upload a PKCS 12 format key (.pfx) to an API connector's authentication configuration. The input is a base-64 encoded value of the PKCS 12 certificate contents. This method returns an apiConnector. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UploadClientCertificatePostR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/b2x_identity_user_flow_item_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/b2x_identity_user_flow_item_request_builder.py index 2ddbc9f01bc..be151995fa3 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/b2x_identity_user_flow_item_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/b2x_identity_user_flow_item_request_builder.py @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[B2xIdentityUserFlowItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a b2xIdentityUserFlow object. + Delete a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. 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/b2xidentityuserflow-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[B2xIdentityUserFlowItemReq async def get(self,request_configuration: Optional[B2xIdentityUserFlowItemRequestBuilderGetRequestConfiguration] = None) -> Optional[B2xIdentityUserFlow]: """ - Retrieve the properties and relationships of a b2xIdentityUserFlow object. + Retrieve the properties and relationships of a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[B2xIdentityUserFlow] Find more info here: https://learn.microsoft.com/graph/api/b2xidentityuserflow-get?view=graph-rest-1.0 @@ -99,34 +99,34 @@ async def patch(self,body: Optional[B2xIdentityUserFlow] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[B2xIdentityUserFlowItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a b2xIdentityUserFlow object. + Delete a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[B2xIdentityUserFlowItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a b2xIdentityUserFlow object. + Retrieve the properties and relationships of a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[B2xIdentityUserFlow] = None, request_configuration: Optional[B2xIdentityUserFlowItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[B2xIdentityUserFlow] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -217,7 +217,7 @@ class B2xIdentityUserFlowItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class B2xIdentityUserFlowItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a b2xIdentityUserFlow object. + Retrieve the properties and relationships of a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/identity_providers/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/identity_providers/count/count_request_builder.py index 087b443048c..999e66bc8ab 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/identity_providers/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/identity_providers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/identity_providers/identity_providers_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/identity_providers/identity_providers_request_builder.py index 4877524e021..a9b3a765b93 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/identity_providers/identity_providers_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/identity_providers/identity_providers_request_builder.py @@ -44,7 +44,7 @@ def by_identity_provider_id(self,identity_provider_id: str) -> IdentityProviderI async def get(self,request_configuration: Optional[IdentityProvidersRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityProviderCollectionResponse]: """ - Get the identity providers in a b2xIdentityUserFlow object. + Get the identity providers in a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProviderCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/b2xidentityuserflow-list-identityproviders?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[IdentityProvidersRequestBuild def to_get_request_information(self,request_configuration: Optional[IdentityProvidersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the identity providers in a b2xIdentityUserFlow object. + Get the identity providers in a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IdentityProvidersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IdentityProvidersRequestBuilderGetQueryParameters(): """ - Get the identity providers in a b2xIdentityUserFlow object. + Get the identity providers in a b2xIdentityUserFlow object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/identity_providers/item/identity_provider_item_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/identity_providers/item/identity_provider_item_request_builder.py index 32df8a5698d..aef5f3f33c7 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/identity_providers/item/identity_provider_item_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/identity_providers/item/identity_provider_item_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[IdentityP Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityProviderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityProv Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IdentityProviderItemRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/count/count_request_builder.py index 0dd1aabd6cb..b95c16d33a7 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/count/count_request_builder.py index d0910bb785c..0ab464cb58e 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/default_pages_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/default_pages_request_builder.py index 8050620b03c..53021ecdd74 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/default_pages_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/default_pages_request_builder.py @@ -45,7 +45,7 @@ def by_user_flow_language_page_id(self,user_flow_language_page_id: str) -> UserF async def get(self,request_configuration: Optional[DefaultPagesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserFlowLanguagePageCollectionResponse]: """ - Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserFlowLanguagePageCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[UserFlowLanguagePage] = None, request_configu def to_get_request_information(self,request_configuration: Optional[DefaultPagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserFlowLanguagePage] = None, request_configuration: Optional[DefaultPagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UserFlowLanguagePage] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DefaultPagesRequestBuilderGetQueryParameters(): """ - Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/user_flow_language_page_item_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/user_flow_language_page_item_request_builder.py index bf10f8cd374..f9e5831c4a7 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/user_flow_language_page_item_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/user_flow_language_page_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[UserFlowLanguagePageItemRe async def get(self,request_configuration: Optional[UserFlowLanguagePageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserFlowLanguagePage]: """ - Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserFlowLanguagePage] """ @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[UserFlowL Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserFlowLanguagePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserFlowLanguagePage] = None, request_configuration: Optional[UserFlowLanguagePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UserFlowLanguagePage] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -175,7 +175,7 @@ class UserFlowLanguagePageItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class UserFlowLanguagePageItemRequestBuilderGetQueryParameters(): """ - Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/value/content_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/value/content_request_builder.py index 91ca7570fc8..9b6272126a0 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/value/content_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/default_pages/item/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/count/count_request_builder.py index 8a2166c54a9..7e5c82d39a4 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/user_flow_language_page_item_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/user_flow_language_page_item_request_builder.py index 0aa1767ae36..be73d655eb6 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/user_flow_language_page_item_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/user_flow_language_page_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[UserFlowLanguagePageItemRe async def get(self,request_configuration: Optional[UserFlowLanguagePageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserFlowLanguagePage]: """ - Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows to modify the content of the page, any other modification is not allowed (creation or deletion of pages). + Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows you to modify the content of the page, any other modification isn't allowed (creation or deletion of pages). param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserFlowLanguagePage] """ @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[UserFlowL Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserFlowLanguagePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows to modify the content of the page, any other modification is not allowed (creation or deletion of pages). + Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows you to modify the content of the page, any other modification isn't allowed (creation or deletion of pages). param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserFlowLanguagePage] = None, request_configuration: Optional[UserFlowLanguagePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UserFlowLanguagePage] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -175,7 +175,7 @@ class UserFlowLanguagePageItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class UserFlowLanguagePageItemRequestBuilderGetQueryParameters(): """ - Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows to modify the content of the page, any other modification is not allowed (creation or deletion of pages). + Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows you to modify the content of the page, any other modification isn't allowed (creation or deletion of pages). """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/value/content_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/value/content_request_builder.py index 70f25273d87..1b9663c3e9d 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/value/content_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/overrides_pages_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/overrides_pages_request_builder.py index 0e8b2d16bdd..f7efedb7b7c 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/overrides_pages_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/overrides_pages/overrides_pages_request_builder.py @@ -45,7 +45,7 @@ def by_user_flow_language_page_id(self,user_flow_language_page_id: str) -> UserF async def get(self,request_configuration: Optional[OverridesPagesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserFlowLanguagePageCollectionResponse]: """ - Get the userFlowLanguagePage resources from the overridesPages navigation property. These pages are used to customize the values shown to the user during a user journey in a user flow. + Get the userFlowLanguagePage resources from the overridesPages navigation property. These pages are used to customize the values shown to the user during a user journey in a user flow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserFlowLanguagePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/userflowlanguageconfiguration-list-overridespages?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UserFlowLanguagePage] = None, request_configu def to_get_request_information(self,request_configuration: Optional[OverridesPagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the userFlowLanguagePage resources from the overridesPages navigation property. These pages are used to customize the values shown to the user during a user journey in a user flow. + Get the userFlowLanguagePage resources from the overridesPages navigation property. These pages are used to customize the values shown to the user during a user journey in a user flow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserFlowLanguagePage] = None, request_configuration: Optional[OverridesPagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UserFlowLanguagePage] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OverridesPagesRequestBuilderGetQueryParameters(): """ - Get the userFlowLanguagePage resources from the overridesPages navigation property. These pages are used to customize the values shown to the user during a user journey in a user flow. + Get the userFlowLanguagePage resources from the overridesPages navigation property. These pages are used to customize the values shown to the user during a user journey in a user flow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/item/user_flow_language_configuration_item_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/item/user_flow_language_configuration_item_request_builder.py index a38a4483fcf..ac2aae7f4bf 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/item/user_flow_language_configuration_item_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/item/user_flow_language_configuration_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[UserFlowLanguageConfigurat async def get(self,request_configuration: Optional[UserFlowLanguageConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserFlowLanguageConfiguration]: """ - Read the properties and relationships of a userFlowLanguageConfiguration object. These objects represent a language available in a user flow. Note: Language customization is enabled by default in Azure Active Directory user flows. + Read the properties and relationships of a userFlowLanguageConfiguration object. These objects represent a language available in a user flow. Note: Language customization is enabled by default in Microsoft Entra user flows. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserFlowLanguageConfiguration] Find more info here: https://learn.microsoft.com/graph/api/userflowlanguageconfiguration-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[UserFlowL Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserFlowLanguageConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a userFlowLanguageConfiguration object. These objects represent a language available in a user flow. Note: Language customization is enabled by default in Azure Active Directory user flows. + Read the properties and relationships of a userFlowLanguageConfiguration object. These objects represent a language available in a user flow. Note: Language customization is enabled by default in Microsoft Entra user flows. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserFlowLanguageConfiguration] = None, request_configuration: Optional[UserFlowLanguageConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[UserFlowLanguageConfigurati if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class UserFlowLanguageConfigurationItemRequestBuilderDeleteRequestConfiguration( @dataclass class UserFlowLanguageConfigurationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a userFlowLanguageConfiguration object. These objects represent a language available in a user flow. Note: Language customization is enabled by default in Azure Active Directory user flows. + Read the properties and relationships of a userFlowLanguageConfiguration object. These objects represent a language available in a user flow. Note: Language customization is enabled by default in Microsoft Entra user flows. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/languages/languages_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/languages/languages_request_builder.py index 005ba80d64a..9b3232f408d 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/languages/languages_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/languages/languages_request_builder.py @@ -45,7 +45,7 @@ def by_user_flow_language_configuration_id(self,user_flow_language_configuration async def get(self,request_configuration: Optional[LanguagesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserFlowLanguageConfigurationCollectionResponse]: """ - Retrieve a list of languages supported for customization in a B2X user flow. + Retrieve a list of languages supported for customization in a B2X user flow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserFlowLanguageConfigurationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/b2xidentityuserflow-list-languages?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UserFlowLanguageConfiguration] = None, reques def to_get_request_information(self,request_configuration: Optional[LanguagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of languages supported for customization in a B2X user flow. + Retrieve a list of languages supported for customization in a B2X user flow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserFlowLanguageConfiguration] = None, request_configuration: Optional[LanguagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UserFlowLanguageConfiguratio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LanguagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of languages supported for customization in a B2X user flow. + Retrieve a list of languages supported for customization in a B2X user flow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/count/count_request_builder.py index 567d70e34e9..e680c486b04 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/get_order/get_order_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/get_order/get_order_request_builder.py index df422e9d8cd..ef971f590b3 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/get_order/get_order_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/get_order/get_order_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[GetOrderRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOrderRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/identity_user_flow_attribute_assignment_item_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/identity_user_flow_attribute_assignment_item_request_builder.py index be2b97d638b..d98d2cc5796 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/identity_user_flow_attribute_assignment_item_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/identity_user_flow_attribute_assignment_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentityUserFlowAttributeAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an identityUserFlowAttributeAssignment object. + Delete an identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. 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/identityuserflowattributeassignment-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[IdentityUserFlowAttributeA async def get(self,request_configuration: Optional[IdentityUserFlowAttributeAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityUserFlowAttributeAssignment]: """ - Read the properties and relationships of an identityUserFlowAttributeAssignment object. + Read the properties and relationships of an identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttributeAssignment] Find more info here: https://learn.microsoft.com/graph/api/identityuserflowattributeassignment-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[IdentityUserFlowAttributeAssi async def patch(self,body: Optional[IdentityUserFlowAttributeAssignment] = None, request_configuration: Optional[IdentityUserFlowAttributeAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[IdentityUserFlowAttributeAssignment]: """ - Update the properties of a identityUserFlowAttributeAssignment object. + Update the properties of a identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttributeAssignment] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[IdentityUserFlowAttributeAssignment] = None, def to_delete_request_information(self,request_configuration: Optional[IdentityUserFlowAttributeAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an identityUserFlowAttributeAssignment object. + Delete an identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityUserFlowAttributeAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an identityUserFlowAttributeAssignment object. + Read the properties and relationships of an identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityUserFlowAttributeAssignment] = None, request_configuration: Optional[IdentityUserFlowAttributeAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a identityUserFlowAttributeAssignment object. + Update the properties of a identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[IdentityUserFlowAttributeAs if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class IdentityUserFlowAttributeAssignmentItemRequestBuilderDeleteRequestConfigur @dataclass class IdentityUserFlowAttributeAssignmentItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an identityUserFlowAttributeAssignment object. + Read the properties and relationships of an identityUserFlowAttributeAssignment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/user_attribute/user_attribute_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/user_attribute/user_attribute_request_builder.py index 570238f973f..8e5656b1cf5 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/user_attribute/user_attribute_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/item/user_attribute/user_attribute_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[UserAttribut Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserAttributeRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/set_order/set_order_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/set_order/set_order_request_builder.py index 9c21b2cf65b..44c8fac4370 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/set_order/set_order_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/set_order/set_order_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetOrderPostRequestBody] = None, request_configuration: Optional[SetOrderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Set the order of identityUserFlowAttributeAssignments being collected within a user flow. + Set the order of identityUserFlowAttributeAssignments being collected within a user flow. This API is available in the following national cloud deployments. 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[SetOrderPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[SetOrderPostRequestBody] = None, request_configuration: Optional[SetOrderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set the order of identityUserFlowAttributeAssignments being collected within a user flow. + Set the order of identityUserFlowAttributeAssignments being collected within a user flow. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetOrderPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/user_attribute_assignments_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/user_attribute_assignments_request_builder.py index 10d561ca109..eb79a420bc4 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/user_attribute_assignments_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_attribute_assignments/user_attribute_assignments_request_builder.py @@ -47,7 +47,7 @@ def by_identity_user_flow_attribute_assignment_id(self,identity_user_flow_attrib async def get(self,request_configuration: Optional[UserAttributeAssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityUserFlowAttributeAssignmentCollectionResponse]: """ - Get the identityUserFlowAttributeAssignment resources from the userAttributeAssignments navigation property in a b2xIdentityUserFlow. + Get the identityUserFlowAttributeAssignment resources from the userAttributeAssignments navigation property in a b2xIdentityUserFlow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttributeAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/b2xidentityuserflow-list-userattributeassignments?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[UserAttributeAssignmentsReque async def post(self,body: Optional[IdentityUserFlowAttributeAssignment] = None, request_configuration: Optional[UserAttributeAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityUserFlowAttributeAssignment]: """ - Create a new identityUserFlowAttributeAssignment object in a b2xIdentityUserFlow. + Create a new identityUserFlowAttributeAssignment object in a b2xIdentityUserFlow. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttributeAssignment] @@ -94,24 +94,24 @@ async def post(self,body: Optional[IdentityUserFlowAttributeAssignment] = None, def to_get_request_information(self,request_configuration: Optional[UserAttributeAssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the identityUserFlowAttributeAssignment resources from the userAttributeAssignments navigation property in a b2xIdentityUserFlow. + Get the identityUserFlowAttributeAssignment resources from the userAttributeAssignments navigation property in a b2xIdentityUserFlow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityUserFlowAttributeAssignment] = None, request_configuration: Optional[UserAttributeAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new identityUserFlowAttributeAssignment object in a b2xIdentityUserFlow. + Create a new identityUserFlowAttributeAssignment object in a b2xIdentityUserFlow. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[IdentityUserFlowAttributeAss if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +169,7 @@ def set_order(self) -> SetOrderRequestBuilder: @dataclass class UserAttributeAssignmentsRequestBuilderGetQueryParameters(): """ - Get the identityUserFlowAttributeAssignment resources from the userAttributeAssignments navigation property in a b2xIdentityUserFlow. + Get the identityUserFlowAttributeAssignment resources from the userAttributeAssignments navigation property in a b2xIdentityUserFlow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/count/count_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/count/count_request_builder.py index 391f8424ed3..029cbf1f306 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/count/count_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/item/ref/ref_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/item/ref/ref_request_builder.py index 5c446d43d60..85fcec18c70 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/item/ref/ref_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/item/ref/ref_request_builder.py @@ -51,13 +51,13 @@ def to_delete_request_information(self,request_configuration: Optional[RefReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/ref/ref_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/ref/ref_request_builder.py index f6684f5710d..1ffa33cbe83 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/ref/ref_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/ref/ref_request_builder.py @@ -77,14 +77,14 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -97,12 +97,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/user_flow_identity_providers_request_builder.py b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/user_flow_identity_providers_request_builder.py index 8e684e8f91b..39692030acb 100644 --- a/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/user_flow_identity_providers_request_builder.py +++ b/msgraph/generated/identity/b2x_user_flows/item/user_flow_identity_providers/user_flow_identity_providers_request_builder.py @@ -71,14 +71,14 @@ def to_get_request_information(self,request_configuration: Optional[UserFlowIden Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserFlowIdentityProvidersRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/authentication_context_class_references/authentication_context_class_references_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_context_class_references/authentication_context_class_references_request_builder.py index 0262cb25179..7e23af9fa11 100644 --- a/msgraph/generated/identity/conditional_access/authentication_context_class_references/authentication_context_class_references_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_context_class_references/authentication_context_class_references_request_builder.py @@ -45,7 +45,7 @@ def by_authentication_context_class_reference_id(self,authentication_context_cla async def get(self,request_configuration: Optional[AuthenticationContextClassReferencesRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationContextClassReferenceCollectionResponse]: """ - Retrieve a list of authenticationContextClassReference objects. + Retrieve a list of authenticationContextClassReference objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationContextClassReferenceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conditionalaccessroot-list-authenticationcontextclassreferences?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AuthenticationContextClassReference] = None, def to_get_request_information(self,request_configuration: Optional[AuthenticationContextClassReferencesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of authenticationContextClassReference objects. + Retrieve a list of authenticationContextClassReference objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationContextClassReference] = None, request_configuration: Optional[AuthenticationContextClassReferencesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AuthenticationContextClassRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AuthenticationContextClassReferencesRequestBuilderGetQueryParameters(): """ - Retrieve a list of authenticationContextClassReference objects. + Retrieve a list of authenticationContextClassReference objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/authentication_context_class_references/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_context_class_references/count/count_request_builder.py index bf85daa513f..bea323be028 100644 --- a/msgraph/generated/identity/conditional_access/authentication_context_class_references/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_context_class_references/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/authentication_context_class_references/item/authentication_context_class_reference_item_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_context_class_references/item/authentication_context_class_reference_item_request_builder.py index 0c9cb0a2eef..5a14907ae67 100644 --- a/msgraph/generated/identity/conditional_access/authentication_context_class_references/item/authentication_context_class_reference_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_context_class_references/item/authentication_context_class_reference_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AuthenticationContextClassReferenceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an authenticationContextClassReference object that's not published or used by a conditional access policy. + Delete an authenticationContextClassReference object that's not published or used by a conditional access policy. This API is available in the following national cloud deployments. 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/authenticationcontextclassreference-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AuthenticationContextClass async def get(self,request_configuration: Optional[AuthenticationContextClassReferenceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationContextClassReference]: """ - Retrieve the properties and relationships of a authenticationContextClassReference object. + Retrieve the properties and relationships of a authenticationContextClassReference object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationContextClassReference] Find more info here: https://learn.microsoft.com/graph/api/authenticationcontextclassreference-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AuthenticationContextClassRef async def patch(self,body: Optional[AuthenticationContextClassReference] = None, request_configuration: Optional[AuthenticationContextClassReferenceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthenticationContextClassReference]: """ - Create an authenticationContextClassReference object, if the ID has not been used. If ID has been used, this call updates the authenticationContextClassReference object. + Create an authenticationContextClassReference object, if the ID has not been used. If ID has been used, this call updates the authenticationContextClassReference object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationContextClassReference] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[AuthenticationContextClassReference] = None, def to_delete_request_information(self,request_configuration: Optional[AuthenticationContextClassReferenceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an authenticationContextClassReference object that's not published or used by a conditional access policy. + Delete an authenticationContextClassReference object that's not published or used by a conditional access policy. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationContextClassReferenceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a authenticationContextClassReference object. + Retrieve the properties and relationships of a authenticationContextClassReference object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationContextClassReference] = None, request_configuration: Optional[AuthenticationContextClassReferenceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Create an authenticationContextClassReference object, if the ID has not been used. If ID has been used, this call updates the authenticationContextClassReference object. + Create an authenticationContextClassReference object, if the ID has not been used. If ID has been used, this call updates the authenticationContextClassReference object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationContextClassR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class AuthenticationContextClassReferenceItemRequestBuilderDeleteRequestConfigur @dataclass class AuthenticationContextClassReferenceItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a authenticationContextClassReference object. + Retrieve the properties and relationships of a authenticationContextClassReference object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/authentication_method_modes_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/authentication_method_modes_request_builder.py index 1851d6dba4c..3a2df8e1f9b 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/authentication_method_modes_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/authentication_method_modes_request_builder.py @@ -45,7 +45,7 @@ def by_authentication_method_mode_detail_id(self,authentication_method_mode_deta async def get(self,request_configuration: Optional[AuthenticationMethodModesRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationMethodModeDetailCollectionResponse]: """ - Get a list of all supported authentication methods, or all supported authentication method combinations as a list of authenticationMethodModes objects and their properties. + Get a list of all supported authentication methods, or all supported authentication method combinations as a list of authenticationMethodModes objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationMethodModeDetailCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authenticationstrengthroot-list-authenticationmethodmodes?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AuthenticationMethodModeDetail] = None, reque def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodModesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of all supported authentication methods, or all supported authentication method combinations as a list of authenticationMethodModes objects and their properties. + Get a list of all supported authentication methods, or all supported authentication method combinations as a list of authenticationMethodModes objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodModeDetail] = None, request_configuration: Optional[AuthenticationMethodModesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AuthenticationMethodModeDeta if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AuthenticationMethodModesRequestBuilderGetQueryParameters(): """ - Get a list of all supported authentication methods, or all supported authentication method combinations as a list of authenticationMethodModes objects and their properties. + Get a list of all supported authentication methods, or all supported authentication method combinations as a list of authenticationMethodModes objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/count/count_request_builder.py index 6f4f913e73e..c1a8bc03aa2 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/item/authentication_method_mode_detail_item_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/item/authentication_method_mode_detail_item_request_builder.py index 056074c32ae..76909bb2f2b 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/item/authentication_method_mode_detail_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_method_modes/item/authentication_method_mode_detail_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodModeDetailItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodModeDetail] = None, request_configuration: Optional[AuthenticationMethodModeDetailItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodModeDet if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_strength_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_strength_request_builder.py index f1328f25f62..6301fc630f5 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/authentication_strength_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/authentication_strength_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationStrengthRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationStrengthRoot] = None, request_configuration: Optional[AuthenticationStrengthRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationStrengthRoot] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/count/count_request_builder.py index 8c784d097a4..d1f7ac3616b 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/authentication_strength_policy_item_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/authentication_strength_policy_item_request_builder.py index 49b6140f393..cc34f6b6ce6 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/authentication_strength_policy_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/authentication_strength_policy_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationStrengthPolicy] = None, request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationStrengthPolic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/combination_configurations_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/combination_configurations_request_builder.py index af06b67c66d..88d947d2e2a 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/combination_configurations_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/combination_configurations_request_builder.py @@ -45,7 +45,7 @@ def by_authentication_combination_configuration_id(self,authentication_combinati async def get(self,request_configuration: Optional[CombinationConfigurationsRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfigurationCollectionResponse]: """ - Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. + Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfigurationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authenticationstrengthpolicy-list-combinationconfigurations?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CombinationConfigurationsRequ async def post(self,body: Optional[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[CombinationConfigurationsRequestBuilderPostRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfiguration]: """ - Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. + Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfiguration] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AuthenticationCombinationConfiguration] = Non def to_get_request_information(self,request_configuration: Optional[CombinationConfigurationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. + Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[CombinationConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. + Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AuthenticationCombinationCon if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CombinationConfigurationsRequestBuilderGetQueryParameters(): """ - Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. + Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/count/count_request_builder.py index 19095d09936..672808884b3 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py index 236e19ab163..f997ac80cc7 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. + Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. 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/authenticationstrengthpolicy-delete-combinationconfigurations?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AuthenticationCombinationC async def get(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfiguration]: """ - Read the properties and relationships of an authenticationCombinationConfiguration object. + Read the properties and relationships of an authenticationCombinationConfiguration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfiguration] Find more info here: https://learn.microsoft.com/graph/api/authenticationcombinationconfiguration-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AuthenticationCombinationConf async def patch(self,body: Optional[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfiguration]: """ - Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfiguration] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[AuthenticationCombinationConfiguration] = No def to_delete_request_information(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. + Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an authenticationCombinationConfiguration object. + Read the properties and relationships of an authenticationCombinationConfiguration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationCombinationCo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class AuthenticationCombinationConfigurationItemRequestBuilderDeleteRequestConfi @dataclass class AuthenticationCombinationConfigurationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an authenticationCombinationConfiguration object. + Read the properties and relationships of an authenticationCombinationConfiguration object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py index 90f508d8ca5..cf4591784f8 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpdateAllowedCombinationsPostRequestBody] = None, request_configuration: Optional[UpdateAllowedCombinationsRequestBuilderPostRequestConfiguration] = None) -> Optional[UpdateAllowedCombinationsResult]: """ - Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. + Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UpdateAllowedCombinationsResult] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UpdateAllowedCombinationsPostRequestBody] = N def to_post_request_information(self,body: Optional[UpdateAllowedCombinationsPostRequestBody] = None, request_configuration: Optional[UpdateAllowedCombinationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. + Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UpdateAllowedCombinationsPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/usage/usage_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/usage/usage_request_builder.py index d3de1b116db..57fd39a8bfd 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/usage/usage_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/item/usage/usage_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[UsageRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsageRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/authentication_strength/policies/policies_request_builder.py b/msgraph/generated/identity/conditional_access/authentication_strength/policies/policies_request_builder.py index 9f3e595276f..c18a23167de 100644 --- a/msgraph/generated/identity/conditional_access/authentication_strength/policies/policies_request_builder.py +++ b/msgraph/generated/identity/conditional_access/authentication_strength/policies/policies_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[PoliciesRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationStrengthPolicy] = None, request_configuration: Optional[PoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AuthenticationStrengthPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/conditional_access/conditional_access_request_builder.py b/msgraph/generated/identity/conditional_access/conditional_access_request_builder.py index 280779c8082..6ebdb1d4ef2 100644 --- a/msgraph/generated/identity/conditional_access/conditional_access_request_builder.py +++ b/msgraph/generated/identity/conditional_access/conditional_access_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[Condition Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConditionalAccessRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[ConditionalA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConditionalAccessRoot] = None, request_configuration: Optional[ConditionalAccessRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[ConditionalAccessRoot] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/conditional_access/named_locations/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/named_locations/count/count_request_builder.py index 2ed36d4b0fb..54c47702dc4 100644 --- a/msgraph/generated/identity/conditional_access/named_locations/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/named_locations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 b0ab24eaf6d..baa42673983 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 an ipNamedLocation object. + Delete a namedLocation object. This API is available in the following national cloud deployments. 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/ipnamedlocation-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/namedlocation-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[NamedLocationItemRequestBu async def get(self,request_configuration: Optional[NamedLocationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[NamedLocation]: """ - Retrieve the properties and relationships of an ipNamedLocation object. + Retrieve the properties and relationships of an ipNamedLocation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NamedLocation] Find more info here: https://learn.microsoft.com/graph/api/ipnamedlocation-get?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[NamedLocationItemRequestBuild async def patch(self,body: Optional[NamedLocation] = None, request_configuration: Optional[NamedLocationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[NamedLocation]: """ - Update the properties of a countryNamedLocation object. + Update the properties of an ipNamedLocation object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NamedLocation] - Find more info here: https://learn.microsoft.com/graph/api/countrynamedlocation-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/ipnamedlocation-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ async def patch(self,body: Optional[NamedLocation] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[NamedLocationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an ipNamedLocation object. + Delete a namedLocation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[NamedLocationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an ipNamedLocation object. + Retrieve the properties and relationships of an ipNamedLocation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[NamedLocation] = None, request_configuration: Optional[NamedLocationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a countryNamedLocation object. + Update the properties of an ipNamedLocation object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[NamedLocation] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class NamedLocationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class NamedLocationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an ipNamedLocation object. + Retrieve the properties and relationships of an ipNamedLocation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/named_locations/named_locations_request_builder.py b/msgraph/generated/identity/conditional_access/named_locations/named_locations_request_builder.py index deaa622f5c8..52be29a49f0 100644 --- a/msgraph/generated/identity/conditional_access/named_locations/named_locations_request_builder.py +++ b/msgraph/generated/identity/conditional_access/named_locations/named_locations_request_builder.py @@ -45,7 +45,7 @@ def by_named_location_id(self,named_location_id: str) -> NamedLocationItemReques async def get(self,request_configuration: Optional[NamedLocationsRequestBuilderGetRequestConfiguration] = None) -> Optional[NamedLocationCollectionResponse]: """ - Get a list of namedLocation objects. + Get a list of namedLocation objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NamedLocationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conditionalaccessroot-list-namedlocations?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[NamedLocationsRequestBuilderG async def post(self,body: Optional[NamedLocation] = None, request_configuration: Optional[NamedLocationsRequestBuilderPostRequestConfiguration] = None) -> Optional[NamedLocation]: """ - Create a new namedLocation object. Named locations can be either ipNamedLocation or countryNamedLocation objects. + Create a new namedLocation object. Named locations can be either ipNamedLocation or countryNamedLocation objects. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NamedLocation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[NamedLocation] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[NamedLocationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of namedLocation objects. + Get a list of namedLocation objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[NamedLocation] = None, request_configuration: Optional[NamedLocationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new namedLocation object. Named locations can be either ipNamedLocation or countryNamedLocation objects. + Create a new namedLocation object. Named locations can be either ipNamedLocation or countryNamedLocation objects. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[NamedLocation] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class NamedLocationsRequestBuilderGetQueryParameters(): """ - Get a list of namedLocation objects. + Get a list of namedLocation objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/policies/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/policies/count/count_request_builder.py index 028ee167d6b..f674675c23b 100644 --- a/msgraph/generated/identity/conditional_access/policies/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/policies/item/conditional_access_policy_item_request_builder.py b/msgraph/generated/identity/conditional_access/policies/item/conditional_access_policy_item_request_builder.py index ce6e23170b5..d4dbbf7494d 100644 --- a/msgraph/generated/identity/conditional_access/policies/item/conditional_access_policy_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/policies/item/conditional_access_policy_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a conditionalAccessPolicy object. + Delete a conditionalAccessPolicy object. This API is available in the following national cloud deployments. 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/conditionalaccesspolicy-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConditionalAccessPolicyIte async def get(self,request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConditionalAccessPolicy]: """ - Retrieve the properties and relationships of a conditionalAccessPolicy object. + Retrieve the properties and relationships of a conditionalAccessPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConditionalAccessPolicy] Find more info here: https://learn.microsoft.com/graph/api/conditionalaccesspolicy-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ConditionalAccessPolicyItemRe async def patch(self,body: Optional[ConditionalAccessPolicy] = None, request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConditionalAccessPolicy]: """ - Update the properties of a conditionalAccessPolicy object. + Update the properties of a conditionalAccessPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConditionalAccessPolicy] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[ConditionalAccessPolicy] = None, request_con def to_delete_request_information(self,request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a conditionalAccessPolicy object. + Delete a conditionalAccessPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a conditionalAccessPolicy object. + Retrieve the properties and relationships of a conditionalAccessPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConditionalAccessPolicy] = None, request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a conditionalAccessPolicy object. + Update the properties of a conditionalAccessPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConditionalAccessPolicy] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConditionalAccessPolicyItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class ConditionalAccessPolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a conditionalAccessPolicy object. + Retrieve the properties and relationships of a conditionalAccessPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/policies/policies_request_builder.py b/msgraph/generated/identity/conditional_access/policies/policies_request_builder.py index da570577fc9..edaa7ab5125 100644 --- a/msgraph/generated/identity/conditional_access/policies/policies_request_builder.py +++ b/msgraph/generated/identity/conditional_access/policies/policies_request_builder.py @@ -45,7 +45,7 @@ def by_conditional_access_policy_id(self,conditional_access_policy_id: str) -> C async def get(self,request_configuration: Optional[PoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[ConditionalAccessPolicyCollectionResponse]: """ - Retrieve a list of conditionalAccessPolicy objects. + Retrieve a list of conditionalAccessPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConditionalAccessPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conditionalaccessroot-list-policies?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PoliciesRequestBuilderGetRequ async def post(self,body: Optional[ConditionalAccessPolicy] = None, request_configuration: Optional[PoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[ConditionalAccessPolicy]: """ - Create a new conditionalAccessPolicy. + Create a new conditionalAccessPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConditionalAccessPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ConditionalAccessPolicy] = None, request_conf def to_get_request_information(self,request_configuration: Optional[PoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conditionalAccessPolicy objects. + Retrieve a list of conditionalAccessPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConditionalAccessPolicy] = None, request_configuration: Optional[PoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new conditionalAccessPolicy. + Create a new conditionalAccessPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ConditionalAccessPolicy] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PoliciesRequestBuilderGetQueryParameters(): """ - Retrieve a list of conditionalAccessPolicy objects. + Retrieve a list of conditionalAccessPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/templates/count/count_request_builder.py b/msgraph/generated/identity/conditional_access/templates/count/count_request_builder.py index d8c038ce3a5..f6e64e927dc 100644 --- a/msgraph/generated/identity/conditional_access/templates/count/count_request_builder.py +++ b/msgraph/generated/identity/conditional_access/templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/conditional_access/templates/item/conditional_access_template_item_request_builder.py b/msgraph/generated/identity/conditional_access/templates/item/conditional_access_template_item_request_builder.py index 2027fd3a255..4dad377f202 100644 --- a/msgraph/generated/identity/conditional_access/templates/item/conditional_access_template_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/templates/item/conditional_access_template_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[ConditionalAccessTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConditionalAccessTemplate]: """ - Read the properties and relationships of a conditionalAccessTemplate object. + Read the properties and relationships of a conditionalAccessTemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConditionalAccessTemplate] Find more info here: https://learn.microsoft.com/graph/api/conditionalaccesstemplate-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[ConditionalAccessTemplateItem def to_get_request_information(self,request_configuration: Optional[ConditionalAccessTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a conditionalAccessTemplate object. + Read the properties and relationships of a conditionalAccessTemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConditionalAccessTemplateItemRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> ConditionalAccessTemplateIte @dataclass class ConditionalAccessTemplateItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a conditionalAccessTemplate object. + Read the properties and relationships of a conditionalAccessTemplate object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/conditional_access/templates/templates_request_builder.py b/msgraph/generated/identity/conditional_access/templates/templates_request_builder.py index 887fb66f1e8..77f463736c9 100644 --- a/msgraph/generated/identity/conditional_access/templates/templates_request_builder.py +++ b/msgraph/generated/identity/conditional_access/templates/templates_request_builder.py @@ -44,7 +44,7 @@ def by_conditional_access_template_id(self,conditional_access_template_id: str) async def get(self,request_configuration: Optional[TemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[ConditionalAccessTemplateCollectionResponse]: """ - Get a list of the conditionalAccessTemplate objects and their properties. + Get a list of the conditionalAccessTemplate objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConditionalAccessTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conditionalaccessroot-list-templates?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TemplatesRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[TemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the conditionalAccessTemplate objects and their properties. + Get a list of the conditionalAccessTemplate objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TemplatesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TemplatesRequestBuilderGetQueryParameters(): """ - Get a list of the conditionalAccessTemplate objects and their properties. + Get a list of the conditionalAccessTemplate objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_get_response.py b/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_get_response.py new file mode 100644 index 00000000000..1edb836228b --- /dev/null +++ b/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_get_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class AvailableProviderTypesGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AvailableProviderTypesGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AvailableProviderTypesGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AvailableProviderTypesGetResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_request_builder.py b/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_request_builder.py index 06b0931c5d8..2ef26de491c 100644 --- a/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_request_builder.py +++ b/msgraph/generated/identity/identity_providers/available_provider_types/available_provider_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .available_provider_types_response import AvailableProviderTypesResponse + from .available_provider_types_get_response import AvailableProviderTypesGetResponse class AvailableProviderTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/identity/identityProviders/availableProviderTypes(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[AvailableProviderTypesResponse]: + async def get(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[AvailableProviderTypesGetResponse]: """ Invoke function availableProviderTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AvailableProviderTypesResponse] + Returns: Optional[AvailableProviderTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[AvailableProviderTypesRequest } if not self.request_adapter: raise Exception("Http core is null") - from .available_provider_types_response import AvailableProviderTypesResponse + from .available_provider_types_get_response import AvailableProviderTypesGetResponse - return await self.request_adapter.send_async(request_info, AvailableProviderTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AvailableProviderTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AvailablePro Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AvailableProviderTypesRequestBuilder: diff --git a/msgraph/generated/identity/identity_providers/count/count_request_builder.py b/msgraph/generated/identity/identity_providers/count/count_request_builder.py index ce5e32dc55c..b5ffd8d5922 100644 --- a/msgraph/generated/identity/identity_providers/count/count_request_builder.py +++ b/msgraph/generated/identity/identity_providers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/identity_providers/identity_providers_request_builder.py b/msgraph/generated/identity/identity_providers/identity_providers_request_builder.py index 718c7d81984..b158b4c104d 100644 --- a/msgraph/generated/identity/identity_providers/identity_providers_request_builder.py +++ b/msgraph/generated/identity/identity_providers/identity_providers_request_builder.py @@ -46,7 +46,7 @@ def by_identity_provider_base_id(self,identity_provider_base_id: str) -> Identit async def get(self,request_configuration: Optional[IdentityProvidersRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityProviderBaseCollectionResponse]: """ - Get a collection of identity provider resources that are configured for a tenant, and that are derived from identityProviderBase. For an Azure AD tenant, the providers can be socialIdentityProviders or builtinIdentityProviders objects. For an Azure AD B2C, the providers can be socialIdentityProvider, or appleManagedIdentityProvider objects. + Get a collection of identity provider resources that are configured for a tenant, and that are derived from identityProviderBase. For a Microsoft Entra tenant, the providers can be socialIdentityProviders or builtinIdentityProviders objects. For an Azure AD B2C, the providers can be socialIdentityProvider, or appleManagedIdentityProvider objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProviderBaseCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitycontainer-list-identityproviders?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[IdentityProvidersRequestBuild async def post(self,body: Optional[IdentityProviderBase] = None, request_configuration: Optional[IdentityProvidersRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityProviderBase]: """ - Create an identity provider object that is of the type specified in the request body. Among the types of providers derived from identityProviderBase, you can currently create a socialIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently create a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Create an identity provider object that is of the type specified in the request body. Among the types of providers derived from identityProviderBase, you can currently create a socialIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently create a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProviderBase] @@ -93,24 +93,24 @@ async def post(self,body: Optional[IdentityProviderBase] = None, request_configu def to_get_request_information(self,request_configuration: Optional[IdentityProvidersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of identity provider resources that are configured for a tenant, and that are derived from identityProviderBase. For an Azure AD tenant, the providers can be socialIdentityProviders or builtinIdentityProviders objects. For an Azure AD B2C, the providers can be socialIdentityProvider, or appleManagedIdentityProvider objects. + Get a collection of identity provider resources that are configured for a tenant, and that are derived from identityProviderBase. For a Microsoft Entra tenant, the providers can be socialIdentityProviders or builtinIdentityProviders objects. For an Azure AD B2C, the providers can be socialIdentityProvider, or appleManagedIdentityProvider objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProviderBase] = None, request_configuration: Optional[IdentityProvidersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an identity provider object that is of the type specified in the request body. Among the types of providers derived from identityProviderBase, you can currently create a socialIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently create a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Create an identity provider object that is of the type specified in the request body. Among the types of providers derived from identityProviderBase, you can currently create a socialIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently create a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[IdentityProviderBase] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IdentityProvidersRequestBuilderGetQueryParameters(): """ - Get a collection of identity provider resources that are configured for a tenant, and that are derived from identityProviderBase. For an Azure AD tenant, the providers can be socialIdentityProviders or builtinIdentityProviders objects. For an Azure AD B2C, the providers can be socialIdentityProvider, or appleManagedIdentityProvider objects. + Get a collection of identity provider resources that are configured for a tenant, and that are derived from identityProviderBase. For a Microsoft Entra tenant, the providers can be socialIdentityProviders or builtinIdentityProviders objects. For an Azure AD B2C, the providers can be socialIdentityProvider, or appleManagedIdentityProvider objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/identity_providers/item/identity_provider_base_item_request_builder.py b/msgraph/generated/identity/identity_providers/item/identity_provider_base_item_request_builder.py index 9cca0c0b5e0..536495cd294 100644 --- a/msgraph/generated/identity/identity_providers/item/identity_provider_base_item_request_builder.py +++ b/msgraph/generated/identity/identity_providers/item/identity_provider_base_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an identity provider resource that is of the type specified by the id in the request. Among the types of providers derived from identityProviderBase, you can currently delete a socialIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently delete a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Delete an identity provider resource that is of the type specified by the id in the request. Among the types of providers derived from identityProviderBase, you can currently delete a socialIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently delete a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. 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/identityproviderbase-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IdentityProviderBaseItemRe async def get(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityProviderBase]: """ - Get the properties and relationships of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently get a socialIdentityProvider or a builtinIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently get a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Get the properties and relationships of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently get a socialIdentityProvider or a builtinIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently get a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProviderBase] Find more info here: https://learn.microsoft.com/graph/api/identityproviderbase-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[IdentityProviderBaseItemReque async def patch(self,body: Optional[IdentityProviderBase] = None, request_configuration: Optional[IdentityProviderBaseItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[IdentityProviderBase]: """ - Update the properties of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently update a socialIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently update a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Update the properties of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently update a socialIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently update a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProviderBase] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[IdentityProviderBase] = None, request_config def to_delete_request_information(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an identity provider resource that is of the type specified by the id in the request. Among the types of providers derived from identityProviderBase, you can currently delete a socialIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently delete a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Delete an identity provider resource that is of the type specified by the id in the request. Among the types of providers derived from identityProviderBase, you can currently delete a socialIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently delete a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityProviderBaseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently get a socialIdentityProvider or a builtinIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently get a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Get the properties and relationships of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently get a socialIdentityProvider or a builtinIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently get a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProviderBase] = None, request_configuration: Optional[IdentityProviderBaseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently update a socialIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently update a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Update the properties of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently update a socialIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently update a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[IdentityProviderBase] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class IdentityProviderBaseItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class IdentityProviderBaseItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently get a socialIdentityProvider or a builtinIdentityProvider resource in Azure AD. In Azure AD B2C, this operation can currently get a socialIdentityProvider, or an appleManagedIdentityProvider resource. + Get the properties and relationships of the specified identity provider configured in the tenant. Among the types of providers derived from identityProviderBase, you can currently get a socialIdentityProvider or a builtinIdentityProvider resource in Microsoft Entra ID. In Azure AD B2C, this operation can currently get a socialIdentityProvider, or an appleManagedIdentityProvider resource. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/identity_request_builder.py b/msgraph/generated/identity/identity_request_builder.py index 565d91e93bb..2030e847a47 100644 --- a/msgraph/generated/identity/identity_request_builder.py +++ b/msgraph/generated/identity/identity_request_builder.py @@ -83,14 +83,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityContainer] = None, request_configuration: Optional[IdentityRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -103,13 +103,13 @@ def to_patch_request_information(self,body: Optional[IdentityContainer] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity/user_flow_attributes/count/count_request_builder.py b/msgraph/generated/identity/user_flow_attributes/count/count_request_builder.py index 248f27adeac..c93fdd50391 100644 --- a/msgraph/generated/identity/user_flow_attributes/count/count_request_builder.py +++ b/msgraph/generated/identity/user_flow_attributes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity/user_flow_attributes/item/identity_user_flow_attribute_item_request_builder.py b/msgraph/generated/identity/user_flow_attributes/item/identity_user_flow_attribute_item_request_builder.py index 34508f8bbb4..948c63bfd42 100644 --- a/msgraph/generated/identity/user_flow_attributes/item/identity_user_flow_attribute_item_request_builder.py +++ b/msgraph/generated/identity/user_flow_attributes/item/identity_user_flow_attribute_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentityUserFlowAttributeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an identityUserFlowAttribute. Only custom user flow attributes can be deleted. + Delete a custom identityUserFlowAttribute. This API is available in the following national cloud deployments. 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/identityuserflowattribute-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IdentityUserFlowAttributeI async def get(self,request_configuration: Optional[IdentityUserFlowAttributeItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityUserFlowAttribute]: """ - Retrieve the properties and relationships of a identityUserFlowAttribute object. + Retrieve the properties and relationships of a identityUserFlowAttribute object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttribute] Find more info here: https://learn.microsoft.com/graph/api/identityuserflowattribute-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[IdentityUserFlowAttributeItem async def patch(self,body: Optional[IdentityUserFlowAttribute] = None, request_configuration: Optional[IdentityUserFlowAttributeItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[IdentityUserFlowAttribute]: """ - Update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated. + Update the properties of a custom identityUserFlowAttribute object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttribute] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[IdentityUserFlowAttribute] = None, request_c def to_delete_request_information(self,request_configuration: Optional[IdentityUserFlowAttributeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an identityUserFlowAttribute. Only custom user flow attributes can be deleted. + Delete a custom identityUserFlowAttribute. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityUserFlowAttributeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a identityUserFlowAttribute object. + Retrieve the properties and relationships of a identityUserFlowAttribute object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityUserFlowAttribute] = None, request_configuration: Optional[IdentityUserFlowAttributeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated. + Update the properties of a custom identityUserFlowAttribute object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[IdentityUserFlowAttribute] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class IdentityUserFlowAttributeItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class IdentityUserFlowAttributeItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a identityUserFlowAttribute object. + Retrieve the properties and relationships of a identityUserFlowAttribute object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity/user_flow_attributes/user_flow_attributes_request_builder.py b/msgraph/generated/identity/user_flow_attributes/user_flow_attributes_request_builder.py index 4eb550d3f73..5b55e27e39b 100644 --- a/msgraph/generated/identity/user_flow_attributes/user_flow_attributes_request_builder.py +++ b/msgraph/generated/identity/user_flow_attributes/user_flow_attributes_request_builder.py @@ -45,7 +45,7 @@ def by_identity_user_flow_attribute_id(self,identity_user_flow_attribute_id: str async def get(self,request_configuration: Optional[UserFlowAttributesRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityUserFlowAttributeCollectionResponse]: """ - Retrieve a list of identityUserFlowAttribute objects. + Retrieve a list of identityUserFlowAttribute objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttributeCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identityuserflowattribute-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[UserFlowAttributesRequestBuil async def post(self,body: Optional[IdentityUserFlowAttribute] = None, request_configuration: Optional[UserFlowAttributesRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityUserFlowAttribute]: """ - Create a new identityUserFlowAttribute object. + Create a new custom identityUserFlowAttribute object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityUserFlowAttribute] @@ -92,24 +92,24 @@ async def post(self,body: Optional[IdentityUserFlowAttribute] = None, request_co def to_get_request_information(self,request_configuration: Optional[UserFlowAttributesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of identityUserFlowAttribute objects. + Retrieve a list of identityUserFlowAttribute objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityUserFlowAttribute] = None, request_configuration: Optional[UserFlowAttributesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new identityUserFlowAttribute object. + Create a new custom identityUserFlowAttribute object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[IdentityUserFlowAttribute] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserFlowAttributesRequestBuilderGetQueryParameters(): """ - Retrieve a list of identityUserFlowAttribute objects. + Retrieve a list of identityUserFlowAttribute objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/access_reviews_request_builder.py b/msgraph/generated/identity_governance/access_reviews/access_reviews_request_builder.py index 7fa2966ea28..367dcae1056 100644 --- a/msgraph/generated/identity_governance/access_reviews/access_reviews_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/access_reviews_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessReview Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewSet] = None, request_configuration: Optional[AccessReviewsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewSet] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/count/count_request_builder.py index 2ce7b3d5201..62c01a31038 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/definitions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/definitions_request_builder.py index ce8d007abee..ad8b1af0ac0 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/definitions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/definitions_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[DefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewScheduleDefinitionCollectionResponse]: """ - Get a list of the accessReviewScheduleDefinition objects and their properties. + Get a list of the accessReviewScheduleDefinition objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewScheduleDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewset-list-definitions?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[DefinitionsRequestBuilderGetR async def post(self,body: Optional[AccessReviewScheduleDefinition] = None, request_configuration: Optional[DefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessReviewScheduleDefinition]: """ - Create a new accessReviewScheduleDefinition object. + Create a new accessReviewScheduleDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewScheduleDefinition] @@ -105,24 +105,24 @@ async def post(self,body: Optional[AccessReviewScheduleDefinition] = None, reque def to_get_request_information(self,request_configuration: Optional[DefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the accessReviewScheduleDefinition objects and their properties. + Get a list of the accessReviewScheduleDefinition objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewScheduleDefinition] = None, request_configuration: Optional[DefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new accessReviewScheduleDefinition object. + Create a new accessReviewScheduleDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[AccessReviewScheduleDefiniti if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DefinitionsRequestBuilderGetQueryParameters(): """ - Get a list of the accessReviewScheduleDefinition objects and their properties. + Get a list of the accessReviewScheduleDefinition objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 00d7cd28949..3991d236c23 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessReviewScheduleDefinition]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index f57487e43c0..c98e4f94ac3 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/accessReviews/definitions/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/access_review_schedule_definition_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/access_review_schedule_definition_item_request_builder.py index 75da570554f..732d3999043 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/access_review_schedule_definition_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/access_review_schedule_definition_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AccessReviewScheduleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes an accessReviewScheduleDefinition object. + Deletes an accessReviewScheduleDefinition object. This API is available in the following national cloud deployments. 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/accessreviewscheduledefinition-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[AccessReviewScheduleDefini async def get(self,request_configuration: Optional[AccessReviewScheduleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewScheduleDefinition]: """ - Read the properties and relationships of an accessReviewScheduleDefinition object. To retrieve the instances of the access review series, use the list accessReviewInstance API. + Read the properties and relationships of an accessReviewScheduleDefinition object. To retrieve the instances of the access review series, use the list accessReviewInstance API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewScheduleDefinition] Find more info here: https://learn.microsoft.com/graph/api/accessreviewscheduledefinition-get?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[AccessReviewScheduleDefinition] = None, requ def to_delete_request_information(self,request_configuration: Optional[AccessReviewScheduleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes an accessReviewScheduleDefinition object. + Deletes an accessReviewScheduleDefinition object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewScheduleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an accessReviewScheduleDefinition object. To retrieve the instances of the access review series, use the list accessReviewInstance API. + Read the properties and relationships of an accessReviewScheduleDefinition object. To retrieve the instances of the access review series, use the list accessReviewInstance API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewScheduleDefinition] = None, request_configuration: Optional[AccessReviewScheduleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewScheduleDefinit if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class AccessReviewScheduleDefinitionItemRequestBuilderDeleteRequestConfiguration @dataclass class AccessReviewScheduleDefinitionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessReviewScheduleDefinition object. To retrieve the instances of the access review series, use the list accessReviewInstance API. + Read the properties and relationships of an accessReviewScheduleDefinition object. To retrieve the instances of the access review series, use the list accessReviewInstance API. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/count/count_request_builder.py index 25f3b6fa31b..13100a82ff7 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 9122f7f8e53..37df8a76cf1 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessReviewInstance]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 3f44d97598f..09bd772bb86 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/instances_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/instances_request_builder.py index 6457b90e403..ffefab59a7f 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/instances_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/instances_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[InstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewInstanceCollectionResponse]: """ - Get a list of the accessReviewInstance objects and their properties. + Get a list of the accessReviewInstance objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewscheduledefinition-list-instances?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[AccessReviewInstance] = None, request_configu def to_get_request_information(self,request_configuration: Optional[InstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the accessReviewInstance objects and their properties. + Get a list of the accessReviewInstance objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewInstance] = None, request_configuration: Optional[InstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[AccessReviewInstance] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstancesRequestBuilderGetQueryParameters(): """ - Get a list of the accessReviewInstance objects and their properties. + Get a list of the accessReviewInstance objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/accept_recommendations/accept_recommendations_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/accept_recommendations/accept_recommendations_request_builder.py index abbd68a1ce7..20c35a1e36d 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/accept_recommendations/accept_recommendations_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/accept_recommendations/accept_recommendations_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[AcceptRecommendationsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Allows the acceptance of recommendations on all accessReviewInstanceDecisionItem objects that have not been reviewed on an accessReviewInstance object for which the calling user is a reviewer. + Allows the acceptance of recommendations on all accessReviewInstanceDecisionItem objects that haven't been reviewed on an accessReviewInstance object for which the calling user is a reviewer. This API is available in the following national cloud deployments. 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/accessreviewinstance-acceptrecommendations?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[AcceptRecommendationsRequest def to_post_request_information(self,request_configuration: Optional[AcceptRecommendationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Allows the acceptance of recommendations on all accessReviewInstanceDecisionItem objects that have not been reviewed on an accessReviewInstance object for which the calling user is a reviewer. + Allows the acceptance of recommendations on all accessReviewInstanceDecisionItem objects that haven't been reviewed on an accessReviewInstance object for which the calling user is a reviewer. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> AcceptRecommendationsRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/access_review_instance_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/access_review_instance_item_request_builder.py index bb765978e9e..c96f2227777 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/access_review_instance_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/access_review_instance_item_request_builder.py @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[AccessReviewInstanceItemRe async def get(self,request_configuration: Optional[AccessReviewInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewInstance]: """ - Read the properties and relationships of an accessReviewInstance object. + Read the properties and relationships of an accessReviewInstance object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstance] Find more info here: https://learn.microsoft.com/graph/api/accessreviewinstance-get?view=graph-rest-1.0 @@ -108,29 +108,29 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an accessReviewInstance object. + Read the properties and relationships of an accessReviewInstance object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewInstance] = None, request_configuration: Optional[AccessReviewInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +143,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewInstance] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -257,7 +257,7 @@ class AccessReviewInstanceItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class AccessReviewInstanceItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessReviewInstance object. + Read the properties and relationships of an accessReviewInstance object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/apply_decisions/apply_decisions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/apply_decisions/apply_decisions_request_builder.py index ea13a924a5b..b5ae5213015 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/apply_decisions/apply_decisions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/apply_decisions/apply_decisions_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ApplyDecisionsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Apply review decisions on an accessReviewInstance if the decisions were not applied automatically because the autoApplyDecisionsEnabled property is false in the review's accessReviewScheduleSettings. The status of the accessReviewInstance must be Completed to call this method. + Apply review decisions on an accessReviewInstance if the decisions were not applied automatically because the autoApplyDecisionsEnabled property is false in the review's accessReviewScheduleSettings. The status of the accessReviewInstance must be Completed to call this method. This API is available in the following national cloud deployments. 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/accessreviewinstance-applydecisions?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ApplyDecisionsRequestBuilder def to_post_request_information(self,request_configuration: Optional[ApplyDecisionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Apply review decisions on an accessReviewInstance if the decisions were not applied automatically because the autoApplyDecisionsEnabled property is false in the review's accessReviewScheduleSettings. The status of the accessReviewInstance must be Completed to call this method. + Apply review decisions on an accessReviewInstance if the decisions were not applied automatically because the autoApplyDecisionsEnabled property is false in the review's accessReviewScheduleSettings. The status of the accessReviewInstance must be Completed to call this method. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ApplyDecisionsRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/batch_record_decisions/batch_record_decisions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/batch_record_decisions/batch_record_decisions_request_builder.py index e2f7cccb301..89a06bfaac0 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/batch_record_decisions/batch_record_decisions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/batch_record_decisions/batch_record_decisions_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[BatchRecordDecisionsPostRequestBody] = None, request_configuration: Optional[BatchRecordDecisionsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Enables reviewers to review all accessReviewInstanceDecisionItem objects in batches by using principalId, resourceId, or neither. + Enables reviewers to review all accessReviewInstanceDecisionItem objects in batches by using principalId, resourceId, or neither. This API is available in the following national cloud deployments. 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[BatchRecordDecisionsPostRequestBody] = None, def to_post_request_information(self,body: Optional[BatchRecordDecisionsPostRequestBody] = None, request_configuration: Optional[BatchRecordDecisionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Enables reviewers to review all accessReviewInstanceDecisionItem objects in batches by using principalId, resourceId, or neither. + Enables reviewers to review all accessReviewInstanceDecisionItem objects in batches by using principalId, resourceId, or neither. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[BatchRecordDecisionsPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/contacted_reviewers_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/contacted_reviewers_request_builder.py index 5ebe390dedd..07a28a3495e 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/contacted_reviewers_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/contacted_reviewers_request_builder.py @@ -45,7 +45,7 @@ def by_access_review_reviewer_id(self,access_review_reviewer_id: str) -> AccessR async def get(self,request_configuration: Optional[ContactedReviewersRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewReviewerCollectionResponse]: """ - Get the reviewers for an access review instance, irrespective of whether or not they have received a notification. The reviewers are represented by an accessReviewReviewer object. A list of zero or more objects are returned, including all of their nested properties. + Get the reviewers for an access review instance, irrespective of whether or not they have received a notification. The reviewers are represented by an accessReviewReviewer object. A list of zero or more objects are returned, including all of their nested properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewReviewerCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewinstance-list-contactedreviewers?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessReviewReviewer] = None, request_configu def to_get_request_information(self,request_configuration: Optional[ContactedReviewersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the reviewers for an access review instance, irrespective of whether or not they have received a notification. The reviewers are represented by an accessReviewReviewer object. A list of zero or more objects are returned, including all of their nested properties. + Get the reviewers for an access review instance, irrespective of whether or not they have received a notification. The reviewers are represented by an accessReviewReviewer object. A list of zero or more objects are returned, including all of their nested properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewReviewer] = None, request_configuration: Optional[ContactedReviewersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessReviewReviewer] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ContactedReviewersRequestBuilderGetQueryParameters(): """ - Get the reviewers for an access review instance, irrespective of whether or not they have received a notification. The reviewers are represented by an accessReviewReviewer object. A list of zero or more objects are returned, including all of their nested properties. + Get the reviewers for an access review instance, irrespective of whether or not they have received a notification. The reviewers are represented by an accessReviewReviewer object. A list of zero or more objects are returned, including all of their nested properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/count/count_request_builder.py index 22a2a009dc5..0e275efe7e7 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/item/access_review_reviewer_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/item/access_review_reviewer_item_request_builder.py index 164ee59bde2..0ef02613ae0 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/item/access_review_reviewer_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/contacted_reviewers/item/access_review_reviewer_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewReviewerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessReview Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewReviewer] = None, request_configuration: Optional[AccessReviewReviewerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewReviewer] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/count/count_request_builder.py index d4d854c429d..5ca28f824c0 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/decisions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/decisions_request_builder.py index 7f8d960d735..e441ac554a4 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/decisions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/decisions_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[DecisionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewInstanceDecisionItemCollectionResponse]: """ - Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. + Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstanceDecisionItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewinstance-list-decisions?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[AccessReviewInstanceDecisionItem] = None, req def to_get_request_information(self,request_configuration: Optional[DecisionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. + Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewInstanceDecisionItem] = None, request_configuration: Optional[DecisionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[AccessReviewInstanceDecision if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DecisionsRequestBuilderGetQueryParameters(): """ - Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. + Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 3f8b15be2ac..d4c63b2f9e4 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessReviewInstanceDecisionItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 0120e4c7475..7c658101a0d 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/access_review_instance_decision_item_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/access_review_instance_decision_item_item_request_builder.py index e4fa37a4b72..4a1a2f4cc26 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/access_review_instance_decision_item_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/access_review_instance_decision_item_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AccessReviewInstanceDecisi async def get(self,request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewInstanceDecisionItem]: """ - Read the properties and relationships of an accessReviewInstanceDecisionItem object. + Read the properties and relationships of an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstanceDecisionItem] Find more info here: https://learn.microsoft.com/graph/api/accessreviewinstancedecisionitem-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an accessReviewInstanceDecisionItem object. + Read the properties and relationships of an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewInstanceDecisionItem] = None, request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewInstanceDecisio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class AccessReviewInstanceDecisionItemItemRequestBuilderDeleteRequestConfigurati @dataclass class AccessReviewInstanceDecisionItemItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessReviewInstanceDecisionItem object. + Read the properties and relationships of an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/count/count_request_builder.py index bf75cbdc272..f6f52986621 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/insights_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/insights_request_builder.py index 20b353fb481..d92254c5b77 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/insights_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/insights_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[InsightsRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GovernanceInsight] = None, request_configuration: Optional[InsightsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[GovernanceInsight] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/item/governance_insight_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/item/governance_insight_item_request_builder.py index 8550cab8002..7c19bd60bef 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/item/governance_insight_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/decisions/item/insights/item/governance_insight_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Governanc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GovernanceInsightItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[GovernanceIn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GovernanceInsight] = None, request_configuration: Optional[GovernanceInsightItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[GovernanceInsight] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/reset_decisions/reset_decisions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/reset_decisions/reset_decisions_request_builder.py index 2fa521b5869..4d6c2c8b083 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/reset_decisions/reset_decisions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/reset_decisions/reset_decisions_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ResetDecisionsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resets all accessReviewInstanceDecisionItem objects on an accessReviewInstance to notReviewed. + Resets all accessReviewInstanceDecisionItem objects on an accessReviewInstance to notReviewed. This API is available in the following national cloud deployments. 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/accessreviewinstance-resetdecisions?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ResetDecisionsRequestBuilder def to_post_request_information(self,request_configuration: Optional[ResetDecisionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resets all accessReviewInstanceDecisionItem objects on an accessReviewInstance to notReviewed. + Resets all accessReviewInstanceDecisionItem objects on an accessReviewInstance to notReviewed. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ResetDecisionsRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/send_reminder/send_reminder_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/send_reminder/send_reminder_request_builder.py index 535c0811668..4920641339a 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/send_reminder/send_reminder_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/send_reminder/send_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SendReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send a reminder to the reviewers of an active accessReviewInstance. + Send a reminder to the reviewers of an active accessReviewInstance. This API is available in the following national cloud deployments. 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/accessreviewinstance-sendreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SendReminderRequestBuilderPo def to_post_request_information(self,request_configuration: Optional[SendReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a reminder to the reviewers of an active accessReviewInstance. + Send a reminder to the reviewers of an active accessReviewInstance. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SendReminderRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/count/count_request_builder.py index 555ab5b4e76..a5dff26cdcc 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 32b687bd5f4..64c71ee9d0f 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessReviewStage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 086976ccdb7..4dc8ba4f326 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/access_review_stage_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/access_review_stage_item_request_builder.py index 1a1038dae35..590a3b2402e 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/access_review_stage_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/access_review_stage_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[AccessReviewStageItemReque async def get(self,request_configuration: Optional[AccessReviewStageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewStage]: """ - Retrieve the properties and relationships of an accessReviewStage object. + Retrieve the properties and relationships of an accessReviewStage object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewStage] Find more info here: https://learn.microsoft.com/graph/api/accessreviewstage-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[AccessReviewStageItemRequestB async def patch(self,body: Optional[AccessReviewStage] = None, request_configuration: Optional[AccessReviewStageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AccessReviewStage]: """ - Update the properties of an accessReviewStage object. Only the reviewers and fallbackReviewers properties can be updated. You can only add reviewers to the fallbackReviewers property but can't remove existing fallbackReviewers. To update an accessReviewStage, its status must be NotStarted, Initializing, or InProgress. + Update the properties of an accessReviewStage object. Only the reviewers and fallbackReviewers properties can be updated. You can only add reviewers to the fallbackReviewers property but can't remove existing fallbackReviewers. To update an accessReviewStage, its status must be NotStarted, Initializing, or InProgress. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewStage] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewStageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an accessReviewStage object. + Retrieve the properties and relationships of an accessReviewStage object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewStage] = None, request_configuration: Optional[AccessReviewStageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an accessReviewStage object. Only the reviewers and fallbackReviewers properties can be updated. You can only add reviewers to the fallbackReviewers property but can't remove existing fallbackReviewers. To update an accessReviewStage, its status must be NotStarted, Initializing, or InProgress. + Update the properties of an accessReviewStage object. Only the reviewers and fallbackReviewers properties can be updated. You can only add reviewers to the fallbackReviewers property but can't remove existing fallbackReviewers. To update an accessReviewStage, its status must be NotStarted, Initializing, or InProgress. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewStage] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class AccessReviewStageItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class AccessReviewStageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an accessReviewStage object. + Retrieve the properties and relationships of an accessReviewStage object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/count/count_request_builder.py index cc6b85d5249..0d49a99cc6d 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/decisions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/decisions_request_builder.py index d3178018fbf..3fe879fdcfb 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/decisions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/decisions_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[DecisionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewInstanceDecisionItemCollectionResponse]: """ - Get the decisions from a stage in a multi-stage access review. The decisions in an accessReviewStage object are represented by an accessReviewInstanceDecisionItem object. + Get the decisions from a stage in a multi-stage access review. The decisions in an accessReviewStage object are represented by an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstanceDecisionItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewstage-list-decisions?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[AccessReviewInstanceDecisionItem] = None, req def to_get_request_information(self,request_configuration: Optional[DecisionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the decisions from a stage in a multi-stage access review. The decisions in an accessReviewStage object are represented by an accessReviewInstanceDecisionItem object. + Get the decisions from a stage in a multi-stage access review. The decisions in an accessReviewStage object are represented by an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewInstanceDecisionItem] = None, request_configuration: Optional[DecisionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[AccessReviewInstanceDecision if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DecisionsRequestBuilderGetQueryParameters(): """ - Get the decisions from a stage in a multi-stage access review. The decisions in an accessReviewStage object are represented by an accessReviewInstanceDecisionItem object. + Get the decisions from a stage in a multi-stage access review. The decisions in an accessReviewStage object are represented by an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 446d3355c39..269d53898f5 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from ...........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessReviewInstanceDecisionItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index bc988807b5e..ccb71889ad8 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/access_review_instance_decision_item_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/access_review_instance_decision_item_item_request_builder.py index cd16f812036..b6980ffb126 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/access_review_instance_decision_item_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/access_review_instance_decision_item_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AccessReviewInstanceDecisi async def get(self,request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewInstanceDecisionItem]: """ - Read the properties and relationships of an accessReviewInstanceDecisionItem object. + Read the properties and relationships of an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstanceDecisionItem] Find more info here: https://learn.microsoft.com/graph/api/accessreviewinstancedecisionitem-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AccessReviewInstanceDecisionI async def patch(self,body: Optional[AccessReviewInstanceDecisionItem] = None, request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AccessReviewInstanceDecisionItem]: """ - Update access decisions, known as accessReviewInstanceDecisionItems, for which the user is the reviewer. + Update access decisions, known as accessReviewInstanceDecisionItems, for which the user is the reviewer. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewInstanceDecisionItem] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an accessReviewInstanceDecisionItem object. + Read the properties and relationships of an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewInstanceDecisionItem] = None, request_configuration: Optional[AccessReviewInstanceDecisionItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update access decisions, known as accessReviewInstanceDecisionItems, for which the user is the reviewer. + Update access decisions, known as accessReviewInstanceDecisionItems, for which the user is the reviewer. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewInstanceDecisio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class AccessReviewInstanceDecisionItemItemRequestBuilderDeleteRequestConfigurati @dataclass class AccessReviewInstanceDecisionItemItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessReviewInstanceDecisionItem object. + Read the properties and relationships of an accessReviewInstanceDecisionItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/count/count_request_builder.py index 86fb8679cef..7493180ddd9 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/insights_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/insights_request_builder.py index 65017ded256..e546970b6bb 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/insights_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/insights_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[InsightsRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GovernanceInsight] = None, request_configuration: Optional[InsightsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[GovernanceInsight] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/item/governance_insight_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/item/governance_insight_item_request_builder.py index 976223b9a39..748ab613cfe 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/item/governance_insight_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/decisions/item/insights/item/governance_insight_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Governanc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GovernanceInsightItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[GovernanceIn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[GovernanceInsight] = None, request_configuration: Optional[GovernanceInsightItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[GovernanceInsight] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/stop/stop_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/stop/stop_request_builder.py index 008f37fc2c7..5709f99a769 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/stop/stop_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/item/stop/stop_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[StopRequestBuilderPostRequestConfiguration] = None) -> None: """ - Stop an access review stage that is inProgress. After the access review stage stops, the stage status will be Completed and the reviewers can no longer give input. If there are subsequent stages that depend on the completed stage, the next stage will be created. The accessReviewInstanceDecisionItem objects will always reflect the last decisions recorded across all stages at that given time, regardless of the status of the stages. + Stop an access review stage that is inProgress. After the access review stage stops, the stage status will be Completed and the reviewers can no longer give input. If there are subsequent stages that depend on the completed stage, the next stage will be created. The accessReviewInstanceDecisionItem objects will always reflect the last decisions recorded across all stages at that given time, regardless of the status of the stages. This API is available in the following national cloud deployments. 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/accessreviewstage-stop?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[StopRequestBuilderPostReques def to_post_request_information(self,request_configuration: Optional[StopRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Stop an access review stage that is inProgress. After the access review stage stops, the stage status will be Completed and the reviewers can no longer give input. If there are subsequent stages that depend on the completed stage, the next stage will be created. The accessReviewInstanceDecisionItem objects will always reflect the last decisions recorded across all stages at that given time, regardless of the status of the stages. + Stop an access review stage that is inProgress. After the access review stage stops, the stage status will be Completed and the reviewers can no longer give input. If there are subsequent stages that depend on the completed stage, the next stage will be created. The accessReviewInstanceDecisionItem objects will always reflect the last decisions recorded across all stages at that given time, regardless of the status of the stages. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> StopRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/stages_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/stages_request_builder.py index 165f3d770d4..7ccebc35f62 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/stages_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stages/stages_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewStageCollectionResponse]: """ - Retrieve the stages in a multi-stage access review instance. + Retrieve the stages in a multi-stage access review instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewStageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewinstance-list-stages?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[AccessReviewStage] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the stages in a multi-stage access review instance. + Retrieve the stages in a multi-stage access review instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewStage] = None, request_configuration: Optional[StagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[AccessReviewStage] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class StagesRequestBuilderGetQueryParameters(): """ - Retrieve the stages in a multi-stage access review instance. + Retrieve the stages in a multi-stage access review instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stop/stop_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stop/stop_request_builder.py index 6243acfbe2d..a29ca3c0931 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stop/stop_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/instances/item/stop/stop_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[StopRequestBuilderPostRequestConfiguration] = None) -> None: """ - Stop a currently active accessReviewInstance. After the access review instance stops, the instance status is marked as Completed, the reviewers can no longer give input, and the access review decisions are applied. Stopping an instance will not stop future instances. To prevent a recurring access review from starting future instances, update the schedule definition to change its scheduled end date. + Stop a currently active accessReviewInstance. After the access review instance stops, the instance status is marked as Completed, the reviewers can no longer give input, and the access review decisions are applied. Stopping an instance will not stop future instances. To prevent a recurring access review from starting future instances, update the schedule definition to change its scheduled end date. This API is available in the following national cloud deployments. 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/accessreviewinstance-stop?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[StopRequestBuilderPostReques def to_post_request_information(self,request_configuration: Optional[StopRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Stop a currently active accessReviewInstance. After the access review instance stops, the instance status is marked as Completed, the reviewers can no longer give input, and the access review decisions are applied. Stopping an instance will not stop future instances. To prevent a recurring access review from starting future instances, update the schedule definition to change its scheduled end date. + Stop a currently active accessReviewInstance. After the access review instance stops, the instance status is marked as Completed, the reviewers can no longer give input, and the access review decisions are applied. Stopping an instance will not stop future instances. To prevent a recurring access review from starting future instances, update the schedule definition to change its scheduled end date. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> StopRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/definitions/item/stop/stop_request_builder.py b/msgraph/generated/identity_governance/access_reviews/definitions/item/stop/stop_request_builder.py index 0e0bc8b928b..a91ea0b6450 100644 --- a/msgraph/generated/identity_governance/access_reviews/definitions/item/stop/stop_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/definitions/item/stop/stop_request_builder.py @@ -51,12 +51,12 @@ def to_post_request_information(self,request_configuration: Optional[StopRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> StopRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/count/count_request_builder.py index a773220300e..418d6a8db07 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/history_definitions_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/history_definitions_request_builder.py index ac00b786691..22f99352c8e 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/history_definitions_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/history_definitions_request_builder.py @@ -45,7 +45,7 @@ def by_access_review_history_definition_id(self,access_review_history_definition async def get(self,request_configuration: Optional[HistoryDefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewHistoryDefinitionCollectionResponse]: """ - Retrieve the accessReviewHistoryDefinition objects created in the last 30 days, including all nested properties. + Retrieve the accessReviewHistoryDefinition objects created in the last 30 days, including all nested properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewHistoryDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewset-list-historydefinitions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[HistoryDefinitionsRequestBuil async def post(self,body: Optional[AccessReviewHistoryDefinition] = None, request_configuration: Optional[HistoryDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessReviewHistoryDefinition]: """ - Create a new accessReviewHistoryDefinition object. + Create a new accessReviewHistoryDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewHistoryDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AccessReviewHistoryDefinition] = None, reques def to_get_request_information(self,request_configuration: Optional[HistoryDefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the accessReviewHistoryDefinition objects created in the last 30 days, including all nested properties. + Retrieve the accessReviewHistoryDefinition objects created in the last 30 days, including all nested properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewHistoryDefinition] = None, request_configuration: Optional[HistoryDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new accessReviewHistoryDefinition object. + Create a new accessReviewHistoryDefinition object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AccessReviewHistoryDefinitio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HistoryDefinitionsRequestBuilderGetQueryParameters(): """ - Retrieve the accessReviewHistoryDefinition objects created in the last 30 days, including all nested properties. + Retrieve the accessReviewHistoryDefinition objects created in the last 30 days, including all nested properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/access_review_history_definition_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/access_review_history_definition_item_request_builder.py index b2993f4a26c..b2b8cafecc5 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/access_review_history_definition_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/access_review_history_definition_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AccessReviewHistoryDefinit async def get(self,request_configuration: Optional[AccessReviewHistoryDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewHistoryDefinition]: """ - Retrieve an accessReviewHistoryDefinition object by its identifier. All the properties of the access review history definition object are returned. If the definition is 30 days or older, a 404 Not Found error is returned. + Retrieve an accessReviewHistoryDefinition object by its identifier. All the properties of the access review history definition object are returned. If the definition is 30 days or older, a 404 Not Found error is returned. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewHistoryDefinition] Find more info here: https://learn.microsoft.com/graph/api/accessreviewhistorydefinition-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewHistoryDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve an accessReviewHistoryDefinition object by its identifier. All the properties of the access review history definition object are returned. If the definition is 30 days or older, a 404 Not Found error is returned. + Retrieve an accessReviewHistoryDefinition object by its identifier. All the properties of the access review history definition object are returned. If the definition is 30 days or older, a 404 Not Found error is returned. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewHistoryDefinition] = None, request_configuration: Optional[AccessReviewHistoryDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewHistoryDefiniti if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class AccessReviewHistoryDefinitionItemRequestBuilderDeleteRequestConfiguration( @dataclass class AccessReviewHistoryDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve an accessReviewHistoryDefinition object by its identifier. All the properties of the access review history definition object are returned. If the definition is 30 days or older, a 404 Not Found error is returned. + Retrieve an accessReviewHistoryDefinition object by its identifier. All the properties of the access review history definition object are returned. If the definition is 30 days or older, a 404 Not Found error is returned. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/count/count_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/count/count_request_builder.py index d90f8bd4255..e0c42514240 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/instances_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/instances_request_builder.py index 3d881b55392..7102f68bb01 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/instances_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/instances_request_builder.py @@ -45,7 +45,7 @@ def by_access_review_history_instance_id(self,access_review_history_instance_id: async def get(self,request_configuration: Optional[InstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewHistoryInstanceCollectionResponse]: """ - Retrieve the instances of an access review history definition created in the last 30 days. + Retrieve the instances of an access review history definition created in the last 30 days. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewHistoryInstanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accessreviewhistorydefinition-list-instances?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessReviewHistoryInstance] = None, request_ def to_get_request_information(self,request_configuration: Optional[InstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the instances of an access review history definition created in the last 30 days. + Retrieve the instances of an access review history definition created in the last 30 days. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewHistoryInstance] = None, request_configuration: Optional[InstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessReviewHistoryInstance] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstancesRequestBuilderGetQueryParameters(): """ - Retrieve the instances of an access review history definition created in the last 30 days. + Retrieve the instances of an access review history definition created in the last 30 days. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/access_review_history_instance_item_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/access_review_history_instance_item_request_builder.py index 855e6750fe1..fe7e31fdaa3 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/access_review_history_instance_item_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/access_review_history_instance_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessRev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessReviewHistoryInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessReview Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessReviewHistoryInstance] = None, request_configuration: Optional[AccessReviewHistoryInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessReviewHistoryInstance if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/generate_download_uri/generate_download_uri_request_builder.py b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/generate_download_uri/generate_download_uri_request_builder.py index 7f53753c620..fcfc0686377 100644 --- a/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/generate_download_uri/generate_download_uri_request_builder.py +++ b/msgraph/generated/identity_governance/access_reviews/history_definitions/item/instances/item/generate_download_uri/generate_download_uri_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[GenerateDownloadUriRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessReviewHistoryInstance]: """ - Generates a URI for an accessReviewHistoryInstance object the status for which is done. Each URI can be used to retrieve the instance's review history data. Each URI is valid for 24 hours and can be retrieved by fetching the downloadUri property from the accessReviewHistoryInstance object. + Generates a URI for an accessReviewHistoryInstance object the status for which is done. Each URI can be used to retrieve the instance's review history data. Each URI is valid for 24 hours and can be retrieved by fetching the downloadUri property from the accessReviewHistoryInstance object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessReviewHistoryInstance] Find more info here: https://learn.microsoft.com/graph/api/accessreviewhistoryinstance-generatedownloaduri?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[GenerateDownloadUriRequestBu def to_post_request_information(self,request_configuration: Optional[GenerateDownloadUriRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Generates a URI for an accessReviewHistoryInstance object the status for which is done. Each URI can be used to retrieve the instance's review history data. Each URI is valid for 24 hours and can be retrieved by fetching the downloadUri property from the accessReviewHistoryInstance object. + Generates a URI for an accessReviewHistoryInstance object the status for which is done. Each URI can be used to retrieve the instance's review history data. Each URI is valid for 24 hours and can be retrieved by fetching the downloadUri property from the accessReviewHistoryInstance object. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GenerateDownloadUriRequestBuilder: diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_request_builder.py index 62c0a26dbfd..b6130a153d3 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AppConsen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppConsentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AppConsentRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppConsentApprovalRoute] = None, request_configuration: Optional[AppConsentRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AppConsentApprovalRoute] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/app_consent_requests_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/app_consent_requests_request_builder.py index fa7958e015d..e72e25050e5 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/app_consent_requests_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/app_consent_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[AppConsentRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[AppConsentRequestCollectionResponse]: """ - Retrieve appConsentRequest objects and their properties. + Retrieve appConsentRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppConsentRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/appconsentapprovalroute-list-appconsentrequests?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[AppConsentRequest] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[AppConsentRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve appConsentRequest objects and their properties. + Retrieve appConsentRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppConsentRequest] = None, request_configuration: Optional[AppConsentRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[AppConsentRequest] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AppConsentRequestsRequestBuilderGetQueryParameters(): """ - Retrieve appConsentRequest objects and their properties. + Retrieve appConsentRequest objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/count/count_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/count/count_request_builder.py index 4975ae5d9e8..82a7c383ecc 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index baa05465801..835721455d6 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AppConsentRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 850289a41d7..52f8d921b87 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/appConsent/appConsentRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/app_consent_request_item_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/app_consent_request_item_request_builder.py index 1d66af92b64..0e9c0161a70 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/app_consent_request_item_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/app_consent_request_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AppConsentRequestItemReque async def get(self,request_configuration: Optional[AppConsentRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AppConsentRequest]: """ - Read the properties and relationships of an appConsentRequest object. + Read the properties and relationships of an appConsentRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppConsentRequest] Find more info here: https://learn.microsoft.com/graph/api/appconsentrequest-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AppConsen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppConsentRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an appConsentRequest object. + Read the properties and relationships of an appConsentRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppConsentRequest] = None, request_configuration: Optional[AppConsentRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AppConsentRequest] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class AppConsentRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class AppConsentRequestItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an appConsentRequest object. + Read the properties and relationships of an appConsentRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/count/count_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/count/count_request_builder.py index 838bdec757f..025afb31eb0 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 08cd266be84..225e6aed257 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UserConsentRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 71571a5230c..7422a3e85b2 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/appConsent/appConsentRequests/{appConsentRequest%2Did}/userConsentRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/approval_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/approval_request_builder.py index 7d9793be61b..9fc786abb3e 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/approval_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/approval_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ApprovalR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApprovalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ApprovalRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Approval] = None, request_configuration: Optional[ApprovalRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Approval] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/count/count_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/count/count_request_builder.py index 0ddcd119e31..65a59600063 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/item/approval_stage_item_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/item/approval_stage_item_request_builder.py index 9d4f5fe9928..09f121c40ac 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/item/approval_stage_item_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/item/approval_stage_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ApprovalStageItemRequestBu async def get(self,request_configuration: Optional[ApprovalStageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalStage]: """ - In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalStage] Find more info here: https://learn.microsoft.com/graph/api/approvalstage-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ApprovalStageItemRequestBuild async def patch(self,body: Optional[ApprovalStage] = None, request_configuration: Optional[ApprovalStageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ApprovalStage]: """ - In Azure AD entitlement management, approve or deny an approvalStage object in an approval. + Approve or deny an approvalStage object in an approval. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalStage] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[ApprovalS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApprovalStageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ApprovalStage] = None, request_configuration: Optional[ApprovalStageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, approve or deny an approvalStage object in an approval. + Approve or deny an approvalStage object in an approval. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ApprovalStage] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ApprovalStageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ApprovalStageItemRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/stages_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/stages_request_builder.py index 933366f059e..3fe31b27329 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/stages_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/approval/stages/stages_request_builder.py @@ -45,7 +45,7 @@ def by_approval_stage_id(self,approval_stage_id: str) -> ApprovalStageItemReques async def get(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalStageCollectionResponse]: """ - In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalStageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/approval-list-stages?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ApprovalStage] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ApprovalStage] = None, request_configuration: Optional[StagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ApprovalStage] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class StagesRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/user_consent_request_item_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/user_consent_request_item_request_builder.py index ba988824603..2997d3cacdf 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/user_consent_request_item_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/item/user_consent_request_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[UserConsentRequestItemRequ async def get(self,request_configuration: Optional[UserConsentRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserConsentRequest]: """ - Read the properties and relationships of a userConsentRequest object. + Read the properties and relationships of a userConsentRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserConsentRequest] Find more info here: https://learn.microsoft.com/graph/api/userconsentrequest-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[UserConse Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserConsentRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a userConsentRequest object. + Read the properties and relationships of a userConsentRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserConsentRequest] = None, request_configuration: Optional[UserConsentRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[UserConsentRequest] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class UserConsentRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class UserConsentRequestItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a userConsentRequest object. + Read the properties and relationships of a userConsentRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/user_consent_requests_request_builder.py b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/user_consent_requests_request_builder.py index 9d4f77140f5..04d93ca61c3 100644 --- a/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/user_consent_requests_request_builder.py +++ b/msgraph/generated/identity_governance/app_consent/app_consent_requests/item/user_consent_requests/user_consent_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[UserConsentRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserConsentRequestCollectionResponse]: """ - Retrieve a collection of userConsentRequest objects and their properties. + Retrieve a collection of userConsentRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserConsentRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/appconsentrequest-list-userconsentrequests?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UserConsentRequest] = None, request_configura def to_get_request_information(self,request_configuration: Optional[UserConsentRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a collection of userConsentRequest objects and their properties. + Retrieve a collection of userConsentRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserConsentRequest] = None, request_configuration: Optional[UserConsentRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UserConsentRequest] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserConsentRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a collection of userConsentRequest objects and their properties. + Retrieve a collection of userConsentRequest objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/access_package_assignment_approvals_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/access_package_assignment_approvals_request_builder.py index f3f69ff4140..03bca0f5361 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/access_package_assignment_approvals_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/access_package_assignment_approvals_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[AccessPackageAssignmentApprovalsRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalCollectionResponse]: """ - In Azure AD entitlement management, retrieve the properties of an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + Retrieve the properties of an approval object. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalCollectionResponse] """ @@ -103,19 +103,19 @@ async def post(self,body: Optional[Approval] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[AccessPackageAssignmentApprovalsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties of an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + Retrieve the properties of an approval object. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Approval] = None, request_configuration: Optional[AccessPackageAssignmentApprovalsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -128,13 +128,13 @@ def to_post_request_information(self,body: Optional[Approval] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -160,7 +160,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AccessPackageAssignmentApprovalsRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties of an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + Retrieve the properties of an approval object. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/count/count_request_builder.py index 4d3a691e2b8..6034c42b988 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index aa605fc4560..c5335af37cc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Approval]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 5351e96119f..b3ca5ae59d5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentApprovals/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/approval_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/approval_item_request_builder.py index 9ae1dc58988..2b459432bb9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/approval_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/approval_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ApprovalItemRequestBuilder async def get(self,request_configuration: Optional[ApprovalItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Approval]: """ - In Azure AD entitlement management, retrieve the properties of an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + Retrieve the properties of an approval object. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Approval] Find more info here: https://learn.microsoft.com/graph/api/approval-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ApprovalI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApprovalItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties of an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + Retrieve the properties of an approval object. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Approval] = None, request_configuration: Optional[ApprovalItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Approval] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ApprovalItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class ApprovalItemRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties of an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + Retrieve the properties of an approval object. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/count/count_request_builder.py index 6ad97e87f43..0dfd7abd3cb 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/item/approval_stage_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/item/approval_stage_item_request_builder.py index b6544b51fd6..d067d942908 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/item/approval_stage_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/item/approval_stage_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ApprovalStageItemRequestBu async def get(self,request_configuration: Optional[ApprovalStageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalStage]: """ - In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalStage] Find more info here: https://learn.microsoft.com/graph/api/approvalstage-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ApprovalStageItemRequestBuild async def patch(self,body: Optional[ApprovalStage] = None, request_configuration: Optional[ApprovalStageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ApprovalStage]: """ - In Azure AD entitlement management, approve or deny an approvalStage object in an approval. + Approve or deny an approvalStage object in an approval. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalStage] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[ApprovalS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ApprovalStageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ApprovalStage] = None, request_configuration: Optional[ApprovalStageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, approve or deny an approvalStage object in an approval. + Approve or deny an approvalStage object in an approval. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ApprovalStage] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ApprovalStageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ApprovalStageItemRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/stages_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/stages_request_builder.py index 1d2a160dd0d..6652db5d0e8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/stages_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_package_assignment_approvals/item/stages/stages_request_builder.py @@ -45,7 +45,7 @@ def by_approval_stage_id(self,approval_stage_id: str) -> ApprovalStageItemReques async def get(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalStageCollectionResponse]: """ - In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ApprovalStageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/approval-list-stages?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ApprovalStage] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ApprovalStage] = None, request_configuration: Optional[StagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ApprovalStage] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class StagesRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/access_packages_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/access_packages_request_builder.py index 4f62e91ba36..958f2435239 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/access_packages_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/access_packages_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[AccessPackagesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageCollectionResponse]: """ - Retrieve a list of accessPackage objects. The resulting list includes all the access packages that the caller has access to read, across all catalogs. + Retrieve a list of accessPackage objects. The resulting list includes all the access packages that the caller has access to read, across all catalogs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-accesspackages?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[AccessPackagesRequestBuilderG async def post(self,body: Optional[AccessPackage] = None, request_configuration: Optional[AccessPackagesRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessPackage]: """ - Create a new accessPackage object. The access package will be added to an existing accessPackageCatalog. + Create a new accessPackage object. The access package will be added to an existing accessPackageCatalog. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackage] @@ -105,24 +105,24 @@ async def post(self,body: Optional[AccessPackage] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[AccessPackagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackage objects. The resulting list includes all the access packages that the caller has access to read, across all catalogs. + Retrieve a list of accessPackage objects. The resulting list includes all the access packages that the caller has access to read, across all catalogs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackage] = None, request_configuration: Optional[AccessPackagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new accessPackage object. The access package will be added to an existing accessPackageCatalog. + Create a new accessPackage object. The access package will be added to an existing accessPackageCatalog. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[AccessPackage] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AccessPackagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackage objects. The resulting list includes all the access packages that the caller has access to read, across all catalogs. + Retrieve a list of accessPackage objects. The resulting list includes all the access packages that the caller has access to read, across all catalogs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/count/count_request_builder.py index 9e667856ae2..9a46a6b6232 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 1139f9e4a6f..68773196829 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessPackage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 6dcfb1eef5a..722dc566369 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: 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 c283af325a5..5cb3a5d3428 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 @@ -35,7 +35,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AccessPackageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an accessPackage object. You cannot delete an access package if it has any accessPackageAssignment. + Delete an accessPackage object. You cannot delete an access package if it has any accessPackageAssignment. This API is available in the following national cloud deployments. 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/accesspackage-delete?view=graph-rest-1.0 @@ -55,10 +55,10 @@ async def delete(self,request_configuration: Optional[AccessPackageItemRequestBu async def get(self,request_configuration: Optional[AccessPackageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackage]: """ - Retrieve the properties and relationships of an accessPackage object. + 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. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-resourcerolescopes?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -77,7 +77,7 @@ async def get(self,request_configuration: Optional[AccessPackageItemRequestBuild async def patch(self,body: Optional[AccessPackage] = None, request_configuration: Optional[AccessPackageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AccessPackage]: """ - Update an existing accessPackage object to change one or more of its properties, such as the display name or description. + Update an existing accessPackage object to change one or more of its properties, such as the display name or description. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackage] @@ -102,39 +102,39 @@ async def patch(self,body: Optional[AccessPackage] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[AccessPackageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an accessPackage object. You cannot delete an access package if it has any accessPackageAssignment. + Delete an accessPackage object. You cannot delete an access package if it has any accessPackageAssignment. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an accessPackage object. + 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. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackage] = None, request_configuration: Optional[AccessPackageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an existing accessPackage object to change one or more of its properties, such as the display name or description. + Update an existing accessPackage object to change one or more of its properties, such as the display name or description. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[AccessPackage] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -238,7 +238,7 @@ class AccessPackageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class AccessPackageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an accessPackage object. + 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. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/access_packages_incompatible_with_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/access_packages_incompatible_with_request_builder.py index c59f6379b93..016bea68ace 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/access_packages_incompatible_with_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/access_packages_incompatible_with_request_builder.py @@ -44,7 +44,7 @@ def by_access_package_id1(self,access_package_id1: str) -> AccessPackageItemRequ async def get(self,request_configuration: Optional[AccessPackagesIncompatibleWithRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageCollectionResponse]: """ - Retrieve a list of the accessPackage objects that have marked a specified accessPackage as incompatible. + Retrieve a list of the accessPackage objects that have marked a specified accessPackage as incompatible. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-accesspackagesincompatiblewith?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AccessPackagesIncompatibleWit def to_get_request_information(self,request_configuration: Optional[AccessPackagesIncompatibleWithRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of the accessPackage objects that have marked a specified accessPackage as incompatible. + Retrieve a list of the accessPackage objects that have marked a specified accessPackage as incompatible. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackagesIncompatibleWithRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AccessPackagesIncompatibleWithRequestBuilderGetQueryParameters(): """ - Retrieve a list of the accessPackage objects that have marked a specified accessPackage as incompatible. + Retrieve a list of the accessPackage objects that have marked a specified accessPackage as incompatible. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/count/count_request_builder.py index 191d2239648..1ed9fd8fb1b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/item/access_package_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/item/access_package_item_request_builder.py index 838b5e38c57..4d2f35e89f1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/item/access_package_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_packages_incompatible_with/item/access_package_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/assignment_policies_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/assignment_policies_request_builder.py index 8f96fcd5c78..148633cc268 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/assignment_policies_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/assignment_policies_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentPo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignmentPolicy] = None, request_configuration: Optional[AssignmentPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageAssignmentPolic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/count/count_request_builder.py index dc7a1b746d6..72b06acb28a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package/access_package_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package/access_package_request_builder.py index 7ab78957e24..3ec0d51cefd 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package/access_package_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package/access_package_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package_assignment_policy_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package_assignment_policy_item_request_builder.py index 580e38c4512..13853efdd59 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package_assignment_policy_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/access_package_assignment_policy_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignmentPolicy] = None, request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageAssignmentPoli if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/catalog/catalog_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/catalog/catalog_request_builder.py index 2361f5ea1d2..de02fd963ec 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/catalog/catalog_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/catalog/catalog_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CatalogReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CatalogRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py index 6027f4edcc2..5d43ac71e12 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py index 4ddd7d2f962..552329c4e1d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[CustomExtens Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomExtensionStageSetting] = None, request_configuration: Optional[CustomExtensionStageSettingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[CustomExtensionStageSetting] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py index 6e8f30ef184..6724bb6a0f6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CustomExtens Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CustomExtensionRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py index 114403db988..01f331b66b3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[CustomExt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[CustomExtens Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomExtensionStageSetting] = None, request_configuration: Optional[CustomExtensionStageSettingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[CustomExtensionStageSetting if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/count/count_request_builder.py index 8bc41e79b96..a3234df0a5b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/item/access_package_question_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/item/access_package_question_item_request_builder.py index 6d2acb37a7c..5c9ecd9f612 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/item/access_package_question_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/item/access_package_question_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageQuestionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageQuestion] = None, request_configuration: Optional[AccessPackageQuestionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageQuestion] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/questions_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/questions_request_builder.py index c26ed6f4320..9b2dd8a9b4b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/questions_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/assignment_policies/item/questions/questions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[QuestionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageQuestion] = None, request_configuration: Optional[QuestionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageQuestion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/catalog/catalog_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/catalog/catalog_request_builder.py index 245453d74c9..5696ec0ea92 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/catalog/catalog_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/catalog/catalog_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CatalogReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CatalogRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_response.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_post_response.py similarity index 90% rename from msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_response.py rename to msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_post_response.py index 94529e10306..771bd5ea7e2 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetApplicablePolicyRequirementsResponse(BaseCollectionPaginationCountResponse): +class GetApplicablePolicyRequirementsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessPackageAssignmentRequestRequirements]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetApplicablePolicyRequirementsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetApplicablePolicyRequirementsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetApplicablePolicyRequirementsResponse + Returns: GetApplicablePolicyRequirementsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetApplicablePolicyRequirementsResponse() + return GetApplicablePolicyRequirementsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_request_builder.py index 02938c65601..0f5d911157a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/get_applicable_policy_requirements/get_applicable_policy_requirements_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_applicable_policy_requirements_response import GetApplicablePolicyRequirementsResponse + from .get_applicable_policy_requirements_post_response import GetApplicablePolicyRequirementsPostResponse class GetApplicablePolicyRequirementsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/getApplicablePolicyRequirements", path_parameters) - async def post(self,request_configuration: Optional[GetApplicablePolicyRequirementsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetApplicablePolicyRequirementsResponse]: + async def post(self,request_configuration: Optional[GetApplicablePolicyRequirementsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetApplicablePolicyRequirementsPostResponse]: """ - In Azure AD entitlement management, this action retrieves a list of accessPackageAssignmentRequestRequirements objects that the currently signed-in user can use to create an accessPackageAssignmentRequest. Each requirement object corresponds to an access package assignment policy that the currently signed-in user is allowed to request an assignment for. + In Microsoft Entra entitlement management, this action retrieves a list of accessPackageAssignmentRequestRequirements objects that the currently signed-in user can use to create an accessPackageAssignmentRequest. Each requirement object corresponds to an access package assignment policy that the currently signed-in user is allowed to request an assignment for. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetApplicablePolicyRequirementsResponse] + Returns: Optional[GetApplicablePolicyRequirementsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackage-getapplicablepolicyrequirements?view=graph-rest-1.0 """ request_info = self.to_post_request_information( @@ -44,24 +44,24 @@ async def post(self,request_configuration: Optional[GetApplicablePolicyRequireme } if not self.request_adapter: raise Exception("Http core is null") - from .get_applicable_policy_requirements_response import GetApplicablePolicyRequirementsResponse + from .get_applicable_policy_requirements_post_response import GetApplicablePolicyRequirementsPostResponse - return await self.request_adapter.send_async(request_info, GetApplicablePolicyRequirementsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetApplicablePolicyRequirementsPostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[GetApplicablePolicyRequirementsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, this action retrieves a list of accessPackageAssignmentRequestRequirements objects that the currently signed-in user can use to create an accessPackageAssignmentRequest. Each requirement object corresponds to an access package assignment policy that the currently signed-in user is allowed to request an assignment for. + In Microsoft Entra entitlement management, this action retrieves a list of accessPackageAssignmentRequestRequirements objects that the currently signed-in user can use to create an accessPackageAssignmentRequest. Each requirement object corresponds to an access package assignment policy that the currently signed-in user is allowed to request an assignment for. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetApplicablePolicyRequirementsRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/count/count_request_builder.py index ed18cfde0c9..449304db910 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/incompatible_access_packages_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/incompatible_access_packages_request_builder.py index 012c1be0e36..f9afcff22db 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/incompatible_access_packages_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/incompatible_access_packages_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_id1(self,access_package_id1: str) -> AccessPackageItemRequ async def get(self,request_configuration: Optional[IncompatibleAccessPackagesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageCollectionResponse]: """ - Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-incompatibleaccesspackages?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[IncompatibleAccessPackagesReq def to_get_request_information(self,request_configuration: Optional[IncompatibleAccessPackagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IncompatibleAccessPackagesRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class IncompatibleAccessPackagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/item/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/item/ref/ref_request_builder.py index f7176a6f470..64ebed47a45 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/item/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an access package from the list of access packages that have been marked as incompatible on an accessPackage. + Remove an access package from the list of access packages that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. 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/accesspackage-delete-incompatibleaccesspackage?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an access package from the list of access packages that have been marked as incompatible on an accessPackage. + Remove an access package from the list of access packages that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an access package from the list of access packages that have been marked as incompatible on an accessPackage. + Remove an access package from the list of access packages that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/ref/ref_request_builder.py index b17301e39e2..6676ba5774a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_access_packages/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-incompatibleaccesspackages?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add an accessPackage to the list of access packages that have been marked as incompatible on an accessPackage. + Add an accessPackage to the list of access packages that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an accessPackage to the list of access packages that have been marked as incompatible on an accessPackage. + Add an accessPackage to the list of access packages that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the accessPackage objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/count/count_request_builder.py index 0589788565b..4c673d32c43 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/incompatible_groups_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/incompatible_groups_request_builder.py index 13002da641a..23c3d6669c0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/incompatible_groups_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/incompatible_groups_request_builder.py @@ -45,7 +45,7 @@ def by_group_id(self,group_id: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[IncompatibleGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-incompatiblegroups?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[IncompatibleGroupsRequestBuil def to_get_request_information(self,request_configuration: Optional[IncompatibleGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IncompatibleGroupsRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class IncompatibleGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/group_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/group_item_request_builder.py index f1a08c1abf2..52c9dae9cce 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/group_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/group_item_request_builder.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from .ref.ref_request_builder import RefRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupItemRequestBuilder(BaseRequestBuilder): """ @@ -29,4 +30,13 @@ def ref(self) -> RefRequestBuilder: return RefRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/ref/ref_request_builder.py index bfa33957b5d..bed051be788 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a group from the list of groups that have been marked as incompatible on an accessPackage. + Remove a group from the list of groups that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. 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/accesspackage-delete-incompatiblegroup?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a group from the list of groups that have been marked as incompatible on an accessPackage. + Remove a group from the list of groups that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a group from the list of groups that have been marked as incompatible on an accessPackage. + Remove a group from the list of groups that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..dcbe12d9752 --- /dev/null +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..f119919bb57 --- /dev/null +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/entitlementManagement/accessPackages/{accessPackage-id}/incompatibleGroups/{group-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/ref/ref_request_builder.py index 1de6026ea36..ebc547aee4a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/incompatible_groups/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-incompatiblegroups?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a group to the list of groups that have been marked as incompatible on an accessPackage. + Add a group to the list of groups that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a group to the list of groups that have been marked as incompatible on an accessPackage. + Add a group to the list of groups that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. + Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/count/count_request_builder.py index 56d71d2c32f..1089ce74524 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py index 596803cf700..bae2f996c8c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AccessPackageResourceRoleScopeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a accessPackageResourceRoleScope from an accessPackage list of resource role scopes. + Remove a accessPackageResourceRoleScope from an accessPackage list of resource role scopes. This API is available in the following national cloud deployments. 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/accesspackage-delete-resourcerolescopes?view=graph-rest-1.0 @@ -95,17 +95,17 @@ async def patch(self,body: Optional[AccessPackageResourceRoleScope] = None, requ def to_delete_request_information(self,request_configuration: Optional[AccessPackageResourceRoleScopeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a accessPackageResourceRoleScope from an accessPackage list of resource role scopes. + Remove a accessPackageResourceRoleScope from an accessPackage list of resource role scopes. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRoleScope] = None, request_configuration: Optional[AccessPackageResourceRoleScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRoleSc if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/environment/environment_request_builder.py index f313dd787a5..a5acb5c44f0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/resource_request_builder.py index a3ea6285a85..4a95a7b864a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py index 265f35bb330..5889755ac13 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py index ae76febf11e..3eac2bdcbb4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/roles_request_builder.py index 6c26521e64e..a1f2df36d66 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py index ceabd43a437..da67bca43d7 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 85eb51986fe..5fee6a57ab6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py index 1c27fe0e982..252ffed7e1f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py index d7ad4999ae1..19029d606b5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py index 970a80c7458..54afa80a3fb 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 18cc1ff6de4..ff4b65d79f1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py index 520cfc82035..732e8fa9ea4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py index 3f68faedecc..770c1ec3dbf 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/role_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/role_request_builder.py index 033d460ec76..8ebbb29a966 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/role_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/role/role_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[RoleReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RoleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RoleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py index 0212e684042..15718abb817 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/resource_request_builder.py index 5cb150ac796..a7de129021b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py index e6904284939..169177246ba 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py index 3009b0de59a..66ea6b96f5a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py index 5b257fd9ee8..6ffa0f895a5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py index e33d169ef67..e6ef0bcf399 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py index be62ff8dfb1..d92ea084897 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 4c3cb25f451..843c38d1b0d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py index e82518cf3ae..399df4df7e1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py index 4c2b11aa5c4..603c67d6783 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py index 918e3bdad84..1f21b64d501 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 2f7affd4c4c..8a9a945daeb 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py index 81022affc77..ad079347283 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/scope_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/scope_request_builder.py index 5deb09d8842..1bf283a02ae 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/scope_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/item/scope/scope_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ScopeRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopeRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/resource_role_scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/resource_role_scopes_request_builder.py index e43a282e2af..c6f453b0180 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/resource_role_scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/resource_role_scopes/resource_role_scopes_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ResourceRoleScopesRequestBuil async def post(self,body: Optional[AccessPackageResourceRoleScope] = None, request_configuration: Optional[ResourceRoleScopesRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessPackageResourceRoleScope]: """ - Create a new accessPackageResourceRoleScope for adding a resource role to an access package. The access package resource, for a group, an app, or a SharePoint Online site, must already exist in the access package catalog, and the originId for the resource role retrieved from the list of the resource roles. Once you add the resource role scope to the access package, the user will receive this resource role through any current and future access package assignments. + Create a new accessPackageResourceRoleScope for adding a resource role to an access package. The access package resource, for a group, an app, or a SharePoint Online site, must already exist in the access package catalog, and the originId for the resource role retrieved from the list of the resource roles. Once you add the resource role scope to the access package, the user will receive this resource role through any current and future access package assignments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceRoleScope] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRoleScope] = None, request_configuration: Optional[ResourceRoleScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new accessPackageResourceRoleScope for adding a resource role to an access package. The access package resource, for a group, an app, or a SharePoint Online site, must already exist in the access package catalog, and the originId for the resource role retrieved from the list of the resource roles. Once you add the resource role scope to the access package, the user will receive this resource role through any current and future access package assignments. + Create a new accessPackageResourceRoleScope for adding a resource role to an access package. The access package resource, for a group, an app, or a SharePoint Online site, must already exist in the access package catalog, and the originId for the resource role retrieved from the list of the resource roles. Once you add the resource role scope to the access package, the user will receive this resource role through any current and future access package assignments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRoleSco if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/assignment_policies_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/assignment_policies_request_builder.py index 615b1c02b70..d4b944ec892 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/assignment_policies_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/assignment_policies_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_assignment_policy_id(self,access_package_assignment_policy async def get(self,request_configuration: Optional[AssignmentPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageAssignmentPolicyCollectionResponse]: """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignmentPolicy objects. If the delegated user is in a directory role, the resulting list includes all the assignment policies that the caller has access to read, across all catalogs and access packages. If the delegated user is an access package manager or catalog owner, they should instead retrieve the policies for the access packages they can read with list accessPackages by including $expand=accessPackageAssignmentPolicies as a query parameter. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignmentPolicy objects. If the delegated user is in a directory role, the resulting list includes all the assignment policies that the caller has access to read, across all catalogs and access packages. If the delegated user is an access package manager or catalog owner, they should instead retrieve the policies for the access packages they can read with list accessPackages by including $expand=accessPackageAssignmentPolicies as a query parameter. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-assignmentpolicies?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AssignmentPoliciesRequestBuil async def post(self,body: Optional[AccessPackageAssignmentPolicy] = None, request_configuration: Optional[AssignmentPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessPackageAssignmentPolicy]: """ - In Azure AD entitlement management, create a new accessPackageAssignmentPolicy object. The request will include a reference to the accessPackage that will contain this policy, which must already exist. + In Microsoft Entra entitlement management, create a new accessPackageAssignmentPolicy object. The request will include a reference to the accessPackage that will contain this policy, which must already exist. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AccessPackageAssignmentPolicy] = None, reques def to_get_request_information(self,request_configuration: Optional[AssignmentPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignmentPolicy objects. If the delegated user is in a directory role, the resulting list includes all the assignment policies that the caller has access to read, across all catalogs and access packages. If the delegated user is an access package manager or catalog owner, they should instead retrieve the policies for the access packages they can read with list accessPackages by including $expand=accessPackageAssignmentPolicies as a query parameter. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignmentPolicy objects. If the delegated user is in a directory role, the resulting list includes all the assignment policies that the caller has access to read, across all catalogs and access packages. If the delegated user is an access package manager or catalog owner, they should instead retrieve the policies for the access packages they can read with list accessPackages by including $expand=accessPackageAssignmentPolicies as a query parameter. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignmentPolicy] = None, request_configuration: Optional[AssignmentPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, create a new accessPackageAssignmentPolicy object. The request will include a reference to the accessPackage that will contain this policy, which must already exist. + In Microsoft Entra entitlement management, create a new accessPackageAssignmentPolicy object. The request will include a reference to the accessPackage that will contain this policy, which must already exist. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AccessPackageAssignmentPolic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AssignmentPoliciesRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignmentPolicy objects. If the delegated user is in a directory role, the resulting list includes all the assignment policies that the caller has access to read, across all catalogs and access packages. If the delegated user is an access package manager or catalog owner, they should instead retrieve the policies for the access packages they can read with list accessPackages by including $expand=accessPackageAssignmentPolicies as a query parameter. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignmentPolicy objects. If the delegated user is in a directory role, the resulting list includes all the assignment policies that the caller has access to read, across all catalogs and access packages. If the delegated user is an access package manager or catalog owner, they should instead retrieve the policies for the access packages they can read with list accessPackages by including $expand=accessPackageAssignmentPolicies as a query parameter. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/count/count_request_builder.py index 46723fa98c3..487f9964a03 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package/access_package_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package/access_package_request_builder.py index 2381c328d2b..7e83bd0c872 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package/access_package_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package/access_package_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package_assignment_policy_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package_assignment_policy_item_request_builder.py index 4828155fa5e..551cbe23687 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package_assignment_policy_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/access_package_assignment_policy_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - In Azure AD entitlement management, delete an accessPackageAssignmentPolicy. + In Microsoft Entra entitlement management, delete an accessPackageAssignmentPolicy. This API is available in the following national cloud deployments. 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/accesspackageassignmentpolicy-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[AccessPackageAssignmentPol async def get(self,request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageAssignmentPolicy]: """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignmentPolicy object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignmentPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentPolicy] Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentpolicy-get?view=graph-rest-1.0 @@ -98,34 +98,34 @@ async def put(self,body: Optional[AccessPackageAssignmentPolicy] = None, request def to_delete_request_information(self,request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, delete an accessPackageAssignmentPolicy. + In Microsoft Entra entitlement management, delete an accessPackageAssignmentPolicy. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignmentPolicy object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignmentPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[AccessPackageAssignmentPolicy] = None, request_configuration: Optional[AccessPackageAssignmentPolicyItemRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_put_request_information(self,body: Optional[AccessPackageAssignmentPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -207,7 +207,7 @@ class AccessPackageAssignmentPolicyItemRequestBuilderDeleteRequestConfiguration( @dataclass class AccessPackageAssignmentPolicyItemRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignmentPolicy object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignmentPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/catalog/catalog_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/catalog/catalog_request_builder.py index 0b668b05d8f..72345533cba 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/catalog/catalog_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/catalog/catalog_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CatalogReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CatalogRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py index 5c038656001..4dbc595e58e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py index 7e31ce946b0..dafef5c9350 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/custom_extension_stage_settings_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[CustomExtens Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomExtensionStageSetting] = None, request_configuration: Optional[CustomExtensionStageSettingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[CustomExtensionStageSetting] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py index 8de4ed949c8..1d58a0117f8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension/custom_extension_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CustomExtens Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CustomExtensionRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py index 7c700e9d3f8..fad6bcbe56e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/custom_extension_stage_settings/item/custom_extension_stage_setting_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[CustomExt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[CustomExtens Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomExtensionStageSetting] = None, request_configuration: Optional[CustomExtensionStageSettingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[CustomExtensionStageSetting if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/count/count_request_builder.py index 880c17daa57..a9278b6fb25 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/item/access_package_question_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/item/access_package_question_item_request_builder.py index 6fc56877ee8..0432c58cedf 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/item/access_package_question_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/item/access_package_question_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageQuestionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageQuestion] = None, request_configuration: Optional[AccessPackageQuestionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageQuestion] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/questions_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/questions_request_builder.py index a714b9b494e..7325b19288f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/questions_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_policies/item/questions/questions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[QuestionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageQuestion] = None, request_configuration: Optional[QuestionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageQuestion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/assignment_requests_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/assignment_requests_request_builder.py index b04e0127151..c1c4c6196a9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/assignment_requests_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/assignment_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[AssignmentRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageAssignmentRequestCollectionResponse]: """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignmentRequest objects. The resulting list includes all the assignment requests, current and well as expired, that the caller has access to read, across all catalogs and access packages. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignmentRequest objects. The resulting list includes all the assignment requests, current and well as expired, that the caller has access to read, across all catalogs and access packages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-assignmentrequests?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[AssignmentRequestsRequestBuil async def post(self,body: Optional[AccessPackageAssignmentRequest] = None, request_configuration: Optional[AssignmentRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessPackageAssignmentRequest]: """ - In Azure AD Entitlement Management, create a new accessPackageAssignmentRequest object. This operation is used to assign a user to an access package, update the assignment, or to remove an access package assignment. + In Microsoft Entra Entitlement Management, create a new accessPackageAssignmentRequest object. This operation is used to assign a user to an access package, update the assignment, or to remove an access package assignment. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentRequest] @@ -105,24 +105,24 @@ async def post(self,body: Optional[AccessPackageAssignmentRequest] = None, reque def to_get_request_information(self,request_configuration: Optional[AssignmentRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignmentRequest objects. The resulting list includes all the assignment requests, current and well as expired, that the caller has access to read, across all catalogs and access packages. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignmentRequest objects. The resulting list includes all the assignment requests, current and well as expired, that the caller has access to read, across all catalogs and access packages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignmentRequest] = None, request_configuration: Optional[AssignmentRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD Entitlement Management, create a new accessPackageAssignmentRequest object. This operation is used to assign a user to an access package, update the assignment, or to remove an access package assignment. + In Microsoft Entra Entitlement Management, create a new accessPackageAssignmentRequest object. This operation is used to assign a user to an access package, update the assignment, or to remove an access package assignment. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[AccessPackageAssignmentReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AssignmentRequestsRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignmentRequest objects. The resulting list includes all the assignment requests, current and well as expired, that the caller has access to read, across all catalogs and access packages. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignmentRequest objects. The resulting list includes all the assignment requests, current and well as expired, that the caller has access to read, across all catalogs and access packages. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/count/count_request_builder.py index 3ae31a63c15..227cb2a089a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 1798dbf3b15..f06fb23594e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessPackageAssignmentRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 2a5c4f060b4..e42e9ac0a37 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/assignmentRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package/access_package_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package/access_package_request_builder.py index fa14e92e27f..1b7296fb1dd 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package/access_package_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package/access_package_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package_assignment_request_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package_assignment_request_item_request_builder.py index 6cc4b1992d0..3e10492a9c9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package_assignment_request_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/access_package_assignment_request_item_request_builder.py @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AccessPackageAssignmentRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an accessPackageAssignmentRequest object. This request can be made to remove a denied or completed request. You cannot delete an access package assignment request if it has any accessPackageAssignment objects. + Delete an accessPackageAssignmentRequest object. This request can be made to remove a denied or completed request. You cannot delete an access package assignment request if it has any accessPackageAssignment objects. This API is available in the following national cloud deployments. 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/accesspackageassignmentrequest-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[AccessPackageAssignmentReq async def get(self,request_configuration: Optional[AccessPackageAssignmentRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageAssignmentRequest]: """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignmentRequest object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignmentRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentRequest] Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentrequest-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[AccessPackageAssignmentRequest] = None, requ def to_delete_request_information(self,request_configuration: Optional[AccessPackageAssignmentRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an accessPackageAssignmentRequest object. This request can be made to remove a denied or completed request. You cannot delete an access package assignment request if it has any accessPackageAssignment objects. + Delete an accessPackageAssignmentRequest object. This request can be made to remove a denied or completed request. You cannot delete an access package assignment request if it has any accessPackageAssignment objects. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageAssignmentRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignmentRequest object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignmentRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignmentRequest] = None, request_configuration: Optional[AccessPackageAssignmentRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageAssignmentRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class AccessPackageAssignmentRequestItemRequestBuilderDeleteRequestConfiguration @dataclass class AccessPackageAssignmentRequestItemRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignmentRequest object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignmentRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py index 3cc611909b5..4c8cf0c4555 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AssignmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/cancel/cancel_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/cancel/cancel_request_builder.py index 617b8a8d6ea..84fc9860986 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - In Azure AD Entitlement Management, cancel accessPackageAssignmentRequest objects that are in a cancellable state: accepted, pendingApproval, pendingNotBefore, pendingApprovalEscalated. + In Microsoft Entra Entitlement Management, cancel accessPackageAssignmentRequest objects that are in a cancellable state: accepted, pendingApproval, pendingNotBefore, pendingApprovalEscalated. This API is available in the following national cloud deployments. 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/accesspackageassignmentrequest-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD Entitlement Management, cancel accessPackageAssignmentRequest objects that are in a cancellable state: accepted, pendingApproval, pendingNotBefore, pendingApprovalEscalated. + In Microsoft Entra Entitlement Management, cancel accessPackageAssignmentRequest objects that are in a cancellable state: accepted, pendingApproval, pendingNotBefore, pendingApprovalEscalated. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/reprocess/reprocess_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/reprocess/reprocess_request_builder.py index e0b13b011af..44c7afe8af3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/reprocess/reprocess_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/reprocess/reprocess_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReprocessRequestBuilderPostRequestConfiguration] = None) -> None: """ - In Azure AD entitlement management, callers can automatically retry a user's request for access to an access package. It is performed on an accessPackageAssignmentRequest object whose requestState is in a DeliveryFailed or PartiallyDelivered state. You can only reprocess a request within 14 days from the time the original request was completed. For requests completed more than 14 days, you will need to ask the users to cancel the request(s) and make a new request in the MyAccess portal. + In Microsoft Entra entitlement management, callers can automatically retry a user's request for access to an access package. It's performed on an accessPackageAssignmentRequest object whose requestState is in a DeliveryFailed or PartiallyDelivered state. You can only reprocess a request within 14 days from the time the original request was completed. For requests completed more than 14 days, you will need to ask the users to cancel the request(s) and make a new request in the MyAccess portal. This API is available in the following national cloud deployments. 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/accesspackageassignmentrequest-reprocess?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReprocessRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[ReprocessRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, callers can automatically retry a user's request for access to an access package. It is performed on an accessPackageAssignmentRequest object whose requestState is in a DeliveryFailed or PartiallyDelivered state. You can only reprocess a request within 14 days from the time the original request was completed. For requests completed more than 14 days, you will need to ask the users to cancel the request(s) and make a new request in the MyAccess portal. + In Microsoft Entra entitlement management, callers can automatically retry a user's request for access to an access package. It's performed on an accessPackageAssignmentRequest object whose requestState is in a DeliveryFailed or PartiallyDelivered state. You can only reprocess a request within 14 days from the time the original request was completed. For requests completed more than 14 days, you will need to ask the users to cancel the request(s) and make a new request in the MyAccess portal. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReprocessRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/requestor/requestor_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/requestor/requestor_request_builder.py index 50f01b07c1d..e0c9635f1f8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/requestor/requestor_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/requestor/requestor_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RequestorReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RequestorRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/resume/resume_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/resume/resume_request_builder.py index 1b2fe77d1ce..8d50925e447 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/resume/resume_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/resume/resume_request_builder.py @@ -28,10 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[ResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action resume + In Microsoft Entra entitlement management, when an access package policy has been enabled to call out a custom extension and the request processing is waiting for the callback from the customer, the customer can initiate a resume action. It is performed on an accessPackageAssignmentRequest object whose requestStatus is in a WaitingForCallback state. This API is available in the following national cloud deployments. 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/accesspackageassignmentrequest-resume?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -50,7 +51,7 @@ async def post(self,body: Optional[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[ResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action resume + In Microsoft Entra entitlement management, when an access package policy has been enabled to call out a custom extension and the request processing is waiting for the callback from the customer, the customer can initiate a resume action. It is performed on an accessPackageAssignmentRequest object whose requestStatus is in a WaitingForCallback state. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -58,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_response.py b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_get_response.py similarity index 91% rename from msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_response.py rename to msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_get_response.py index 58cc782f9c8..5d4caf2d4f9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AdditionalAccessResponse(BaseCollectionPaginationCountResponse): +class AdditionalAccessGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessPackageAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AdditionalAccessResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AdditionalAccessGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AdditionalAccessResponse + Returns: AdditionalAccessGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AdditionalAccessResponse() + return AdditionalAccessGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_request_builder.py index bfbbd0446b9..985d320671e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access/additional_access_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .additional_access_response import AdditionalAccessResponse + from .additional_access_get_response import AdditionalAccessGetResponse class AdditionalAccessRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/assignments/additionalAccess(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[AdditionalAccessRequestBuilderGetRequestConfiguration] = None) -> Optional[AdditionalAccessResponse]: + async def get(self,request_configuration: Optional[AdditionalAccessRequestBuilderGetRequestConfiguration] = None) -> Optional[AdditionalAccessGetResponse]: """ Invoke function additionalAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AdditionalAccessResponse] + Returns: Optional[AdditionalAccessGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[AdditionalAccessRequestBuilde } if not self.request_adapter: raise Exception("Http core is null") - from .additional_access_response import AdditionalAccessResponse + from .additional_access_get_response import AdditionalAccessGetResponse - return await self.request_adapter.send_async(request_info, AdditionalAccessResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AdditionalAccessGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AdditionalAccessRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AdditionalAc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AdditionalAccessRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_response.py b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_get_response.py similarity index 94% rename from msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_response.py rename to msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_get_response.py index 191c49fa4d7..7994107f982 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse(BaseCollectionPaginationCountResponse): +class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessPackageAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse + Returns: AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse() + return AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_request_builder.py index 8953dbb034f..1dbd31f7ac5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/additional_access_with_access_package_id_with_incompatible_access_package_id/additional_access_with_access_package_id_with_incompatible_access_package_id_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .additional_access_with_access_package_id_with_incompatible_access_package_id_response import AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse + from .additional_access_with_access_package_id_with_incompatible_access_package_id_get_response import AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder(BaseRequestBuilder): """ @@ -26,13 +26,16 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['access_package_id'] = str(access_package_id) + path_parameters['incompatible_access_package_id'] = str(incompatible_access_package_id) super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/assignments/additionalAccess(accessPackageId='{accessPackageId}',incompatibleAccessPackageId='{incompatibleAccessPackageId}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilderGetRequestConfiguration] = None) -> Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse]: + async def get(self,request_configuration: Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilderGetRequestConfiguration] = None) -> Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse]: """ Invoke function additionalAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse] + Returns: Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -45,9 +48,9 @@ async def get(self,request_configuration: Optional[AdditionalAccessWithAccessPac } if not self.request_adapter: raise Exception("Http core is null") - from .additional_access_with_access_package_id_with_incompatible_access_package_id_response import AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse + from .additional_access_with_access_package_id_with_incompatible_access_package_id_get_response import AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse - return await self.request_adapter.send_async(request_info, AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -56,14 +59,14 @@ def to_get_request_information(self,request_configuration: Optional[AdditionalAc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/assignments_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/assignments_request_builder.py index 1a13ec444a0..262b1a6a30b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/assignments_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/assignments_request_builder.py @@ -75,7 +75,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageAssignmentCollectionResponse]: """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignment objects. For directory-wide administrators, the resulting list includes all the assignments, current and well as expired, that the caller has access to read, across all catalogs and access packages. If the caller is on behalf of a delegated user who is assigned only to catalog-specific delegated administrative roles, the request must supply a filter to indicate a specific access package, such as: $filter=accessPackage/id eq 'a914b616-e04e-476b-aa37-91038f0b165b'. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignment objects. For directory-wide administrators, the resulting list includes all the assignments, current and well as expired, that the caller has access to read, across all catalogs and access packages. If the caller is on behalf of a delegated user who is assigned only to catalog-specific delegated administrative roles, the request must supply a filter to indicate a specific access package, such as: $filter=accessPackage/id eq 'a914b616-e04e-476b-aa37-91038f0b165b'. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-assignments?view=graph-rest-1.0 @@ -121,19 +121,19 @@ async def post(self,body: Optional[AccessPackageAssignment] = None, request_conf def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignment objects. For directory-wide administrators, the resulting list includes all the assignments, current and well as expired, that the caller has access to read, across all catalogs and access packages. If the caller is on behalf of a delegated user who is assigned only to catalog-specific delegated administrative roles, the request must supply a filter to indicate a specific access package, such as: $filter=accessPackage/id eq 'a914b616-e04e-476b-aa37-91038f0b165b'. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignment objects. For directory-wide administrators, the resulting list includes all the assignments, current and well as expired, that the caller has access to read, across all catalogs and access packages. If the caller is on behalf of a delegated user who is assigned only to catalog-specific delegated administrative roles, the request must supply a filter to indicate a specific access package, such as: $filter=accessPackage/id eq 'a914b616-e04e-476b-aa37-91038f0b165b'. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -146,13 +146,13 @@ def to_post_request_information(self,body: Optional[AccessPackageAssignment] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AssignmentsRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve a list of accessPackageAssignment objects. For directory-wide administrators, the resulting list includes all the assignments, current and well as expired, that the caller has access to read, across all catalogs and access packages. If the caller is on behalf of a delegated user who is assigned only to catalog-specific delegated administrative roles, the request must supply a filter to indicate a specific access package, such as: $filter=accessPackage/id eq 'a914b616-e04e-476b-aa37-91038f0b165b'. + In Microsoft Entra entitlement management, retrieve a list of accessPackageAssignment objects. For directory-wide administrators, the resulting list includes all the assignments, current and well as expired, that the caller has access to read, across all catalogs and access packages. If the caller is on behalf of a delegated user who is assigned only to catalog-specific delegated administrative roles, the request must supply a filter to indicate a specific access package, such as: $filter=accessPackage/id eq 'a914b616-e04e-476b-aa37-91038f0b165b'. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/count/count_request_builder.py index ef8f01902ae..a8c216d11cc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index b8b17172f1d..bce4654795d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AccessPackageAssignment]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 7c792f98671..fe8e2b76d9f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/assignments/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package/access_package_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package/access_package_request_builder.py index 566d8a1e1a4..edae710bfef 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package/access_package_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package/access_package_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package_assignment_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package_assignment_item_request_builder.py index 978e17b512c..171c6c48328 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package_assignment_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/item/access_package_assignment_item_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[AccessPackageAssignmentIte async def get(self,request_configuration: Optional[AccessPackageAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageAssignment]: """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignment object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignment] Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignment-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignment object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageAssignment] = None, request_configuration: Optional[AccessPackageAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageAssignment] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class AccessPackageAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class AccessPackageAssignmentItemRequestBuilderGetQueryParameters(): """ - In Azure AD entitlement management, retrieve the properties and relationships of an accessPackageAssignment object. + In Microsoft Entra entitlement management, retrieve the properties and relationships of an accessPackageAssignment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/item/assignment_policy/assignment_policy_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/item/assignment_policy/assignment_policy_request_builder.py index 01d7bf506d1..a59db7a6c89 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/item/assignment_policy/assignment_policy_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/item/assignment_policy/assignment_policy_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentPo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AssignmentPolicyRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/assignments/item/reprocess/reprocess_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignments/item/reprocess/reprocess_request_builder.py index 6f68b04f0cc..616f4c39250 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignments/item/reprocess/reprocess_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignments/item/reprocess/reprocess_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReprocessRequestBuilderPostRequestConfiguration] = None) -> None: """ - In Azure AD entitlement management, callers can automatically reevaluate and enforce an accessPackageAssignment object of a user’s assignments for a specific access package. The state of the access package assignment must be Delivered for the administrator to reprocess the user's assignment. Only admins with the Access Package Assignment Manager role, or higher, in Azure AD entitlement management can perform this action. + In Microsoft Entra entitlement management, callers can automatically reevaluate and enforce an accessPackageAssignment object of a user’s assignments for a specific access package. The state of the access package assignment must be Delivered for the administrator to reprocess the user's assignment. Only admins with the Access Package Assignment Manager role, or higher, in Microsoft Entra entitlement management can perform this action. This API is available in the following national cloud deployments. 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/accesspackageassignment-reprocess?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReprocessRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[ReprocessRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In Azure AD entitlement management, callers can automatically reevaluate and enforce an accessPackageAssignment object of a user’s assignments for a specific access package. The state of the access package assignment must be Delivered for the administrator to reprocess the user's assignment. Only admins with the Access Package Assignment Manager role, or higher, in Azure AD entitlement management can perform this action. + In Microsoft Entra entitlement management, callers can automatically reevaluate and enforce an accessPackageAssignment object of a user’s assignments for a specific access package. The state of the access package assignment must be Delivered for the administrator to reprocess the user's assignment. Only admins with the Access Package Assignment Manager role, or higher, in Microsoft Entra entitlement management can perform this action. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReprocessRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/catalogs_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/catalogs_request_builder.py index ecb9282377b..0e950ab5a10 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/catalogs_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/catalogs_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_catalog_id(self,access_package_catalog_id: str) -> AccessP async def get(self,request_configuration: Optional[CatalogsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageCatalogCollectionResponse]: """ - Retrieve a list of accessPackageCatalog objects. + Retrieve a list of accessPackageCatalog objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCatalogCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-catalogs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CatalogsRequestBuilderGetRequ async def post(self,body: Optional[AccessPackageCatalog] = None, request_configuration: Optional[CatalogsRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessPackageCatalog]: """ - Create a new accessPackageCatalog object. + Create a new accessPackageCatalog object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCatalog] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AccessPackageCatalog] = None, request_configu def to_get_request_information(self,request_configuration: Optional[CatalogsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageCatalog objects. + Retrieve a list of accessPackageCatalog objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageCatalog] = None, request_configuration: Optional[CatalogsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new accessPackageCatalog object. + Create a new accessPackageCatalog object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AccessPackageCatalog] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CatalogsRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageCatalog objects. + Retrieve a list of accessPackageCatalog objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/count/count_request_builder.py index e072c9e27c5..cbc47e1671c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_package_catalog_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_package_catalog_item_request_builder.py index aaceebe1087..4dfb23d949a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_package_catalog_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_package_catalog_item_request_builder.py @@ -14,8 +14,8 @@ from .....models.o_data_errors.o_data_error import ODataError from .access_packages.access_packages_request_builder import AccessPackagesRequestBuilder from .custom_workflow_extensions.custom_workflow_extensions_request_builder import CustomWorkflowExtensionsRequestBuilder - from .resource_roles.resource_roles_request_builder import ResourceRolesRequestBuilder from .resources.resources_request_builder import ResourcesRequestBuilder + from .resource_roles.resource_roles_request_builder import ResourceRolesRequestBuilder from .resource_scopes.resource_scopes_request_builder import ResourceScopesRequestBuilder class AccessPackageCatalogItemRequestBuilder(BaseRequestBuilder): @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AccessPackageCatalogItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an accessPackageCatalog. + Delete an accessPackageCatalog. This API is available in the following national cloud deployments. 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/accesspackagecatalog-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[AccessPackageCatalogItemRe async def get(self,request_configuration: Optional[AccessPackageCatalogItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageCatalog]: """ - Retrieve the properties and relationships of an accessPackageCatalog object. + Retrieve the properties and relationships of an accessPackageCatalog object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCatalog] Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[AccessPackageCatalogItemReque async def patch(self,body: Optional[AccessPackageCatalog] = None, request_configuration: Optional[AccessPackageCatalogItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AccessPackageCatalog]: """ - Update an existing accessPackageCatalog object to change one or more of its properties, such as the display name or description. + Update an existing accessPackageCatalog object to change one or more of its properties, such as the display name or description. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageCatalog] @@ -100,39 +100,39 @@ async def patch(self,body: Optional[AccessPackageCatalog] = None, request_config def to_delete_request_information(self,request_configuration: Optional[AccessPackageCatalogItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an accessPackageCatalog. + Delete an accessPackageCatalog. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageCatalogItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an accessPackageCatalog object. + Retrieve the properties and relationships of an accessPackageCatalog object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageCatalog] = None, request_configuration: Optional[AccessPackageCatalogItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an existing accessPackageCatalog object to change one or more of its properties, such as the display name or description. + Update an existing accessPackageCatalog object to change one or more of its properties, such as the display name or description. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageCatalog] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,22 +188,22 @@ def resource_roles(self) -> ResourceRolesRequestBuilder: return ResourceRolesRequestBuilder(self.request_adapter, self.path_parameters) @property - def resources(self) -> ResourcesRequestBuilder: + def resource_scopes(self) -> ResourceScopesRequestBuilder: """ - Provides operations to manage the resources property of the microsoft.graph.accessPackageCatalog entity. + Provides operations to manage the resourceScopes property of the microsoft.graph.accessPackageCatalog entity. """ - from .resources.resources_request_builder import ResourcesRequestBuilder + from .resource_scopes.resource_scopes_request_builder import ResourceScopesRequestBuilder - return ResourcesRequestBuilder(self.request_adapter, self.path_parameters) + return ResourceScopesRequestBuilder(self.request_adapter, self.path_parameters) @property - def resource_scopes(self) -> ResourceScopesRequestBuilder: + def resources(self) -> ResourcesRequestBuilder: """ - Provides operations to manage the resourceScopes property of the microsoft.graph.accessPackageCatalog entity. + Provides operations to manage the resources property of the microsoft.graph.accessPackageCatalog entity. """ - from .resource_scopes.resource_scopes_request_builder import ResourceScopesRequestBuilder + from .resources.resources_request_builder import ResourcesRequestBuilder - return ResourceScopesRequestBuilder(self.request_adapter, self.path_parameters) + return ResourcesRequestBuilder(self.request_adapter, self.path_parameters) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @@ -218,7 +218,7 @@ class AccessPackageCatalogItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class AccessPackageCatalogItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an accessPackageCatalog object. + Retrieve the properties and relationships of an accessPackageCatalog object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/access_packages_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/access_packages_request_builder.py index 7c0d11c27e4..0b5800e0234 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/access_packages_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/access_packages_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackagesRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/count/count_request_builder.py index dbf20bd4ea1..24acbf88277 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/item/access_package_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/item/access_package_item_request_builder.py index aa868bced3d..eb613a05d24 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/item/access_package_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/access_packages/item/access_package_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/count/count_request_builder.py index 8d0372460bb..832ceab5bf6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/custom_workflow_extensions_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/custom_workflow_extensions_request_builder.py index 61cedb4ed08..a0c5126bf8e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/custom_workflow_extensions_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/custom_workflow_extensions_request_builder.py @@ -45,9 +45,10 @@ def by_custom_callout_extension_id(self,custom_callout_extension_id: str) -> Cus async def get(self,request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomCalloutExtensionCollectionResponse]: """ - Get customWorkflowExtensions from identityGovernance + Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the customAccessPackageWorkflowExtension objects for the catalog that the caller has access to read. Each object includes an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomCalloutExtensionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-list-accesspackagecustomworkflowextensions?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -66,10 +67,11 @@ async def get(self,request_configuration: Optional[CustomWorkflowExtensionsReque async def post(self,body: Optional[CustomCalloutExtension] = None, request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CustomCalloutExtension]: """ - Create new navigation property to customWorkflowExtensions for identityGovernance + Create a new accessPackageAssignmentRequestWorkflowExtension or accessPackageAssignmentWorkflowExtension object and add it to an existing accessPackageCatalog object. You must explicitly provide an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. 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/accesspackagecatalog-post-accesspackagecustomworkflowextensions?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -90,24 +92,24 @@ async def post(self,body: Optional[CustomCalloutExtension] = None, request_confi def to_get_request_information(self,request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get customWorkflowExtensions from identityGovernance + Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the customAccessPackageWorkflowExtension objects for the catalog that the caller has access to read. Each object includes an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomCalloutExtension] = None, request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create new navigation property to customWorkflowExtensions for identityGovernance + Create a new accessPackageAssignmentRequestWorkflowExtension or accessPackageAssignmentWorkflowExtension object and add it to an existing accessPackageCatalog object. You must explicitly provide an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -115,13 +117,13 @@ def to_post_request_information(self,body: Optional[CustomCalloutExtension] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustomWorkflowExtensionsRequestBuilderGetQueryParameters(): """ - Get customWorkflowExtensions from identityGovernance + Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the customAccessPackageWorkflowExtension objects for the catalog that the caller has access to read. Each object includes an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. """ 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 ceaa5d3b70d..57095f9a954 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 @@ -28,9 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete navigation property customWorkflowExtensions for identityGovernance + Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -47,9 +48,10 @@ async def delete(self,request_configuration: Optional[CustomCalloutExtensionItem async def get(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomCalloutExtension]: """ - Get customWorkflowExtensions from identityGovernance + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. This API is available in the following national cloud deployments. 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 """ request_info = self.to_get_request_information( request_configuration @@ -68,10 +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 navigation property customWorkflowExtensions in identityGovernance + Update the properties of an accessPackageAssignmentWorkflowExtension 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 """ if not body: raise TypeError("body cannot be null.") @@ -92,39 +95,39 @@ async def patch(self,body: Optional[CustomCalloutExtension] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete navigation property customWorkflowExtensions for identityGovernance + Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get customWorkflowExtensions from identityGovernance + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomCalloutExtension] = None, request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the navigation property customWorkflowExtensions in identityGovernance + Update the properties of an accessPackageAssignmentWorkflowExtension object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -132,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CustomCalloutExtension] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +168,7 @@ class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class CustomCalloutExtensionItemRequestBuilderGetQueryParameters(): """ - Get customWorkflowExtensions from identityGovernance + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/count/count_request_builder.py index 00e4d4c5ca8..cec4fcc4ce8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/access_package_resource_role_item_request_builder.py index bafa88d9922..92b267fe047 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/environment/environment_request_builder.py index 4251c8d2916..37a2120d33e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/resource_request_builder.py index 33d731d7a28..1d01aa14aa4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/count/count_request_builder.py index ef92b9dc3e7..badda7c25f3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 292f8c0f962..7d6ecc0e121 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/roles_request_builder.py index d9c2eff1d89..66aa9a056bb 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/count/count_request_builder.py index 01aa94768e8..f0688a41db7 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index a064874978d..25eba749c4a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index 13727d818ec..88bd0427a17 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py index 96975ede70f..91567ef15fd 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py index e3dfaab20b6..af43c759750 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index f31aa2866b6..dcae62fe452 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py index e97a7dd0a1f..bef2ba1c8a9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/scopes_request_builder.py index f84c8e183a9..f207ac04621 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/resource_roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/resource_roles_request_builder.py index 6b8ccfbb35f..dbe6c8be0a7 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/resource_roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_roles/resource_roles_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_resource_role_id(self,access_package_resource_role_id: str async def get(self,request_configuration: Optional[ResourceRolesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageResourceRoleCollectionResponse]: """ - Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. + Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceRoleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-list-resourceroles?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessPackageResourceRole] = None, request_co def to_get_request_information(self,request_configuration: Optional[ResourceRolesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. + Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[ResourceRolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourceRolesRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. + Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/count/count_request_builder.py index b3f1feef9c0..dc03347fc67 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/access_package_resource_scope_item_request_builder.py index 252691521fc..f90719d59bc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/environment/environment_request_builder.py index 62377d046d1..57b6933938c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/resource_request_builder.py index e29817e8645..a24100b6584 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/count/count_request_builder.py index 0ce92ce73a5..f0292798017 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 9474f6d79d0..378a4ffbebf 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index 5bf0cc90613..64f2fc7f1f9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py index 984fc4dbfff..949369b41ef 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py index fd8d8141dad..e3d3a5fec36 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 84650b5ce9d..d64c8c96dee 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py index 055cb1b344e..ef3b46873fb 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/roles_request_builder.py index be7017241ca..f7f7ea8e2de 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/count/count_request_builder.py index ded98303733..776e594adbf 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 8eed5953e79..ab5b02ba496 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/scopes_request_builder.py index 3b97b99eaeb..50747ebc2ca 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/resource_scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/resource_scopes_request_builder.py index 84a55e5f3ab..3ab3ac66b2a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/resource_scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resource_scopes/resource_scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceScop Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ResourceScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/count/count_request_builder.py index 0eaf97fc4dd..b274b953785 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/access_package_resource_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/access_package_resource_item_request_builder.py index edba87b26a2..e7aaa7f481f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/access_package_resource_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/access_package_resource_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[AccessPackageResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/environment/environment_request_builder.py index b1cbad25245..3276925483f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/count/count_request_builder.py index 2034467622f..f0cbf9691ce 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py index 5bcd5a9dd60..61e49c0532a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/environment/environment_request_builder.py index 04dbb375d1f..ac82902495b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/resource_request_builder.py index 4e3390106fc..9dfc78a9649 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py index a3113338683..71cd6417a99 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index db680e13e36..86ec02c8cbc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index 5345383589e..e0835835c0f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py index ba3608288ef..1fa3f3dcfa5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py index 2c393d9807e..f9b1192806b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/roles_request_builder.py index f1b705328a0..8ced844b55f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/count/count_request_builder.py index 6ad3e4f7dc6..81f0ca5a5e2 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py index 62f6a28e84a..a98eef2df81 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/environment/environment_request_builder.py index eb389b7e07e..40842a34680 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/resource_request_builder.py index 41a32f5f7a9..4752c5cb736 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py index 22c15dac20a..a4dc5a4c28b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 70e399c19f6..adec591d4da 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index d1623570477..f24c7dc769a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py index 7f6e78a6b59..5696ee3d264 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/roles_request_builder.py index fc15a9ad9c4..4e68d4cc89a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/scopes_request_builder.py index 1f09942ab3b..1ff1a7cbfa5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/item/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/resources_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/resources_request_builder.py index 90652c9594c..5351003c67a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/resources_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_resource_id(self,access_package_resource_id: str) -> Acces async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageResourceCollectionResponse]: """ - Retrieve a list of accessPackageResource objects in an accessPackageCatalog. + Retrieve a list of accessPackageResource objects in an accessPackageCatalog. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-list-resources?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessPackageResource] = None, request_config def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageResource objects in an accessPackageCatalog. + Retrieve a list of accessPackageResource objects in an accessPackageCatalog. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResource] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageResource objects in an accessPackageCatalog. + Retrieve a list of accessPackageResource objects in an accessPackageCatalog. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/connected_organizations_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/connected_organizations_request_builder.py index 44ec78d069c..e2279f65578 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/connected_organizations_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/connected_organizations_request_builder.py @@ -45,7 +45,7 @@ def by_connected_organization_id(self,connected_organization_id: str) -> Connect async def get(self,request_configuration: Optional[ConnectedOrganizationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ConnectedOrganizationCollectionResponse]: """ - Retrieve a list of connectedOrganization objects. + Retrieve a list of connectedOrganization objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectedOrganizationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-connectedorganizations?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ConnectedOrganizationsRequest async def post(self,body: Optional[ConnectedOrganization] = None, request_configuration: Optional[ConnectedOrganizationsRequestBuilderPostRequestConfiguration] = None) -> Optional[ConnectedOrganization]: """ - Create a new connectedOrganization object. + Create a new connectedOrganization object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectedOrganization] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ConnectedOrganization] = None, request_config def to_get_request_information(self,request_configuration: Optional[ConnectedOrganizationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of connectedOrganization objects. + Retrieve a list of connectedOrganization objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConnectedOrganization] = None, request_configuration: Optional[ConnectedOrganizationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new connectedOrganization object. + Create a new connectedOrganization object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ConnectedOrganization] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ConnectedOrganizationsRequestBuilderGetQueryParameters(): """ - Retrieve a list of connectedOrganization objects. + Retrieve a list of connectedOrganization objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/count/count_request_builder.py index efe4ff3725e..924b6cf6c5c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/connected_organization_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/connected_organization_item_request_builder.py index 970cbbaa45f..fdb33edb5a2 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/connected_organization_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/connected_organization_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConnectedOrganizationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a connectedOrganization object. + Delete a connectedOrganization object. This API is available in the following national cloud deployments. 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/connectedorganization-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[ConnectedOrganizationItemR async def get(self,request_configuration: Optional[ConnectedOrganizationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConnectedOrganization]: """ - Retrieve the properties and relationships of a connectedOrganization object. + Retrieve the properties and relationships of a connectedOrganization object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectedOrganization] Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[ConnectedOrganizationItemRequ async def patch(self,body: Optional[ConnectedOrganization] = None, request_configuration: Optional[ConnectedOrganizationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConnectedOrganization]: """ - Update a connectedOrganization object to change one or more of its properties. + Update a connectedOrganization object to change one or more of its properties. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConnectedOrganization] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[ConnectedOrganization] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[ConnectedOrganizationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a connectedOrganization object. + Delete a connectedOrganization object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConnectedOrganizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a connectedOrganization object. + Retrieve the properties and relationships of a connectedOrganization object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConnectedOrganization] = None, request_configuration: Optional[ConnectedOrganizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a connectedOrganization object to change one or more of its properties. + Update a connectedOrganization object to change one or more of its properties. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[ConnectedOrganization] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class ConnectedOrganizationItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class ConnectedOrganizationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a connectedOrganization object. + Retrieve the properties and relationships of a connectedOrganization object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/count/count_request_builder.py index 11eb712a9e7..a62bbf5e9ec 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_response.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_response.py deleted file mode 100644 index 2511b8129fe..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - -from .......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/external_sponsors_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/external_sponsors_request_builder.py index 7050adc2251..8a820cb21e3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/external_sponsors_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/external_sponsors_request_builder.py @@ -10,16 +10,11 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.directory_object import DirectoryObject from ......models.directory_object_collection_response import DirectoryObjectCollectionResponse from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.directory_object_item_request_builder import DirectoryObjectItemRequestBuilder from .ref.ref_request_builder import RefRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class ExternalSponsorsRequestBuilder(BaseRequestBuilder): """ @@ -50,7 +45,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[ExternalSponsorsRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-list-externalsponsors?view=graph-rest-1.0 @@ -70,66 +65,21 @@ async def get(self,request_configuration: Optional[ExternalSponsorsRequestBuilde return await self.request_adapter.send_async(request_info, DirectoryObjectCollectionResponse, error_mapping) - async def post(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[ExternalSponsorsRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: - """ - Add a user or a group to the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-post-externalsponsors?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.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - def to_get_request_information(self,request_configuration: Optional[ExternalSponsorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) - return request_info - - def to_post_request_information(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[ExternalSponsorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Add a user or a group to the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() request_info.url_template = self.url_template request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + 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) -> ExternalSponsorsRequestBuilder: @@ -151,33 +101,6 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - @property def ref(self) -> RefRequestBuilder: """ @@ -187,19 +110,10 @@ def ref(self) -> RefRequestBuilder: return RefRequestBuilder(self.request_adapter, self.path_parameters) - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class ExternalSponsorsRequestBuilderGetQueryParameters(): """ - Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -265,14 +179,4 @@ class ExternalSponsorsRequestBuilderGetRequestConfiguration(BaseRequestConfigura query_parameters: Optional[ExternalSponsorsRequestBuilder.ExternalSponsorsRequestBuilderGetQueryParameters] = None - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ExternalSponsorsRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 65b850c98d8..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/externalSponsors/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 293b643490d..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_response.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 4a990d4d637..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/item/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/item/ref/ref_request_builder.py index 90488f6137c..5e1cd32ab6b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/item/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a user or a group from the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Remove a user or a group from the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. 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/connectedorganization-delete-externalsponsors?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a user or a group from the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Remove a user or a group from the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a user or a group from the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Remove a user or a group from the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/ref/ref_request_builder.py index ecec811f030..335030046f3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-list-externalsponsors?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a user or a group to the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Add a user or a group to the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a user or a group to the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Add a user or a group to the connected organization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's external sponsors. The external sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index 460bd014582..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/externalSponsors/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/count/count_request_builder.py index 512fbe75196..aadac9140d6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_response.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_response.py deleted file mode 100644 index 2511b8129fe..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - -from .......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 3c41ce48f56..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/internalSponsors/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 293b643490d..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index f7beca17ff4..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/internalSponsors/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_response.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 4a990d4d637..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/internal_sponsors_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/internal_sponsors_request_builder.py index ecd71143919..c3e568ac72f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/internal_sponsors_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/internal_sponsors_request_builder.py @@ -10,16 +10,11 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.directory_object import DirectoryObject from ......models.directory_object_collection_response import DirectoryObjectCollectionResponse from ......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.directory_object_item_request_builder import DirectoryObjectItemRequestBuilder from .ref.ref_request_builder import RefRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class InternalSponsorsRequestBuilder(BaseRequestBuilder): """ @@ -50,7 +45,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[InternalSponsorsRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-list-internalsponsors?view=graph-rest-1.0 @@ -70,66 +65,21 @@ async def get(self,request_configuration: Optional[InternalSponsorsRequestBuilde return await self.request_adapter.send_async(request_info, DirectoryObjectCollectionResponse, error_mapping) - async def post(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[InternalSponsorsRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: - """ - Add a user or a group to the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-post-internalsponsors?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.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - def to_get_request_information(self,request_configuration: Optional[InternalSponsorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) - return request_info - - def to_post_request_information(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[InternalSponsorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Add a user or a group to the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() request_info.url_template = self.url_template request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + 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) -> InternalSponsorsRequestBuilder: @@ -151,33 +101,6 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - @property def ref(self) -> RefRequestBuilder: """ @@ -187,19 +110,10 @@ def ref(self) -> RefRequestBuilder: return RefRequestBuilder(self.request_adapter, self.path_parameters) - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class InternalSponsorsRequestBuilderGetQueryParameters(): """ - Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -265,14 +179,4 @@ class InternalSponsorsRequestBuilderGetRequestConfiguration(BaseRequestConfigura query_parameters: Optional[InternalSponsorsRequestBuilder.InternalSponsorsRequestBuilderGetQueryParameters] = None - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class InternalSponsorsRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/item/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/item/ref/ref_request_builder.py index 6f5691cced6..84c9201fdf9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/item/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a user or a group from the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Remove a user or a group from the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. 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/connectedorganization-delete-internalsponsors?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a user or a group from the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Remove a user or a group from the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a user or a group from the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Remove a user or a group from the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/ref/ref_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/ref/ref_request_builder.py index 8997e8eb8d6..1d8fc1278ca 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/ref/ref_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/connectedorganization-list-internalsponsors?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add a user or a group to the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Add a user or a group to the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a user or a group to the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Add a user or a group to the connected organization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. + Retrieve a list of a connectedOrganization's internal sponsors. The internal sponsors are a set of users who can approve requests on behalf of other users from that connected organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index 4efdb0209bf..00000000000 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/internalSponsors/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/identity_governance/entitlement_management/entitlement_management_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/entitlement_management_request_builder.py index 1ae7eec1b0f..5d2c5a62d33 100644 --- a/msgraph/generated/identity_governance/entitlement_management/entitlement_management_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/entitlement_management_request_builder.py @@ -12,17 +12,17 @@ if TYPE_CHECKING: from ...models.entitlement_management import EntitlementManagement from ...models.o_data_errors.o_data_error import ODataError - from .access_package_assignment_approvals.access_package_assignment_approvals_request_builder import AccessPackageAssignmentApprovalsRequestBuilder from .access_packages.access_packages_request_builder import AccessPackagesRequestBuilder + from .access_package_assignment_approvals.access_package_assignment_approvals_request_builder import AccessPackageAssignmentApprovalsRequestBuilder + from .assignments.assignments_request_builder import AssignmentsRequestBuilder from .assignment_policies.assignment_policies_request_builder import AssignmentPoliciesRequestBuilder from .assignment_requests.assignment_requests_request_builder import AssignmentRequestsRequestBuilder - from .assignments.assignments_request_builder import AssignmentsRequestBuilder from .catalogs.catalogs_request_builder import CatalogsRequestBuilder from .connected_organizations.connected_organizations_request_builder import ConnectedOrganizationsRequestBuilder + from .resources.resources_request_builder import ResourcesRequestBuilder from .resource_environments.resource_environments_request_builder import ResourceEnvironmentsRequestBuilder from .resource_requests.resource_requests_request_builder import ResourceRequestsRequestBuilder from .resource_role_scopes.resource_role_scopes_request_builder import ResourceRoleScopesRequestBuilder - from .resources.resources_request_builder import ResourcesRequestBuilder from .settings.settings_request_builder import SettingsRequestBuilder class EntitlementManagementRequestBuilder(BaseRequestBuilder): @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[Entitleme Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EntitlementManagementRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,14 +124,14 @@ def to_get_request_information(self,request_configuration: Optional[EntitlementM Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EntitlementManagement] = None, request_configuration: Optional[EntitlementManagementRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[EntitlementManagement] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/count/count_request_builder.py index d56fa7ab0b3..021476d0e7f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/access_package_resource_environment_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/access_package_resource_environment_item_request_builder.py index f766bb537df..21135212e80 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/access_package_resource_environment_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/access_package_resource_environment_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceEnvironmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceEnvironment] = None, request_configuration: Optional[AccessPackageResourceEnvironmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceEnviro if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/count/count_request_builder.py index 7bbdf115cd0..46625fa07a6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/access_package_resource_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/access_package_resource_item_request_builder.py index 88f58e18a7f..eab308be0ee 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/access_package_resource_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/access_package_resource_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[AccessPackageResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/environment/environment_request_builder.py index 8462d4fd653..f8de316cc2c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/count/count_request_builder.py index 4ce30836373..da2722f90d6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py index b91304ede51..25605df19e2 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/environment/environment_request_builder.py index 5d7bb54e3ed..26f1098d35c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/resource_request_builder.py index 45a3f7174cf..ee4b98608ea 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py index 408a047ad27..34054e68748 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index c06290bc27c..790bec9aeca 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index 4f6e56c24dd..32d9da1e77a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py index 52d1ae9c9f1..e755a193755 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py index a161e9edb52..f3ca97d16dc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/roles_request_builder.py index d0700e72657..b129b526468 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/count/count_request_builder.py index 5ee43ef6589..1e9675e0d9d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py index 44acf3fd654..cd350064f4e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/environment/environment_request_builder.py index a07cf004edd..02c59ee6c5a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/resource_request_builder.py index f5039825d5f..43d1a0dd060 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py index d5fa01e3421..eda92f9de31 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 58882641fe0..0e0993c7d99 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index e39bb9912a4..2121a5cce0f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py index 6de7ddfa9a1..03f2ebc9814 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/roles_request_builder.py index 0baa9f9ec58..9cf6f54d97f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/scopes_request_builder.py index 9b823386a66..44ae588553e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/item/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/resources_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/resources_request_builder.py index a64b3ea188d..5061ea7b540 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/resources_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/item/resources/resources_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourcesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResource] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_environments/resource_environments_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_environments/resource_environments_request_builder.py index 1c5df86877c..bdc893db702 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_environments/resource_environments_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_environments/resource_environments_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_resource_environment_id(self,access_package_resource_envir async def get(self,request_configuration: Optional[ResourceEnvironmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageResourceEnvironmentCollectionResponse]: """ - Retrieve a list of accessPackageResourceEnvironment objects and their properties. + Retrieve a list of accessPackageResourceEnvironment objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceEnvironmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-resourceenvironments?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessPackageResourceEnvironment] = None, req def to_get_request_information(self,request_configuration: Optional[ResourceEnvironmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageResourceEnvironment objects and their properties. + Retrieve a list of accessPackageResourceEnvironment objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceEnvironment] = None, request_configuration: Optional[ResourceEnvironmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceEnviron if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourceEnvironmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageResourceEnvironment objects and their properties. + Retrieve a list of accessPackageResourceEnvironment objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/count/count_request_builder.py index 949954c218c..c7b7b0d44c5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/access_package_resource_request_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/access_package_resource_request_item_request_builder.py index 1632e6965e4..3d8c0380daa 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/access_package_resource_request_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/access_package_resource_request_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRequest] = None, request_configuration: Optional[AccessPackageResourceRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/access_packages_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/access_packages_request_builder.py index d71823a73c7..0f039cd64bd 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/access_packages_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/access_packages_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackagesRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/count/count_request_builder.py index c6c4f9b6d92..c9aa55da824 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/item/access_package_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/item/access_package_item_request_builder.py index 2a5e18b8045..d1bfb632f86 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/item/access_package_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/access_packages/item/access_package_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AccessPackageItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/catalog_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/catalog_request_builder.py index bd868a2ba67..07aa6183624 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/catalog_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/catalog_request_builder.py @@ -14,8 +14,8 @@ from ......models.o_data_errors.o_data_error import ODataError from .access_packages.access_packages_request_builder import AccessPackagesRequestBuilder from .custom_workflow_extensions.custom_workflow_extensions_request_builder import CustomWorkflowExtensionsRequestBuilder - from .resource_roles.resource_roles_request_builder import ResourceRolesRequestBuilder from .resources.resources_request_builder import ResourcesRequestBuilder + from .resource_roles.resource_roles_request_builder import ResourceRolesRequestBuilder from .resource_scopes.resource_scopes_request_builder import ResourceScopesRequestBuilder class CatalogRequestBuilder(BaseRequestBuilder): @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[CatalogRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CatalogRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[CatalogReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageCatalog] = None, request_configuration: Optional[CatalogRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageCatalog] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -185,22 +185,22 @@ def resource_roles(self) -> ResourceRolesRequestBuilder: return ResourceRolesRequestBuilder(self.request_adapter, self.path_parameters) @property - def resources(self) -> ResourcesRequestBuilder: + def resource_scopes(self) -> ResourceScopesRequestBuilder: """ - Provides operations to manage the resources property of the microsoft.graph.accessPackageCatalog entity. + Provides operations to manage the resourceScopes property of the microsoft.graph.accessPackageCatalog entity. """ - from .resources.resources_request_builder import ResourcesRequestBuilder + from .resource_scopes.resource_scopes_request_builder import ResourceScopesRequestBuilder - return ResourcesRequestBuilder(self.request_adapter, self.path_parameters) + return ResourceScopesRequestBuilder(self.request_adapter, self.path_parameters) @property - def resource_scopes(self) -> ResourceScopesRequestBuilder: + def resources(self) -> ResourcesRequestBuilder: """ - Provides operations to manage the resourceScopes property of the microsoft.graph.accessPackageCatalog entity. + Provides operations to manage the resources property of the microsoft.graph.accessPackageCatalog entity. """ - from .resource_scopes.resource_scopes_request_builder import ResourceScopesRequestBuilder + from .resources.resources_request_builder import ResourcesRequestBuilder - return ResourceScopesRequestBuilder(self.request_adapter, self.path_parameters) + return ResourcesRequestBuilder(self.request_adapter, self.path_parameters) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/count/count_request_builder.py index af7c4387425..ad319039c21 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/custom_workflow_extensions_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/custom_workflow_extensions_request_builder.py index bbe0d67aa02..10c58b72959 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/custom_workflow_extensions_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/custom_workflow_extensions_request_builder.py @@ -45,9 +45,10 @@ def by_custom_callout_extension_id(self,custom_callout_extension_id: str) -> Cus async def get(self,request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomCalloutExtensionCollectionResponse]: """ - Get customWorkflowExtensions from identityGovernance + Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the customAccessPackageWorkflowExtension objects for the catalog that the caller has access to read. Each object includes an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomCalloutExtensionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-list-accesspackagecustomworkflowextensions?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -66,10 +67,11 @@ async def get(self,request_configuration: Optional[CustomWorkflowExtensionsReque async def post(self,body: Optional[CustomCalloutExtension] = None, request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CustomCalloutExtension]: """ - Create new navigation property to customWorkflowExtensions for identityGovernance + Create a new accessPackageAssignmentRequestWorkflowExtension or accessPackageAssignmentWorkflowExtension object and add it to an existing accessPackageCatalog object. You must explicitly provide an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. 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/accesspackagecatalog-post-accesspackagecustomworkflowextensions?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -90,24 +92,24 @@ async def post(self,body: Optional[CustomCalloutExtension] = None, request_confi def to_get_request_information(self,request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get customWorkflowExtensions from identityGovernance + Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the customAccessPackageWorkflowExtension objects for the catalog that the caller has access to read. Each object includes an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomCalloutExtension] = None, request_configuration: Optional[CustomWorkflowExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create new navigation property to customWorkflowExtensions for identityGovernance + Create a new accessPackageAssignmentRequestWorkflowExtension or accessPackageAssignmentWorkflowExtension object and add it to an existing accessPackageCatalog object. You must explicitly provide an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -115,13 +117,13 @@ def to_post_request_information(self,body: Optional[CustomCalloutExtension] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustomWorkflowExtensionsRequestBuilderGetQueryParameters(): """ - Get customWorkflowExtensions from identityGovernance + Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the customAccessPackageWorkflowExtension objects for the catalog that the caller has access to read. Each object includes an @odata.type property that indicates whether the object is an accessPackageAssignmentRequestWorkflowExtension or an accessPackageAssignmentWorkflowExtension. This API is available in the following national cloud deployments. """ 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 e67b88a9d7b..a89aefd928a 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 @@ -28,9 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete navigation property customWorkflowExtensions for identityGovernance + Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -47,9 +48,10 @@ async def delete(self,request_configuration: Optional[CustomCalloutExtensionItem async def get(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomCalloutExtension]: """ - Get customWorkflowExtensions from identityGovernance + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. This API is available in the following national cloud deployments. 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 """ request_info = self.to_get_request_information( request_configuration @@ -68,10 +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 navigation property customWorkflowExtensions in identityGovernance + Update the properties of an accessPackageAssignmentWorkflowExtension 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 """ if not body: raise TypeError("body cannot be null.") @@ -92,39 +95,39 @@ async def patch(self,body: Optional[CustomCalloutExtension] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete navigation property customWorkflowExtensions for identityGovernance + Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get customWorkflowExtensions from identityGovernance + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomCalloutExtension] = None, request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the navigation property customWorkflowExtensions in identityGovernance + Update the properties of an accessPackageAssignmentWorkflowExtension object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -132,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CustomCalloutExtension] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +168,7 @@ class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class CustomCalloutExtensionItemRequestBuilderGetQueryParameters(): """ - Get customWorkflowExtensions from identityGovernance + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/count/count_request_builder.py index f304ab78d3d..0e0fa18db3c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/access_package_resource_role_item_request_builder.py index 689b814e6f3..745c7159438 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/environment/environment_request_builder.py index ee5aaf10bd6..6bc387f946d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/resource_request_builder.py index 45f71a0e80c..213c087bb34 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/count/count_request_builder.py index 570795a272e..3091b45091a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 3419874f72b..f6614dc0ff4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/roles_request_builder.py index 6372a65fe46..747a214a4b7 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/count/count_request_builder.py index 6290336110f..67fcaa6de40 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 09e2630d3e0..2860cd09446 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index c8fdab4413c..c419066c119 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py index 3650ec00d54..d69900c269f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py index 1ea20676d26..8d77d751082 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 86c00ff2345..e476d0bd56e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py index dd8a0611656..0fec7653ff1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/scopes_request_builder.py index b21e3b63fcb..850768453d1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/resource_roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/resource_roles_request_builder.py index 647910ae556..7ece1d2e8a9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/resource_roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_roles/resource_roles_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_resource_role_id(self,access_package_resource_role_id: str async def get(self,request_configuration: Optional[ResourceRolesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageResourceRoleCollectionResponse]: """ - Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. + Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceRoleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-list-resourceroles?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessPackageResourceRole] = None, request_co def to_get_request_information(self,request_configuration: Optional[ResourceRolesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. + Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[ResourceRolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourceRolesRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. + Retrieve a list of accessPackageResourceRole objects of an accessPackageResource in an accessPackageCatalog. The resource should have been added to the catalog by creating an accessPackageResourceRequest. This list of roles can then be used by the caller to select a role, which is needed when subsequently creating an accessPackageResourceRoleScope. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/count/count_request_builder.py index 1d8488d8ef7..962655757dc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/access_package_resource_scope_item_request_builder.py index 395e3179c3c..3489fd080ea 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/environment/environment_request_builder.py index f25eb10b8b3..a228df3afa8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/resource_request_builder.py index 8045a2ee3fe..f7137bb5301 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/count/count_request_builder.py index 38d58dcc0bf..001f4a89a21 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 373cecd15a3..ba24fa59ad1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index d2c7bbc2fe7..bc900dc3c87 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py index 9e8662424e8..9270b7748b8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py index 713efb6999a..ce888fe5679 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 01bb28489ce..9a073f51e81 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py index e0ff1afbcc9..52ee15d9650 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/roles_request_builder.py index dd3403095dc..448bbe4490f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/count/count_request_builder.py index 38e1bc556c4..5eab27c4fb3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 8bda6728924..28545dcd3c1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/scopes_request_builder.py index a2ff0e79504..0f3fde9be8a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/resource_scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/resource_scopes_request_builder.py index 4a35266e8e0..0c48379b60d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/resource_scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resource_scopes/resource_scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceScop Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ResourceScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/count/count_request_builder.py index 6ede3135df7..abd7963e852 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/access_package_resource_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/access_package_resource_item_request_builder.py index b6d5f793e26..b5f6e671376 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/access_package_resource_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/access_package_resource_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[AccessPackageResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/environment/environment_request_builder.py index 85409d57524..e244fcdd2f3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/count/count_request_builder.py index f121ea0ead0..d32d71c8f8d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/access_package_resource_role_item_request_builder.py index 5596e0d489a..6a3616d9004 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/environment/environment_request_builder.py index a441ae85fc8..fd6ac99b550 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/resource_request_builder.py index f9a50d151d1..3c3acd74056 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/count/count_request_builder.py index ed53e259a82..ba07bc90a4a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index e9aa70b0b28..d640705bae0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index 5f35d5ff816..5aeb6124977 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py index 7e8fcb808b7..f6dbd26a702 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/scopes_request_builder.py index 36e35e007bb..97b96c8d08a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/roles_request_builder.py index ee5a1cfea83..9b89ec7d46a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/count/count_request_builder.py index 33a60c66a22..7b6b74bb2ef 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py index 4910f577357..1c3a8c6e32b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/environment/environment_request_builder.py index 1ca4c5455d4..94ef92817b9 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/resource_request_builder.py index c4f5f8dcdbd..006e69790e0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/count/count_request_builder.py index 90216f913b2..ada6e56ef3f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 76834a8f2e8..67ab2d0b89e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index bd3ab19757f..48d78200e83 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py index 3131ad4e0b8..bf520be2376 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/roles_request_builder.py index b5b985d4244..ef045033cf1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/scopes_request_builder.py index f5977c58fc9..932a6e9d3ff 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/item/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/resources_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/resources_request_builder.py index 3acea5846a4..b01a36dc764 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/resources_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/resources/resources_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_resource_id(self,access_package_resource_id: str) -> Acces async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageResourceCollectionResponse]: """ - Retrieve a list of accessPackageResource objects in an accessPackageCatalog. + Retrieve a list of accessPackageResource objects in an accessPackageCatalog. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/accesspackagecatalog-list-resources?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AccessPackageResource] = None, request_config def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageResource objects in an accessPackageCatalog. + Retrieve a list of accessPackageResource objects in an accessPackageCatalog. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResource] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageResource objects in an accessPackageCatalog. + Retrieve a list of accessPackageResource objects in an accessPackageCatalog. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/environment/environment_request_builder.py index 4d5123ff3fc..28dbe287033 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/resource_request_builder.py index da1b5b8784c..c66f62c8d90 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/count/count_request_builder.py index 5a18395ce3b..b2f042d7bd0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 523e41adf34..84b8fcd7e33 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/environment/environment_request_builder.py index af78e864a85..55b2eafa8e5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/resource_request_builder.py index 70d7afa9828..cffe88b6e47 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/count/count_request_builder.py index 4af10ff8bc2..6c9e660f590 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 36dccd032b7..c2fd59de9da 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index 60a94bef4aa..7d01316bc5e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/resource_request_builder.py index 6c4e60ac2da..1c421515268 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/scopes_request_builder.py index 5d0598ca05f..f8da89e04cf 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/roles_request_builder.py index d6fec132526..bbbad664461 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/count/count_request_builder.py index e40dae199a1..fdd42649418 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 5ab38f6bf08..32a0db04b98 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/environment/environment_request_builder.py index b12f7cdf416..233e4bf9b83 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/resource_request_builder.py index af39fc91282..795dd35cd67 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/count/count_request_builder.py index 5a7be1c00c8..4aef2e77158 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index deb78bd0c33..262754235aa 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index 80ad65792cf..75429cdeb42 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/resource_request_builder.py index 82058f24e4e..d273f715af6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/roles_request_builder.py index 10cd05820cc..9ea16dfb0b5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/scopes_request_builder.py index 0d7d0881503..b04bd503e29 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/resource_requests_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/resource_requests_request_builder.py index 040d3a0725c..c5f8a67974f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/resource_requests_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/resource_requests_request_builder.py @@ -45,7 +45,7 @@ def by_access_package_resource_request_id(self,access_package_resource_request_i async def get(self,request_configuration: Optional[ResourceRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessPackageResourceRequestCollectionResponse]: """ - Retrieve a list of accessPackageResourceRequest objects. + Retrieve a list of accessPackageResourceRequest objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagement-list-resourcerequests?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ResourceRequestsRequestBuilde async def post(self,body: Optional[AccessPackageResourceRequest] = None, request_configuration: Optional[ResourceRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessPackageResourceRequest]: """ - Create a new accessPackageResourceRequest object to request the addition of a resource to an access package catalog, update of a resource, or the removal of a resource from a catalog. A resource must be included in an access package catalog before a role of that resource can be added to an access package. To add an Azure AD group as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadGroup and the value of the originId is the identifier of the group. To add an Azure AD application as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadApplication and the value of the originId is the identifier of the servicePrincipal. To add a SharePoint Online site an as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be SharePointOnline and the value of the originId is the URI of the site. To remove a resource from a catalog, set the requestType to be adminRemove, and the resource to contain the id of the resource object to be removed. The resource object can be retrieved using list resources. + Create a new accessPackageResourceRequest object to request the addition of a resource to an access package catalog, update of a resource, or the removal of a resource from a catalog. A resource must be included in an access package catalog before a role of that resource can be added to an access package. To add a Microsoft Entra group as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadGroup and the value of the originId is the identifier of the group. To add a Microsoft Entra application as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadApplication and the value of the originId is the identifier of the servicePrincipal. To add a SharePoint Online site an as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be SharePointOnline and the value of the originId is the URI of the site. To remove a resource from a catalog, set the requestType to be adminRemove, and the resource to contain the id of the resource object to be removed. The resource object can be retrieved using list resources. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageResourceRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AccessPackageResourceRequest] = None, request def to_get_request_information(self,request_configuration: Optional[ResourceRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of accessPackageResourceRequest objects. + Retrieve a list of accessPackageResourceRequest objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRequest] = None, request_configuration: Optional[ResourceRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new accessPackageResourceRequest object to request the addition of a resource to an access package catalog, update of a resource, or the removal of a resource from a catalog. A resource must be included in an access package catalog before a role of that resource can be added to an access package. To add an Azure AD group as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadGroup and the value of the originId is the identifier of the group. To add an Azure AD application as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadApplication and the value of the originId is the identifier of the servicePrincipal. To add a SharePoint Online site an as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be SharePointOnline and the value of the originId is the URI of the site. To remove a resource from a catalog, set the requestType to be adminRemove, and the resource to contain the id of the resource object to be removed. The resource object can be retrieved using list resources. + Create a new accessPackageResourceRequest object to request the addition of a resource to an access package catalog, update of a resource, or the removal of a resource from a catalog. A resource must be included in an access package catalog before a role of that resource can be added to an access package. To add a Microsoft Entra group as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadGroup and the value of the originId is the identifier of the group. To add a Microsoft Entra application as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be AadApplication and the value of the originId is the identifier of the servicePrincipal. To add a SharePoint Online site an as a resource to a catalog, set the requestType to be adminAdd, and a resource representing the resource. The value of the originSystem property within the resource should be SharePointOnline and the value of the originId is the URI of the site. To remove a resource from a catalog, set the requestType to be adminRemove, and the resource to contain the id of the resource object to be removed. The resource object can be retrieved using list resources. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourceRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of accessPackageResourceRequest objects. + Retrieve a list of accessPackageResourceRequest objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/count/count_request_builder.py index ada6ae8337e..78a89dbe923 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py index c8d053585d4..f4d774d524d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/access_package_resource_role_scope_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRoleScope] = None, request_configuration: Optional[AccessPackageResourceRoleScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRoleSc if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/environment/environment_request_builder.py index 5c699f50e04..2365b98c464 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/resource_request_builder.py index a5eb5f5ee1e..1532a752809 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py index 30aa4e349f6..f83cca1e96f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py index 2167b181d0c..199cbef9c50 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/roles_request_builder.py index 0d0c3cb19fb..2b341a285dc 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py index 520e098cedc..e93b498b947 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 3690c86953b..dc5f37fd249 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py index a2a2d87e9e1..dd4cd0ed3e2 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py index ad4cb1f398c..c9e005d9732 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py index 37f4b588f22..ec4c405bc6c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index e9fd03e0d44..577fa07a0b7 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py index b9c22d39adb..07fb70e3312 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py index 7f3f8ef90c8..976adf245c4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/role_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/role_request_builder.py index f0a9a668a78..26436a381d0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/role_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/role/role_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[RoleReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RoleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RoleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py index 1a2c1948ed5..3fb58ee46c6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/resource_request_builder.py index 087acaf3da2..3a21ef08c50 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/resource_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py index 62e46327496..eb4448f0c3b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py index 384d1198e5b..2e59783dbab 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py index 46884fae421..943391bb844 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py index 01245323ffc..f93f2fc30a2 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py index b1c34b7b97d..8debebe0bc0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 532067721f9..a186cc3b08f 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py index 008001a458b..aca1b0e999b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py index 090c3e58b85..3cbd000a929 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py index 55783bc63e8..20fbef9233e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py index 3679fa47bf2..2216447aa21 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py index a65d1f85e99..7e0353f1f0e 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/scope_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/scope_request_builder.py index 389867c5b7b..5c2a904a3bd 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/scope_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/item/scope/scope_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ScopeRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopeRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/resource_role_scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/resource_role_scopes_request_builder.py index 988ef773cb1..eb9a82ada6b 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/resource_role_scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_role_scopes/resource_role_scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRoleScope] = None, request_configuration: Optional[ResourceRoleScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRoleSco if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/count/count_request_builder.py index 7ffacb9c490..c0da7743bac 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/access_package_resource_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/access_package_resource_item_request_builder.py index 95aa75c67f6..d9de56392ad 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/access_package_resource_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/access_package_resource_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[AccessPackageResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/environment/environment_request_builder.py index 2da53da6e78..ce00a1c67a1 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/count/count_request_builder.py index 52702513474..45e23d38608 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/access_package_resource_role_item_request_builder.py index 7a62ae3a2f8..50b31e410a3 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/environment/environment_request_builder.py index 69bc1ea9c03..b1221a70ba5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/resource_request_builder.py index cf3e090bf5f..adae96eb23c 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/count/count_request_builder.py index 4b1c01b88ec..e3e885c55e4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py index af1f112a857..1aef0634c79 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py index 226c2f19f27..f45f83ab2d6 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py index 64c26edaca8..251838980a4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/scopes_request_builder.py index 25eedc2b21b..775d3206561 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/item/resource/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/roles_request_builder.py index d03dc99bdda..df0576591f4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/count/count_request_builder.py index 2c0ce089334..610640a810a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py index 308ef5756c6..b9d4976eb7a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/access_package_resource_scope_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[AccessPackageResourceScopeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/environment/environment_request_builder.py index cde79a307e8..2999505f002 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/resource_request_builder.py index 6ef98b7b38b..7eaac72f122 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/resource_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/count/count_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/count/count_request_builder.py index 3821d23d47f..b7dacc3cc48 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py index 6ade40c1d5e..bb1c5ffe892 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/access_package_resource_role_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AccessPackag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[AccessPackageResourceRoleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResourceRole] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py index 351b0795e88..fe8574c55b4 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/environment/environment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EnvironmentR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EnvironmentRequestBuilder: diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py index b3fb3690924..70629d4bc7d 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/item/resource/resource_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AccessPackageResource] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/roles_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/roles_request_builder.py index b385e35e515..9bdb9b2c279 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/roles_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/item/resource/roles/roles_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RolesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceRole] = None, request_configuration: Optional[RolesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceRole] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/scopes_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/scopes_request_builder.py index 39ab70cf163..b6d021350f5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/scopes_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/item/scopes/scopes_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResourceScope] = None, request_configuration: Optional[ScopesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResourceScope] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/resources/resources_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resources/resources_request_builder.py index 8189367e197..2a1eb7ffef8 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resources/resources_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resources/resources_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourcesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AccessPackageResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AccessPackageResource] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/entitlement_management/settings/settings_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/settings/settings_request_builder.py index 7792582c2fe..fa18ce14898 100644 --- a/msgraph/generated/identity_governance/entitlement_management/settings/settings_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/settings/settings_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SettingsRequestBuilderDele async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[EntitlementManagementSettings]: """ - Retrieve the properties of an entitlementManagementSettings object. + Retrieve the properties of an entitlementManagementSettings object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EntitlementManagementSettings] Find more info here: https://learn.microsoft.com/graph/api/entitlementmanagementsettings-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequ async def patch(self,body: Optional[EntitlementManagementSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[EntitlementManagementSettings]: """ - Update an existing entitlementManagementSettings object to change one or more of its properties. + Update an existing entitlementManagementSettings object to change one or more of its properties. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EntitlementManagementSettings] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[SettingsR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of an entitlementManagementSettings object. + Retrieve the properties of an entitlementManagementSettings object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EntitlementManagementSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an existing entitlementManagementSettings object to change one or more of its properties. + Update an existing entitlementManagementSettings object to change one or more of its properties. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[EntitlementManagementSettin if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class SettingsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class SettingsRequestBuilderGetQueryParameters(): """ - Retrieve the properties of an entitlementManagementSettings object. + Retrieve the properties of an entitlementManagementSettings object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/identity_governance_request_builder.py b/msgraph/generated/identity_governance/identity_governance_request_builder.py index b0642179c72..e52e8805458 100644 --- a/msgraph/generated/identity_governance/identity_governance_request_builder.py +++ b/msgraph/generated/identity_governance/identity_governance_request_builder.py @@ -16,6 +16,7 @@ from .app_consent.app_consent_request_builder import AppConsentRequestBuilder from .entitlement_management.entitlement_management_request_builder import EntitlementManagementRequestBuilder from .lifecycle_workflows.lifecycle_workflows_request_builder import LifecycleWorkflowsRequestBuilder + from .privileged_access.privileged_access_request_builder import PrivilegedAccessRequestBuilder from .terms_of_use.terms_of_use_request_builder import TermsOfUseRequestBuilder class IdentityGovernanceRequestBuilder(BaseRequestBuilder): @@ -83,14 +84,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityGove Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityGovernance] = None, request_configuration: Optional[IdentityGovernanceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -103,13 +104,13 @@ def to_patch_request_information(self,body: Optional[IdentityGovernance] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,6 +160,15 @@ def lifecycle_workflows(self) -> LifecycleWorkflowsRequestBuilder: return LifecycleWorkflowsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def privileged_access(self) -> PrivilegedAccessRequestBuilder: + """ + Provides operations to manage the privilegedAccess property of the microsoft.graph.identityGovernance entity. + """ + from .privileged_access.privileged_access_request_builder import PrivilegedAccessRequestBuilder + + return PrivilegedAccessRequestBuilder(self.request_adapter, self.path_parameters) + @property def terms_of_use(self) -> TermsOfUseRequestBuilder: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/count/count_request_builder.py index dfa32ef30ac..3ea770ffa86 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/custom_task_extensions_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/custom_task_extensions_request_builder.py index ed3af22bae0..e1121574cfe 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/custom_task_extensions_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/custom_task_extensions_request_builder.py @@ -45,7 +45,7 @@ def by_custom_task_extension_id(self,custom_task_extension_id: str) -> CustomTas async def get(self,request_configuration: Optional[CustomTaskExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomTaskExtensionCollectionResponse]: """ - Get a list of the customTaskExtension objects and their properties. + Get a list of the customTaskExtension objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomTaskExtensionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-lifecycleworkflowscontainer-list-customtaskextensions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CustomTaskExtensionsRequestBu async def post(self,body: Optional[CustomTaskExtension] = None, request_configuration: Optional[CustomTaskExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CustomTaskExtension]: """ - Create a new customTaskExtension object. + Create a new customTaskExtension object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomTaskExtension] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CustomTaskExtension] = None, request_configur def to_get_request_information(self,request_configuration: Optional[CustomTaskExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the customTaskExtension objects and their properties. + Get a list of the customTaskExtension objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomTaskExtension] = None, request_configuration: Optional[CustomTaskExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new customTaskExtension object. + Create a new customTaskExtension object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CustomTaskExtension] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustomTaskExtensionsRequestBuilderGetQueryParameters(): """ - Get a list of the customTaskExtension objects and their properties. + Get a list of the customTaskExtension objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/created_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/created_by_request_builder.py index 85e55a9b97c..04f437f7ff9 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/created_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/created_by_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedByRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py index faab0cc41ad..caa932e8591 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..b1f42b3468b --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..7e87a2b5fad --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension-id}/createdBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/custom_task_extension_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/custom_task_extension_item_request_builder.py index 6303d95668e..0ec6792e0da 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/custom_task_extension_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/custom_task_extension_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CustomTaskExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a customTaskExtension object. A custom task extension can only be deleted if it is not referenced in any task objects in a lifecycle workflow. + Delete a customTaskExtension object. A custom task extension can only be deleted if it is not referenced in any task objects in a lifecycle workflow. This API is available in the following national cloud deployments. 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/identitygovernance-customtaskextension-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[CustomTaskExtensionItemReq async def get(self,request_configuration: Optional[CustomTaskExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomTaskExtension]: """ - Read the properties and relationships of a customTaskExtension object. + Read the properties and relationships of a customTaskExtension object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomTaskExtension] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-customtaskextension-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[CustomTaskExtensionItemReques async def patch(self,body: Optional[CustomTaskExtension] = None, request_configuration: Optional[CustomTaskExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CustomTaskExtension]: """ - Update the properties of a customTaskExtension object. + Update the properties of a customTaskExtension object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomTaskExtension] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[CustomTaskExtension] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[CustomTaskExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a customTaskExtension object. A custom task extension can only be deleted if it is not referenced in any task objects in a lifecycle workflow. + Delete a customTaskExtension object. A custom task extension can only be deleted if it is not referenced in any task objects in a lifecycle workflow. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CustomTaskExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a customTaskExtension object. + Read the properties and relationships of a customTaskExtension object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CustomTaskExtension] = None, request_configuration: Optional[CustomTaskExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a customTaskExtension object. + Update the properties of a customTaskExtension object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[CustomTaskExtension] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class CustomTaskExtensionItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class CustomTaskExtensionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a customTaskExtension object. + Read the properties and relationships of a customTaskExtension object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/last_modified_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/last_modified_by_request_builder.py index 2b9393b57a0..cbfb71dd57b 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/last_modified_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/last_modified_by_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastModifiedByRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py index 6eeff6c508e..9ed855bee2d 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..7231f44929d --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..152e9eb8ad0 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/custom_task_extensions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension-id}/lastModifiedBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/deleted_items_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/deleted_items_request_builder.py index a7af7694918..637b2a05457 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/deleted_items_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/deleted_items_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeletedIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeletedItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[DeletedItems Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeletedItemsRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/count/count_request_builder.py index ebedf24b12d..6a88e3c72b3 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/created_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/created_by_request_builder.py index 7fed3fc2109..fd23a063319 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/created_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/created_by_request_builder.py @@ -13,6 +13,7 @@ from .......models.o_data_errors.o_data_error import ODataError from .......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedByRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py index dbb5f9ce550..dded31586d8 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..1d66bd3e16b --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..09d1fc2d1af --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/createdBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/count/count_request_builder.py index 786ecc4ae8b..f8480691206 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/execution_scope_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/execution_scope_request_builder.py index cfb4512f802..794b5fbb2ca 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/execution_scope_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/execution_scope_request_builder.py @@ -44,7 +44,7 @@ def by_user_processing_result_id(self,user_processing_result_id: str) -> UserPro async def get(self,request_configuration: Optional[ExecutionScopeRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResultCollectionResponse]: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResultCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[ExecutionScopeRequestBuilderG def to_get_request_information(self,request_configuration: Optional[ExecutionScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ExecutionScopeRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExecutionScopeRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py index a6b00d5736c..9e48e270a6d 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResult]: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResult] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[UserProcessingResultItemReque def to_get_request_information(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultItemRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> UserProcessingResultItemRequ @dataclass class UserProcessingResultItemRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/last_modified_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/last_modified_by_request_builder.py index 3bef163271d..86b148623cb 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/last_modified_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/last_modified_by_request_builder.py @@ -13,6 +13,7 @@ from .......models.o_data_errors.o_data_error import ODataError from .......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderG def to_get_request_information(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastModifiedByRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py index f53ab717dd1..65223e9009e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..14e76120a18 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..5abd20cd64c --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/lastModifiedBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py index 6ec2a05fd6b..ad5bdece99d 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ActivatePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceActivateRequestBuilderPostRequestConfiguration] = None) -> None: """ - Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. + Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. This API is available in the following national cloud deployments. 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[ActivatePostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[ActivatePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceActivateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. + Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ActivatePostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py index 342dff7535f..190a0539b72 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateNewVersionPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilderPostRequestConfiguration] = None) -> Optional[Workflow]: """ - Create a new version of the workflow object. + Create a new version of the workflow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateNewVersionPostRequestBody] = None, requ def to_post_request_information(self,body: Optional[CreateNewVersionPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new version of the workflow object. + Create a new version of the workflow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateNewVersionPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py index 0ec9cefef09..3595bc9d657 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceRestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[Workflow]: """ - Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Azure AD automatically permanently deletes it. + Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Microsoft Entra ID automatically permanently deletes it. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[MicrosoftGraphIdentityGovern def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceRestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Azure AD automatically permanently deletes it. + Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Microsoft Entra ID automatically permanently deletes it. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceRestoreRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/count/count_request_builder.py index d895aacfd85..3b398e109ce 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/run_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/run_item_request_builder.py index 76376a51dcd..24a8ed6b378 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/run_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/run_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RunItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Run]: """ - Read the properties and relationships of a run object. + Read the properties and relationships of a run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Run] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-run-get?view=graph-rest-1.0 @@ -52,19 +52,19 @@ async def get(self,request_configuration: Optional[RunItemRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[RunItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a run object. + Read the properties and relationships of a run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RunItemRequestBuilder: @@ -98,7 +98,7 @@ def user_processing_results(self) -> UserProcessingResultsRequestBuilder: @dataclass class RunItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a run object. + Read the properties and relationships of a run object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/count/count_request_builder.py index 21abd011756..e26dd803453 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 1c43ae0acc4..31ee563672c 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 893777e7140..6a816430034 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..d414a562031 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..ada9d74dc88 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/runs/{run-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py index 11904e30935..8ffa9039cb9 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ...........models.o_data_errors.o_data_error import ODataError from ...........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py index 734a6a708d7..21aa46a95c1 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py index a26737d7a2e..58def79cd0f 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py index b3cedd10b6c..051780a92de 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the taskProcessingResult resources for a run. + Get the taskProcessingResult resources for a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-run-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the taskProcessingResult resources for a run. + Get the taskProcessingResult resources for a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the taskProcessingResult resources for a run. + Get the taskProcessingResult resources for a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/count/count_request_builder.py index 44769da9aac..3a5abad2f51 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index b2cb776aae9..b57656ac7f5 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..e728b73c4ea --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..3e46f3097ee --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/runs/{run-id}/userProcessingResults/{userProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py index bc7be1f3839..d4129a2ad14 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ...........models.o_data_errors.o_data_error import ODataError from ...........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[SubjectReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py index e257121b91f..a8a379e0334 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 87f43a9ab97..e080ca9162a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index e9dbffcd1e5..e8faa1b1642 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..050d5dd636e --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..7c1dd08c906 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/runs/{run-id}/userProcessingResults/{userProcessingResult-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py index d55728ba2eb..4107503f228 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from .............models.o_data_errors.o_data_error import ODataError from .............models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py index 702ab63a0cc..b8c36faa920 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py index ef77312ac4a..6ee0ec6b20e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py index 7781858cb54..67b5ea23e6c 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-userprocessingresult-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py index 9102b3fad2a..00e293057ee 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResult]: """ - Get the user processing result of a user processing result of a run. + Get the user processing result of a user processing result of a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResult] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-userprocessingresult-get?view=graph-rest-1.0 @@ -52,19 +52,19 @@ async def get(self,request_configuration: Optional[UserProcessingResultItemReque def to_get_request_information(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the user processing result of a user processing result of a run. + Get the user processing result of a user processing result of a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultItemRequestBuilder: @@ -98,7 +98,7 @@ def task_processing_results(self) -> TaskProcessingResultsRequestBuilder: @dataclass class UserProcessingResultItemRequestBuilderGetQueryParameters(): """ - Get the user processing result of a user processing result of a run. + Get the user processing result of a user processing result of a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index 3add17425b8..33289d21713 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[UserSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py index 66aef250aee..5069e73a6d0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py @@ -46,7 +46,7 @@ def by_user_processing_result_id(self,user_processing_result_id: str) -> UserPro async def get(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResultCollectionResponse]: """ - Get user processing results of a workflow run object. + Get user processing results of a workflow run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-run-list-userprocessingresults?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get user processing results of a workflow run object. + Get user processing results of a workflow run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserProcessingResultsRequestBuilderGetQueryParameters(): """ - Get user processing results of a workflow run object. + Get user processing results of a workflow run object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index caefa8daed7..92508d604a3 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[RunSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/runs_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/runs_request_builder.py index 9255635f7b6..b472c655cf5 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/runs_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/runs/runs_request_builder.py @@ -46,7 +46,7 @@ def by_run_id(self,run_id: str) -> RunItemRequestBuilder: async def get(self,request_configuration: Optional[RunsRequestBuilderGetRequestConfiguration] = None) -> Optional[RunCollectionResponse]: """ - Get a list of the run objects and their properties for a lifecycle workflow. + Get a list of the run objects and their properties for a lifecycle workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RunCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-runs?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[RunsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the run objects and their properties for a lifecycle workflow. + Get a list of the run objects and their properties for a lifecycle workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RunsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RunsRequestBuilderGetQueryParameters(): """ - Get a list of the run objects and their properties for a lifecycle workflow. + Get a list of the run objects and their properties for a lifecycle workflow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/count/count_request_builder.py index bdcecb35a28..fdf7d8a9f44 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task/task_request_builder.py index a0c7bc1d1e5..faa6aa0da21 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py index cbbbf165133..64120999b4a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskDefinitionRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py index b0ec34f1032..463b3d34358 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 188973b0dc7..05ad55dd30a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 588c7b871f5..291bd3b9707 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..6c3bfd6be20 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..17928bfa6a2 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/taskReports/{taskReport-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py index 3bfa9e4b60a..d310004b3ec 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ...........models.o_data_errors.o_data_error import ODataError from ...........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py index c0c6ed70ab8..d65c229e4cc 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py index bc86f879461..d22314ad8ba 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py index d83e1619de0..ecaeba144ab 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the task processing result resources from the taskReport. + Get the task processing result resources from the taskReport. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-taskreport-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the task processing result resources from the taskReport. + Get the task processing result resources from the taskReport. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the task processing result resources from the taskReport. + Get the task processing result resources from the taskReport. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_report_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_report_item_request_builder.py index 4d8196d3866..85065b0d228 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_report_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/item/task_report_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskReportIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskReportItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index 6fdca5c32da..70df37d47f7 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskReportSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/task_reports_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/task_reports_request_builder.py index 8c365c2af50..e841a36073e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/task_reports_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/task_reports/task_reports_request_builder.py @@ -46,7 +46,7 @@ def by_task_report_id(self,task_report_id: str) -> TaskReportItemRequestBuilder: async def get(self,request_configuration: Optional[TaskReportsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskReportCollectionResponse]: """ - Get a list of the taskReport objects and their properties. + Get a list of the taskReport objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskReportCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-taskreports?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[TaskReportsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the taskReport objects and their properties. + Get a list of the taskReport objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskReportsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskReportsRequestBuilderGetQueryParameters(): """ - Get a list of the taskReport objects and their properties. + Get a list of the taskReport objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/count/count_request_builder.py index b4954fb80cf..43ad44166cd 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_item_request_builder.py index f9402999c1c..2b6ca515258 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TaskItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Task] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py index 5fcafaa1294..25bbe5fe95b 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index c13fe7fa62e..517bf60f0d9 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 75968ebfeb2..dee43812284 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..6eef7a4071f --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..ee18ad907a8 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/tasks/{task-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py index 6bdec1815a2..71168a74f30 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ...........models.o_data_errors.o_data_error import ODataError from ...........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py index 7dcd0c1933d..2f42c54522e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py index cdb6a305d5a..659ef074d8e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py index 5301a3bb24c..ec750a85d2e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/tasks_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/tasks_request_builder.py index 89bcb6d47fb..6e054c2d3df 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/tasks/tasks_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Task] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/count/count_request_builder.py index c85f2b5fe10..92ac44320c0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index f24b73f9a75..9bacc1d927e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..057627999da --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..3a5bd10f787 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/userProcessingResults/{userProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/subject_request_builder.py index 6d6c8011316..59d7487881e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from .........models.o_data_errors.o_data_error import ODataError from .........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[SubjectReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py index 889f0d127a2..c249a8e7c6f 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 1c0279fcf9b..d9f2cdefcc9 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index bac2002888c..e1d8499b342 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..b926295ebd5 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..169ac2ae815 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/userProcessingResults/{userProcessingResult-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py index 14178a79423..dee6343ca03 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ...........models.o_data_errors.o_data_error import ODataError from ...........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py index 7335ed93eae..67ca08e3d04 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py index 81b5a428fd0..0abed4d9fb9 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py index e79688e2d35..c4425df1a14 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-userprocessingresult-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py index a19276782b2..917f15e9632 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[UserProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index 68ba63fb086..4e7c80fdc83 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[UserSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/user_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/user_processing_results_request_builder.py index 35ddd1fce6a..11ab120a795 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/user_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/user_processing_results/user_processing_results_request_builder.py @@ -46,7 +46,7 @@ def by_user_processing_result_id(self,user_processing_result_id: str) -> UserPro async def get(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResultCollectionResponse]: """ - Get the userProcessingResult resources for a workflow. + Get the userProcessingResult resources for a workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-userprocessingresults?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the userProcessingResult resources for a workflow. + Get the userProcessingResult resources for a workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the userProcessingResult resources for a workflow. + Get the userProcessingResult resources for a workflow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/count/count_request_builder.py index 0a29665c6e5..b33ba3afecd 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/created_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/created_by_request_builder.py index 3f72f30a353..159e82e1e66 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/created_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/created_by_request_builder.py @@ -13,6 +13,7 @@ from .........models.o_data_errors.o_data_error import ODataError from .........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedByRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py index dd316051247..96090a75b79 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..487feb64bbc --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..6a7035d0dcc --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/versions/{workflowVersion-versionNumber}/createdBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py index d8bb0d52c23..ccf86440e6a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py @@ -13,6 +13,7 @@ from .........models.o_data_errors.o_data_error import ODataError from .........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderG def to_get_request_information(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastModifiedByRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py index ff0987a3de7..2c14e2b46c0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..9c7b53f33b8 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..b6c6fdcbb9a --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/versions/{workflowVersion-versionNumber}/lastModifiedBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/count/count_request_builder.py index 7e363c96580..bf4b624b7f4 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_item_request_builder.py index fd68dced9cc..17c4cb112ba 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TaskItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Task] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py index 3bcb2f1f009..7b87a96ddf7 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 176f1a40afc..a2568c033e3 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 352cfb1edeb..cf0399c0bd8 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..49bea4fe18e --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..98fca600340 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow-id}/versions/{workflowVersion-versionNumber}/tasks/{task-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py index d21fd42b637..9b1d6b7502e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from .............models.o_data_errors.o_data_error import ODataError from .............models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py index 62f573aa407..90f37734379 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py index 02c2fdeb2e7..4c96fcd2362 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py index 480486a2020..f351f308d6e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/tasks_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/tasks_request_builder.py index 9d2e58eeee6..1f317c69769 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/tasks/tasks_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Task] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py index 53df3a3c70d..0d3b5378797 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[WorkflowVersionVersionNumberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowVersion]: """ - Read the properties and relationships of a workflowVersion object. + Read the properties and relationships of a workflowVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowVersion] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflowversion-get?view=graph-rest-1.0 @@ -53,19 +53,19 @@ async def get(self,request_configuration: Optional[WorkflowVersionVersionNumberI def to_get_request_information(self,request_configuration: Optional[WorkflowVersionVersionNumberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a workflowVersion object. + Read the properties and relationships of a workflowVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkflowVersionVersionNumberItemRequestBuilder: @@ -108,7 +108,7 @@ def tasks(self) -> TasksRequestBuilder: @dataclass class WorkflowVersionVersionNumberItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a workflowVersion object. + Read the properties and relationships of a workflowVersion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/versions_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/versions_request_builder.py index cf65a70fba1..7c04a2fefc4 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/versions_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/versions/versions_request_builder.py @@ -44,7 +44,7 @@ def by_workflow_version_version_number(self,workflow_version_version_number: int async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowVersionCollectionResponse]: """ - Get a list of the workflowVersion objects and their properties. + Get a list of the workflowVersion objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-versions?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the workflowVersion objects and their properties. + Get a list of the workflowVersion objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> VersionsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - Get a list of the workflowVersion objects and their properties. + Get a list of the workflowVersion objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/workflow_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/workflow_item_request_builder.py index a0d3505ff24..0f5697307fb 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/workflow_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/item/workflow_item_request_builder.py @@ -19,8 +19,8 @@ from .microsoft_graph_identity_governance_create_new_version.microsoft_graph_identity_governance_create_new_version_request_builder import MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder from .microsoft_graph_identity_governance_restore.microsoft_graph_identity_governance_restore_request_builder import MicrosoftGraphIdentityGovernanceRestoreRequestBuilder from .runs.runs_request_builder import RunsRequestBuilder - from .task_reports.task_reports_request_builder import TaskReportsRequestBuilder from .tasks.tasks_request_builder import TasksRequestBuilder + from .task_reports.task_reports_request_builder import TaskReportsRequestBuilder from .user_processing_results.user_processing_results_request_builder import UserProcessingResultsRequestBuilder from .versions.versions_request_builder import VersionsRequestBuilder @@ -39,7 +39,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkflowItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a workflow object. + Delete a workflow object. This API is available in the following national cloud deployments. 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/identitygovernance-deletedItemcontainer-delete?view=graph-rest-1.0 @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[WorkflowItemRequestBuilder async def get(self,request_configuration: Optional[WorkflowItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Workflow]: """ - Retrieve a deleted workflow object. + Retrieve a deleted workflow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-deleteditemcontainer-get?view=graph-rest-1.0 @@ -81,34 +81,34 @@ async def get(self,request_configuration: Optional[WorkflowItemRequestBuilderGet def to_delete_request_information(self,request_configuration: Optional[WorkflowItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a workflow object. + Delete a workflow object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkflowItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a deleted workflow object. + Retrieve a deleted workflow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkflowItemRequestBuilder: @@ -233,7 +233,7 @@ class WorkflowItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class WorkflowItemRequestBuilderGetQueryParameters(): """ - Retrieve a deleted workflow object. + Retrieve a deleted workflow object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/workflows_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/workflows_request_builder.py index 874b9c01112..b5726c5ce30 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/workflows_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/deleted_items/workflows/workflows_request_builder.py @@ -44,7 +44,7 @@ def by_workflow_id(self,workflow_id: str) -> WorkflowItemRequestBuilder: async def get(self,request_configuration: Optional[WorkflowsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowCollectionResponse]: """ - Get a list of the deleted workflow objects and their properties. + Get a list of the deleted workflow objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-lifecycleworkflowscontainer-list-deleteditems?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[WorkflowsRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[WorkflowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the deleted workflow objects and their properties. + Get a list of the deleted workflow objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkflowsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class WorkflowsRequestBuilderGetQueryParameters(): """ - Get a list of the deleted workflow objects and their properties. + Get a list of the deleted workflow objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/lifecycle_workflows_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/lifecycle_workflows_request_builder.py index 51560811ca9..5801b4e0553 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/lifecycle_workflows_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/lifecycle_workflows_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[Lifecycle Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LifecycleWorkflowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[LifecycleWor Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LifecycleWorkflowsContainer] = None, request_configuration: Optional[LifecycleWorkflowsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[LifecycleWorkflowsContainer if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -195,22 +195,22 @@ def task_definitions(self) -> TaskDefinitionsRequestBuilder: return TaskDefinitionsRequestBuilder(self.request_adapter, self.path_parameters) @property - def workflows(self) -> WorkflowsRequestBuilder: + def workflow_templates(self) -> WorkflowTemplatesRequestBuilder: """ - Provides operations to manage the workflows property of the microsoft.graph.identityGovernance.lifecycleWorkflowsContainer entity. + Provides operations to manage the workflowTemplates property of the microsoft.graph.identityGovernance.lifecycleWorkflowsContainer entity. """ - from .workflows.workflows_request_builder import WorkflowsRequestBuilder + from .workflow_templates.workflow_templates_request_builder import WorkflowTemplatesRequestBuilder - return WorkflowsRequestBuilder(self.request_adapter, self.path_parameters) + return WorkflowTemplatesRequestBuilder(self.request_adapter, self.path_parameters) @property - def workflow_templates(self) -> WorkflowTemplatesRequestBuilder: + def workflows(self) -> WorkflowsRequestBuilder: """ - Provides operations to manage the workflowTemplates property of the microsoft.graph.identityGovernance.lifecycleWorkflowsContainer entity. + Provides operations to manage the workflows property of the microsoft.graph.identityGovernance.lifecycleWorkflowsContainer entity. """ - from .workflow_templates.workflow_templates_request_builder import WorkflowTemplatesRequestBuilder + from .workflows.workflows_request_builder import WorkflowsRequestBuilder - return WorkflowTemplatesRequestBuilder(self.request_adapter, self.path_parameters) + return WorkflowsRequestBuilder(self.request_adapter, self.path_parameters) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/settings/settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/settings/settings_request_builder.py index 6b4472efd65..3ed6ebe69dc 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/settings/settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/settings/settings_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[LifecycleManagementSettings]: """ - Read the properties and relationships of a lifecycleManagementSettings object. + Read the properties and relationships of a lifecycleManagementSettings object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LifecycleManagementSettings] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-lifecyclemanagementsettings-get?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequ async def patch(self,body: Optional[LifecycleManagementSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[LifecycleManagementSettings]: """ - Update the properties of a lifecycleManagementSettings object. + Update the properties of a lifecycleManagementSettings object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LifecycleManagementSettings] @@ -75,24 +75,24 @@ async def patch(self,body: Optional[LifecycleManagementSettings] = None, request def to_get_request_information(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a lifecycleManagementSettings object. + Read the properties and relationships of a lifecycleManagementSettings object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LifecycleManagementSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a lifecycleManagementSettings object. + Update the properties of a lifecycleManagementSettings object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[LifecycleManagementSettings if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -123,7 +123,7 @@ def with_url(self,raw_url: Optional[str] = None) -> SettingsRequestBuilder: @dataclass class SettingsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a lifecycleManagementSettings object. + Read the properties and relationships of a lifecycleManagementSettings object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/count/count_request_builder.py index 54c879369fb..5e51127177b 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/item/task_definition_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/item/task_definition_item_request_builder.py index 9c4b8e97e2a..7350c26f990 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/item/task_definition_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/item/task_definition_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TaskDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskDefinition]: """ - Read the details of a built-in workflow task. + Read the details of a built-in workflow task. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskDefinition] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-taskdefinition-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[TaskDefinitionItemRequestBuil def to_get_request_information(self,request_configuration: Optional[TaskDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the details of a built-in workflow task. + Read the details of a built-in workflow task. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskDefinitionItemRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TaskDefinitionItemRequestBui @dataclass class TaskDefinitionItemRequestBuilderGetQueryParameters(): """ - Read the details of a built-in workflow task. + Read the details of a built-in workflow task. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/task_definitions_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/task_definitions_request_builder.py index 8397fef6d05..9359fbb149d 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/task_definitions_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/task_definitions/task_definitions_request_builder.py @@ -44,7 +44,7 @@ def by_task_definition_id(self,task_definition_id: str) -> TaskDefinitionItemReq async def get(self,request_configuration: Optional[TaskDefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskDefinitionCollectionResponse]: """ - Get a list of the taskDefinition objects and their properties. + Get a list of the taskDefinition objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-lifecycleworkflowscontainer-list-taskdefinitions?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskDefinitionsRequestBuilder def to_get_request_information(self,request_configuration: Optional[TaskDefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the taskDefinition objects and their properties. + Get a list of the taskDefinition objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskDefinitionsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskDefinitionsRequestBuilderGetQueryParameters(): """ - Get a list of the taskDefinition objects and their properties. + Get a list of the taskDefinition objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/count/count_request_builder.py index 4d21ddb143b..e7689a18939 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/count/count_request_builder.py index 39c01f3c274..ad15e8d3bcc 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_item_request_builder.py index 9710651fd79..8140bf91997 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/count/count_request_builder.py index d3fc56f7dff..4d7d42854df 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 5a473af15cc..cb2f62227c6 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index e6d8a47a796..d9e5afcf7b8 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..5bf83c8d235 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..dc54cd38e7e --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate-id}/tasks/{task-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py index 1da5680ecf1..0e6bf6b8388 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task/task_request_builder.py index 0d56ce17bac..d262b6047c6 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py index 97bb292bd0e..223245d6a3a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/task_processing_results_request_builder.py index b3e45a9578d..cf12007ef36 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/item/task_processing_results/task_processing_results_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/tasks_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/tasks_request_builder.py index c279e7847ef..0dd920192c8 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/tasks/tasks_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TasksRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/workflow_template_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/workflow_template_item_request_builder.py index 6e3e6b71e91..572f708c066 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/workflow_template_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/item/workflow_template_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[WorkflowTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowTemplate]: """ - Read the properties and relationships of a workflowTemplate object. + Read the properties and relationships of a workflowTemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowTemplate] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflowtemplate-get?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[WorkflowTemplateItemRequestBu def to_get_request_information(self,request_configuration: Optional[WorkflowTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a workflowTemplate object. + Read the properties and relationships of a workflowTemplate object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkflowTemplateItemRequestBuilder: @@ -88,7 +88,7 @@ def tasks(self) -> TasksRequestBuilder: @dataclass class WorkflowTemplateItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a workflowTemplate object. + Read the properties and relationships of a workflowTemplate object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/workflow_templates_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/workflow_templates_request_builder.py index 298e0062950..d502b30af80 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/workflow_templates_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflow_templates/workflow_templates_request_builder.py @@ -44,7 +44,7 @@ def by_workflow_template_id(self,workflow_template_id: str) -> WorkflowTemplateI async def get(self,request_configuration: Optional[WorkflowTemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowTemplateCollectionResponse]: """ - Get a list of the workflowTemplate objects and their properties. + Get a list of the workflowTemplate objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-lifecycleworkflowscontainer-list-workflowtemplates?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[WorkflowTemplatesRequestBuild def to_get_request_information(self,request_configuration: Optional[WorkflowTemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the workflowTemplate objects and their properties. + Get a list of the workflowTemplate objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkflowTemplatesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class WorkflowTemplatesRequestBuilderGetQueryParameters(): """ - Get a list of the workflowTemplate objects and their properties. + Get a list of the workflowTemplate objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/count/count_request_builder.py index d372a075542..d78bbcc7892 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/created_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/created_by_request_builder.py index ec8c21f8ca7..e8ecdebbd32 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/created_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/created_by_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedByRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py index 4a6e37981fb..0bbf10844a2 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..b4f9654fc58 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..1a2d9600c4a --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/createdBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/count/count_request_builder.py index df33cde7763..e1a7a461072 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/execution_scope_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/execution_scope_request_builder.py index c4e013e8447..fa268c4d6cd 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/execution_scope_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/execution_scope_request_builder.py @@ -44,7 +44,7 @@ def by_user_processing_result_id(self,user_processing_result_id: str) -> UserPro async def get(self,request_configuration: Optional[ExecutionScopeRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResultCollectionResponse]: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResultCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[ExecutionScopeRequestBuilderG def to_get_request_information(self,request_configuration: Optional[ExecutionScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ExecutionScopeRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExecutionScopeRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py index 3b10fcd463c..2cf431507e0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/item/user_processing_result_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResult]: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResult] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[UserProcessingResultItemReque def to_get_request_information(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultItemRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> UserProcessingResultItemRequ @dataclass class UserProcessingResultItemRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD identity that last modified the workflow object. + The unique identifier of the Microsoft Entra identity that last modified the workflow object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/last_modified_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/last_modified_by_request_builder.py index 2be015f3ac2..9faa30c6803 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/last_modified_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/last_modified_by_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderG def to_get_request_information(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastModifiedByRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py index a434850d4ee..31d7e984649 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..874f4a62bf7 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..e98294a2a18 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/lastModifiedBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py index 39cb7975e61..ee2ae236fde 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_activate/microsoft_graph_identity_governance_activate_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ActivatePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceActivateRequestBuilderPostRequestConfiguration] = None) -> None: """ - Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. + Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. This API is available in the following national cloud deployments. 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[ActivatePostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[ActivatePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceActivateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. + Run a workflow object on-demand. You can run any workflow on-demand, including scheduled workflows. Workflows created from the 'Real-time employee termination' template are run on-demand only. When you run a workflow on demand, the tasks are executed regardless of whether the user state matches the scope and trigger execution conditions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ActivatePostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py index 8ae927512f7..80271a52043 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_create_new_version/microsoft_graph_identity_governance_create_new_version_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateNewVersionPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilderPostRequestConfiguration] = None) -> Optional[Workflow]: """ - Create a new version of the workflow object. + Create a new version of the workflow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateNewVersionPostRequestBody] = None, requ def to_post_request_information(self,body: Optional[CreateNewVersionPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new version of the workflow object. + Create a new version of the workflow object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateNewVersionPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py index c6f949322b3..f13ec65a36c 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/microsoft_graph_identity_governance_restore/microsoft_graph_identity_governance_restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceRestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[Workflow]: """ - Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Azure AD automatically permanently deletes it. + Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Microsoft Entra ID automatically permanently deletes it. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[MicrosoftGraphIdentityGovern def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceRestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Azure AD automatically permanently deletes it. + Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Microsoft Entra ID automatically permanently deletes it. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceRestoreRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/count/count_request_builder.py index 22f8dcdf7f3..3f4488e9307 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/run_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/run_item_request_builder.py index 0d8fd11e416..60cefaf5926 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/run_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/run_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RunItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Run]: """ - Read the properties and relationships of a run object. + Read the properties and relationships of a run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Run] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-run-get?view=graph-rest-1.0 @@ -52,19 +52,19 @@ async def get(self,request_configuration: Optional[RunItemRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[RunItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a run object. + Read the properties and relationships of a run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RunItemRequestBuilder: @@ -98,7 +98,7 @@ def user_processing_results(self) -> UserProcessingResultsRequestBuilder: @dataclass class RunItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a run object. + Read the properties and relationships of a run object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/count/count_request_builder.py index 59113187aad..72fb4b8a4b0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index b71ea58ea95..a1f9ddc75f1 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 1beb3b54341..949d60b5f67 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..e6fe88625da --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..b43253a8260 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/runs/{run-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py index 98e4994f87c..5afb6d89063 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py index 7b8450564c0..ac72b97b179 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py index dad147ae1b7..4528aba620a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py index 620479a2d3a..0e7acc8c8b1 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the taskProcessingResult resources for a run. + Get the taskProcessingResult resources for a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-run-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the taskProcessingResult resources for a run. + Get the taskProcessingResult resources for a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the taskProcessingResult resources for a run. + Get the taskProcessingResult resources for a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/count/count_request_builder.py index 55bb6ebe53d..3d0be1eb909 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 92447088afe..42bcc4cbcb6 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..a06b0a19dd1 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..7a9bf8f8b36 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/runs/{run-id}/userProcessingResults/{userProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py index 376c50996a8..a5e43b804ba 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[SubjectReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py index 835385fb126..65441eb2736 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index b0c04f12b40..e0384b9d9d7 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 3435622e876..f289b857498 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..8e6c2b6ac53 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..0500876ee62 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/runs/{run-id}/userProcessingResults/{userProcessingResult-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py index 0a75e37252f..9321d9d5d25 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ............models.o_data_errors.o_data_error import ODataError from ............models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py index 971ba7a37bb..7ef85d362a5 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py index 7c156389264..c47d2f644f3 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py index 6924504c227..3e7cc30eca3 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-userprocessingresult-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py index 823836fc5f6..c6a0aa9fcf9 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/item/user_processing_result_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResult]: """ - Get the user processing result of a user processing result of a run. + Get the user processing result of a user processing result of a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResult] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-userprocessingresult-get?view=graph-rest-1.0 @@ -52,19 +52,19 @@ async def get(self,request_configuration: Optional[UserProcessingResultItemReque def to_get_request_information(self,request_configuration: Optional[UserProcessingResultItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the user processing result of a user processing result of a run. + Get the user processing result of a user processing result of a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultItemRequestBuilder: @@ -98,7 +98,7 @@ def task_processing_results(self) -> TaskProcessingResultsRequestBuilder: @dataclass class UserProcessingResultItemRequestBuilderGetQueryParameters(): """ - Get the user processing result of a user processing result of a run. + Get the user processing result of a user processing result of a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index 46a46ca9e3b..9da8c1cc431 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[UserSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py index 770319f265b..356d2de4041 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/item/user_processing_results/user_processing_results_request_builder.py @@ -46,7 +46,7 @@ def by_user_processing_result_id(self,user_processing_result_id: str) -> UserPro async def get(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResultCollectionResponse]: """ - Get user processing results of a workflow run object. + Get user processing results of a workflow run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-run-list-userprocessingresults?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get user processing results of a workflow run object. + Get user processing results of a workflow run object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserProcessingResultsRequestBuilderGetQueryParameters(): """ - Get user processing results of a workflow run object. + Get user processing results of a workflow run object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index b47c3f39577..5c3dc969614 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[RunSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/runs_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/runs_request_builder.py index 86006689b2e..725c1b9cd7a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/runs_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/runs/runs_request_builder.py @@ -46,7 +46,7 @@ def by_run_id(self,run_id: str) -> RunItemRequestBuilder: async def get(self,request_configuration: Optional[RunsRequestBuilderGetRequestConfiguration] = None) -> Optional[RunCollectionResponse]: """ - Get a list of the run objects and their properties for a lifecycle workflow. + Get a list of the run objects and their properties for a lifecycle workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RunCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-runs?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[RunsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the run objects and their properties for a lifecycle workflow. + Get a list of the run objects and their properties for a lifecycle workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RunsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RunsRequestBuilderGetQueryParameters(): """ - Get a list of the run objects and their properties for a lifecycle workflow. + Get a list of the run objects and their properties for a lifecycle workflow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/count/count_request_builder.py index 170d47672ff..2fd04f967a7 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task/task_request_builder.py index 2f50997facb..c7d34685567 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py index 7b7e3935c73..ebde90b237d 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_definition/task_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskDefinitionRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py index ed65b63801c..d85a153b842 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 8c5cfcff69b..23d2391245a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index d07825462ba..1052723e440 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..0f43e047125 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..90e3cbefce5 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/taskReports/{taskReport-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py index fb1135d17e7..e9cc72cdc28 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py index beb755187df..f8095ec1de0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py index 8d58073a905..1c26ccc3da1 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py index a843a77922c..9eb7162f592 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the task processing result resources from the taskReport. + Get the task processing result resources from the taskReport. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-taskreport-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the task processing result resources from the taskReport. + Get the task processing result resources from the taskReport. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the task processing result resources from the taskReport. + Get the task processing result resources from the taskReport. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_report_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_report_item_request_builder.py index bf375a7de75..4d6b4d7330d 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_report_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/item/task_report_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskReportIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskReportItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index a212ee488c5..149c5f57d3f 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskReportSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/task_reports_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/task_reports_request_builder.py index 1ac1f235377..4cd9e5a32a6 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/task_reports_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/task_reports/task_reports_request_builder.py @@ -46,7 +46,7 @@ def by_task_report_id(self,task_report_id: str) -> TaskReportItemRequestBuilder: async def get(self,request_configuration: Optional[TaskReportsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskReportCollectionResponse]: """ - Get a list of the taskReport objects and their properties. + Get a list of the taskReport objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskReportCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-taskreports?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[TaskReportsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the taskReport objects and their properties. + Get a list of the taskReport objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskReportsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskReportsRequestBuilderGetQueryParameters(): """ - Get a list of the taskReport objects and their properties. + Get a list of the taskReport objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/count/count_request_builder.py index edbeb1edfd5..566daddaf7b 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_item_request_builder.py index 5fdf9ec8114..e16759d5652 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TaskItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Task] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py index 282647c7dc5..43a532dcff0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 2971b02a7d3..b5af09c0ba7 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 612b9363f42..f1ca3dfd070 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..a384cd2e9a0 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..7527a240c77 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/tasks/{task-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py index 5097957dc62..38db3a1a687 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py index 5e9c953ec77..d15d7c1f3e5 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py index d262be0a3c4..0ed4b5ee05f 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py index fba164ef357..afcabe3389b 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/item/task_processing_results/task_processing_results_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/tasks_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/tasks_request_builder.py index 9c684604eb7..122787c1c66 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/tasks/tasks_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Task] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/count/count_request_builder.py index 2a27a3fd6c1..c9b78238021 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index 40c6aaf763b..d57ff84ef59 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..f91fe973ddb --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..068fa7635ce --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/userProcessingResults/{userProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/subject_request_builder.py index d45f1e6db7f..790d335a3d0 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[SubjectReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py index a499ab7ff0a..49e8c151e86 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 5416986e173..99139174153 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index e310fbca2bd..af13489ad5e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..90b297c0fbd --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..e668a4de102 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/userProcessingResults/{userProcessingResult-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py index b83319f7be3..a2c31327fb1 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ..........models.o_data_errors.o_data_error import ODataError from ..........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py index 5b3c6522305..d660186f493 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py index c4dd0a0d83f..759c977a443 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py index b6a05d88263..c91815bfa15 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/task_processing_results/task_processing_results_request_builder.py @@ -44,7 +44,7 @@ def by_task_processing_result_id(self,task_processing_result_id: str) -> TaskPro async def get(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[TaskProcessingResultCollectionResponse]: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TaskProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-userprocessingresult-list-taskprocessingresults?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TaskProcessingResultsRequestB def to_get_request_information(self,request_configuration: Optional[TaskProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the task processing result from a userProcessingResult either directly or through a run. + Get the task processing result from a userProcessingResult either directly or through a run. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py index 3375bac91a0..d27626fe7ef 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/item/user_processing_result_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[UserProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py index 47ab921cf1f..23cb9891d92 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time/microsoft_graph_identity_governance_summary_with_start_date_time_with_end_date_time_request_builder.py @@ -27,6 +27,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", path_parameters) async def get(self,request_configuration: Optional[MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[UserSummary]: @@ -57,13 +60,13 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/user_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/user_processing_results_request_builder.py index b7c621cb3dc..89fd85b8c17 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/user_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/user_processing_results/user_processing_results_request_builder.py @@ -46,7 +46,7 @@ def by_user_processing_result_id(self,user_processing_result_id: str) -> UserPro async def get(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserProcessingResultCollectionResponse]: """ - Get the userProcessingResult resources for a workflow. + Get the userProcessingResult resources for a workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserProcessingResultCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-userprocessingresults?view=graph-rest-1.0 @@ -83,19 +83,19 @@ def microsoft_graph_identity_governance_summary_with_start_date_time_with_end_da def to_get_request_information(self,request_configuration: Optional[UserProcessingResultsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the userProcessingResult resources for a workflow. + Get the userProcessingResult resources for a workflow. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserProcessingResultsRequestBuilder: @@ -120,7 +120,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserProcessingResultsRequestBuilderGetQueryParameters(): """ - Get the userProcessingResult resources for a workflow. + Get the userProcessingResult resources for a workflow. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/count/count_request_builder.py index a5b2f4ef7e4..6e81145c8a6 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/created_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/created_by_request_builder.py index 85a04119eda..a2a8f3306bc 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/created_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/created_by_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedByRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py index 8fa19764585..e026dc5dfa7 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..5a778bd2321 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..8e287e34eea --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/created_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/versions/{workflowVersion-versionNumber}/createdBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py index 7d481e35e42..ecfbce39eee 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/last_modified_by_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[LastModifiedByRequestBuilderG def to_get_request_information(self,request_configuration: Optional[LastModifiedByRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastModifiedByRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure Active Directory identity that last modified the workflow. + The unique identifier of the Microsoft Entra identity that last modified the workflow. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py index 88ade54f2d5..8326bd3f556 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..781791b6806 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..bcaa59fd42e --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/last_modified_by/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/versions/{workflowVersion-versionNumber}/lastModifiedBy/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/count/count_request_builder.py index a1713f7a28e..356ee94c3b3 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_item_request_builder.py index 6378552c95b..b88319eab7b 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TaskItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Task] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py index 00929df0b53..c306d8a0d9e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py index 60cb9d8adac..1f1c38b4693 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/microsoft_graph_identity_governance_resume/microsoft_graph_identity_governance_resume_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. 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[ResumePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ResumePostRequestBody] = None, request_configuration: Optional[MicrosoftGraphIdentityGovernanceResumeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. + Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ResumePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py index bdd5aaea53b..c3ce1c15093 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..6b981f89f83 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..47e4f588f90 --- /dev/null +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/versions/{workflowVersion-versionNumber}/tasks/{task-id}/taskProcessingResults/{taskProcessingResult-id}/subject/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py index 73650148f3f..fc002666785 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/subject/subject_request_builder.py @@ -13,6 +13,7 @@ from ............models.o_data_errors.o_data_error import ODataError from ............models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class SubjectRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[SubjectRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[SubjectRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SubjectRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class SubjectRequestBuilderGetQueryParameters(): """ - The unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. + The unique identifier of the Microsoft Entra user targeted for the task execution.Supports $filter(eq, ne) and $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py index a77905cf102..593587f4a72 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task/task_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py index e33d5502bd0..8c1d7f6dc1e 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/item/task_processing_result_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultItemRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py index 82c96dca3b7..7ca4666de3a 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/item/task_processing_results/task_processing_results_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TaskProcessi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TaskProcessingResultsRequestBuilder: diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/tasks_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/tasks_request_builder.py index aa6ba0492a7..729fdc6e452 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/tasks/tasks_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Task] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Task] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py index 32c6006d743..a1fc1f522c8 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/item/workflow_version_version_number_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[WorkflowVersionVersionNumberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowVersion]: """ - Read the properties and relationships of a workflowVersion object. + Read the properties and relationships of a workflowVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowVersion] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflowversion-get?view=graph-rest-1.0 @@ -53,19 +53,19 @@ async def get(self,request_configuration: Optional[WorkflowVersionVersionNumberI def to_get_request_information(self,request_configuration: Optional[WorkflowVersionVersionNumberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a workflowVersion object. + Read the properties and relationships of a workflowVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WorkflowVersionVersionNumberItemRequestBuilder: @@ -108,7 +108,7 @@ def tasks(self) -> TasksRequestBuilder: @dataclass class WorkflowVersionVersionNumberItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a workflowVersion object. + Read the properties and relationships of a workflowVersion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/versions_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/versions_request_builder.py index 6190cfea067..8d67b6fd9a5 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/versions_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/versions/versions_request_builder.py @@ -44,7 +44,7 @@ def by_workflow_version_version_number(self,workflow_version_version_number: int async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowVersionCollectionResponse]: """ - Get a list of the workflowVersion objects and their properties. + Get a list of the workflowVersion objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-list-versions?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the workflowVersion objects and their properties. + Get a list of the workflowVersion objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> VersionsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - Get a list of the workflowVersion objects and their properties. + Get a list of the workflowVersion objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/workflow_item_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/workflow_item_request_builder.py index 0790c373330..3fef7a297a2 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/workflow_item_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/workflow_item_request_builder.py @@ -19,8 +19,8 @@ from .microsoft_graph_identity_governance_create_new_version.microsoft_graph_identity_governance_create_new_version_request_builder import MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder from .microsoft_graph_identity_governance_restore.microsoft_graph_identity_governance_restore_request_builder import MicrosoftGraphIdentityGovernanceRestoreRequestBuilder from .runs.runs_request_builder import RunsRequestBuilder - from .task_reports.task_reports_request_builder import TaskReportsRequestBuilder from .tasks.tasks_request_builder import TasksRequestBuilder + from .task_reports.task_reports_request_builder import TaskReportsRequestBuilder from .user_processing_results.user_processing_results_request_builder import UserProcessingResultsRequestBuilder from .versions.versions_request_builder import VersionsRequestBuilder @@ -39,7 +39,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkflowItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a workflow object and its associated tasks, taskProcessingResults and versions. You can restore a deleted workflow and its associated objects within 30 days of deletion. + Delete a workflow object and its associated tasks, taskProcessingResults and versions. You can restore a deleted workflow and its associated objects within 30 days of deletion. This API is available in the following national cloud deployments. 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/identitygovernance-workflow-delete?view=graph-rest-1.0 @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[WorkflowItemRequestBuilder async def get(self,request_configuration: Optional[WorkflowItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Workflow]: """ - Read the properties and relationships of a workflow object. + Read the properties and relationships of a workflow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-workflow-get?view=graph-rest-1.0 @@ -81,7 +81,7 @@ async def get(self,request_configuration: Optional[WorkflowItemRequestBuilderGet async def patch(self,body: Optional[Workflow] = None, request_configuration: Optional[WorkflowItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Workflow]: """ - Update the properties of a workflow object. Only the properties listed in the request body table can be updated. To update any other workflow properties, see workflow: createNewVersion. + Update the properties of a workflow object. Only the properties listed in the request body table can be updated. To update any other workflow properties, see workflow: createNewVersion. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] @@ -106,39 +106,39 @@ async def patch(self,body: Optional[Workflow] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[WorkflowItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a workflow object and its associated tasks, taskProcessingResults and versions. You can restore a deleted workflow and its associated objects within 30 days of deletion. + Delete a workflow object and its associated tasks, taskProcessingResults and versions. You can restore a deleted workflow and its associated objects within 30 days of deletion. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkflowItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a workflow object. + Read the properties and relationships of a workflow object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Workflow] = None, request_configuration: Optional[WorkflowItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a workflow object. Only the properties listed in the request body table can be updated. To update any other workflow properties, see workflow: createNewVersion. + Update the properties of a workflow object. Only the properties listed in the request body table can be updated. To update any other workflow properties, see workflow: createNewVersion. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -146,13 +146,13 @@ def to_patch_request_information(self,body: Optional[Workflow] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -278,7 +278,7 @@ class WorkflowItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class WorkflowItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a workflow object. + Read the properties and relationships of a workflow object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/workflows_request_builder.py b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/workflows_request_builder.py index 110e9afec81..4cde8e39bfc 100644 --- a/msgraph/generated/identity_governance/lifecycle_workflows/workflows/workflows_request_builder.py +++ b/msgraph/generated/identity_governance/lifecycle_workflows/workflows/workflows_request_builder.py @@ -45,7 +45,7 @@ def by_workflow_id(self,workflow_id: str) -> WorkflowItemRequestBuilder: async def get(self,request_configuration: Optional[WorkflowsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkflowCollectionResponse]: """ - Get a list of workflow resources that are associated with lifecycle workflows. + Get a list of workflow resources that are associated with lifecycle workflows. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkflowCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identitygovernance-lifecycleworkflowscontainer-list-workflows?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[WorkflowsRequestBuilderGetReq async def post(self,body: Optional[Workflow] = None, request_configuration: Optional[WorkflowsRequestBuilderPostRequestConfiguration] = None) -> Optional[Workflow]: """ - Create a new workflow object. You can create up to 50 workflows in a tenant. + Create a new workflow object. You can create up to 50 workflows in a tenant. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Workflow] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Workflow] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[WorkflowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of workflow resources that are associated with lifecycle workflows. + Get a list of workflow resources that are associated with lifecycle workflows. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Workflow] = None, request_configuration: Optional[WorkflowsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new workflow object. You can create up to 50 workflows in a tenant. + Create a new workflow object. You can create up to 50 workflows in a tenant. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Workflow] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class WorkflowsRequestBuilderGetQueryParameters(): """ - Get a list of workflow resources that are associated with lifecycle workflows. + Get a list of workflow resources that are associated with lifecycle workflows. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/assignment_approvals_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/assignment_approvals_request_builder.py new file mode 100644 index 00000000000..4ee826716c0 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/assignment_approvals_request_builder.py @@ -0,0 +1,239 @@ +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.approval import Approval + from .....models.approval_collection_response import ApprovalCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.approval_item_request_builder import ApprovalItemRequestBuilder + +class AssignmentApprovalsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentApprovalsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_approval_id(self,approval_id: str) -> ApprovalItemRequestBuilder: + """ + Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + param approval_id: The unique identifier of approval + Returns: ApprovalItemRequestBuilder + """ + if not approval_id: + raise TypeError("approval_id cannot be null.") + from .item.approval_item_request_builder import ApprovalItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["approval%2Did"] = approval_id + return ApprovalItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[AssignmentApprovalsRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalCollectionResponse]: + """ + Get assignmentApprovals from identityGovernance + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ApprovalCollectionResponse] + """ + 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.approval_collection_response import ApprovalCollectionResponse + + return await self.request_adapter.send_async(request_info, ApprovalCollectionResponse, error_mapping) + + async def post(self,body: Optional[Approval] = None, request_configuration: Optional[AssignmentApprovalsRequestBuilderPostRequestConfiguration] = None) -> Optional[Approval]: + """ + Create new navigation property to assignmentApprovals for identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Approval] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.approval import Approval + + return await self.request_adapter.send_async(request_info, Approval, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentApprovalsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get assignmentApprovals from identityGovernance + 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(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[Approval] = None, request_configuration: Optional[AssignmentApprovalsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to assignmentApprovals for identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> AssignmentApprovalsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentApprovalsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentApprovalsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentApprovalsRequestBuilderGetQueryParameters(): + """ + Get assignmentApprovals from identityGovernance + """ + 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 AssignmentApprovalsRequestBuilderGetRequestConfiguration(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[AssignmentApprovalsRequestBuilder.AssignmentApprovalsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentApprovalsRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/assignment_approvals/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/count/count_request_builder.py new file mode 100644 index 00000000000..99beabb544a --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py new file mode 100644 index 00000000000..d7df81c0407 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_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.approval import Approval + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[Approval]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FilterByCurrentUserWithOnGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FilterByCurrentUserWithOnGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ......models.approval import Approval + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + from ......models.approval import Approval + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Approval)), + } + 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/team/permission_grants/delta/delta_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py similarity index 68% rename from msgraph/generated/groups/item/team/permission_grants/delta/delta_request_builder.py rename to msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 6709d953439..2021b488db9 100644 --- a/msgraph/generated/groups/item/team/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,26 +11,29 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse -class DeltaRequestBuilder(BaseRequestBuilder): +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Provides operations to call the filterByCurrentUser method. """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' param path_parameters: The raw url or the Url 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}/team/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +46,41 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: FilterByCurrentUserWithOnRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): """ - Invoke function delta + Invoke function filterByCurrentUser """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -128,14 +131,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/approval_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/approval_item_request_builder.py new file mode 100644 index 00000000000..8e705aee5b9 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/approval_item_request_builder.py @@ -0,0 +1,224 @@ +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.approval import Approval + from ......models.o_data_errors.o_data_error import ODataError + from .stages.stages_request_builder import StagesRequestBuilder + +class ApprovalItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ApprovalItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[ApprovalItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property assignmentApprovals for identityGovernance + 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[ApprovalItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Approval]: + """ + Get assignmentApprovals from identityGovernance + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Approval] + """ + 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.approval import Approval + + return await self.request_adapter.send_async(request_info, Approval, error_mapping) + + async def patch(self,body: Optional[Approval] = None, request_configuration: Optional[ApprovalItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Approval]: + """ + Update the navigation property assignmentApprovals in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Approval] + """ + 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.approval import Approval + + return await self.request_adapter.send_async(request_info, Approval, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[ApprovalItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property assignmentApprovals for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[ApprovalItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get assignmentApprovals from identityGovernance + 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(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[Approval] = None, request_configuration: Optional[ApprovalItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property assignmentApprovals in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> ApprovalItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApprovalItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApprovalItemRequestBuilder(self.request_adapter, raw_url) + + @property + def stages(self) -> StagesRequestBuilder: + """ + Provides operations to manage the stages property of the microsoft.graph.approval entity. + """ + from .stages.stages_request_builder import StagesRequestBuilder + + return StagesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ApprovalItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class ApprovalItemRequestBuilderGetQueryParameters(): + """ + Get assignmentApprovals from identityGovernance + """ + 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 ApprovalItemRequestBuilderGetRequestConfiguration(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[ApprovalItemRequestBuilder.ApprovalItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ApprovalItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/assignment_approvals/item/stages/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/count/count_request_builder.py new file mode 100644 index 00000000000..d3bc0cc3884 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/item/approval_stage_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/item/approval_stage_item_request_builder.py new file mode 100644 index 00000000000..857c00b0ca6 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/item/approval_stage_item_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.approval_stage import ApprovalStage + from ........models.o_data_errors.o_data_error import ODataError + +class ApprovalStageItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the stages property of the microsoft.graph.approval entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ApprovalStageItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages/{approvalStage%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[ApprovalStageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property stages for identityGovernance + 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[ApprovalStageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalStage]: + """ + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ApprovalStage] + Find more info here: https://learn.microsoft.com/graph/api/approvalstage-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.approval_stage import ApprovalStage + + return await self.request_adapter.send_async(request_info, ApprovalStage, error_mapping) + + async def patch(self,body: Optional[ApprovalStage] = None, request_configuration: Optional[ApprovalStageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ApprovalStage]: + """ + Approve or deny an approvalStage object in an approval. This API is available in the following national cloud deployments. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ApprovalStage] + Find more info here: https://learn.microsoft.com/graph/api/approvalstage-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.approval_stage import ApprovalStage + + return await self.request_adapter.send_async(request_info, ApprovalStage, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[ApprovalStageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property stages for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[ApprovalStageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. + 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(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[ApprovalStage] = None, request_configuration: Optional[ApprovalStageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Approve or deny an approvalStage object in an approval. This API is available in the following national cloud deployments. + param body: The request body + param request_configuration: Configuration for 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(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) -> ApprovalStageItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApprovalStageItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApprovalStageItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ApprovalStageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class ApprovalStageItemRequestBuilderGetQueryParameters(): + """ + Retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. This API is available in the following national cloud deployments. + """ + 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 ApprovalStageItemRequestBuilderGetRequestConfiguration(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[ApprovalStageItemRequestBuilder.ApprovalStageItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ApprovalStageItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/assignment_approvals/item/stages/stages_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/stages_request_builder.py new file mode 100644 index 00000000000..ea9c3a092f8 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_approvals/item/stages/stages_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.approval_stage import ApprovalStage + from .......models.approval_stage_collection_response import ApprovalStageCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.approval_stage_item_request_builder import ApprovalStageItemRequestBuilder + +class StagesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the stages property of the microsoft.graph.approval entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new StagesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_approval_stage_id(self,approval_stage_id: str) -> ApprovalStageItemRequestBuilder: + """ + Provides operations to manage the stages property of the microsoft.graph.approval entity. + param approval_stage_id: The unique identifier of approvalStage + Returns: ApprovalStageItemRequestBuilder + """ + if not approval_stage_id: + raise TypeError("approval_stage_id cannot be null.") + from .item.approval_stage_item_request_builder import ApprovalStageItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["approvalStage%2Did"] = approval_stage_id + return ApprovalStageItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ApprovalStageCollectionResponse]: + """ + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ApprovalStageCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/approval-list-stages?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.approval_stage_collection_response import ApprovalStageCollectionResponse + + return await self.request_adapter.send_async(request_info, ApprovalStageCollectionResponse, error_mapping) + + async def post(self,body: Optional[ApprovalStage] = None, request_configuration: Optional[StagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ApprovalStage]: + """ + Create new navigation property to stages for identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ApprovalStage] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.approval_stage import ApprovalStage + + return await self.request_adapter.send_async(request_info, ApprovalStage, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[StagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. + 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(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[ApprovalStage] = None, request_configuration: Optional[StagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to stages for identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> StagesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StagesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StagesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class StagesRequestBuilderGetQueryParameters(): + """ + List the approvalStage objects associated with an approval. This API request is made by an approver in the following scenarios: In Microsoft Entra entitlement management, providing the identifier of the access package assignment request.In PIM for groups, providing the identifier of the assignment schedule request. This API is available in the following national cloud deployments. + """ + 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 StagesRequestBuilderGetRequestConfiguration(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[StagesRequestBuilder.StagesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class StagesRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/assignment_schedule_instances/assignment_schedule_instances_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/assignment_schedule_instances_request_builder.py new file mode 100644 index 00000000000..8f8d080f620 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/assignment_schedule_instances_request_builder.py @@ -0,0 +1,240 @@ +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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .....models.privileged_access_group_assignment_schedule_instance_collection_response import PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.privileged_access_group_assignment_schedule_instance_item_request_builder import PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder + +class AssignmentScheduleInstancesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentScheduleInstancesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_privileged_access_group_assignment_schedule_instance_id(self,privileged_access_group_assignment_schedule_instance_id: str) -> PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder: + """ + Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + param privileged_access_group_assignment_schedule_instance_id: The unique identifier of privilegedAccessGroupAssignmentScheduleInstance + Returns: PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder + """ + if not privileged_access_group_assignment_schedule_instance_id: + raise TypeError("privileged_access_group_assignment_schedule_instance_id cannot be null.") + from .item.privileged_access_group_assignment_schedule_instance_item_request_builder import PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["privilegedAccessGroupAssignmentScheduleInstance%2Did"] = privileged_access_group_assignment_schedule_instance_id + return PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[AssignmentScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse]: + """ + Get a list of the privilegedAccessGroupAssignmentScheduleInstance objects and their properties. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-list-assignmentscheduleinstances?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.privileged_access_group_assignment_schedule_instance_collection_response import PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse, error_mapping) + + async def post(self,body: Optional[PrivilegedAccessGroupAssignmentScheduleInstance] = None, request_configuration: Optional[AssignmentScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleInstance]: + """ + Create new navigation property to assignmentScheduleInstances for identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleInstance] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleInstance, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of the privilegedAccessGroupAssignmentScheduleInstance objects and their properties. + 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(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[PrivilegedAccessGroupAssignmentScheduleInstance] = None, request_configuration: Optional[AssignmentScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to assignmentScheduleInstances for identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> AssignmentScheduleInstancesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentScheduleInstancesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentScheduleInstancesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentScheduleInstancesRequestBuilderGetQueryParameters(): + """ + Get a list of the privilegedAccessGroupAssignmentScheduleInstance objects and their properties. + """ + 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 AssignmentScheduleInstancesRequestBuilderGetRequestConfiguration(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[AssignmentScheduleInstancesRequestBuilder.AssignmentScheduleInstancesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentScheduleInstancesRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/assignment_schedule_instances/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/count/count_request_builder.py new file mode 100644 index 00000000000..3498d67707e --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py new file mode 100644 index 00000000000..b43517d1ead --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + +from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupAssignmentScheduleInstance]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FilterByCurrentUserWithOnGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FilterByCurrentUserWithOnGetResponse() + + def 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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ......models.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentScheduleInstance)), + } + 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/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py new file mode 100644 index 00000000000..67df34e375d --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_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 .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse + +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the filterByCurrentUser method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: + """ + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' + param path_parameters: The 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['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: + """ + Invoke function filterByCurrentUser + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FilterByCurrentUserWithOnGetResponse] + """ + 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 .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse + + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function filterByCurrentUser + 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(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) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): + """ + Invoke function filterByCurrentUser + """ + 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/activated_using/activated_using_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/activated_using/activated_using_request_builder.py new file mode 100644 index 00000000000..b08f3f06b8d --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/activated_using/activated_using_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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + +class ActivatedUsingRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/activatedUsing{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ActivatedUsingRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleInstance]: + """ + When the request activates a membership or ownership in PIM for groups, this object represents the eligibility request for the group. Otherwise, it is null. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] + """ + 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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleInstance, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ActivatedUsingRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + When the request activates a membership or ownership in PIM for groups, this object represents the eligibility request for the group. Otherwise, it is null. + 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(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) -> ActivatedUsingRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ActivatedUsingRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ActivatedUsingRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ActivatedUsingRequestBuilderGetQueryParameters(): + """ + When the request activates a membership or ownership in PIM for groups, this object represents the eligibility request for the group. Otherwise, it is null. + """ + 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 ActivatedUsingRequestBuilderGetRequestConfiguration(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[ActivatedUsingRequestBuilder.ActivatedUsingRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/group_request_builder.py new file mode 100644 index 00000000000..e22031ad067 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/group_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.group import Group + from .......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: + """ + References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Group] + """ + 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.group import Group + + return await self.request_adapter.send_async(request_info, Group, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..437e5483eab --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..3d82c7a884b --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/principal/principal_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/principal/principal_request_builder.py new file mode 100644 index 00000000000..6e35422d840 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/principal/principal_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.directory_object import DirectoryObject + from .......models.o_data_errors.o_data_error import ODataError + +class PrincipalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrincipalRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/principal{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: + """ + References the principal that's in the scope of the membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DirectoryObject] + """ + 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.directory_object import DirectoryObject + + return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the principal that's in the scope of the membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + 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(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) -> PrincipalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrincipalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrincipalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PrincipalRequestBuilderGetQueryParameters(): + """ + References the principal that's in the scope of the membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + """ + 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 PrincipalRequestBuilderGetRequestConfiguration(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[PrincipalRequestBuilder.PrincipalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/privileged_access_group_assignment_schedule_instance_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/privileged_access_group_assignment_schedule_instance_item_request_builder.py new file mode 100644 index 00000000000..03216550c1c --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_instances/item/privileged_access_group_assignment_schedule_instance_item_request_builder.py @@ -0,0 +1,245 @@ +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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .activated_using.activated_using_request_builder import ActivatedUsingRequestBuilder + from .group.group_request_builder import GroupRequestBuilder + from .principal.principal_request_builder import PrincipalRequestBuilder + +class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property assignmentScheduleInstances for identityGovernance + 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[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleInstance]: + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentScheduleInstance object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleInstance] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupassignmentscheduleinstance-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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleInstance, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroupAssignmentScheduleInstance] = None, request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleInstance]: + """ + Update the navigation property assignmentScheduleInstances in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleInstance] + """ + 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.privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleInstance, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property assignmentScheduleInstances for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentScheduleInstance 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(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[PrivilegedAccessGroupAssignmentScheduleInstance] = None, request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property assignmentScheduleInstances in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(self.request_adapter, raw_url) + + @property + def activated_using(self) -> ActivatedUsingRequestBuilder: + """ + Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + """ + from .activated_using.activated_using_request_builder import ActivatedUsingRequestBuilder + + return ActivatedUsingRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def principal(self) -> PrincipalRequestBuilder: + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + """ + from .principal.principal_request_builder import PrincipalRequestBuilder + + return PrincipalRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentScheduleInstance 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 PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration(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[PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/assignment_schedule_requests/assignment_schedule_requests_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/assignment_schedule_requests_request_builder.py new file mode 100644 index 00000000000..c631a5095bb --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/assignment_schedule_requests_request_builder.py @@ -0,0 +1,241 @@ +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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .....models.privileged_access_group_assignment_schedule_request_collection_response import PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.privileged_access_group_assignment_schedule_request_item_request_builder import PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder + +class AssignmentScheduleRequestsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentScheduleRequestsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_privileged_access_group_assignment_schedule_request_id(self,privileged_access_group_assignment_schedule_request_id: str) -> PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder: + """ + Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + param privileged_access_group_assignment_schedule_request_id: The unique identifier of privilegedAccessGroupAssignmentScheduleRequest + Returns: PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder + """ + if not privileged_access_group_assignment_schedule_request_id: + raise TypeError("privileged_access_group_assignment_schedule_request_id cannot be null.") + from .item.privileged_access_group_assignment_schedule_request_item_request_builder import PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["privilegedAccessGroupAssignmentScheduleRequest%2Did"] = privileged_access_group_assignment_schedule_request_id + return PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[AssignmentScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse]: + """ + Get a list of the privilegedAccessGroupAssignmentScheduleRequest objects and their properties. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-list-assignmentschedulerequests?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.privileged_access_group_assignment_schedule_request_collection_response import PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse, error_mapping) + + async def post(self,body: Optional[PrivilegedAccessGroupAssignmentScheduleRequest] = None, request_configuration: Optional[AssignmentScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleRequest]: + """ + Create a new privilegedAccessGroupAssignmentScheduleRequest object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleRequest] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-post-assignmentschedulerequests?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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleRequest, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of the privilegedAccessGroupAssignmentScheduleRequest objects and their properties. + 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(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[PrivilegedAccessGroupAssignmentScheduleRequest] = None, request_configuration: Optional[AssignmentScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new privilegedAccessGroupAssignmentScheduleRequest 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(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) -> AssignmentScheduleRequestsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentScheduleRequestsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentScheduleRequestsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentScheduleRequestsRequestBuilderGetQueryParameters(): + """ + Get a list of the privilegedAccessGroupAssignmentScheduleRequest objects and their properties. + """ + 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 AssignmentScheduleRequestsRequestBuilderGetRequestConfiguration(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[AssignmentScheduleRequestsRequestBuilder.AssignmentScheduleRequestsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentScheduleRequestsRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/assignment_schedule_requests/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/count/count_request_builder.py new file mode 100644 index 00000000000..655b5a8b905 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py new file mode 100644 index 00000000000..2ce4377dd64 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + +from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupAssignmentScheduleRequest]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FilterByCurrentUserWithOnGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FilterByCurrentUserWithOnGetResponse() + + def 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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ......models.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentScheduleRequest)), + } + 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/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py similarity index 67% rename from msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_request_builder.py rename to msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 8cd2876a30e..85499a4c5f0 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/internal_sponsors/delta/delta_request_builder.py +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -10,32 +10,35 @@ 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 .delta_response import DeltaResponse + from ......models.o_data_errors.o_data_error import ODataError + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse -class DeltaRequestBuilder(BaseRequestBuilder): +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Provides operations to call the filterByCurrentUser method. """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/internalSponsors/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration ) - from .......models.o_data_errors.o_data_error import ODataError + from ......models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -43,41 +46,41 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: FilterByCurrentUserWithOnRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): """ - Invoke function delta + Invoke function filterByCurrentUser """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -128,14 +131,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/activated_using/activated_using_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/activated_using/activated_using_request_builder.py new file mode 100644 index 00000000000..898a2524b43 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/activated_using/activated_using_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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + +class ActivatedUsingRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/activatedUsing{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ActivatedUsingRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + When the request activates a membership or ownership assignment in PIM for groups, this object represents the eligibility policy for the group. Otherwise, it is null. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + """ + 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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ActivatedUsingRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + When the request activates a membership or ownership assignment in PIM for groups, this object represents the eligibility policy for the group. Otherwise, it is null. Supports $expand. + 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(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) -> ActivatedUsingRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ActivatedUsingRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ActivatedUsingRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ActivatedUsingRequestBuilderGetQueryParameters(): + """ + When the request activates a membership or ownership assignment in PIM for groups, this object represents the eligibility policy for the group. Otherwise, it is null. Supports $expand. + """ + 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 ActivatedUsingRequestBuilderGetRequestConfiguration(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[ActivatedUsingRequestBuilder.ActivatedUsingRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/team/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/cancel/cancel_request_builder.py similarity index 58% rename from msgraph/generated/groups/item/team/permission_grants/item/restore/restore_request_builder.py rename to msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/cancel/cancel_request_builder.py index 5302811e269..82b0a94214f 100644 --- a/msgraph/generated/groups/item/team/permission_grants/item/restore/restore_request_builder.py +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/cancel/cancel_request_builder.py @@ -10,28 +10,27 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .......models.directory_object import DirectoryObject from .......models.o_data_errors.o_data_error import ODataError -class RestoreRequestBuilder(BaseRequestBuilder): +class CancelRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the restore method. + Provides operations to call the cancel method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new RestoreRequestBuilder and sets the default values. + Instantiates a new CancelRequestBuilder and sets the default values. param path_parameters: The raw url or the Url 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}/team/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore", path_parameters) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/cancel", path_parameters) - async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: + async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Cancel an access assignment request to a group whose membership and ownership are governed by PIM. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupassignmentschedulerequest-cancel?view=graph-rest-1.0 """ request_info = self.to_post_request_information( request_configuration @@ -44,40 +43,37 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq } if not self.request_adapter: raise Exception("Http core is null") - from .......models.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Cancel an access assignment request to a group whose membership and ownership are governed by PIM. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info - def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: RestoreRequestBuilder + Returns: CancelRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return RestoreRequestBuilder(self.request_adapter, raw_url) + return CancelRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class RestoreRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class CancelRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/group_request_builder.py new file mode 100644 index 00000000000..913e599efc7 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/group_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.group import Group + from .......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: + """ + References the group that is the scope of the membership or ownership assignment request through PIM for groups. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Group] + """ + 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.group import Group + + return await self.request_adapter.send_async(request_info, Group, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the group that is the scope of the membership or ownership assignment request through PIM for groups. Supports $expand. + 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + References the group that is the scope of the membership or ownership assignment request through PIM for groups. Supports $expand. + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..07f4185cd30 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..8b06e5398b4 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/principal/principal_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/principal/principal_request_builder.py new file mode 100644 index 00000000000..6754b0490d8 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/principal/principal_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.directory_object import DirectoryObject + from .......models.o_data_errors.o_data_error import ODataError + +class PrincipalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrincipalRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/principal{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: + """ + References the principal that's in the scope of this membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DirectoryObject] + """ + 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.directory_object import DirectoryObject + + return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the principal that's in the scope of this membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + 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(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) -> PrincipalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrincipalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrincipalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PrincipalRequestBuilderGetQueryParameters(): + """ + References the principal that's in the scope of this membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + """ + 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 PrincipalRequestBuilderGetRequestConfiguration(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[PrincipalRequestBuilder.PrincipalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/privileged_access_group_assignment_schedule_request_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/privileged_access_group_assignment_schedule_request_item_request_builder.py new file mode 100644 index 00000000000..013f0d75096 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/privileged_access_group_assignment_schedule_request_item_request_builder.py @@ -0,0 +1,265 @@ +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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .activated_using.activated_using_request_builder import ActivatedUsingRequestBuilder + from .cancel.cancel_request_builder import CancelRequestBuilder + from .group.group_request_builder import GroupRequestBuilder + from .principal.principal_request_builder import PrincipalRequestBuilder + from .target_schedule.target_schedule_request_builder import TargetScheduleRequestBuilder + +class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property assignmentScheduleRequests for identityGovernance + 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[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleRequest]: + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentScheduleRequest object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleRequest] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupassignmentschedulerequest-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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleRequest, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroupAssignmentScheduleRequest] = None, request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleRequest]: + """ + Update the navigation property assignmentScheduleRequests in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleRequest] + """ + 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.privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleRequest, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property assignmentScheduleRequests for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentScheduleRequest 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(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[PrivilegedAccessGroupAssignmentScheduleRequest] = None, request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property assignmentScheduleRequests in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(self.request_adapter, raw_url) + + @property + def activated_using(self) -> ActivatedUsingRequestBuilder: + """ + Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + from .activated_using.activated_using_request_builder import ActivatedUsingRequestBuilder + + return ActivatedUsingRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def cancel(self) -> CancelRequestBuilder: + """ + Provides operations to call the cancel method. + """ + from .cancel.cancel_request_builder import CancelRequestBuilder + + return CancelRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def principal(self) -> PrincipalRequestBuilder: + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + from .principal.principal_request_builder import PrincipalRequestBuilder + + return PrincipalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def target_schedule(self) -> TargetScheduleRequestBuilder: + """ + Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + from .target_schedule.target_schedule_request_builder import TargetScheduleRequestBuilder + + return TargetScheduleRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentScheduleRequest 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 PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration(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[PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py new file mode 100644 index 00000000000..6121fd30fce --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedule_requests/item/target_schedule/target_schedule_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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + +class TargetScheduleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TargetScheduleRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/targetSchedule{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[TargetScheduleRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + Schedule created by this request. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + """ + 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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TargetScheduleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Schedule created by this request. Supports $expand. + 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(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) -> TargetScheduleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TargetScheduleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TargetScheduleRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TargetScheduleRequestBuilderGetQueryParameters(): + """ + Schedule created by this request. Supports $expand. + """ + 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 TargetScheduleRequestBuilderGetRequestConfiguration(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[TargetScheduleRequestBuilder.TargetScheduleRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/assignment_schedules_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/assignment_schedules_request_builder.py new file mode 100644 index 00000000000..473368c75a3 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/assignment_schedules_request_builder.py @@ -0,0 +1,240 @@ +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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .....models.privileged_access_group_assignment_schedule_collection_response import PrivilegedAccessGroupAssignmentScheduleCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.privileged_access_group_assignment_schedule_item_request_builder import PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder + +class AssignmentSchedulesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AssignmentSchedulesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_privileged_access_group_assignment_schedule_id(self,privileged_access_group_assignment_schedule_id: str) -> PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder: + """ + Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + param privileged_access_group_assignment_schedule_id: The unique identifier of privilegedAccessGroupAssignmentSchedule + Returns: PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder + """ + if not privileged_access_group_assignment_schedule_id: + raise TypeError("privileged_access_group_assignment_schedule_id cannot be null.") + from .item.privileged_access_group_assignment_schedule_item_request_builder import PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["privilegedAccessGroupAssignmentSchedule%2Did"] = privileged_access_group_assignment_schedule_id + return PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[AssignmentSchedulesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentScheduleCollectionResponse]: + """ + Get a list of the privilegedAccessGroupAssignmentSchedule objects and their properties. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentScheduleCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-list-assignmentschedules?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.privileged_access_group_assignment_schedule_collection_response import PrivilegedAccessGroupAssignmentScheduleCollectionResponse + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentScheduleCollectionResponse, error_mapping) + + async def post(self,body: Optional[PrivilegedAccessGroupAssignmentSchedule] = None, request_configuration: Optional[AssignmentSchedulesRequestBuilderPostRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentSchedule]: + """ + Create new navigation property to assignmentSchedules for identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentSchedule] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentSchedule, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[AssignmentSchedulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of the privilegedAccessGroupAssignmentSchedule objects and their properties. + 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(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[PrivilegedAccessGroupAssignmentSchedule] = None, request_configuration: Optional[AssignmentSchedulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to assignmentSchedules for identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> AssignmentSchedulesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignmentSchedulesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignmentSchedulesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AssignmentSchedulesRequestBuilderGetQueryParameters(): + """ + Get a list of the privilegedAccessGroupAssignmentSchedule objects and their properties. + """ + 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 AssignmentSchedulesRequestBuilderGetRequestConfiguration(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[AssignmentSchedulesRequestBuilder.AssignmentSchedulesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AssignmentSchedulesRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/assignment_schedules/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/count/count_request_builder.py new file mode 100644 index 00000000000..2284e125975 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py new file mode 100644 index 00000000000..7b35476c6a9 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + +from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupAssignmentSchedule]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FilterByCurrentUserWithOnGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FilterByCurrentUserWithOnGetResponse() + + def 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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ......models.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentSchedule)), + } + 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/policies/feature_rollout_policies/item/applies_to/delta/delta_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py similarity index 68% rename from msgraph/generated/policies/feature_rollout_policies/item/applies_to/delta/delta_request_builder.py rename to msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 07618eefef0..0cfdbb6e760 100644 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/delta/delta_request_builder.py +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,26 +11,29 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse -class DeltaRequestBuilder(BaseRequestBuilder): +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Provides operations to call the filterByCurrentUser method. """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/policies/featureRolloutPolicies/{featureRolloutPolicy%2Did}/appliesTo/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +46,41 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: FilterByCurrentUserWithOnRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): """ - Invoke function delta + Invoke function filterByCurrentUser """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -128,14 +131,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/activated_using/activated_using_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/activated_using/activated_using_request_builder.py new file mode 100644 index 00000000000..cba7c6c17ad --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/activated_using/activated_using_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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + +class ActivatedUsingRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/activatedUsing{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ActivatedUsingRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + When the request activates an ownership or membership assignment in PIM for groups, this object represents the eligibility relationship. Otherwise, it is null. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + """ + 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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ActivatedUsingRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + When the request activates an ownership or membership assignment in PIM for groups, this object represents the eligibility relationship. Otherwise, it is null. Supports $expand. + 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(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) -> ActivatedUsingRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ActivatedUsingRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ActivatedUsingRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ActivatedUsingRequestBuilderGetQueryParameters(): + """ + When the request activates an ownership or membership assignment in PIM for groups, this object represents the eligibility relationship. Otherwise, it is null. Supports $expand. + """ + 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 ActivatedUsingRequestBuilderGetRequestConfiguration(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[ActivatedUsingRequestBuilder.ActivatedUsingRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/group_request_builder.py new file mode 100644 index 00000000000..86474093403 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/group_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.group import Group + from .......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: + """ + References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Group] + """ + 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.group import Group + + return await self.request_adapter.send_async(request_info, Group, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..bba0ae6db69 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..b0033a09512 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/principal/principal_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/principal/principal_request_builder.py new file mode 100644 index 00000000000..05daeec56cd --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/principal/principal_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.directory_object import DirectoryObject + from .......models.o_data_errors.o_data_error import ODataError + +class PrincipalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrincipalRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/principal{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: + """ + References the principal that's in the scope of this membership or ownership assignment request to the group that's governed by PIM. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DirectoryObject] + """ + 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.directory_object import DirectoryObject + + return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the principal that's in the scope of this membership or ownership assignment request to the group that's governed by PIM. Supports $expand. + 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(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) -> PrincipalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrincipalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrincipalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PrincipalRequestBuilderGetQueryParameters(): + """ + References the principal that's in the scope of this membership or ownership assignment request to the group that's governed by PIM. Supports $expand. + """ + 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 PrincipalRequestBuilderGetRequestConfiguration(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[PrincipalRequestBuilder.PrincipalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/privileged_access_group_assignment_schedule_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/privileged_access_group_assignment_schedule_item_request_builder.py new file mode 100644 index 00000000000..3d267394cbc --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/assignment_schedules/item/privileged_access_group_assignment_schedule_item_request_builder.py @@ -0,0 +1,245 @@ +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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .activated_using.activated_using_request_builder import ActivatedUsingRequestBuilder + from .group.group_request_builder import GroupRequestBuilder + from .principal.principal_request_builder import PrincipalRequestBuilder + +class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property assignmentSchedules for identityGovernance + 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[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentSchedule]: + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentSchedule object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentSchedule] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupassignmentschedule-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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentSchedule, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroupAssignmentSchedule] = None, request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupAssignmentSchedule]: + """ + Update the navigation property assignmentSchedules in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupAssignmentSchedule] + """ + 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.privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupAssignmentSchedule, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property assignmentSchedules for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentSchedule 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(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[PrivilegedAccessGroupAssignmentSchedule] = None, request_configuration: Optional[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property assignmentSchedules in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(self.request_adapter, raw_url) + + @property + def activated_using(self) -> ActivatedUsingRequestBuilder: + """ + Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + """ + from .activated_using.activated_using_request_builder import ActivatedUsingRequestBuilder + + return ActivatedUsingRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def principal(self) -> PrincipalRequestBuilder: + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + """ + from .principal.principal_request_builder import PrincipalRequestBuilder + + return PrincipalRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a privilegedAccessGroupAssignmentSchedule 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 PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration(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[PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/eligibility_schedule_instances/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/count/count_request_builder.py new file mode 100644 index 00000000000..86531b0e990 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/eligibility_schedule_instances_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/eligibility_schedule_instances_request_builder.py new file mode 100644 index 00000000000..ac4e3bb0dee --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/eligibility_schedule_instances_request_builder.py @@ -0,0 +1,240 @@ +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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .....models.privileged_access_group_eligibility_schedule_instance_collection_response import PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.privileged_access_group_eligibility_schedule_instance_item_request_builder import PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder + +class EligibilityScheduleInstancesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new EligibilityScheduleInstancesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_privileged_access_group_eligibility_schedule_instance_id(self,privileged_access_group_eligibility_schedule_instance_id: str) -> PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder: + """ + Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + param privileged_access_group_eligibility_schedule_instance_id: The unique identifier of privilegedAccessGroupEligibilityScheduleInstance + Returns: PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder + """ + if not privileged_access_group_eligibility_schedule_instance_id: + raise TypeError("privileged_access_group_eligibility_schedule_instance_id cannot be null.") + from .item.privileged_access_group_eligibility_schedule_instance_item_request_builder import PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["privilegedAccessGroupEligibilityScheduleInstance%2Did"] = privileged_access_group_eligibility_schedule_instance_id + return PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[EligibilityScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse]: + """ + Get a list of the privilegedAccessGroupEligibilityScheduleInstance objects and their properties. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-list-eligibilityscheduleinstances?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.privileged_access_group_eligibility_schedule_instance_collection_response import PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse, error_mapping) + + async def post(self,body: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] = None, request_configuration: Optional[EligibilityScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleInstance]: + """ + Create new navigation property to eligibilityScheduleInstances for identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleInstance, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[EligibilityScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of the privilegedAccessGroupEligibilityScheduleInstance objects and their properties. + 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(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[PrivilegedAccessGroupEligibilityScheduleInstance] = None, request_configuration: Optional[EligibilityScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to eligibilityScheduleInstances for identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> EligibilityScheduleInstancesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EligibilityScheduleInstancesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EligibilityScheduleInstancesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class EligibilityScheduleInstancesRequestBuilderGetQueryParameters(): + """ + Get a list of the privilegedAccessGroupEligibilityScheduleInstance objects and their properties. + """ + 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 EligibilityScheduleInstancesRequestBuilderGetRequestConfiguration(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[EligibilityScheduleInstancesRequestBuilder.EligibilityScheduleInstancesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EligibilityScheduleInstancesRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py new file mode 100644 index 00000000000..74ce4bbbdbb --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + +from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupEligibilityScheduleInstance]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FilterByCurrentUserWithOnGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FilterByCurrentUserWithOnGetResponse() + + def 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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ......models.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilityScheduleInstance)), + } + 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/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py new file mode 100644 index 00000000000..6c7e309e479 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_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 .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse + +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the filterByCurrentUser method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: + """ + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' + param path_parameters: The 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['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: + """ + Invoke function filterByCurrentUser + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FilterByCurrentUserWithOnGetResponse] + """ + 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 .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse + + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function filterByCurrentUser + 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(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) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): + """ + Invoke function filterByCurrentUser + """ + 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/group_request_builder.py new file mode 100644 index 00000000000..9391058b89f --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/group_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.group import Group + from .......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: + """ + References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Group] + """ + 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.group import Group + + return await self.request_adapter.send_async(request_info, Group, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..c90fa35ebd5 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..732bcd7af85 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/principal/principal_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/principal/principal_request_builder.py new file mode 100644 index 00000000000..d5acc6bce5d --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/principal/principal_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.directory_object import DirectoryObject + from .......models.o_data_errors.o_data_error import ODataError + +class PrincipalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrincipalRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/principal{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: + """ + References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DirectoryObject] + """ + 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.directory_object import DirectoryObject + + return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + 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(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) -> PrincipalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrincipalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrincipalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PrincipalRequestBuilderGetQueryParameters(): + """ + References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + """ + 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 PrincipalRequestBuilderGetRequestConfiguration(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[PrincipalRequestBuilder.PrincipalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/privileged_access_group_eligibility_schedule_instance_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/privileged_access_group_eligibility_schedule_instance_item_request_builder.py new file mode 100644 index 00000000000..b5a73048162 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_instances/item/privileged_access_group_eligibility_schedule_instance_item_request_builder.py @@ -0,0 +1,235 @@ +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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .group.group_request_builder import GroupRequestBuilder + from .principal.principal_request_builder import PrincipalRequestBuilder + +class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property eligibilityScheduleInstances for identityGovernance + 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[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleInstance]: + """ + Read the properties and relationships of a privilegedAccessGroupEligibilityScheduleInstance object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupeligibilityscheduleinstance-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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleInstance, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] = None, request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleInstance]: + """ + Update the navigation property eligibilityScheduleInstances in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] + """ + 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.privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleInstance, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property eligibilityScheduleInstances for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a privilegedAccessGroupEligibilityScheduleInstance 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(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[PrivilegedAccessGroupEligibilityScheduleInstance] = None, request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property eligibilityScheduleInstances in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(self.request_adapter, raw_url) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def principal(self) -> PrincipalRequestBuilder: + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + """ + from .principal.principal_request_builder import PrincipalRequestBuilder + + return PrincipalRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a privilegedAccessGroupEligibilityScheduleInstance 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 PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration(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[PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/eligibility_schedule_requests/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/count/count_request_builder.py new file mode 100644 index 00000000000..a5ee50b0f02 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/eligibility_schedule_requests_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/eligibility_schedule_requests_request_builder.py new file mode 100644 index 00000000000..5d5cec165e1 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/eligibility_schedule_requests_request_builder.py @@ -0,0 +1,241 @@ +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.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .....models.privileged_access_group_eligibility_schedule_request_collection_response import PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.privileged_access_group_eligibility_schedule_request_item_request_builder import PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder + +class EligibilityScheduleRequestsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new EligibilityScheduleRequestsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_privileged_access_group_eligibility_schedule_request_id(self,privileged_access_group_eligibility_schedule_request_id: str) -> PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder: + """ + Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + param privileged_access_group_eligibility_schedule_request_id: The unique identifier of privilegedAccessGroupEligibilityScheduleRequest + Returns: PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder + """ + if not privileged_access_group_eligibility_schedule_request_id: + raise TypeError("privileged_access_group_eligibility_schedule_request_id cannot be null.") + from .item.privileged_access_group_eligibility_schedule_request_item_request_builder import PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["privilegedAccessGroupEligibilityScheduleRequest%2Did"] = privileged_access_group_eligibility_schedule_request_id + return PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[EligibilityScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse]: + """ + Get a list of the privilegedAccessGroupEligibilityScheduleRequest objects and their properties. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-list-eligibilityschedulerequests?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.privileged_access_group_eligibility_schedule_request_collection_response import PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse, error_mapping) + + async def post(self,body: Optional[PrivilegedAccessGroupEligibilityScheduleRequest] = None, request_configuration: Optional[EligibilityScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleRequest]: + """ + Create a new privilegedAccessGroupEligibilityScheduleRequest object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleRequest] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-post-eligibilityschedulerequests?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.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleRequest, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[EligibilityScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of the privilegedAccessGroupEligibilityScheduleRequest objects and their properties. + 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(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[PrivilegedAccessGroupEligibilityScheduleRequest] = None, request_configuration: Optional[EligibilityScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new privilegedAccessGroupEligibilityScheduleRequest 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(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) -> EligibilityScheduleRequestsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EligibilityScheduleRequestsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EligibilityScheduleRequestsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class EligibilityScheduleRequestsRequestBuilderGetQueryParameters(): + """ + Get a list of the privilegedAccessGroupEligibilityScheduleRequest objects and their properties. + """ + 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 EligibilityScheduleRequestsRequestBuilderGetRequestConfiguration(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[EligibilityScheduleRequestsRequestBuilder.EligibilityScheduleRequestsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EligibilityScheduleRequestsRequestBuilderPostRequestConfiguration(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/team/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 71% rename from msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_response.py rename to msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 1adfa89b776..bb83654add9 100644 --- a/msgraph/generated/groups/item/team/permission_grants/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -5,25 +5,25 @@ if TYPE_CHECKING: from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ......models.directory_object import DirectoryObject + from ......models.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property - value: Optional[List[DirectoryObject]] = None + value: Optional[List[PrivilegedAccessGroupEligibilityScheduleRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ @@ -31,13 +31,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ......models.directory_object import DirectoryObject + from ......models.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ......models.directory_object import DirectoryObject + from ......models.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilityScheduleRequest)), } super_fields = super().get_field_deserializers() fields.update(super_fields) diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py new file mode 100644 index 00000000000..730c5467763 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_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 .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse + +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the filterByCurrentUser method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: + """ + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' + param path_parameters: The 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['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: + """ + Invoke function filterByCurrentUser + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FilterByCurrentUserWithOnGetResponse] + """ + 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 .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse + + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function filterByCurrentUser + 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(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) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): + """ + Invoke function filterByCurrentUser + """ + 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/cancel/cancel_request_builder.py similarity index 56% rename from msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_request_builder.py rename to msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/cancel/cancel_request_builder.py index c4846936861..f8874c8de53 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/cancel/cancel_request_builder.py @@ -11,34 +11,29 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse -class GetByIdsRequestBuilder(BaseRequestBuilder): +class CancelRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the getByIds method. + Provides operations to call the cancel method. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. + Instantiates a new CancelRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/externalSponsors/getByIds", path_parameters) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/cancel", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body + Cancel an eligibility assignment request to a group whose membership and ownership are governed by PIM. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupeligibilityschedulerequest-cancel?view=graph-rest-1.0 """ - if not body: - raise TypeError("body cannot be null.") request_info = self.to_post_request_information( - body, request_configuration + request_configuration ) from .......models.o_data_errors.o_data_error import ODataError @@ -48,44 +43,37 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body + Cancel an eligibility assignment request to a group whose membership and ownership are governed by PIM. param request_configuration: Configuration for 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder + Returns: CancelRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) + return CancelRequestBuilder(self.request_adapter, raw_url) from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + class CancelRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): from kiota_abstractions.base_request_configuration import BaseRequestConfiguration """ diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/group_request_builder.py new file mode 100644 index 00000000000..db51ffec677 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/group_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.group import Group + from .......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: + """ + References the group that is the scope of the membership or ownership eligibility request through PIM for groups. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Group] + """ + 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.group import Group + + return await self.request_adapter.send_async(request_info, Group, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the group that is the scope of the membership or ownership eligibility request through PIM for groups. Supports $expand. + 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + References the group that is the scope of the membership or ownership eligibility request through PIM for groups. Supports $expand. + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..7f454bf3672 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..1308efb90f0 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/principal/principal_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/principal/principal_request_builder.py new file mode 100644 index 00000000000..f81d0d30b22 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/principal/principal_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.directory_object import DirectoryObject + from .......models.o_data_errors.o_data_error import ODataError + +class PrincipalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrincipalRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/principal{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: + """ + References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DirectoryObject] + """ + 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.directory_object import DirectoryObject + + return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + 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(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) -> PrincipalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrincipalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrincipalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PrincipalRequestBuilderGetQueryParameters(): + """ + References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + """ + 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 PrincipalRequestBuilderGetRequestConfiguration(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[PrincipalRequestBuilder.PrincipalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/privileged_access_group_eligibility_schedule_request_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/privileged_access_group_eligibility_schedule_request_item_request_builder.py new file mode 100644 index 00000000000..91ddcb02eed --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/privileged_access_group_eligibility_schedule_request_item_request_builder.py @@ -0,0 +1,255 @@ +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.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .cancel.cancel_request_builder import CancelRequestBuilder + from .group.group_request_builder import GroupRequestBuilder + from .principal.principal_request_builder import PrincipalRequestBuilder + from .target_schedule.target_schedule_request_builder import TargetScheduleRequestBuilder + +class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property eligibilityScheduleRequests for identityGovernance + 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[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleRequest]: + """ + Read the properties and relationships of a privilegedAccessGroupEligibilityScheduleRequest object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleRequest] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupeligibilityschedulerequest-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.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleRequest, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroupEligibilityScheduleRequest] = None, request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleRequest]: + """ + Update the navigation property eligibilityScheduleRequests in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleRequest] + """ + 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.privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleRequest, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property eligibilityScheduleRequests for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a privilegedAccessGroupEligibilityScheduleRequest 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(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[PrivilegedAccessGroupEligibilityScheduleRequest] = None, request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property eligibilityScheduleRequests in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(self.request_adapter, raw_url) + + @property + def cancel(self) -> CancelRequestBuilder: + """ + Provides operations to call the cancel method. + """ + from .cancel.cancel_request_builder import CancelRequestBuilder + + return CancelRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def principal(self) -> PrincipalRequestBuilder: + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + """ + from .principal.principal_request_builder import PrincipalRequestBuilder + + return PrincipalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def target_schedule(self) -> TargetScheduleRequestBuilder: + """ + Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + """ + from .target_schedule.target_schedule_request_builder import TargetScheduleRequestBuilder + + return TargetScheduleRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a privilegedAccessGroupEligibilityScheduleRequest 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 PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration(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[PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py new file mode 100644 index 00000000000..4a4d0c0b60f --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedule_requests/item/target_schedule/target_schedule_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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + +class TargetScheduleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TargetScheduleRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/targetSchedule{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[TargetScheduleRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + Schedule created by this request. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + """ + 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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TargetScheduleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Schedule created by this request. + 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(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) -> TargetScheduleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TargetScheduleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TargetScheduleRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TargetScheduleRequestBuilderGetQueryParameters(): + """ + Schedule created by this request. + """ + 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 TargetScheduleRequestBuilderGetRequestConfiguration(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[TargetScheduleRequestBuilder.TargetScheduleRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/count/count_request_builder.py new file mode 100644 index 00000000000..d6681743a6d --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/eligibility_schedules_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/eligibility_schedules_request_builder.py new file mode 100644 index 00000000000..a7abc7b1aec --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/eligibility_schedules_request_builder.py @@ -0,0 +1,240 @@ +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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .....models.privileged_access_group_eligibility_schedule_collection_response import PrivilegedAccessGroupEligibilityScheduleCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + from .item.privileged_access_group_eligibility_schedule_item_request_builder import PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder + +class EligibilitySchedulesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new EligibilitySchedulesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_privileged_access_group_eligibility_schedule_id(self,privileged_access_group_eligibility_schedule_id: str) -> PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder: + """ + Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + param privileged_access_group_eligibility_schedule_id: The unique identifier of privilegedAccessGroupEligibilitySchedule + Returns: PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder + """ + if not privileged_access_group_eligibility_schedule_id: + raise TypeError("privileged_access_group_eligibility_schedule_id cannot be null.") + from .item.privileged_access_group_eligibility_schedule_item_request_builder import PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["privilegedAccessGroupEligibilitySchedule%2Did"] = privileged_access_group_eligibility_schedule_id + return PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(self.request_adapter, url_tpl_params) + + def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: + """ + Provides operations to call the filterByCurrentUser method. + param on: Usage: on='{on}' + Returns: FilterByCurrentUserWithOnRequestBuilder + """ + if not on: + raise TypeError("on cannot be null.") + from .filter_by_current_user_with_on.filter_by_current_user_with_on_request_builder import FilterByCurrentUserWithOnRequestBuilder + + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, self.path_parameters, on) + + async def get(self,request_configuration: Optional[EligibilitySchedulesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilityScheduleCollectionResponse]: + """ + Get a list of the privilegedAccessGroupEligibilitySchedule objects and their properties. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilityScheduleCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroup-list-eligibilityschedules?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.privileged_access_group_eligibility_schedule_collection_response import PrivilegedAccessGroupEligibilityScheduleCollectionResponse + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilityScheduleCollectionResponse, error_mapping) + + async def post(self,body: Optional[PrivilegedAccessGroupEligibilitySchedule] = None, request_configuration: Optional[EligibilitySchedulesRequestBuilderPostRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + Create new navigation property to eligibilitySchedules for identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[EligibilitySchedulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of the privilegedAccessGroupEligibilitySchedule objects and their properties. + 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(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[PrivilegedAccessGroupEligibilitySchedule] = None, request_configuration: Optional[EligibilitySchedulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to eligibilitySchedules for identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> EligibilitySchedulesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EligibilitySchedulesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EligibilitySchedulesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class EligibilitySchedulesRequestBuilderGetQueryParameters(): + """ + Get a list of the privilegedAccessGroupEligibilitySchedule objects and their properties. + """ + 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 EligibilitySchedulesRequestBuilderGetRequestConfiguration(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[EligibilitySchedulesRequestBuilder.EligibilitySchedulesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EligibilitySchedulesRequestBuilderPostRequestConfiguration(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/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py new file mode 100644 index 00000000000..d0d48d5f380 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + +from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupEligibilitySchedule]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FilterByCurrentUserWithOnGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FilterByCurrentUserWithOnGetResponse() + + def 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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ......models.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilitySchedule)), + } + 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/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py similarity index 67% rename from msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_request_builder.py rename to msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 366d487ecca..4fac6b75a64 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/delta/delta_request_builder.py +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -10,32 +10,35 @@ 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 .delta_response import DeltaResponse + from ......models.o_data_errors.o_data_error import ODataError + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse -class DeltaRequestBuilder(BaseRequestBuilder): +class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Provides operations to call the filterByCurrentUser method. """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, on: Optional[str] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + param on: Usage: on='{on}' param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/externalSponsors/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration ) - from .......models.o_data_errors.o_data_error import ODataError + from ......models.o_data_errors.o_data_error import ODataError error_mapping: Dict[str, ParsableFactory] = { "4XX": ODataError, @@ -43,41 +46,41 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> FilterByCurrentUserWithOnRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: FilterByCurrentUserWithOnRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return FilterByCurrentUserWithOnRequestBuilder(self.request_adapter, raw_url) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(): """ - Invoke function delta + Invoke function filterByCurrentUser """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -128,14 +131,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[FilterByCurrentUserWithOnRequestBuilder.FilterByCurrentUserWithOnRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/group_request_builder.py new file mode 100644 index 00000000000..ec020237a38 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/group_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.group import Group + from .......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: + """ + References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Group] + """ + 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.group import Group + + return await self.request_adapter.send_async(request_info, Group, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..23cf4126fd5 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..aaec7aee4a0 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/principal/principal_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/principal/principal_request_builder.py new file mode 100644 index 00000000000..3b53867e857 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/principal/principal_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.directory_object import DirectoryObject + from .......models.o_data_errors.o_data_error import ODataError + +class PrincipalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrincipalRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/principal{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: + """ + References the principal that's in the scope of this membership or ownership eligibility request to the group that's governed by PIM. Supports $expand. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DirectoryObject] + """ + 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.directory_object import DirectoryObject + + return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PrincipalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + References the principal that's in the scope of this membership or ownership eligibility request to the group that's governed by PIM. Supports $expand. + 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(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) -> PrincipalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrincipalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrincipalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PrincipalRequestBuilderGetQueryParameters(): + """ + References the principal that's in the scope of this membership or ownership eligibility request to the group that's governed by PIM. Supports $expand. + """ + 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 PrincipalRequestBuilderGetRequestConfiguration(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[PrincipalRequestBuilder.PrincipalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/privileged_access_group_eligibility_schedule_item_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/privileged_access_group_eligibility_schedule_item_request_builder.py new file mode 100644 index 00000000000..e250bb6ff65 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/eligibility_schedules/item/privileged_access_group_eligibility_schedule_item_request_builder.py @@ -0,0 +1,235 @@ +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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .group.group_request_builder import GroupRequestBuilder + from .principal.principal_request_builder import PrincipalRequestBuilder + +class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property eligibilitySchedules for identityGovernance + 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[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + Read the properties and relationships of a privilegedAccessGroupEligibilitySchedule object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + Find more info here: https://learn.microsoft.com/graph/api/privilegedaccessgroupeligibilityschedule-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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroupEligibilitySchedule] = None, request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroupEligibilitySchedule]: + """ + Update the navigation property eligibilitySchedules in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroupEligibilitySchedule] + """ + 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.privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroupEligibilitySchedule, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property eligibilitySchedules for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a privilegedAccessGroupEligibilitySchedule 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(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[PrivilegedAccessGroupEligibilitySchedule] = None, request_configuration: Optional[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property eligibilitySchedules in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(self.request_adapter, raw_url) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def principal(self) -> PrincipalRequestBuilder: + """ + Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + """ + from .principal.principal_request_builder import PrincipalRequestBuilder + + return PrincipalRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a privilegedAccessGroupEligibilitySchedule 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 PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration(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[PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/group/group_request_builder.py b/msgraph/generated/identity_governance/privileged_access/group/group_request_builder.py new file mode 100644 index 00000000000..f9018ba55e6 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/group/group_request_builder.py @@ -0,0 +1,284 @@ +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.privileged_access_group import PrivilegedAccessGroup + from .assignment_approvals.assignment_approvals_request_builder import AssignmentApprovalsRequestBuilder + from .assignment_schedules.assignment_schedules_request_builder import AssignmentSchedulesRequestBuilder + from .assignment_schedule_instances.assignment_schedule_instances_request_builder import AssignmentScheduleInstancesRequestBuilder + from .assignment_schedule_requests.assignment_schedule_requests_request_builder import AssignmentScheduleRequestsRequestBuilder + from .eligibility_schedules.eligibility_schedules_request_builder import EligibilitySchedulesRequestBuilder + from .eligibility_schedule_instances.eligibility_schedule_instances_request_builder import EligibilityScheduleInstancesRequestBuilder + from .eligibility_schedule_requests.eligibility_schedule_requests_request_builder import EligibilityScheduleRequestsRequestBuilder + +class GroupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new GroupRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess/group{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[GroupRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property group for identityGovernance + 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[GroupRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessGroup]: + """ + A group that's governed through Privileged Identity Management (PIM). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroup] + """ + 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.privileged_access_group import PrivilegedAccessGroup + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroup, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessGroup] = None, request_configuration: Optional[GroupRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessGroup]: + """ + Update the navigation property group in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessGroup] + """ + 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.privileged_access_group import PrivilegedAccessGroup + + return await self.request_adapter.send_async(request_info, PrivilegedAccessGroup, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[GroupRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property group for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[GroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + A group that's governed through Privileged Identity Management (PIM). + 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(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[PrivilegedAccessGroup] = None, request_configuration: Optional[GroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property group in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> GroupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GroupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GroupRequestBuilder(self.request_adapter, raw_url) + + @property + def assignment_approvals(self) -> AssignmentApprovalsRequestBuilder: + """ + Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .assignment_approvals.assignment_approvals_request_builder import AssignmentApprovalsRequestBuilder + + return AssignmentApprovalsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def assignment_schedule_instances(self) -> AssignmentScheduleInstancesRequestBuilder: + """ + Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .assignment_schedule_instances.assignment_schedule_instances_request_builder import AssignmentScheduleInstancesRequestBuilder + + return AssignmentScheduleInstancesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def assignment_schedule_requests(self) -> AssignmentScheduleRequestsRequestBuilder: + """ + Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .assignment_schedule_requests.assignment_schedule_requests_request_builder import AssignmentScheduleRequestsRequestBuilder + + return AssignmentScheduleRequestsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def assignment_schedules(self) -> AssignmentSchedulesRequestBuilder: + """ + Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .assignment_schedules.assignment_schedules_request_builder import AssignmentSchedulesRequestBuilder + + return AssignmentSchedulesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def eligibility_schedule_instances(self) -> EligibilityScheduleInstancesRequestBuilder: + """ + Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .eligibility_schedule_instances.eligibility_schedule_instances_request_builder import EligibilityScheduleInstancesRequestBuilder + + return EligibilityScheduleInstancesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def eligibility_schedule_requests(self) -> EligibilityScheduleRequestsRequestBuilder: + """ + Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .eligibility_schedule_requests.eligibility_schedule_requests_request_builder import EligibilityScheduleRequestsRequestBuilder + + return EligibilityScheduleRequestsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def eligibility_schedules(self) -> EligibilitySchedulesRequestBuilder: + """ + Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + """ + from .eligibility_schedules.eligibility_schedules_request_builder import EligibilitySchedulesRequestBuilder + + return EligibilitySchedulesRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GroupRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class GroupRequestBuilderGetQueryParameters(): + """ + A group that's governed through Privileged Identity Management (PIM). + """ + 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 GroupRequestBuilderGetRequestConfiguration(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[GroupRequestBuilder.GroupRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GroupRequestBuilderPatchRequestConfiguration(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/identity_governance/privileged_access/privileged_access_request_builder.py b/msgraph/generated/identity_governance/privileged_access/privileged_access_request_builder.py new file mode 100644 index 00000000000..b987233d1b1 --- /dev/null +++ b/msgraph/generated/identity_governance/privileged_access/privileged_access_request_builder.py @@ -0,0 +1,224 @@ +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.privileged_access_root import PrivilegedAccessRoot + from .group.group_request_builder import GroupRequestBuilder + +class PrivilegedAccessRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the privilegedAccess property of the microsoft.graph.identityGovernance entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PrivilegedAccessRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identityGovernance/privilegedAccess{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PrivilegedAccessRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property privilegedAccess for identityGovernance + 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[PrivilegedAccessRequestBuilderGetRequestConfiguration] = None) -> Optional[PrivilegedAccessRoot]: + """ + Get privilegedAccess from identityGovernance + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessRoot] + """ + 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.privileged_access_root import PrivilegedAccessRoot + + return await self.request_adapter.send_async(request_info, PrivilegedAccessRoot, error_mapping) + + async def patch(self,body: Optional[PrivilegedAccessRoot] = None, request_configuration: Optional[PrivilegedAccessRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrivilegedAccessRoot]: + """ + Update the navigation property privilegedAccess in identityGovernance + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PrivilegedAccessRoot] + """ + 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.privileged_access_root import PrivilegedAccessRoot + + return await self.request_adapter.send_async(request_info, PrivilegedAccessRoot, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PrivilegedAccessRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property privilegedAccess for identityGovernance + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PrivilegedAccessRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get privilegedAccess from identityGovernance + 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(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[PrivilegedAccessRoot] = None, request_configuration: Optional[PrivilegedAccessRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property privilegedAccess in identityGovernance + param body: The request body + param request_configuration: Configuration for 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(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) -> PrivilegedAccessRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PrivilegedAccessRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PrivilegedAccessRequestBuilder(self.request_adapter, raw_url) + + @property + def group(self) -> GroupRequestBuilder: + """ + Provides operations to manage the group property of the microsoft.graph.privilegedAccessRoot entity. + """ + from .group.group_request_builder import GroupRequestBuilder + + return GroupRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PrivilegedAccessRequestBuilderGetQueryParameters(): + """ + Get privilegedAccess from identityGovernance + """ + 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 PrivilegedAccessRequestBuilderGetRequestConfiguration(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[PrivilegedAccessRequestBuilder.PrivilegedAccessRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PrivilegedAccessRequestBuilderPatchRequestConfiguration(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/identity_governance/terms_of_use/agreement_acceptances/agreement_acceptances_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/agreement_acceptances_request_builder.py index b8a93d98a81..ebc353b65ec 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/agreement_acceptances_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/agreement_acceptances_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AgreementAcceptancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AgreementAcceptance] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/count/count_request_builder.py index eefba8119ec..9fd6c0d2d1b 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/item/agreement_acceptance_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/item/agreement_acceptance_item_request_builder.py index 3e5dbaaf364..613a7bf769b 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/item/agreement_acceptance_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreement_acceptances/item/agreement_acceptance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementAcceptanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AgreementAcceptanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementAcceptance] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/agreements_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/agreements_request_builder.py index 0ded2abaf21..c15c8b799e2 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/agreements_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/agreements_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_id(self,agreement_id: str) -> AgreementItemRequestBuilder: async def get(self,request_configuration: Optional[AgreementsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementCollectionResponse]: """ - Retrieve a list of agreement objects. + Retrieve a list of agreement objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termsofusecontainer-list-agreements?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AgreementsRequestBuilderGetRe async def post(self,body: Optional[Agreement] = None, request_configuration: Optional[AgreementsRequestBuilderPostRequestConfiguration] = None) -> Optional[Agreement]: """ - Create a new agreement object. + Create a new agreement object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Agreement] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Agreement] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[AgreementsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of agreement objects. + Retrieve a list of agreement objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Agreement] = None, request_configuration: Optional[AgreementsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new agreement object. + Create a new agreement object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Agreement] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AgreementsRequestBuilderGetQueryParameters(): """ - Retrieve a list of agreement objects. + Retrieve a list of agreement objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/count/count_request_builder.py index c1cb28760f6..b905bf1ed6f 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/acceptances_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/acceptances_request_builder.py index 990742af3b0..3dd4f3ccead 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/acceptances_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/acceptances_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_acceptance_id(self,agreement_acceptance_id: str) -> AgreementAc async def get(self,request_configuration: Optional[AcceptancesRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementAcceptanceCollectionResponse]: """ - Get the details about the acceptance records for a specific agreement. + Get the details about the acceptance records for a specific agreement. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementAcceptanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/agreement-list-acceptances?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AgreementAcceptance] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AcceptancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the details about the acceptance records for a specific agreement. + Get the details about the acceptance records for a specific agreement. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AcceptancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AgreementAcceptance] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AcceptancesRequestBuilderGetQueryParameters(): """ - Get the details about the acceptance records for a specific agreement. + Get the details about the acceptance records for a specific agreement. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/count/count_request_builder.py index 06faee013bb..48eeabcbbee 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py index 9e43154a589..09764c7f8d1 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementAcceptanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementAcceptance] = None, request_configuration: Optional[AgreementAcceptanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementAcceptance] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 2962f0516f9..92560bf93b7 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 @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AgreementItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an agreement object. + Delete an agreement object. This API is available in the following national cloud deployments. 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/agreement-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ 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 all files related to an agreement. This includes the default file and all localized files. This API is available in the following national cloud deployments. 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 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[AgreementItemRequestBuilderGe async def patch(self,body: Optional[Agreement] = None, request_configuration: Optional[AgreementItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Agreement]: """ - Update the properties of an agreement object. + Update the properties of an agreement object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Agreement] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Agreement] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[AgreementItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an agreement object. + Delete an agreement object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info 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 all files related to an agreement. This includes the default file and all localized files. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Agreement] = None, request_configuration: Optional[AgreementItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an agreement object. + Update the properties of an agreement object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Agreement] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class AgreementItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class AgreementItemRequestBuilderGetQueryParameters(): """ - Retrieve all files related to an agreement. This includes the default file and all localized files. + Retrieve all files related to an agreement. This includes the default file and all localized files. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/file_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/file_request_builder.py index f2f95eea2c0..ac901f0a7ee 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/file_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/file_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[FileRequestBuilderDeleteRe async def get(self,request_configuration: Optional[FileRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFile]: """ - Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. + Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFile] Find more info here: https://learn.microsoft.com/graph/api/agreementfile-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[FileReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FileRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. + Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFile] = None, request_configuration: Optional[FileRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AgreementFile] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class FileRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class FileRequestBuilderGetQueryParameters(): """ - Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. + Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/count/count_request_builder.py index 5ae0d1abf39..921648f4199 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py index 1cbf595aa6a..af7572f2786 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementFil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileLocalization] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/count/count_request_builder.py index 66c41755f77..1fa1f14727a 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py index 1dd399ff92f..0ab2cde66a9 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AgreementFileVersionItemRe async def get(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersion]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersion] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[AgreementFileVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileVersion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class AgreementFileVersionItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class AgreementFileVersionItemRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/versions_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/versions_request_builder.py index 54cf3a5103d..e1de2d2f8e6 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/versions_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_file_version_id(self,agreement_file_version_id: str) -> Agreeme async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersionCollectionResponse]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[AgreementFileVersion] = None, request_configu def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AgreementFileVersion] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/localizations_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/localizations_request_builder.py index 1c0986c75eb..06d3ac4acfa 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/localizations_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/file/localizations/localizations_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_file_localization_id(self,agreement_file_localization_id: str) async def get(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileLocalizationCollectionResponse]: """ - Get a list of the default and localized agreement files. + Get a list of the default and localized agreement files. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileLocalizationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/agreementfile-list-localizations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AgreementFileLocalization] = None, request_co def to_get_request_information(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the default and localized agreement files. + Get a list of the default and localized agreement files. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[LocalizationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AgreementFileLocalization] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LocalizationsRequestBuilderGetQueryParameters(): """ - Get a list of the default and localized agreement files. + Get a list of the default and localized agreement files. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/count/count_request_builder.py index cb81be99cdb..fcb85719194 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/files_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/files_request_builder.py index 2927a8568dc..c7bd9e5b4b1 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/files_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/files_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[FilesRequestBuilderGetRequest async def post(self,body: Optional[AgreementFileLocalization] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> Optional[AgreementFileLocalization]: """ - Create a new localized agreement file. + Create a new localized agreement file. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileLocalization] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[FilesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[FilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new localized agreement file. + Create a new localized agreement file. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AgreementFileLocalization] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/agreement_file_localization_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/agreement_file_localization_item_request_builder.py index a6a20dda796..3b553d4ed03 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/agreement_file_localization_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/agreement_file_localization_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementFil Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileLocalization] = None, request_configuration: Optional[AgreementFileLocalizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileLocalization] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/count/count_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/count/count_request_builder.py index 6092ce430d2..621ea94ffc7 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/count/count_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py index 42d30780d9e..bfd037fe521 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AgreementFileVersionItemRe async def get(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersion]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersion] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[Agreement Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AgreementFileVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[AgreementFileVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AgreementFileVersion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class AgreementFileVersionItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class AgreementFileVersionItemRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/versions_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/versions_request_builder.py index c3c8065bb07..3db5b398609 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/versions_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/files/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_agreement_file_version_id(self,agreement_file_version_id: str) -> Agreeme async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileVersionCollectionResponse]: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementFileVersionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[AgreementFileVersion] = None, request_configu def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AgreementFileVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AgreementFileVersion] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/terms_of_use_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/terms_of_use_request_builder.py index e59214c0f42..bcc9c971e66 100644 --- a/msgraph/generated/identity_governance/terms_of_use/terms_of_use_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/terms_of_use_request_builder.py @@ -12,8 +12,8 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from ...models.terms_of_use_container import TermsOfUseContainer - from .agreement_acceptances.agreement_acceptances_request_builder import AgreementAcceptancesRequestBuilder from .agreements.agreements_request_builder import AgreementsRequestBuilder + from .agreement_acceptances.agreement_acceptances_request_builder import AgreementAcceptancesRequestBuilder class TermsOfUseRequestBuilder(BaseRequestBuilder): """ @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermsOfUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermsOfUseRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermsOfUseRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TermsOfUseContainer] = None, request_configuration: Optional[TermsOfUseRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TermsOfUseContainer] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/identity_protection_request_builder.py b/msgraph/generated/identity_protection/identity_protection_request_builder.py index 2e2504b529f..0f8190c5440 100644 --- a/msgraph/generated/identity_protection/identity_protection_request_builder.py +++ b/msgraph/generated/identity_protection/identity_protection_request_builder.py @@ -12,9 +12,9 @@ if TYPE_CHECKING: from ..models.identity_protection_root import IdentityProtectionRoot from ..models.o_data_errors.o_data_error import ODataError - from .risk_detections.risk_detections_request_builder import RiskDetectionsRequestBuilder from .risky_service_principals.risky_service_principals_request_builder import RiskyServicePrincipalsRequestBuilder from .risky_users.risky_users_request_builder import RiskyUsersRequestBuilder + from .risk_detections.risk_detections_request_builder import RiskDetectionsRequestBuilder from .service_principal_risk_detections.service_principal_risk_detections_request_builder import ServicePrincipalRiskDetectionsRequestBuilder class IdentityProtectionRequestBuilder(BaseRequestBuilder): @@ -82,14 +82,14 @@ def to_get_request_information(self,request_configuration: Optional[IdentityProt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProtectionRoot] = None, request_configuration: Optional[IdentityProtectionRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -102,13 +102,13 @@ def to_patch_request_information(self,body: Optional[IdentityProtectionRoot] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/risk_detections/count/count_request_builder.py b/msgraph/generated/identity_protection/risk_detections/count/count_request_builder.py index ab6c8edb8cf..af0ee1fbc90 100644 --- a/msgraph/generated/identity_protection/risk_detections/count/count_request_builder.py +++ b/msgraph/generated/identity_protection/risk_detections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_protection/risk_detections/item/risk_detection_item_request_builder.py b/msgraph/generated/identity_protection/risk_detections/item/risk_detection_item_request_builder.py index f01034fa8ef..ee318c52f7f 100644 --- a/msgraph/generated/identity_protection/risk_detections/item/risk_detection_item_request_builder.py +++ b/msgraph/generated/identity_protection/risk_detections/item/risk_detection_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[RiskDetectionItemRequestBu async def get(self,request_configuration: Optional[RiskDetectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskDetection]: """ - Read the properties and relationships of a riskDetection object. + Read the properties and relationships of a riskDetection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskDetection] Find more info here: https://learn.microsoft.com/graph/api/riskdetection-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[RiskDetec Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RiskDetectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a riskDetection object. + Read the properties and relationships of a riskDetection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskDetection] = None, request_configuration: Optional[RiskDetectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[RiskDetection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class RiskDetectionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class RiskDetectionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a riskDetection object. + Read the properties and relationships of a riskDetection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risk_detections/risk_detections_request_builder.py b/msgraph/generated/identity_protection/risk_detections/risk_detections_request_builder.py index 9a3ce4bbd63..07c43c6f272 100644 --- a/msgraph/generated/identity_protection/risk_detections/risk_detections_request_builder.py +++ b/msgraph/generated/identity_protection/risk_detections/risk_detections_request_builder.py @@ -45,7 +45,7 @@ def by_risk_detection_id(self,risk_detection_id: str) -> RiskDetectionItemReques async def get(self,request_configuration: Optional[RiskDetectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskDetectionCollectionResponse]: """ - Get a list of the riskDetection objects and their properties. + Get a list of the riskDetection objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskDetectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/riskdetection-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[RiskDetection] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[RiskDetectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the riskDetection objects and their properties. + Get a list of the riskDetection objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskDetection] = None, request_configuration: Optional[RiskDetectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[RiskDetection] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RiskDetectionsRequestBuilderGetQueryParameters(): """ - Get a list of the riskDetection objects and their properties. + Get a list of the riskDetection objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_service_principals/confirm_compromised/confirm_compromised_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/confirm_compromised/confirm_compromised_request_builder.py index 85047e4c297..f63cb0d1460 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/confirm_compromised/confirm_compromised_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/confirm_compromised/confirm_compromised_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ConfirmCompromisedPostRequestBody] = None, request_configuration: Optional[ConfirmCompromisedRequestBuilderPostRequestConfiguration] = None) -> None: """ - Confirm one or more riskyServicePrincipal objects as compromised. This action sets the targeted service principal account's risk level to high. + Confirm one or more riskyServicePrincipal objects as compromised. This action sets the targeted service principal account's risk level to high. This API is available in the following national cloud deployments. 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[ConfirmCompromisedPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ConfirmCompromisedPostRequestBody] = None, request_configuration: Optional[ConfirmCompromisedRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Confirm one or more riskyServicePrincipal objects as compromised. This action sets the targeted service principal account's risk level to high. + Confirm one or more riskyServicePrincipal objects as compromised. This action sets the targeted service principal account's risk level to high. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ConfirmCompromisedPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/risky_service_principals/count/count_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/count/count_request_builder.py index 4c9fd6a963e..0c6a2fbb638 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/count/count_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_protection/risky_service_principals/dismiss/dismiss_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/dismiss/dismiss_request_builder.py index e8ac3819d66..f6991ac8435 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/dismiss/dismiss_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/dismiss/dismiss_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DismissPostRequestBody] = None, request_configuration: Optional[DismissRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss the risk of one or more riskyServicePrincipal objects. This action sets the targeted service principal account's risk level to none. You can dismiss up to 60 service principal accounts in one request. + Dismiss the risk of one or more riskyServicePrincipal objects. This action sets the targeted service principal account's risk level to none. You can dismiss up to 60 service principal accounts in one request. This API is available in the following national cloud deployments. 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[DismissPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DismissPostRequestBody] = None, request_configuration: Optional[DismissRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss the risk of one or more riskyServicePrincipal objects. This action sets the targeted service principal account's risk level to none. You can dismiss up to 60 service principal accounts in one request. + Dismiss the risk of one or more riskyServicePrincipal objects. This action sets the targeted service principal account's risk level to none. You can dismiss up to 60 service principal accounts in one request. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DismissPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/risky_service_principals/item/history/count/count_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/item/history/count/count_request_builder.py index 777f1cded7d..26c265096f6 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/item/history/count/count_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/item/history/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_protection/risky_service_principals/item/history/history_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/item/history/history_request_builder.py index a0ebaf6dfed..a508180e714 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/item/history/history_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/item/history/history_request_builder.py @@ -45,7 +45,7 @@ def by_risky_service_principal_history_item_id(self,risky_service_principal_hist async def get(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyServicePrincipalHistoryItemCollectionResponse]: """ - Get the risk history of a riskyServicePrincipal object. + Get the risk history of a riskyServicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyServicePrincipalHistoryItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/riskyserviceprincipal-list-history?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[RiskyServicePrincipalHistoryItem] = None, req def to_get_request_information(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the risk history of a riskyServicePrincipal object. + Get the risk history of a riskyServicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyServicePrincipalHistoryItem] = None, request_configuration: Optional[HistoryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[RiskyServicePrincipalHistory if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HistoryRequestBuilderGetQueryParameters(): """ - Get the risk history of a riskyServicePrincipal object. + Get the risk history of a riskyServicePrincipal object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_service_principals/item/history/item/risky_service_principal_history_item_item_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/item/history/item/risky_service_principal_history_item_item_request_builder.py index f1664f257a5..cc420bb1286 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/item/history/item/risky_service_principal_history_item_item_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/item/history/item/risky_service_principal_history_item_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[RiskyServicePrincipalHisto async def get(self,request_configuration: Optional[RiskyServicePrincipalHistoryItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyServicePrincipalHistoryItem]: """ - Represents the risk history of Azure AD service principals. + Represents the risk history of Microsoft Entra service principals. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyServicePrincipalHistoryItem] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[RiskyServ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RiskyServicePrincipalHistoryItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Represents the risk history of Azure AD service principals. + Represents the risk history of Microsoft Entra service principals. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyServicePrincipalHistoryItem] = None, request_configuration: Optional[RiskyServicePrincipalHistoryItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[RiskyServicePrincipalHistor if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class RiskyServicePrincipalHistoryItemItemRequestBuilderDeleteRequestConfigurati @dataclass class RiskyServicePrincipalHistoryItemItemRequestBuilderGetQueryParameters(): """ - Represents the risk history of Azure AD service principals. + Represents the risk history of Microsoft Entra service principals. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_service_principals/item/risky_service_principal_item_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/item/risky_service_principal_item_request_builder.py index 5b9d18f565b..040e2d48bff 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/item/risky_service_principal_item_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/item/risky_service_principal_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RiskyServicePrincipalItemR async def get(self,request_configuration: Optional[RiskyServicePrincipalItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyServicePrincipal]: """ - Read the properties and relationships of a riskyServicePrincipal object. + Read the properties and relationships of a riskyServicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyServicePrincipal] Find more info here: https://learn.microsoft.com/graph/api/riskyserviceprincipal-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[RiskyServ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RiskyServicePrincipalItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a riskyServicePrincipal object. + Read the properties and relationships of a riskyServicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyServicePrincipal] = None, request_configuration: Optional[RiskyServicePrincipalItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[RiskyServicePrincipal] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class RiskyServicePrincipalItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class RiskyServicePrincipalItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a riskyServicePrincipal object. + Read the properties and relationships of a riskyServicePrincipal object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_service_principals/risky_service_principals_request_builder.py b/msgraph/generated/identity_protection/risky_service_principals/risky_service_principals_request_builder.py index 5f92ae576fc..36922031d32 100644 --- a/msgraph/generated/identity_protection/risky_service_principals/risky_service_principals_request_builder.py +++ b/msgraph/generated/identity_protection/risky_service_principals/risky_service_principals_request_builder.py @@ -47,7 +47,7 @@ def by_risky_service_principal_id(self,risky_service_principal_id: str) -> Risky async def get(self,request_configuration: Optional[RiskyServicePrincipalsRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyServicePrincipalCollectionResponse]: """ - Retrieve the properties and relationships of riskyServicePrincipal objects. + Retrieve the properties and relationships of riskyServicePrincipal objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyServicePrincipalCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identityprotectionroot-list-riskyserviceprincipals?view=graph-rest-1.0 @@ -93,19 +93,19 @@ async def post(self,body: Optional[RiskyServicePrincipal] = None, request_config def to_get_request_information(self,request_configuration: Optional[RiskyServicePrincipalsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of riskyServicePrincipal objects. + Retrieve the properties and relationships of riskyServicePrincipal objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyServicePrincipal] = None, request_configuration: Optional[RiskyServicePrincipalsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[RiskyServicePrincipal] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ def dismiss(self) -> DismissRequestBuilder: @dataclass class RiskyServicePrincipalsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of riskyServicePrincipal objects. + Retrieve the properties and relationships of riskyServicePrincipal objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_users/confirm_compromised/confirm_compromised_request_builder.py b/msgraph/generated/identity_protection/risky_users/confirm_compromised/confirm_compromised_request_builder.py index 7f60f5a5d08..a9967312267 100644 --- a/msgraph/generated/identity_protection/risky_users/confirm_compromised/confirm_compromised_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/confirm_compromised/confirm_compromised_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ConfirmCompromisedPostRequestBody] = None, request_configuration: Optional[ConfirmCompromisedRequestBuilderPostRequestConfiguration] = None) -> None: """ - Confirm one or more riskyUser objects as compromised. This action sets the targeted user's risk level to high. + Confirm one or more riskyUser objects as compromised. This action sets the targeted user's risk level to high. This API is available in the following national cloud deployments. 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[ConfirmCompromisedPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ConfirmCompromisedPostRequestBody] = None, request_configuration: Optional[ConfirmCompromisedRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Confirm one or more riskyUser objects as compromised. This action sets the targeted user's risk level to high. + Confirm one or more riskyUser objects as compromised. This action sets the targeted user's risk level to high. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ConfirmCompromisedPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/risky_users/count/count_request_builder.py b/msgraph/generated/identity_protection/risky_users/count/count_request_builder.py index e6af61ffe91..e02846b24c1 100644 --- a/msgraph/generated/identity_protection/risky_users/count/count_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_protection/risky_users/dismiss/dismiss_request_builder.py b/msgraph/generated/identity_protection/risky_users/dismiss/dismiss_request_builder.py index f8955df4035..6904cb568ce 100644 --- a/msgraph/generated/identity_protection/risky_users/dismiss/dismiss_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/dismiss/dismiss_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DismissPostRequestBody] = None, request_configuration: Optional[DismissRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss the risk of one or more riskyUser objects. This action sets the targeted user's risk level to none. + Dismiss the risk of one or more riskyUser objects. This action sets the targeted user's risk level to none. This API is available in the following national cloud deployments. 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[DismissPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DismissPostRequestBody] = None, request_configuration: Optional[DismissRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss the risk of one or more riskyUser objects. This action sets the targeted user's risk level to none. + Dismiss the risk of one or more riskyUser objects. This action sets the targeted user's risk level to none. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DismissPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/risky_users/item/history/count/count_request_builder.py b/msgraph/generated/identity_protection/risky_users/item/history/count/count_request_builder.py index 7551ce906ac..f67e21637c9 100644 --- a/msgraph/generated/identity_protection/risky_users/item/history/count/count_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/item/history/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 f28cd6378d5..823d3f3f12d 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,7 +45,7 @@ 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]: """ - Get the riskyUserHistoryItems from the history navigation property. + Get the riskyUserHistoryItems from the history navigation property. This API is available in the following national cloud deployments. 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-list-history?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[RiskyUserHistoryItem] = None, request_configu def to_get_request_information(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the riskyUserHistoryItems from the history navigation property. + Get the riskyUserHistoryItems from the history navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyUserHistoryItem] = None, request_configuration: Optional[HistoryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[RiskyUserHistoryItem] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HistoryRequestBuilderGetQueryParameters(): """ - Get the riskyUserHistoryItems from the history navigation property. + Get the riskyUserHistoryItems from the history navigation property. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_users/item/history/item/risky_user_history_item_item_request_builder.py b/msgraph/generated/identity_protection/risky_users/item/history/item/risky_user_history_item_item_request_builder.py index 1f163519c11..2f19ab636e9 100644 --- a/msgraph/generated/identity_protection/risky_users/item/history/item/risky_user_history_item_item_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/item/history/item/risky_user_history_item_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[RiskyUser Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RiskyUserHistoryItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[RiskyUserHis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyUserHistoryItem] = None, request_configuration: Optional[RiskyUserHistoryItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[RiskyUserHistoryItem] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/identity_protection/risky_users/item/risky_user_item_request_builder.py b/msgraph/generated/identity_protection/risky_users/item/risky_user_item_request_builder.py index 3fc90a475ee..7b0acdca72a 100644 --- a/msgraph/generated/identity_protection/risky_users/item/risky_user_item_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/item/risky_user_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RiskyUserItemRequestBuilde async def get(self,request_configuration: Optional[RiskyUserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyUser]: """ - Read the properties and relationships of a riskyUser object. + Read the properties and relationships of a riskyUser object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyUser] Find more info here: https://learn.microsoft.com/graph/api/riskyuser-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[RiskyUser Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RiskyUserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a riskyUser object. + Read the properties and relationships of a riskyUser object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyUser] = None, request_configuration: Optional[RiskyUserItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[RiskyUser] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class RiskyUserItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class RiskyUserItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a riskyUser object. + Read the properties and relationships of a riskyUser object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_users/risky_users_request_builder.py b/msgraph/generated/identity_protection/risky_users/risky_users_request_builder.py index 193c8729469..8392b53f291 100644 --- a/msgraph/generated/identity_protection/risky_users/risky_users_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/risky_users_request_builder.py @@ -47,7 +47,7 @@ def by_risky_user_id(self,risky_user_id: str) -> RiskyUserItemRequestBuilder: async def get(self,request_configuration: Optional[RiskyUsersRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyUserCollectionResponse]: """ - Get a list of the riskyUser objects and their properties. + Get a list of the riskyUser objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/riskyuser-list?view=graph-rest-1.0 @@ -93,19 +93,19 @@ async def post(self,body: Optional[RiskyUser] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[RiskyUsersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the riskyUser objects and their properties. + Get a list of the riskyUser objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RiskyUser] = None, request_configuration: Optional[RiskyUsersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[RiskyUser] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ def dismiss(self) -> DismissRequestBuilder: @dataclass class RiskyUsersRequestBuilderGetQueryParameters(): """ - Get a list of the riskyUser objects and their properties. + Get a list of the riskyUser objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/service_principal_risk_detections/count/count_request_builder.py b/msgraph/generated/identity_protection/service_principal_risk_detections/count/count_request_builder.py index 38d996d0590..70465597eaa 100644 --- a/msgraph/generated/identity_protection/service_principal_risk_detections/count/count_request_builder.py +++ b/msgraph/generated/identity_protection/service_principal_risk_detections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_protection/service_principal_risk_detections/item/service_principal_risk_detection_item_request_builder.py b/msgraph/generated/identity_protection/service_principal_risk_detections/item/service_principal_risk_detection_item_request_builder.py index 44f2a63416f..16cbac3abf3 100644 --- a/msgraph/generated/identity_protection/service_principal_risk_detections/item/service_principal_risk_detection_item_request_builder.py +++ b/msgraph/generated/identity_protection/service_principal_risk_detections/item/service_principal_risk_detection_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ServicePrincipalRiskDetect async def get(self,request_configuration: Optional[ServicePrincipalRiskDetectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ServicePrincipalRiskDetection]: """ - Read the properties and relationships of a servicePrincipalRiskDetection object. + Read the properties and relationships of a servicePrincipalRiskDetection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServicePrincipalRiskDetection] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipalriskdetection-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[ServicePr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServicePrincipalRiskDetectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a servicePrincipalRiskDetection object. + Read the properties and relationships of a servicePrincipalRiskDetection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServicePrincipalRiskDetection] = None, request_configuration: Optional[ServicePrincipalRiskDetectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ServicePrincipalRiskDetecti if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ServicePrincipalRiskDetectionItemRequestBuilderDeleteRequestConfiguration( @dataclass class ServicePrincipalRiskDetectionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a servicePrincipalRiskDetection object. + Read the properties and relationships of a servicePrincipalRiskDetection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/service_principal_risk_detections/service_principal_risk_detections_request_builder.py b/msgraph/generated/identity_protection/service_principal_risk_detections/service_principal_risk_detections_request_builder.py index 241c9a636c8..51222f938e9 100644 --- a/msgraph/generated/identity_protection/service_principal_risk_detections/service_principal_risk_detections_request_builder.py +++ b/msgraph/generated/identity_protection/service_principal_risk_detections/service_principal_risk_detections_request_builder.py @@ -45,7 +45,7 @@ def by_service_principal_risk_detection_id(self,service_principal_risk_detection async def get(self,request_configuration: Optional[ServicePrincipalRiskDetectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServicePrincipalRiskDetectionCollectionResponse]: """ - Retrieve the properties of a collection of servicePrincipalRiskDetection objects. + Retrieve the properties of a collection of servicePrincipalRiskDetection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServicePrincipalRiskDetectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identityprotectionroot-list-serviceprincipalriskdetections?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ServicePrincipalRiskDetection] = None, reques def to_get_request_information(self,request_configuration: Optional[ServicePrincipalRiskDetectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a collection of servicePrincipalRiskDetection objects. + Retrieve the properties of a collection of servicePrincipalRiskDetection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServicePrincipalRiskDetection] = None, request_configuration: Optional[ServicePrincipalRiskDetectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ServicePrincipalRiskDetectio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ServicePrincipalRiskDetectionsRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a collection of servicePrincipalRiskDetection objects. + Retrieve the properties of a collection of servicePrincipalRiskDetection objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_providers/available_provider_types/available_provider_types_response.py b/msgraph/generated/identity_providers/available_provider_types/available_provider_types_get_response.py similarity index 89% rename from msgraph/generated/identity_providers/available_provider_types/available_provider_types_response.py rename to msgraph/generated/identity_providers/available_provider_types/available_provider_types_get_response.py index c3f6f296422..19448db6612 100644 --- a/msgraph/generated/identity_providers/available_provider_types/available_provider_types_response.py +++ b/msgraph/generated/identity_providers/available_provider_types/available_provider_types_get_response.py @@ -9,20 +9,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AvailableProviderTypesResponse(BaseCollectionPaginationCountResponse): +class AvailableProviderTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[str]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AvailableProviderTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AvailableProviderTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AvailableProviderTypesResponse + Returns: AvailableProviderTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AvailableProviderTypesResponse() + return AvailableProviderTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/identity_providers/available_provider_types/available_provider_types_request_builder.py b/msgraph/generated/identity_providers/available_provider_types/available_provider_types_request_builder.py index 5d722886b3c..36a966e188b 100644 --- a/msgraph/generated/identity_providers/available_provider_types/available_provider_types_request_builder.py +++ b/msgraph/generated/identity_providers/available_provider_types/available_provider_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .available_provider_types_response import AvailableProviderTypesResponse + from .available_provider_types_get_response import AvailableProviderTypesGetResponse class AvailableProviderTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/identityProviders/availableProviderTypes(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[AvailableProviderTypesResponse]: + async def get(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[AvailableProviderTypesGetResponse]: """ Invoke function availableProviderTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AvailableProviderTypesResponse] + Returns: Optional[AvailableProviderTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[AvailableProviderTypesRequest } if not self.request_adapter: raise Exception("Http core is null") - from .available_provider_types_response import AvailableProviderTypesResponse + from .available_provider_types_get_response import AvailableProviderTypesGetResponse - return await self.request_adapter.send_async(request_info, AvailableProviderTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AvailableProviderTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AvailableProviderTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AvailablePro Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AvailableProviderTypesRequestBuilder: diff --git a/msgraph/generated/identity_providers/count/count_request_builder.py b/msgraph/generated/identity_providers/count/count_request_builder.py index b6002dbda62..21841f942f6 100644 --- a/msgraph/generated/identity_providers/count/count_request_builder.py +++ b/msgraph/generated/identity_providers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/identity_providers/identity_providers_request_builder.py b/msgraph/generated/identity_providers/identity_providers_request_builder.py index 09321a66614..49243be4ce8 100644 --- a/msgraph/generated/identity_providers/identity_providers_request_builder.py +++ b/msgraph/generated/identity_providers/identity_providers_request_builder.py @@ -46,7 +46,7 @@ def by_identity_provider_id(self,identity_provider_id: str) -> IdentityProviderI async def get(self,request_configuration: Optional[IdentityProvidersRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityProviderCollectionResponse]: """ - Retrieve all identityProviders in the directory. + Retrieve all identityProviders in the directory. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProviderCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/identityprovider-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[IdentityProvidersRequestBuild async def post(self,body: Optional[IdentityProvider] = None, request_configuration: Optional[IdentityProvidersRequestBuilderPostRequestConfiguration] = None) -> Optional[IdentityProvider]: """ - Create a new identityProvider by specifying display name, identityProvider type, client ID, and client secret. + Create a new identityProvider by specifying display name, identityProvider type, client ID, and client secret. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProvider] @@ -93,24 +93,24 @@ async def post(self,body: Optional[IdentityProvider] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[IdentityProvidersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve all identityProviders in the directory. + Retrieve all identityProviders in the directory. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProvider] = None, request_configuration: Optional[IdentityProvidersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new identityProvider by specifying display name, identityProvider type, client ID, and client secret. + Create a new identityProvider by specifying display name, identityProvider type, client ID, and client secret. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[IdentityProvider] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IdentityProvidersRequestBuilderGetQueryParameters(): """ - Retrieve all identityProviders in the directory. + Retrieve all identityProviders in the directory. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_providers/item/identity_provider_item_request_builder.py b/msgraph/generated/identity_providers/item/identity_provider_item_request_builder.py index fb9a6e8f953..3a2acbc2f5a 100644 --- a/msgraph/generated/identity_providers/item/identity_provider_item_request_builder.py +++ b/msgraph/generated/identity_providers/item/identity_provider_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentityProviderItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an existing identityProvider. + Delete an existing identityProvider. This API is available in the following national cloud deployments. 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/identityprovider-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IdentityProviderItemReques async def get(self,request_configuration: Optional[IdentityProviderItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentityProvider]: """ - Retrieve the properties of an existing identityProvider. + Retrieve the properties of an existing identityProvider. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProvider] Find more info here: https://learn.microsoft.com/graph/api/identityprovider-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[IdentityProviderItemRequestBu async def patch(self,body: Optional[IdentityProvider] = None, request_configuration: Optional[IdentityProviderItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[IdentityProvider]: """ - Update properties in an existing identityProvider. + Update properties in an existing identityProvider. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentityProvider] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[IdentityProvider] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[IdentityProviderItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an existing identityProvider. + Delete an existing identityProvider. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentityProviderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of an existing identityProvider. + Retrieve the properties of an existing identityProvider. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentityProvider] = None, request_configuration: Optional[IdentityProviderItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update properties in an existing identityProvider. + Update properties in an existing identityProvider. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[IdentityProvider] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class IdentityProviderItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class IdentityProviderItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of an existing identityProvider. + Retrieve the properties of an existing identityProvider. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/information_protection/bitlocker/bitlocker_request_builder.py b/msgraph/generated/information_protection/bitlocker/bitlocker_request_builder.py index 0ca2d6af327..7d8ffb1cdcf 100644 --- a/msgraph/generated/information_protection/bitlocker/bitlocker_request_builder.py +++ b/msgraph/generated/information_protection/bitlocker/bitlocker_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[BitlockerReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BitlockerRequestBuilder: diff --git a/msgraph/generated/information_protection/bitlocker/recovery_keys/count/count_request_builder.py b/msgraph/generated/information_protection/bitlocker/recovery_keys/count/count_request_builder.py index f5d9485512e..2ba4d786300 100644 --- a/msgraph/generated/information_protection/bitlocker/recovery_keys/count/count_request_builder.py +++ b/msgraph/generated/information_protection/bitlocker/recovery_keys/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/information_protection/bitlocker/recovery_keys/item/bitlocker_recovery_key_item_request_builder.py b/msgraph/generated/information_protection/bitlocker/recovery_keys/item/bitlocker_recovery_key_item_request_builder.py index 6040951dde9..c27c647216d 100644 --- a/msgraph/generated/information_protection/bitlocker/recovery_keys/item/bitlocker_recovery_key_item_request_builder.py +++ b/msgraph/generated/information_protection/bitlocker/recovery_keys/item/bitlocker_recovery_key_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[BitlockerRecoveryKeyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BitlockerRecoveryKey]: """ - Retrieve the properties and relationships of a bitlockerRecoveryKey object. By default, this operation does not return the key property that represents the actual recovery key. To include the key property in the response, use the $select OData query parameter. Including the $select query parameter triggers an Azure AD audit of the operation and generates an audit log. For more information on audit logs for bitlocker recovery keys, see the KeyManagement category filter of Azure AD audit logs. + Retrieve the properties and relationships of a bitlockerRecoveryKey object. By default, this operation doesn't return the key property that represents the actual recovery key. To include the key property in the response, use the $select OData query parameter. Including the $select query parameter triggers a Microsoft Entra audit of the operation and generates an audit log. For more information on audit logs for bitlocker recovery keys, see the KeyManagement category filter of Microsoft Entra audit logs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BitlockerRecoveryKey] Find more info here: https://learn.microsoft.com/graph/api/bitlockerrecoverykey-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[BitlockerRecoveryKeyItemReque def to_get_request_information(self,request_configuration: Optional[BitlockerRecoveryKeyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a bitlockerRecoveryKey object. By default, this operation does not return the key property that represents the actual recovery key. To include the key property in the response, use the $select OData query parameter. Including the $select query parameter triggers an Azure AD audit of the operation and generates an audit log. For more information on audit logs for bitlocker recovery keys, see the KeyManagement category filter of Azure AD audit logs. + Retrieve the properties and relationships of a bitlockerRecoveryKey object. By default, this operation doesn't return the key property that represents the actual recovery key. To include the key property in the response, use the $select OData query parameter. Including the $select query parameter triggers a Microsoft Entra audit of the operation and generates an audit log. For more information on audit logs for bitlocker recovery keys, see the KeyManagement category filter of Microsoft Entra audit logs. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BitlockerRecoveryKeyItemRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> BitlockerRecoveryKeyItemRequ @dataclass class BitlockerRecoveryKeyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a bitlockerRecoveryKey object. By default, this operation does not return the key property that represents the actual recovery key. To include the key property in the response, use the $select OData query parameter. Including the $select query parameter triggers an Azure AD audit of the operation and generates an audit log. For more information on audit logs for bitlocker recovery keys, see the KeyManagement category filter of Azure AD audit logs. + Retrieve the properties and relationships of a bitlockerRecoveryKey object. By default, this operation doesn't return the key property that represents the actual recovery key. To include the key property in the response, use the $select OData query parameter. Including the $select query parameter triggers a Microsoft Entra audit of the operation and generates an audit log. For more information on audit logs for bitlocker recovery keys, see the KeyManagement category filter of Microsoft Entra audit logs. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/information_protection/bitlocker/recovery_keys/recovery_keys_request_builder.py b/msgraph/generated/information_protection/bitlocker/recovery_keys/recovery_keys_request_builder.py index 4512b9ee850..b0f16b9d7f4 100644 --- a/msgraph/generated/information_protection/bitlocker/recovery_keys/recovery_keys_request_builder.py +++ b/msgraph/generated/information_protection/bitlocker/recovery_keys/recovery_keys_request_builder.py @@ -44,7 +44,7 @@ def by_bitlocker_recovery_key_id(self,bitlocker_recovery_key_id: str) -> Bitlock async def get(self,request_configuration: Optional[RecoveryKeysRequestBuilderGetRequestConfiguration] = None) -> Optional[BitlockerRecoveryKeyCollectionResponse]: """ - Get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the key property. For information about how to read the key property, see Get bitlockerRecoveryKey. + Get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the key property. For information about how to read the key property, see Get bitlockerRecoveryKey. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BitlockerRecoveryKeyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bitlocker-list-recoverykeys?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[RecoveryKeysRequestBuilderGet def to_get_request_information(self,request_configuration: Optional[RecoveryKeysRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the key property. For information about how to read the key property, see Get bitlockerRecoveryKey. + Get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the key property. For information about how to read the key property, see Get bitlockerRecoveryKey. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RecoveryKeysRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RecoveryKeysRequestBuilderGetQueryParameters(): """ - Get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the key property. For information about how to read the key property, see Get bitlockerRecoveryKey. + Get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the key property. For information about how to read the key property, see Get bitlockerRecoveryKey. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/information_protection/information_protection_request_builder.py b/msgraph/generated/information_protection/information_protection_request_builder.py index f74cc947022..4217b3c0ef4 100644 --- a/msgraph/generated/information_protection/information_protection_request_builder.py +++ b/msgraph/generated/information_protection/information_protection_request_builder.py @@ -80,14 +80,14 @@ def to_get_request_information(self,request_configuration: Optional[InformationP Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InformationProtection] = None, request_configuration: Optional[InformationProtectionRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[InformationProtection] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/information_protection/threat_assessment_requests/count/count_request_builder.py b/msgraph/generated/information_protection/threat_assessment_requests/count/count_request_builder.py index 9ea7ad6231c..fc7cd2570e7 100644 --- a/msgraph/generated/information_protection/threat_assessment_requests/count/count_request_builder.py +++ b/msgraph/generated/information_protection/threat_assessment_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/information_protection/threat_assessment_requests/item/results/count/count_request_builder.py b/msgraph/generated/information_protection/threat_assessment_requests/item/results/count/count_request_builder.py index ee50e48d1ed..5e0272e1380 100644 --- a/msgraph/generated/information_protection/threat_assessment_requests/item/results/count/count_request_builder.py +++ b/msgraph/generated/information_protection/threat_assessment_requests/item/results/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/information_protection/threat_assessment_requests/item/results/item/threat_assessment_result_item_request_builder.py b/msgraph/generated/information_protection/threat_assessment_requests/item/results/item/threat_assessment_result_item_request_builder.py index f60d919babc..a894009cfb6 100644 --- a/msgraph/generated/information_protection/threat_assessment_requests/item/results/item/threat_assessment_result_item_request_builder.py +++ b/msgraph/generated/information_protection/threat_assessment_requests/item/results/item/threat_assessment_result_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ThreatAss Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ThreatAssessmentResultItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ThreatAssess Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThreatAssessmentResult] = None, request_configuration: Optional[ThreatAssessmentResultItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ThreatAssessmentResult] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/information_protection/threat_assessment_requests/item/results/results_request_builder.py b/msgraph/generated/information_protection/threat_assessment_requests/item/results/results_request_builder.py index 7454de51a6c..699f7920747 100644 --- a/msgraph/generated/information_protection/threat_assessment_requests/item/results/results_request_builder.py +++ b/msgraph/generated/information_protection/threat_assessment_requests/item/results/results_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResultsReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThreatAssessmentResult] = None, request_configuration: Optional[ResultsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ThreatAssessmentResult] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/information_protection/threat_assessment_requests/item/threat_assessment_request_item_request_builder.py b/msgraph/generated/information_protection/threat_assessment_requests/item/threat_assessment_request_item_request_builder.py index d1df6c2d4a4..88edd2c1893 100644 --- a/msgraph/generated/information_protection/threat_assessment_requests/item/threat_assessment_request_item_request_builder.py +++ b/msgraph/generated/information_protection/threat_assessment_requests/item/threat_assessment_request_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ThreatAssessmentRequestIte async def get(self,request_configuration: Optional[ThreatAssessmentRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ThreatAssessmentRequest]: """ - Retrieve the properties and relationships of a specified threatAssessmentRequest object. A threat assessment request can be one of the following types: + Retrieve the properties and relationships of a specified threatAssessmentRequest object. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ThreatAssessmentRequest] Find more info here: https://learn.microsoft.com/graph/api/threatassessmentrequest-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ThreatAss Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ThreatAssessmentRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a specified threatAssessmentRequest object. A threat assessment request can be one of the following types: + Retrieve the properties and relationships of a specified threatAssessmentRequest object. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThreatAssessmentRequest] = None, request_configuration: Optional[ThreatAssessmentRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ThreatAssessmentRequest] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ThreatAssessmentRequestItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class ThreatAssessmentRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a specified threatAssessmentRequest object. A threat assessment request can be one of the following types: + Retrieve the properties and relationships of a specified threatAssessmentRequest object. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/information_protection/threat_assessment_requests/threat_assessment_requests_request_builder.py b/msgraph/generated/information_protection/threat_assessment_requests/threat_assessment_requests_request_builder.py index ede886e62d3..90ab3cd70d0 100644 --- a/msgraph/generated/information_protection/threat_assessment_requests/threat_assessment_requests_request_builder.py +++ b/msgraph/generated/information_protection/threat_assessment_requests/threat_assessment_requests_request_builder.py @@ -45,7 +45,7 @@ def by_threat_assessment_request_id(self,threat_assessment_request_id: str) -> T async def get(self,request_configuration: Optional[ThreatAssessmentRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[ThreatAssessmentRequestCollectionResponse]: """ - Retrieve a list of threatAssessmentRequest objects. A threat assessment request can be one of the following types: + Retrieve a list of threatAssessmentRequest objects. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ThreatAssessmentRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/informationprotection-list-threatassessmentrequests?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ThreatAssessmentRequestsReque async def post(self,body: Optional[ThreatAssessmentRequest] = None, request_configuration: Optional[ThreatAssessmentRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[ThreatAssessmentRequest]: """ - Create a new threat assessment request. A threat assessment request can be one of the following types: + Create a new threat assessment request. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ThreatAssessmentRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ThreatAssessmentRequest] = None, request_conf def to_get_request_information(self,request_configuration: Optional[ThreatAssessmentRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of threatAssessmentRequest objects. A threat assessment request can be one of the following types: + Retrieve a list of threatAssessmentRequest objects. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThreatAssessmentRequest] = None, request_configuration: Optional[ThreatAssessmentRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new threat assessment request. A threat assessment request can be one of the following types: + Create a new threat assessment request. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ThreatAssessmentRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ThreatAssessmentRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of threatAssessmentRequest objects. A threat assessment request can be one of the following types: + Retrieve a list of threatAssessmentRequest objects. A threat assessment request can be one of the following types: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/invitations/count/count_request_builder.py b/msgraph/generated/invitations/count/count_request_builder.py index a7437cbd186..54b11d80ce9 100644 --- a/msgraph/generated/invitations/count/count_request_builder.py +++ b/msgraph/generated/invitations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/invitations/invitations_request_builder.py b/msgraph/generated/invitations/invitations_request_builder.py index 9741c7fede6..561a4203f0b 100644 --- a/msgraph/generated/invitations/invitations_request_builder.py +++ b/msgraph/generated/invitations/invitations_request_builder.py @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[InvitationsRequestBuilderGetR async def post(self,body: Optional[Invitation] = None, request_configuration: Optional[InvitationsRequestBuilderPostRequestConfiguration] = None) -> Optional[Invitation]: """ - Use this API to create a new invitation. Invitation adds an external user to the organization. When creating a new invitation you have several options available: + Use this API to create a new invitation. Invitation adds an external user to the organization. When creating a new invitation, you have several options available: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Invitation] @@ -96,19 +96,19 @@ def to_get_request_information(self,request_configuration: Optional[InvitationsR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Invitation] = None, request_configuration: Optional[InvitationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new invitation. Invitation adds an external user to the organization. When creating a new invitation you have several options available: + Use this API to create a new invitation. Invitation adds an external user to the organization. When creating a new invitation, you have several options available: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Invitation] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/invitations/item/invitation_item_request_builder.py b/msgraph/generated/invitations/item/invitation_item_request_builder.py index 79c22d2fe19..f8ea8b4a0e4 100644 --- a/msgraph/generated/invitations/item/invitation_item_request_builder.py +++ b/msgraph/generated/invitations/item/invitation_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Invitatio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[InvitationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[InvitationIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Invitation] = None, request_configuration: Optional[InvitationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Invitation] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/invitations/item/invited_user/invited_user_request_builder.py b/msgraph/generated/invitations/item/invited_user/invited_user_request_builder.py index efda9e0a6d2..1c7b884adfb 100644 --- a/msgraph/generated/invitations/item/invited_user/invited_user_request_builder.py +++ b/msgraph/generated/invitations/item/invited_user/invited_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class InvitedUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[InvitedUserR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InvitedUserRequestBuilder: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class InvitedUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/invitations/item/invited_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/invitations/item/invited_user/mailbox_settings/mailbox_settings_request_builder.py index a19ed87ac47..c4da9b49721 100644 --- a/msgraph/generated/invitations/item/invited_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/invitations/item/invited_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/invitations/item/invited_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/invitations/item/invited_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..54c1366eec9 --- /dev/null +++ b/msgraph/generated/invitations/item/invited_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/permission_grants/delta/delta_request_builder.py b/msgraph/generated/invitations/item/invited_user/service_provisioning_errors/service_provisioning_errors_request_builder.py similarity index 65% rename from msgraph/generated/groups/item/permission_grants/delta/delta_request_builder.py rename to msgraph/generated/invitations/item/invited_user/service_provisioning_errors/service_provisioning_errors_request_builder.py index 9dec6049927..e802a6c567f 100644 --- a/msgraph/generated/groups/item/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/invitations/item/invited_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -11,26 +11,27 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder -class DeltaRequestBuilder(BaseRequestBuilder): +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Builds and executes requests for operations under /invitations/{invitation-id}/invitedUser/serviceProvisioningErrors """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + super().__init__(request_adapter, "{+baseurl}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[ServiceProvisioningErrorCollectionResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +44,50 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> ServiceProvisioningErrorsRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: ServiceProvisioningErrorsRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): """ - Invoke function delta + Get serviceProvisioningErrors property value """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -89,6 +99,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: 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": @@ -106,6 +118,9 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: # 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 @@ -128,14 +143,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/kiota-lock.json b/msgraph/generated/kiota-lock.json index ed4883acb54..e3b96351c15 100644 --- a/msgraph/generated/kiota-lock.json +++ b/msgraph/generated/kiota-lock.json @@ -1,12 +1,13 @@ { - "descriptionHash": "CBAA9CD9A5ED486BF4A3E16CEA9C7D4FB1788BED22F6CE155FE077D427AA541276A57673615BC8B2AA6B11504FC040903BDFBD6E3C3FFCC71325613B7C5DF5AD", + "descriptionHash": "B2D2F27DFB5C7013578D8B3F1F7E10BE98ED25C1C61777BC2287F62E44FF78C88C5427FAB5A60785CDC9DC0C7BA39F5BD92AAA92197C84E0D2F8D9D4A4DCF417", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.7.0", + "kiotaVersion": "1.8.0", "clientClassName": "BaseGraphServiceClient", "clientNamespaceName": "msgraph.generated", "language": "Python", "usesBackingStore": true, + "excludeBackwardCompatible": false, "includeAdditionalData": true, "serializers": [ "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", diff --git a/msgraph/generated/models/access_action.py b/msgraph/generated/models/access_action.py index 06858eb0d69..fac3f8ebf3c 100644 --- a/msgraph/generated/models/access_action.py +++ b/msgraph/generated/models/access_action.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_answer.py b/msgraph/generated/models/access_package_answer.py index 2e18b9aaadc..546902d54e1 100644 --- a/msgraph/generated/models/access_package_answer.py +++ b/msgraph/generated/models/access_package_answer.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "answeredQuestion": lambda n : setattr(self, 'answered_question', n.get_object_value(AccessPackageQuestion)), "displayValue": lambda n : setattr(self, 'display_value', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("answeredQuestion", self.answered_question) writer.write_str_value("displayValue", self.display_value) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_answer_choice.py b/msgraph/generated/models/access_package_answer_choice.py index f614a1dc276..98ffe14eeb7 100644 --- a/msgraph/generated/models/access_package_answer_choice.py +++ b/msgraph/generated/models/access_package_answer_choice.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "actualValue": lambda n : setattr(self, 'actual_value', n.get_str_value()), "localizations": lambda n : setattr(self, 'localizations', n.get_collection_of_object_values(AccessPackageLocalizedText)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "text": lambda n : setattr(self, 'text', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("actualValue", self.actual_value) writer.write_collection_of_object_values("localizations", self.localizations) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("text", self.text) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_approval_stage.py b/msgraph/generated/models/access_package_approval_stage.py index 5075d5e6480..ae38d5d6e88 100644 --- a/msgraph/generated/models/access_package_approval_stage.py +++ b/msgraph/generated/models/access_package_approval_stage.py @@ -62,7 +62,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "fallbackPrimaryApprovers": lambda n : setattr(self, 'fallback_primary_approvers', n.get_collection_of_object_values(SubjectSet)), "isApproverJustificationRequired": lambda n : setattr(self, 'is_approver_justification_required', n.get_bool_value()), "isEscalationEnabled": lambda n : setattr(self, 'is_escalation_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "primaryApprovers": lambda n : setattr(self, 'primary_approvers', n.get_collection_of_object_values(SubjectSet)), } return fields @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("fallbackPrimaryApprovers", self.fallback_primary_approvers) writer.write_bool_value("isApproverJustificationRequired", self.is_approver_justification_required) writer.write_bool_value("isEscalationEnabled", self.is_escalation_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("primaryApprovers", self.primary_approvers) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_assignment_approval_settings.py b/msgraph/generated/models/access_package_assignment_approval_settings.py index b79f4ff2e53..bb140655b6c 100644 --- a/msgraph/generated/models/access_package_assignment_approval_settings.py +++ b/msgraph/generated/models/access_package_assignment_approval_settings.py @@ -14,9 +14,9 @@ class AccessPackageAssignmentApprovalSettings(AdditionalDataHolder, BackedModel, # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # If false, then approval is not required for new requests in this policy. + # If false, then approval isn't required for new requests in this policy. is_approval_required_for_add: Optional[bool] = None - # If false, then approval is not required for updates to requests in this policy. + # If false, then approval isn't required for updates to requests in this policy. is_approval_required_for_update: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isApprovalRequiredForAdd": lambda n : setattr(self, 'is_approval_required_for_add', n.get_bool_value()), "isApprovalRequiredForUpdate": lambda n : setattr(self, 'is_approval_required_for_update', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "stages": lambda n : setattr(self, 'stages', n.get_collection_of_object_values(AccessPackageApprovalStage)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isApprovalRequiredForAdd", self.is_approval_required_for_add) writer.write_bool_value("isApprovalRequiredForUpdate", self.is_approval_required_for_update) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("stages", self.stages) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_assignment_request.py b/msgraph/generated/models/access_package_assignment_request.py index 9fff6a31293..2b39ed54128 100644 --- a/msgraph/generated/models/access_package_assignment_request.py +++ b/msgraph/generated/models/access_package_assignment_request.py @@ -33,11 +33,11 @@ class AccessPackageAssignmentRequest(Entity): custom_extension_callout_instances: Optional[List[CustomExtensionCalloutInstance]] = None # The OdataType property odata_type: Optional[str] = None - # The type of the request. The possible values are: notSpecified, userAdd, UserExtend, userUpdate, userRemove, adminAdd, adminUpdate, adminRemove, systemAdd, systemUpdate, systemRemove, onBehalfAdd (not supported), unknownFutureValue. A request from the user themselves would have requestType of userAdd, userUpdate or userRemove. This property cannot be changed once set. + # The type of the request. The possible values are: notSpecified, userAdd, UserExtend, userUpdate, userRemove, adminAdd, adminUpdate, adminRemove, systemAdd, systemUpdate, systemRemove, onBehalfAdd (not supported), unknownFutureValue. A request from the user themselves would have requestType of userAdd, userUpdate or userRemove. This property can't be changed once set. request_type: Optional[AccessPackageRequestType] = None # The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand. requestor: Optional[AccessPackageSubject] = None - # The range of dates that access is to be assigned to the requestor. This property cannot be changed once set. + # The range of dates that access is to be assigned to the requestor. This property can't be changed once set. schedule: Optional[EntitlementManagementSchedule] = None # The state of the request. The possible values are: submitted, pendingApproval, delivering, delivered, deliveryFailed, denied, scheduled, canceled, partiallyDelivered, unknownFutureValue. Read-only. Supports $filter (eq). state: Optional[AccessPackageRequestState] = None diff --git a/msgraph/generated/models/access_package_assignment_request_callback_data.py b/msgraph/generated/models/access_package_assignment_request_callback_data.py index 81f312793e2..8a044c1d94d 100644 --- a/msgraph/generated/models/access_package_assignment_request_callback_data.py +++ b/msgraph/generated/models/access_package_assignment_request_callback_data.py @@ -17,7 +17,7 @@ class AccessPackageAssignmentRequestCallbackData(CustomExtensionData): custom_extension_stage_instance_detail: Optional[str] = None # Unique identifier of the callout to the custom extension. custom_extension_stage_instance_id: Optional[str] = None - # Indicates the stage at which the custom callout extension will be executed. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. + # Indicates the stage at which the custom callout extension is executed. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. stage: Optional[AccessPackageCustomExtensionStage] = None # Allow the extension to be able to deny or cancel the request submitted by the requestor. The supported values are Denied and Canceled. This property can only be set for an assignmentRequestCreated stage. state: Optional[str] = None diff --git a/msgraph/generated/models/access_package_assignment_request_requirements.py b/msgraph/generated/models/access_package_assignment_request_requirements.py index 03b243ad845..3b9c4393386 100644 --- a/msgraph/generated/models/access_package_assignment_request_requirements.py +++ b/msgraph/generated/models/access_package_assignment_request_requirements.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowCustomAssignmentSchedule": lambda n : setattr(self, 'allow_custom_assignment_schedule', n.get_bool_value()), "isApprovalRequiredForAdd": lambda n : setattr(self, 'is_approval_required_for_add', n.get_bool_value()), "isApprovalRequiredForUpdate": lambda n : setattr(self, 'is_approval_required_for_update', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "policyDescription": lambda n : setattr(self, 'policy_description', n.get_str_value()), "policyDisplayName": lambda n : setattr(self, 'policy_display_name', n.get_str_value()), "policyId": lambda n : setattr(self, 'policy_id', n.get_str_value()), @@ -80,7 +80,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowCustomAssignmentSchedule", self.allow_custom_assignment_schedule) writer.write_bool_value("isApprovalRequiredForAdd", self.is_approval_required_for_add) writer.write_bool_value("isApprovalRequiredForUpdate", self.is_approval_required_for_update) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("policyDescription", self.policy_description) writer.write_str_value("policyDisplayName", self.policy_display_name) writer.write_str_value("policyId", self.policy_id) diff --git a/msgraph/generated/models/access_package_assignment_requestor_settings.py b/msgraph/generated/models/access_package_assignment_requestor_settings.py index 4fc77007c6b..92ffff0be5e 100644 --- a/msgraph/generated/models/access_package_assignment_requestor_settings.py +++ b/msgraph/generated/models/access_package_assignment_requestor_settings.py @@ -14,7 +14,7 @@ class AccessPackageAssignmentRequestorSettings(AdditionalDataHolder, BackedModel # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # False indicates that the requestor is not permitted to include a schedule in their request. + # False indicates that the requestor isn't permitted to include a schedule in their request. allow_custom_assignment_schedule: Optional[bool] = None # True allows on-behalf-of requestors to create a request to add access for another principal. enable_on_behalf_requestors_to_add_access: Optional[bool] = None @@ -61,7 +61,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "enableTargetsToSelfAddAccess": lambda n : setattr(self, 'enable_targets_to_self_add_access', n.get_bool_value()), "enableTargetsToSelfRemoveAccess": lambda n : setattr(self, 'enable_targets_to_self_remove_access', n.get_bool_value()), "enableTargetsToSelfUpdateAccess": lambda n : setattr(self, 'enable_targets_to_self_update_access', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "onBehalfRequestors": lambda n : setattr(self, 'on_behalf_requestors', n.get_collection_of_object_values(SubjectSet)), } return fields @@ -81,7 +81,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("enableTargetsToSelfAddAccess", self.enable_targets_to_self_add_access) writer.write_bool_value("enableTargetsToSelfRemoveAccess", self.enable_targets_to_self_remove_access) writer.write_bool_value("enableTargetsToSelfUpdateAccess", self.enable_targets_to_self_update_access) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("onBehalfRequestors", self.on_behalf_requestors) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_assignment_review_settings.py b/msgraph/generated/models/access_package_assignment_review_settings.py index 494423eaeff..bdcc0acea62 100644 --- a/msgraph/generated/models/access_package_assignment_review_settings.py +++ b/msgraph/generated/models/access_package_assignment_review_settings.py @@ -66,7 +66,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isRecommendationEnabled": lambda n : setattr(self, 'is_recommendation_enabled', n.get_bool_value()), "isReviewerJustificationRequired": lambda n : setattr(self, 'is_reviewer_justification_required', n.get_bool_value()), "isSelfReview": lambda n : setattr(self, 'is_self_review', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "primaryReviewers": lambda n : setattr(self, 'primary_reviewers', n.get_collection_of_object_values(SubjectSet)), "schedule": lambda n : setattr(self, 'schedule', n.get_object_value(EntitlementManagementSchedule)), } @@ -86,7 +86,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isRecommendationEnabled", self.is_recommendation_enabled) writer.write_bool_value("isReviewerJustificationRequired", self.is_reviewer_justification_required) writer.write_bool_value("isSelfReview", self.is_self_review) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("primaryReviewers", self.primary_reviewers) writer.write_object_value("schedule", self.schedule) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_automatic_request_settings.py b/msgraph/generated/models/access_package_automatic_request_settings.py index 04008ee364a..a4552f31400 100644 --- a/msgraph/generated/models/access_package_automatic_request_settings.py +++ b/msgraph/generated/models/access_package_automatic_request_settings.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "gracePeriodBeforeAccessRemoval": lambda n : setattr(self, 'grace_period_before_access_removal', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "removeAccessWhenTargetLeavesAllowedTargets": lambda n : setattr(self, 'remove_access_when_target_leaves_allowed_targets', n.get_bool_value()), "requestAccessForAllowedTargets": lambda n : setattr(self, 'request_access_for_allowed_targets', n.get_bool_value()), } @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_timedelta_value("gracePeriodBeforeAccessRemoval", self.grace_period_before_access_removal) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("removeAccessWhenTargetLeavesAllowedTargets", self.remove_access_when_target_leaves_allowed_targets) writer.write_bool_value("requestAccessForAllowedTargets", self.request_access_for_allowed_targets) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_localized_text.py b/msgraph/generated/models/access_package_localized_text.py index b73371f2787..b451e2d000c 100644 --- a/msgraph/generated/models/access_package_localized_text.py +++ b/msgraph/generated/models/access_package_localized_text.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "languageCode": lambda n : setattr(self, 'language_code', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "text": lambda n : setattr(self, 'text', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("languageCode", self.language_code) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("text", self.text) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_package_text_input_question.py b/msgraph/generated/models/access_package_text_input_question.py index 14418fc4563..c99ac4439b8 100644 --- a/msgraph/generated/models/access_package_text_input_question.py +++ b/msgraph/generated/models/access_package_text_input_question.py @@ -12,9 +12,9 @@ class AccessPackageTextInputQuestion(AccessPackageQuestion): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.accessPackageTextInputQuestion" - # Indicates whether the answer will be in single or multiple line format. + # Indicates whether the answer is in single or multiple line format. is_single_line_question: Optional[bool] = None - # The regular expression pattern which any answer to this question must match. + # The regular expression pattern that any answer to this question must match. regex_pattern: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/access_review_apply_action.py b/msgraph/generated/models/access_review_apply_action.py index 1fc31c6d686..9505b623714 100644 --- a/msgraph/generated/models/access_review_apply_action.py +++ b/msgraph/generated/models/access_review_apply_action.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .remove_access_apply_action import RemoveAccessApplyAction fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_history_schedule_settings.py b/msgraph/generated/models/access_review_history_schedule_settings.py index 19acfc6bead..56d6ed04e9a 100644 --- a/msgraph/generated/models/access_review_history_schedule_settings.py +++ b/msgraph/generated/models/access_review_history_schedule_settings.py @@ -18,7 +18,7 @@ class AccessReviewHistoryScheduleSettings(AdditionalDataHolder, BackedModel, Par odata_type: Optional[str] = None # The recurrence property recurrence: Optional[PatternedRecurrence] = None - # A duration string in ISO 8601 duration format specifying the lookback period of the generated review history data. For example, if a history definition is scheduled to run on the 1st of every month, the reportRange is P1M. In this case, on the first of every month, access review history data will be collected containing only the previous month's review data. Note: Only years, months, and days ISO 8601 properties are supported. Required. + # A duration string in ISO 8601 duration format specifying the lookback period of the generated review history data. For example, if a history definition is scheduled to run on the first of every month, the reportRange is P1M. In this case, on the first of every month, access review history data is collected containing only the previous month's review data. Note: Only years, months, and days ISO 8601 properties are supported. Required. report_range: Optional[str] = None @staticmethod @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .patterned_recurrence import PatternedRecurrence fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recurrence": lambda n : setattr(self, 'recurrence', n.get_object_value(PatternedRecurrence)), "reportRange": lambda n : setattr(self, 'report_range', n.get_str_value()), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("recurrence", self.recurrence) writer.write_str_value("reportRange", self.report_range) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_instance_decision_item_resource.py b/msgraph/generated/models/access_review_instance_decision_item_resource.py index ac2a9a6fa43..bdbee9c6446 100644 --- a/msgraph/generated/models/access_review_instance_decision_item_resource.py +++ b/msgraph/generated/models/access_review_instance_decision_item_resource.py @@ -68,7 +68,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -83,7 +83,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_notification_recipient_item.py b/msgraph/generated/models/access_review_notification_recipient_item.py index 44ebcf5f384..b3829948e15 100644 --- a/msgraph/generated/models/access_review_notification_recipient_item.py +++ b/msgraph/generated/models/access_review_notification_recipient_item.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "notificationRecipientScope": lambda n : setattr(self, 'notification_recipient_scope', n.get_object_value(AccessReviewNotificationRecipientScope)), "notificationTemplateType": lambda n : setattr(self, 'notification_template_type', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("notificationRecipientScope", self.notification_recipient_scope) writer.write_str_value("notificationTemplateType", self.notification_template_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_notification_recipient_scope.py b/msgraph/generated/models/access_review_notification_recipient_scope.py index 53ffb070726..40e1bc14470 100644 --- a/msgraph/generated/models/access_review_notification_recipient_scope.py +++ b/msgraph/generated/models/access_review_notification_recipient_scope.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .access_review_notification_recipient_query_scope import AccessReviewNotificationRecipientQueryScope fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_recommendation_insight_setting.py b/msgraph/generated/models/access_review_recommendation_insight_setting.py index 55ca0ea89cf..40835bf1005 100644 --- a/msgraph/generated/models/access_review_recommendation_insight_setting.py +++ b/msgraph/generated/models/access_review_recommendation_insight_setting.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .user_last_sign_in_recommendation_insight_setting import UserLastSignInRecommendationInsightSetting fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_reviewer_scope.py b/msgraph/generated/models/access_review_reviewer_scope.py index 5117fe38f82..2c733e981c9 100644 --- a/msgraph/generated/models/access_review_reviewer_scope.py +++ b/msgraph/generated/models/access_review_reviewer_scope.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "query": lambda n : setattr(self, 'query', n.get_str_value()), "queryRoot": lambda n : setattr(self, 'query_root', n.get_str_value()), "queryType": lambda n : setattr(self, 'query_type', n.get_str_value()), @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("query", self.query) writer.write_str_value("queryRoot", self.query_root) writer.write_str_value("queryType", self.query_type) diff --git a/msgraph/generated/models/access_review_schedule_definition.py b/msgraph/generated/models/access_review_schedule_definition.py index 7d794b18200..0abc763575a 100644 --- a/msgraph/generated/models/access_review_schedule_definition.py +++ b/msgraph/generated/models/access_review_schedule_definition.py @@ -26,15 +26,15 @@ class AccessReviewScheduleDefinition(Entity): created_date_time: Optional[datetime.datetime] = None # Description provided by review creators to provide more context of the review to admins. Supports $select. description_for_admins: Optional[str] = None - # Description provided by review creators to provide more context of the review to reviewers. Reviewers will see this description in the email sent to them requesting their review. Email notifications support up to 256 characters. Supports $select. + # Description provided by review creators to provide more context of the review to reviewers. Reviewers see this description in the email sent to them requesting their review. Email notifications support up to 256 characters. Supports $select. description_for_reviewers: Optional[str] = None # Name of the access review series. Supports $select and $orderby. Required on create. display_name: Optional[str] = None - # This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. See accessReviewReviewerScope. Replaces backupReviewers. Supports $select. NOTE: The value of this property will be ignored if fallback reviewers are assigned through the stageSettings property. + # This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers are notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner doesn't exist, or manager is specified as reviewer but a user's manager doesn't exist. See accessReviewReviewerScope. Replaces backupReviewers. Supports $select. NOTE: The value of this property will be ignored if fallback reviewers are assigned through the stageSettings property. fallback_reviewers: Optional[List[AccessReviewReviewerScope]] = None - # This property is required when scoping a review to guest users' access across all Microsoft 365 groups and determines which Microsoft 365 groups are reviewed. Each group will become a unique accessReviewInstance of the access review series. For supported scopes, see accessReviewScope. Supports $select. For examples of options for configuring instanceEnumerationScope, see Configure the scope of your access review definition using the Microsoft Graph API. + # This property is required when scoping a review to guest users' access across all Microsoft 365 groups and determines which Microsoft 365 groups are reviewed. Each group becomes a unique accessReviewInstance of the access review series. For supported scopes, see accessReviewScope. Supports $select. For examples of options for configuring instanceEnumerationScope, see Configure the scope of your access review definition using the Microsoft Graph API. instance_enumeration_scope: Optional[AccessReviewScope] = None - # If the accessReviewScheduleDefinition is a recurring access review, instances represent each recurrence. A review that does not recur will have exactly one instance. Instances also represent each unique resource under review in the accessReviewScheduleDefinition. If a review has multiple resources and multiple instances, each resource will have a unique instance for each recurrence. + # If the accessReviewScheduleDefinition is a recurring access review, instances represent each recurrence. A review that doesn't recur will have exactly one instance. Instances also represent each unique resource under review in the accessReviewScheduleDefinition. If a review has multiple resources and multiple instances, each resource has a unique instance for each recurrence. instances: Optional[List[AccessReviewInstance]] = None # Timestamp when the access review series was last modified. Supports $select. Read-only. last_modified_date_time: Optional[datetime.datetime] = None @@ -46,7 +46,7 @@ class AccessReviewScheduleDefinition(Entity): scope: Optional[AccessReviewScope] = None # The settings for an access review series, see type definition below. Supports $select. Required on create. settings: Optional[AccessReviewScheduleSettings] = None - # Required only for a multi-stage access review to define the stages and their settings. You can break down each review instance into up to three sequential stages, where each stage can have a different set of reviewers, fallback reviewers, and settings. Stages will be created sequentially based on the dependsOn property. Optional. When this property is defined, its settings are used instead of the corresponding settings in the accessReviewScheduleDefinition object and its settings, reviewers, and fallbackReviewers properties. + # Required only for a multi-stage access review to define the stages and their settings. You can break down each review instance into up to three sequential stages, where each stage can have a different set of reviewers, fallback reviewers, and settings. Stages are created sequentially based on the dependsOn property. Optional. When this property is defined, its settings are used instead of the corresponding settings in the accessReviewScheduleDefinition object and its settings, reviewers, and fallbackReviewers properties. stage_settings: Optional[List[AccessReviewStageSettings]] = None # This read-only field specifies the status of an access review. The typical states include Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. status: Optional[str] = None diff --git a/msgraph/generated/models/access_review_schedule_settings.py b/msgraph/generated/models/access_review_schedule_settings.py index 85222bedf8e..4bbe38df4b8 100644 --- a/msgraph/generated/models/access_review_schedule_settings.py +++ b/msgraph/generated/models/access_review_schedule_settings.py @@ -37,7 +37,7 @@ class AccessReviewScheduleSettings(AdditionalDataHolder, BackedModel, Parsable): odata_type: Optional[str] = None # Optional. Describes the types of insights that aid reviewers to make access review decisions. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationInsightSettings setting will be used instead of the value of this property. recommendation_insight_settings: Optional[List[AccessReviewRecommendationInsightSetting]] = None - # Optional field. Indicates the period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationLookBackDuration setting will be used instead of the value of this property. + # Optional field. Indicates the period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Microsoft Entra roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationLookBackDuration setting will be used instead of the value of this property. recommendation_look_back_duration: Optional[datetime.timedelta] = None # Indicates whether decision recommendations are enabled or disabled. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationsEnabled setting will be used instead of the value of this property. recommendations_enabled: Optional[bool] = None @@ -79,7 +79,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "instanceDurationInDays": lambda n : setattr(self, 'instance_duration_in_days', n.get_int_value()), "justificationRequiredOnApproval": lambda n : setattr(self, 'justification_required_on_approval', n.get_bool_value()), "mailNotificationsEnabled": lambda n : setattr(self, 'mail_notifications_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recommendationInsightSettings": lambda n : setattr(self, 'recommendation_insight_settings', n.get_collection_of_object_values(AccessReviewRecommendationInsightSetting)), "recommendationLookBackDuration": lambda n : setattr(self, 'recommendation_look_back_duration', n.get_timedelta_value()), "recommendationsEnabled": lambda n : setattr(self, 'recommendations_enabled', n.get_bool_value()), @@ -104,7 +104,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("instanceDurationInDays", self.instance_duration_in_days) writer.write_bool_value("justificationRequiredOnApproval", self.justification_required_on_approval) writer.write_bool_value("mailNotificationsEnabled", self.mail_notifications_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("recommendationInsightSettings", self.recommendation_insight_settings) writer.write_timedelta_value("recommendationLookBackDuration", self.recommendation_look_back_duration) writer.write_bool_value("recommendationsEnabled", self.recommendations_enabled) diff --git a/msgraph/generated/models/access_review_scope.py b/msgraph/generated/models/access_review_scope.py index 8f8b8819b2b..06aba485a2e 100644 --- a/msgraph/generated/models/access_review_scope.py +++ b/msgraph/generated/models/access_review_scope.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .principal_resource_memberships_scope import PrincipalResourceMembershipsScope fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/access_review_stage.py b/msgraph/generated/models/access_review_stage.py index cd18b3e35b8..abd3d782228 100644 --- a/msgraph/generated/models/access_review_stage.py +++ b/msgraph/generated/models/access_review_stage.py @@ -17,7 +17,7 @@ class AccessReviewStage(Entity): decisions: Optional[List[AccessReviewInstanceDecisionItem]] = None # The date and time in ISO 8601 format and UTC time when the review stage is scheduled to end. This property is the cumulative total of the durationInDays for all stages. Read-only. end_date_time: Optional[datetime.datetime] = None - # This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. + # This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers are notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner doesn't exist, or manager is specified as reviewer but a user's manager doesn't exist. fallback_reviewers: Optional[List[AccessReviewReviewerScope]] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/access_review_stage_settings.py b/msgraph/generated/models/access_review_stage_settings.py index a648861907e..a68561d9bca 100644 --- a/msgraph/generated/models/access_review_stage_settings.py +++ b/msgraph/generated/models/access_review_stage_settings.py @@ -21,7 +21,7 @@ class AccessReviewStageSettings(AdditionalDataHolder, BackedModel, Parsable): depends_on: Optional[List[str]] = None # The duration of the stage. Required. NOTE: The cumulative value of this property across all stages 1. Will override the instanceDurationInDays setting on the accessReviewScheduleDefinition object. 2. Can't exceed the length of one recurrence. That is, if the review recurs weekly, the cumulative durationInDays can't exceed 7. duration_in_days: Optional[int] = None - # If provided, the fallback reviewers are asked to complete a review if the primary reviewers don't exist. For example, if managers are selected as reviewers and a principal under review doesn't have a manager in Azure AD, the fallback reviewers are asked to review that principal. NOTE: The value of this property overrides the corresponding setting on the accessReviewScheduleDefinition object. + # If provided, the fallback reviewers are asked to complete a review if the primary reviewers don't exist. For example, if managers are selected as reviewers and a principal under review doesn't have a manager in Microsoft Entra ID, the fallback reviewers are asked to review that principal. NOTE: The value of this property overrides the corresponding setting on the accessReviewScheduleDefinition object. fallback_reviewers: Optional[List[AccessReviewReviewerScope]] = None # The OdataType property odata_type: Optional[str] = None @@ -61,7 +61,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dependsOn": lambda n : setattr(self, 'depends_on', n.get_collection_of_primitive_values(str)), "durationInDays": lambda n : setattr(self, 'duration_in_days', n.get_int_value()), "fallbackReviewers": lambda n : setattr(self, 'fallback_reviewers', n.get_collection_of_object_values(AccessReviewReviewerScope)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recommendationInsightSettings": lambda n : setattr(self, 'recommendation_insight_settings', n.get_collection_of_object_values(AccessReviewRecommendationInsightSetting)), "recommendationsEnabled": lambda n : setattr(self, 'recommendations_enabled', n.get_bool_value()), "reviewers": lambda n : setattr(self, 'reviewers', n.get_collection_of_object_values(AccessReviewReviewerScope)), @@ -81,7 +81,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("dependsOn", self.depends_on) writer.write_int_value("durationInDays", self.duration_in_days) writer.write_collection_of_object_values("fallbackReviewers", self.fallback_reviewers) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("recommendationInsightSettings", self.recommendation_insight_settings) writer.write_bool_value("recommendationsEnabled", self.recommendations_enabled) writer.write_collection_of_object_values("reviewers", self.reviewers) diff --git a/msgraph/generated/models/account_target_content.py b/msgraph/generated/models/account_target_content.py new file mode 100644 index 00000000000..227b22932d0 --- /dev/null +++ b/msgraph/generated/models/account_target_content.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .account_target_content_type import AccountTargetContentType + from .address_book_account_target_content import AddressBookAccountTargetContent + from .include_all_account_target_content import IncludeAllAccountTargetContent + +@dataclass +class AccountTargetContent(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + # The type property + type: Optional[AccountTargetContentType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AccountTargetContent: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AccountTargetContent + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.addressBookAccountTargetContent".casefold(): + from .address_book_account_target_content import AddressBookAccountTargetContent + + return AddressBookAccountTargetContent() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.includeAllAccountTargetContent".casefold(): + from .include_all_account_target_content import IncludeAllAccountTargetContent + + return IncludeAllAccountTargetContent() + return AccountTargetContent() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .account_target_content_type import AccountTargetContentType + from .address_book_account_target_content import AddressBookAccountTargetContent + from .include_all_account_target_content import IncludeAllAccountTargetContent + + from .account_target_content_type import AccountTargetContentType + from .address_book_account_target_content import AddressBookAccountTargetContent + from .include_all_account_target_content import IncludeAllAccountTargetContent + + fields: Dict[str, Callable[[Any], None]] = { + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "type": lambda n : setattr(self, 'type', n.get_enum_value(AccountTargetContentType)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current 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("OdataType", self.odata_type) + writer.write_enum_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/account_target_content_type.py b/msgraph/generated/models/account_target_content_type.py new file mode 100644 index 00000000000..85eb293a65e --- /dev/null +++ b/msgraph/generated/models/account_target_content_type.py @@ -0,0 +1,8 @@ +from enum import Enum + +class AccountTargetContentType(str, Enum): + Unknown = "unknown", + IncludeAll = "includeAll", + AddressBook = "addressBook", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/action_result_part.py b/msgraph/generated/models/action_result_part.py index a8aee762283..d8fc688bfd8 100644 --- a/msgraph/generated/models/action_result_part.py +++ b/msgraph/generated/models/action_result_part.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "error": lambda n : setattr(self, 'error', n.get_object_value(PublicError)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("error", self.error) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/add_in.py b/msgraph/generated/models/add_in.py index 57b6bd7ee1b..3a122753079 100644 --- a/msgraph/generated/models/add_in.py +++ b/msgraph/generated/models/add_in.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_uuid_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "properties": lambda n : setattr(self, 'properties', n.get_collection_of_object_values(KeyValue)), "type": lambda n : setattr(self, 'type', n.get_str_value()), } @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_uuid_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("properties", self.properties) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/address_book_account_target_content.py b/msgraph/generated/models/address_book_account_target_content.py new file mode 100644 index 00000000000..1d3714b2522 --- /dev/null +++ b/msgraph/generated/models/address_book_account_target_content.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .account_target_content import AccountTargetContent + +from .account_target_content import AccountTargetContent + +@dataclass +class AddressBookAccountTargetContent(AccountTargetContent): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.addressBookAccountTargetContent" + # The accountTargetEmails property + account_target_emails: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddressBookAccountTargetContent: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddressBookAccountTargetContent + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddressBookAccountTargetContent() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .account_target_content import AccountTargetContent + + from .account_target_content import AccountTargetContent + + fields: Dict[str, Callable[[Any], None]] = { + "accountTargetEmails": lambda n : setattr(self, 'account_target_emails', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("accountTargetEmails", self.account_target_emails) + + diff --git a/msgraph/generated/models/admin.py b/msgraph/generated/models/admin.py index 11577416f36..6a0b4244dbc 100644 --- a/msgraph/generated/models/admin.py +++ b/msgraph/generated/models/admin.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from .edge import Edge + from .people_admin_settings import PeopleAdminSettings from .service_announcement import ServiceAnnouncement from .sharepoint import Sharepoint @@ -20,6 +21,8 @@ class Admin(AdditionalDataHolder, BackedModel, Parsable): edge: Optional[Edge] = None # The OdataType property odata_type: Optional[str] = None + # The people property + people: Optional[PeopleAdminSettings] = None # A container for service communications resources. Read-only. service_announcement: Optional[ServiceAnnouncement] = None # The sharepoint property @@ -42,16 +45,19 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .edge import Edge + from .people_admin_settings import PeopleAdminSettings from .service_announcement import ServiceAnnouncement from .sharepoint import Sharepoint from .edge import Edge + from .people_admin_settings import PeopleAdminSettings from .service_announcement import ServiceAnnouncement from .sharepoint import Sharepoint fields: Dict[str, Callable[[Any], None]] = { "edge": lambda n : setattr(self, 'edge', n.get_object_value(Edge)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "people": lambda n : setattr(self, 'people', n.get_object_value(PeopleAdminSettings)), "serviceAnnouncement": lambda n : setattr(self, 'service_announcement', n.get_object_value(ServiceAnnouncement)), "sharepoint": lambda n : setattr(self, 'sharepoint', n.get_object_value(Sharepoint)), } @@ -66,7 +72,8 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("edge", self.edge) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) + writer.write_object_value("people", self.people) writer.write_object_value("serviceAnnouncement", self.service_announcement) writer.write_object_value("sharepoint", self.sharepoint) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/aggregation_option.py b/msgraph/generated/models/aggregation_option.py index 4c9c790c060..29d09841886 100644 --- a/msgraph/generated/models/aggregation_option.py +++ b/msgraph/generated/models/aggregation_option.py @@ -20,7 +20,7 @@ class AggregationOption(AdditionalDataHolder, BackedModel, Parsable): field: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The number of searchBucket resources to be returned. This is not required when the range is provided manually in the search request. Optional. + # The number of searchBucket resources to be returned. This isn't required when the range is provided manually in the search request. Optional. size: Optional[int] = None @staticmethod @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "bucketDefinition": lambda n : setattr(self, 'bucket_definition', n.get_object_value(BucketAggregationDefinition)), "field": lambda n : setattr(self, 'field', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "size": lambda n : setattr(self, 'size', n.get_int_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("bucketDefinition", self.bucket_definition) writer.write_str_value("field", self.field) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("size", self.size) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/agreement.py b/msgraph/generated/models/agreement.py index 1f520eab09c..ffc94fe720f 100644 --- a/msgraph/generated/models/agreement.py +++ b/msgraph/generated/models/agreement.py @@ -23,7 +23,7 @@ class Agreement(Entity): file: Optional[AgreementFile] = None # PDFs linked to this agreement. This property is in the process of being deprecated. Use the file property instead. Supports $expand. files: Optional[List[AgreementFileLocalization]] = None - # Indicates whether end users are required to accept this agreement on every device that they access it from. The end user is required to register their device in Azure AD, if they haven't already done so. Supports $filter (eq). + # Indicates whether end users are required to accept this agreement on every device that they access it from. The end user is required to register their device in Microsoft Entra ID, if they haven't already done so. Supports $filter (eq). is_per_device_acceptance_required: Optional[bool] = None # Indicates whether the user has to expand the agreement before accepting. Supports $filter (eq). is_viewing_before_acceptance_required: Optional[bool] = None diff --git a/msgraph/generated/models/agreement_file_data.py b/msgraph/generated/models/agreement_file_data.py index e9968180351..8b4370d5b04 100644 --- a/msgraph/generated/models/agreement_file_data.py +++ b/msgraph/generated/models/agreement_file_data.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "data": lambda n : setattr(self, 'data', n.get_bytes_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bytes_value("data", self.data) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/agreement_file_localization.py b/msgraph/generated/models/agreement_file_localization.py index f7763de5c33..6e08322e37f 100644 --- a/msgraph/generated/models/agreement_file_localization.py +++ b/msgraph/generated/models/agreement_file_localization.py @@ -13,7 +13,7 @@ class AgreementFileLocalization(AgreementFileProperties): # The OdataType property odata_type: Optional[str] = None - # Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + # Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. versions: Optional[List[AgreementFileVersion]] = None @staticmethod diff --git a/msgraph/generated/models/agreement_file_properties.py b/msgraph/generated/models/agreement_file_properties.py index 80f0f59a904..89e7b6171ce 100644 --- a/msgraph/generated/models/agreement_file_properties.py +++ b/msgraph/generated/models/agreement_file_properties.py @@ -15,7 +15,7 @@ @dataclass class AgreementFileProperties(Entity): - # The date time representing when the file was created.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. + # The date time representing when the file was created. 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. created_date_time: Optional[datetime.datetime] = None # Localized display name of the policy file of an agreement. The localized display name is shown to end users who view the agreement. display_name: Optional[str] = None @@ -23,7 +23,7 @@ class AgreementFileProperties(Entity): file_data: Optional[AgreementFileData] = None # Name of the agreement file (for example, TOU.pdf). Read-only. file_name: Optional[str] = None - # If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only. + # If none of the languages matches the client preference, indicates whether this is the default agreement file. If none of the files are marked as default, the first one is treated as the default. Read-only. is_default: Optional[bool] = None # Indicates whether the agreement file is a major version update. Major version updates invalidate the agreement's acceptances on the corresponding language. is_major_version: Optional[bool] = None diff --git a/msgraph/generated/models/album.py b/msgraph/generated/models/album.py index aff7c8cb039..f4cf6b40cbd 100644 --- a/msgraph/generated/models/album.py +++ b/msgraph/generated/models/album.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "coverImageItemId": lambda n : setattr(self, 'cover_image_item_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("coverImageItemId", self.cover_image_item_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/alert.py b/msgraph/generated/models/alert.py index 87c21f19587..818e42d17dd 100644 --- a/msgraph/generated/models/alert.py +++ b/msgraph/generated/models/alert.py @@ -39,7 +39,7 @@ class Alert(Entity): assigned_to: Optional[str] = None # Azure subscription ID, present if this alert is related to an Azure resource. azure_subscription_id: Optional[str] = None - # Azure Active Directory tenant ID. Required. + # Microsoft Entra tenant ID. Required. azure_tenant_id: Optional[str] = None # Category of the alert (for example, credentialTheft, ransomware, etc.). category: Optional[str] = None diff --git a/msgraph/generated/models/alert_detection.py b/msgraph/generated/models/alert_detection.py index 243fe4de136..322fb75878f 100644 --- a/msgraph/generated/models/alert_detection.py +++ b/msgraph/generated/models/alert_detection.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "detectionType": lambda n : setattr(self, 'detection_type', n.get_str_value()), "method": lambda n : setattr(self, 'method', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("detectionType", self.detection_type) writer.write_str_value("method", self.method) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/alert_history_state.py b/msgraph/generated/models/alert_history_state.py index dfef27271ad..a7e777a0247 100644 --- a/msgraph/generated/models/alert_history_state.py +++ b/msgraph/generated/models/alert_history_state.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "assignedTo": lambda n : setattr(self, 'assigned_to', n.get_str_value()), "comments": lambda n : setattr(self, 'comments', n.get_collection_of_primitive_values(str)), "feedback": lambda n : setattr(self, 'feedback', n.get_enum_value(AlertFeedback)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_enum_value(AlertStatus)), "updatedDateTime": lambda n : setattr(self, 'updated_date_time', n.get_datetime_value()), "user": lambda n : setattr(self, 'user', n.get_str_value()), @@ -79,7 +79,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("assignedTo", self.assigned_to) writer.write_collection_of_primitive_values("comments", self.comments) writer.write_enum_value("feedback", self.feedback) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("status", self.status) writer.write_datetime_value("updatedDateTime", self.updated_date_time) writer.write_str_value("user", self.user) diff --git a/msgraph/generated/models/alert_trigger.py b/msgraph/generated/models/alert_trigger.py index 8b57443e606..518eac4551b 100644 --- a/msgraph/generated/models/alert_trigger.py +++ b/msgraph/generated/models/alert_trigger.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/allowed_value.py b/msgraph/generated/models/allowed_value.py index 823c884e47b..4c2dbaad667 100644 --- a/msgraph/generated/models/allowed_value.py +++ b/msgraph/generated/models/allowed_value.py @@ -10,7 +10,7 @@ @dataclass class AllowedValue(Entity): - # Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. + # Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. is_active: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/alteration_response.py b/msgraph/generated/models/alteration_response.py index ee2cd38ee40..a363732d2dc 100644 --- a/msgraph/generated/models/alteration_response.py +++ b/msgraph/generated/models/alteration_response.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .search_alteration_type import SearchAlterationType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "originalQueryString": lambda n : setattr(self, 'original_query_string', n.get_str_value()), "queryAlteration": lambda n : setattr(self, 'query_alteration', n.get_object_value(SearchAlteration)), "queryAlterationType": lambda n : setattr(self, 'query_alteration_type', n.get_enum_value(SearchAlterationType)), @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("originalQueryString", self.original_query_string) writer.write_object_value("queryAlteration", self.query_alteration) writer.write_enum_value("queryAlterationType", self.query_alteration_type) diff --git a/msgraph/generated/models/altered_query_token.py b/msgraph/generated/models/altered_query_token.py index 6f7f87eeb2f..59f399b6a83 100644 --- a/msgraph/generated/models/altered_query_token.py +++ b/msgraph/generated/models/altered_query_token.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "length": lambda n : setattr(self, 'length', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "offset": lambda n : setattr(self, 'offset', n.get_int_value()), "suggestion": lambda n : setattr(self, 'suggestion', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("length", self.length) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("offset", self.offset) writer.write_str_value("suggestion", self.suggestion) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/alternative_security_id.py b/msgraph/generated/models/alternative_security_id.py index 516d421085d..fe3609bcd00 100644 --- a/msgraph/generated/models/alternative_security_id.py +++ b/msgraph/generated/models/alternative_security_id.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "identityProvider": lambda n : setattr(self, 'identity_provider', n.get_str_value()), "key": lambda n : setattr(self, 'key', n.get_bytes_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_int_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("identityProvider", self.identity_provider) writer.write_bytes_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/android_minimum_operating_system.py b/msgraph/generated/models/android_minimum_operating_system.py index 6989b348cd9..60e3de4daa2 100644 --- a/msgraph/generated/models/android_minimum_operating_system.py +++ b/msgraph/generated/models/android_minimum_operating_system.py @@ -66,7 +66,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "v10_0": lambda n : setattr(self, 'v10_0', n.get_bool_value()), "v11_0": lambda n : setattr(self, 'v11_0', n.get_bool_value()), "v4_0": lambda n : setattr(self, 'v4_0', n.get_bool_value()), @@ -94,7 +94,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("v10_0", self.v10_0) writer.write_bool_value("v11_0", self.v11_0) writer.write_bool_value("v4_0", self.v4_0) diff --git a/msgraph/generated/models/api_application.py b/msgraph/generated/models/api_application.py index bd4ec4be0b4..82c3fd4db32 100644 --- a/msgraph/generated/models/api_application.py +++ b/msgraph/generated/models/api_application.py @@ -18,13 +18,13 @@ class ApiApplication(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # When true, allows an application to use claims mapping without specifying a custom signing key. accept_mapped_claims: Optional[bool] = None - # Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. + # Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Microsoft Entra ID knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. known_client_applications: Optional[List[UUID]] = None # The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes. oauth2_permission_scopes: Optional[List[PermissionScope]] = None # The OdataType property odata_type: Optional[str] = None - # Lists the client applications that are pre-authorized with the specified delegated permissions to access this application's APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. + # Lists the client applications that are preauthorized with the specified delegated permissions to access this application's APIs. Users aren't required to consent to any preauthorized application (for the permissions specified). However, any other permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. pre_authorized_applications: Optional[List[PreAuthorizedApplication]] = None # Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount or PersonalMicrosoftAccount, the value for this property must be 2. requested_access_token_version: Optional[int] = None @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "acceptMappedClaims": lambda n : setattr(self, 'accept_mapped_claims', n.get_bool_value()), "knownClientApplications": lambda n : setattr(self, 'known_client_applications', n.get_collection_of_primitive_values(UUID)), "oauth2PermissionScopes": lambda n : setattr(self, 'oauth2_permission_scopes', n.get_collection_of_object_values(PermissionScope)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "preAuthorizedApplications": lambda n : setattr(self, 'pre_authorized_applications', n.get_collection_of_object_values(PreAuthorizedApplication)), "requestedAccessTokenVersion": lambda n : setattr(self, 'requested_access_token_version', n.get_int_value()), } @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("acceptMappedClaims", self.accept_mapped_claims) writer.write_collection_of_primitive_values("knownClientApplications", self.known_client_applications) writer.write_collection_of_object_values("oauth2PermissionScopes", self.oauth2_permission_scopes) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("preAuthorizedApplications", self.pre_authorized_applications) writer.write_int_value("requestedAccessTokenVersion", self.requested_access_token_version) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/api_authentication_configuration_base.py b/msgraph/generated/models/api_authentication_configuration_base.py index 85b015d3653..0aca182c457 100644 --- a/msgraph/generated/models/api_authentication_configuration_base.py +++ b/msgraph/generated/models/api_authentication_configuration_base.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .pkcs12_certificate import Pkcs12Certificate fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_configuration_setting_item.py b/msgraph/generated/models/app_configuration_setting_item.py index 45de6c5b366..11d48d983cc 100644 --- a/msgraph/generated/models/app_configuration_setting_item.py +++ b/msgraph/generated/models/app_configuration_setting_item.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "appConfigKey": lambda n : setattr(self, 'app_config_key', n.get_str_value()), "appConfigKeyType": lambda n : setattr(self, 'app_config_key_type', n.get_enum_value(MdmAppConfigKeyType)), "appConfigKeyValue": lambda n : setattr(self, 'app_config_key_value', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("appConfigKey", self.app_config_key) writer.write_enum_value("appConfigKeyType", self.app_config_key_type) writer.write_str_value("appConfigKeyValue", self.app_config_key_value) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_consent_request_scope.py b/msgraph/generated/models/app_consent_request_scope.py index 04f219fac1b..318656a0ff3 100644 --- a/msgraph/generated/models/app_consent_request_scope.py +++ b/msgraph/generated/models/app_consent_request_scope.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_identity.py b/msgraph/generated/models/app_identity.py index 3bc996304f8..eca72d77ba9 100644 --- a/msgraph/generated/models/app_identity.py +++ b/msgraph/generated/models/app_identity.py @@ -11,13 +11,13 @@ class AppIdentity(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) - # Refers to the Unique GUID representing Application Id in the Azure Active Directory. + # Refers to the unique ID representing application in Microsoft Entra ID. app_id: Optional[str] = None - # Refers to the Application Name displayed in the Azure Portal. + # Refers to the application name displayed in the Microsoft Entra admin center. display_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # Refers to the Unique GUID indicating Service Principal Id in Azure Active Directory for the corresponding App. + # Refers to the unique ID for the service principal in Microsoft Entra ID. service_principal_id: Optional[str] = None # Refers to the Service Principal Name is the Application name in the tenant. service_principal_name: Optional[str] = None @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "appId": lambda n : setattr(self, 'app_id', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "servicePrincipalId": lambda n : setattr(self, 'service_principal_id', n.get_str_value()), "servicePrincipalName": lambda n : setattr(self, 'service_principal_name', n.get_str_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("appId", self.app_id) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("servicePrincipalId", self.service_principal_id) writer.write_str_value("servicePrincipalName", self.service_principal_name) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_list_item.py b/msgraph/generated/models/app_list_item.py index 6d9d7d5fa30..50ec4f52534 100644 --- a/msgraph/generated/models/app_list_item.py +++ b/msgraph/generated/models/app_list_item.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "appId": lambda n : setattr(self, 'app_id', n.get_str_value()), "appStoreUrl": lambda n : setattr(self, 'app_store_url', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "publisher": lambda n : setattr(self, 'publisher', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("appId", self.app_id) writer.write_str_value("appStoreUrl", self.app_store_url) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("publisher", self.publisher) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_log_collection_download_details.py b/msgraph/generated/models/app_log_collection_download_details.py index 73a488b8aa3..38ebef89e5d 100644 --- a/msgraph/generated/models/app_log_collection_download_details.py +++ b/msgraph/generated/models/app_log_collection_download_details.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "appLogDecryptionAlgorithm": lambda n : setattr(self, 'app_log_decryption_algorithm', n.get_enum_value(AppLogDecryptionAlgorithm)), "decryptionKey": lambda n : setattr(self, 'decryption_key', n.get_str_value()), "downloadUrl": lambda n : setattr(self, 'download_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("appLogDecryptionAlgorithm", self.app_log_decryption_algorithm) writer.write_str_value("decryptionKey", self.decryption_key) writer.write_str_value("downloadUrl", self.download_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_management_configuration.py b/msgraph/generated/models/app_management_configuration.py index d91ddc29102..442b06c3aae 100644 --- a/msgraph/generated/models/app_management_configuration.py +++ b/msgraph/generated/models/app_management_configuration.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "keyCredentials": lambda n : setattr(self, 'key_credentials', n.get_collection_of_object_values(KeyCredentialConfiguration)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "passwordCredentials": lambda n : setattr(self, 'password_credentials', n.get_collection_of_object_values(PasswordCredentialConfiguration)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("keyCredentials", self.key_credentials) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("passwordCredentials", self.password_credentials) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/app_role.py b/msgraph/generated/models/app_role.py index a1839339ced..9257b5d06d1 100644 --- a/msgraph/generated/models/app_role.py +++ b/msgraph/generated/models/app_role.py @@ -26,7 +26,7 @@ class AppRole(AdditionalDataHolder, BackedModel, Parsable): odata_type: Optional[str] = None # Specifies if the app role is defined on the application object or on the servicePrincipal entity. Must not be included in any POST or PATCH requests. Read-only. origin: Optional[str] = None - # Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. + # Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, and characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, aren't allowed. May not begin with .. value: Optional[str] = None @staticmethod @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_uuid_value()), "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "origin": lambda n : setattr(self, 'origin', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_uuid_value("id", self.id) writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("origin", self.origin) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/application.py b/msgraph/generated/models/application.py index 6af17dda0e3..1d54ccd0b21 100644 --- a/msgraph/generated/models/application.py +++ b/msgraph/generated/models/application.py @@ -41,7 +41,7 @@ class Application(DirectoryObject): add_ins: Optional[List[AddIn]] = None # Specifies settings for an application that implements a web API. api: Optional[ApiApplication] = None - # The unique identifier for the application that is assigned to an application by Azure AD. Not nullable. Read-only. Supports $filter (eq). + # The unique identifier for the application that is assigned to an application by Microsoft Entra ID. Not nullable. Read-only. Alternate key. Supports $filter (eq). app_id: Optional[str] = None # The appManagementPolicy applied to this application. app_management_policies: Optional[List[AppManagementPolicy]] = None @@ -67,17 +67,17 @@ class Application(DirectoryObject): extension_properties: Optional[List[ExtensionProperty]] = None # Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). federated_identity_credentials: Optional[List[FederatedIdentityCredential]] = None - # Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all of the security groups, distribution groups, and Azure AD directory roles that the signed-in user is a member of). + # Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values: None, SecurityGroup (for security groups and Microsoft Entra roles), All (this gets all of the security groups, distribution groups, and Microsoft Entra directory roles that the signed-in user is a member of). group_membership_claims: Optional[str] = None # The homeRealmDiscoveryPolicies property home_realm_discovery_policies: Optional[List[HomeRealmDiscoveryPolicy]] = None - # Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). + # Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Microsoft Entra application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). identifier_uris: Optional[List[str]] = None - # Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). + # Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Microsoft Entra apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). info: Optional[InformationalUrl] = None # Specifies whether this application supports device authentication without a user. The default is false. is_device_only_auth_supported: Optional[bool] = None - # Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where it is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. + # Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Microsoft Entra ID cannot determine the client application type. For example, the ROPC flow where it is configured without specifying a redirect URI. In those cases Microsoft Entra ID interprets the application type based on the value of this property. is_fallback_public_client: Optional[bool] = None # The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). key_credentials: Optional[List[KeyCredential]] = None @@ -87,7 +87,7 @@ class Application(DirectoryObject): notes: Optional[str] = None # The oauth2RequirePostResponse property oauth2_require_post_response: Optional[bool] = None - # Application developers can configure optional claims in their Azure AD applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. + # Application developers can configure optional claims in their Microsoft Entra applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. optional_claims: Optional[OptionalClaims] = None # Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. owners: Optional[List[DirectoryObject]] = None @@ -99,7 +99,7 @@ class Application(DirectoryObject): public_client: Optional[PublicClientApplication] = None # The verified publisher domain for the application. Read-only. For more information, see How to: Configure an application's publisher domain. Supports $filter (eq, ne, ge, le, startsWith). publisher_domain: Optional[str] = None - # Specifies whether this application requires Azure AD to verify the signed authentication requests. + # Specifies whether this application requires Microsoft Entra ID to verify the signed authentication requests. request_signature_verification: Optional[RequestSignatureVerification] = None # Specifies the resources that the application needs to access. This property also specifies the set of delegated permissions and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. No more than 50 resource services (APIs) can be configured. Beginning mid-October 2021, the total number of required permissions must not exceed 400. For more information, see Limits on requested permissions per app. Not nullable. Supports $filter (eq, not, ge, le). required_resource_access: Optional[List[RequiredResourceAccess]] = None @@ -113,11 +113,11 @@ class Application(DirectoryObject): sign_in_audience: Optional[str] = None # Specifies settings for a single-page application, including sign out URLs and redirect URIs for authorization codes and access tokens. spa: Optional[SpaApplication] = None - # Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + # Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. synchronization: Optional[Synchronization] = None # Custom strings that can be used to categorize and identify the application. Not nullable. Strings added here will also appear in the tags property of any associated service principals.Supports $filter (eq, not, ge, le, startsWith) and $search. tags: Optional[List[str]] = None - # Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + # Specifies the keyId of a public key from the keyCredentials collection. When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. token_encryption_key_id: Optional[UUID] = None # The tokenIssuancePolicies property token_issuance_policies: Optional[List[TokenIssuancePolicy]] = None diff --git a/msgraph/generated/models/application_service_principal.py b/msgraph/generated/models/application_service_principal.py index 0ded0fdb6dd..57c0b08fb05 100644 --- a/msgraph/generated/models/application_service_principal.py +++ b/msgraph/generated/models/application_service_principal.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "application": lambda n : setattr(self, 'application', n.get_object_value(Application)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "servicePrincipal": lambda n : setattr(self, 'service_principal', n.get_object_value(ServicePrincipal)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("application", self.application) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("servicePrincipal", self.service_principal) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/applied_conditional_access_policy.py b/msgraph/generated/models/applied_conditional_access_policy.py index 28be2b9d26e..dde8c5783af 100644 --- a/msgraph/generated/models/applied_conditional_access_policy.py +++ b/msgraph/generated/models/applied_conditional_access_policy.py @@ -16,7 +16,7 @@ class AppliedConditionalAccessPolicy(AdditionalDataHolder, BackedModel, Parsable additional_data: Dict[str, Any] = field(default_factory=dict) # Refers to the Name of the conditional access policy (example: 'Require MFA for Salesforce'). display_name: Optional[str] = None - # Refers to the grant controls enforced by the conditional access policy (example: 'Require multi-factor authentication'). + # Refers to the grant controls enforced by the conditional access policy (example: 'Require multifactor authentication'). enforced_grant_controls: Optional[List[str]] = None # Refers to the session controls enforced by the conditional access policy (example: 'Require app enforced controls'). enforced_session_controls: Optional[List[str]] = None @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "enforcedGrantControls": lambda n : setattr(self, 'enforced_grant_controls', n.get_collection_of_primitive_values(str)), "enforcedSessionControls": lambda n : setattr(self, 'enforced_session_controls', n.get_collection_of_primitive_values(str)), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "result": lambda n : setattr(self, 'result', n.get_enum_value(AppliedConditionalAccessPolicyResult)), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("enforcedGrantControls", self.enforced_grant_controls) writer.write_collection_of_primitive_values("enforcedSessionControls", self.enforced_session_controls) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("result", self.result) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/approval_settings.py b/msgraph/generated/models/approval_settings.py index 8945be24d83..ce19e2d84a2 100644 --- a/msgraph/generated/models/approval_settings.py +++ b/msgraph/generated/models/approval_settings.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isApprovalRequired": lambda n : setattr(self, 'is_approval_required', n.get_bool_value()), "isApprovalRequiredForExtension": lambda n : setattr(self, 'is_approval_required_for_extension', n.get_bool_value()), "isRequestorJustificationRequired": lambda n : setattr(self, 'is_requestor_justification_required', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isApprovalRequired", self.is_approval_required) writer.write_bool_value("isApprovalRequiredForExtension", self.is_approval_required_for_extension) writer.write_bool_value("isRequestorJustificationRequired", self.is_requestor_justification_required) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/archived_print_job.py b/msgraph/generated/models/archived_print_job.py index 9999ff12813..2b5a8423b89 100644 --- a/msgraph/generated/models/archived_print_job.py +++ b/msgraph/generated/models/archived_print_job.py @@ -69,7 +69,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(UserIdentity)), "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "printerId": lambda n : setattr(self, 'printer_id', n.get_str_value()), "printerName": lambda n : setattr(self, 'printer_name', n.get_str_value()), "processingState": lambda n : setattr(self, 'processing_state', n.get_enum_value(PrintJobProcessingState)), @@ -91,7 +91,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("createdBy", self.created_by) writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("printerId", self.printer_id) writer.write_str_value("printerName", self.printer_name) writer.write_enum_value("processingState", self.processing_state) diff --git a/msgraph/generated/models/assigned_label.py b/msgraph/generated/models/assigned_label.py index be72e7b908c..0c44f557ff5 100644 --- a/msgraph/generated/models/assigned_label.py +++ b/msgraph/generated/models/assigned_label.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "labelId": lambda n : setattr(self, 'label_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("labelId", self.label_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/assigned_license.py b/msgraph/generated/models/assigned_license.py index f95903c12b1..ea3b6b306cd 100644 --- a/msgraph/generated/models/assigned_license.py +++ b/msgraph/generated/models/assigned_license.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "disabledPlans": lambda n : setattr(self, 'disabled_plans', n.get_collection_of_primitive_values(UUID)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "skuId": lambda n : setattr(self, 'sku_id', n.get_uuid_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("disabledPlans", self.disabled_plans) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_uuid_value("skuId", self.sku_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/assigned_plan.py b/msgraph/generated/models/assigned_plan.py index 089e155b23a..c8c20e6dc58 100644 --- a/msgraph/generated/models/assigned_plan.py +++ b/msgraph/generated/models/assigned_plan.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "assignedDateTime": lambda n : setattr(self, 'assigned_date_time', n.get_datetime_value()), "capabilityStatus": lambda n : setattr(self, 'capability_status', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "service": lambda n : setattr(self, 'service', n.get_str_value()), "servicePlanId": lambda n : setattr(self, 'service_plan_id', n.get_uuid_value()), } @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("assignedDateTime", self.assigned_date_time) writer.write_str_value("capabilityStatus", self.capability_status) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("service", self.service) writer.write_uuid_value("servicePlanId", self.service_plan_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/assigned_training_info.py b/msgraph/generated/models/assigned_training_info.py index c8e13fee1cf..3e5ecd1515b 100644 --- a/msgraph/generated/models/assigned_training_info.py +++ b/msgraph/generated/models/assigned_training_info.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "assignedUserCount": lambda n : setattr(self, 'assigned_user_count', n.get_int_value()), "completedUserCount": lambda n : setattr(self, 'completed_user_count', n.get_int_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("assignedUserCount", self.assigned_user_count) writer.write_int_value("completedUserCount", self.completed_user_count) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/assignment_order.py b/msgraph/generated/models/assignment_order.py index 51e692db866..d919b96940e 100644 --- a/msgraph/generated/models/assignment_order.py +++ b/msgraph/generated/models/assignment_order.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "order": lambda n : setattr(self, 'order', n.get_collection_of_primitive_values(str)), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("order", self.order) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attachment_base.py b/msgraph/generated/models/attachment_base.py index efe6a9f3077..d429f5cfc4b 100644 --- a/msgraph/generated/models/attachment_base.py +++ b/msgraph/generated/models/attachment_base.py @@ -16,7 +16,7 @@ class AttachmentBase(Entity): content_type: Optional[str] = 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. last_modified_date_time: Optional[datetime.datetime] = None - # The display name of the attachment. This does not need to be the actual file name. + # The display name of the attachment. This doesn't need to be the actual file name. name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/attachment_info.py b/msgraph/generated/models/attachment_info.py index 3e1f5073f46..eb32a1377a9 100644 --- a/msgraph/generated/models/attachment_info.py +++ b/msgraph/generated/models/attachment_info.py @@ -18,7 +18,7 @@ class AttachmentInfo(AdditionalDataHolder, BackedModel, Parsable): attachment_type: Optional[AttachmentType] = None # The nature of the data in the attachment. Optional. content_type: Optional[str] = None - # The display name of the attachment. This can be a descriptive string and does not have to be the actual file name. Required. + # The display name of the attachment. This can be a descriptive string and doesn't have to be the actual file name. Required. name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "attachmentType": lambda n : setattr(self, 'attachment_type', n.get_enum_value(AttachmentType)), "contentType": lambda n : setattr(self, 'content_type', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "size": lambda n : setattr(self, 'size', n.get_int_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("attachmentType", self.attachment_type) writer.write_str_value("contentType", self.content_type) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("size", self.size) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attachment_item.py b/msgraph/generated/models/attachment_item.py index d6295caa867..ee1bc7ad267 100644 --- a/msgraph/generated/models/attachment_item.py +++ b/msgraph/generated/models/attachment_item.py @@ -16,13 +16,13 @@ class AttachmentItem(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The type of attachment. Possible values are: file, item, reference. Required. attachment_type: Optional[AttachmentType] = None - # The CID or Content-Id of the attachment for referencing in case of in-line attachments using tag in HTML messages. Optional. + # The CID or Content-Id of the attachment for referencing for the in-line attachments using the tag in HTML messages. Optional. content_id: Optional[str] = None # The nature of the data in the attachment. Optional. content_type: Optional[str] = None # true if the attachment is an inline attachment; otherwise, false. Optional. is_inline: Optional[bool] = None - # The display name of the attachment. This can be a descriptive string and does not have to be the actual file name. Required. + # The display name of the attachment. This can be a descriptive string and doesn't have to be the actual file name. Required. name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "contentType": lambda n : setattr(self, 'content_type', n.get_str_value()), "isInline": lambda n : setattr(self, 'is_inline', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "size": lambda n : setattr(self, 'size', n.get_int_value()), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("contentType", self.content_type) writer.write_bool_value("isInline", self.is_inline) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("size", self.size) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attack_simulation_operation.py b/msgraph/generated/models/attack_simulation_operation.py new file mode 100644 index 00000000000..012d3cd2f95 --- /dev/null +++ b/msgraph/generated/models/attack_simulation_operation.py @@ -0,0 +1,67 @@ +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 .attack_simulation_operation_type import AttackSimulationOperationType + from .long_running_operation import LongRunningOperation + +from .long_running_operation import LongRunningOperation + +@dataclass +class AttackSimulationOperation(LongRunningOperation): + # The OdataType property + odata_type: Optional[str] = None + # The percentageCompleted property + percentage_completed: Optional[int] = None + # The tenantId property + tenant_id: Optional[str] = None + # The type property + type: Optional[AttackSimulationOperationType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AttackSimulationOperation: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AttackSimulationOperation + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AttackSimulationOperation() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .attack_simulation_operation_type import AttackSimulationOperationType + from .long_running_operation import LongRunningOperation + + from .attack_simulation_operation_type import AttackSimulationOperationType + from .long_running_operation import LongRunningOperation + + fields: Dict[str, Callable[[Any], None]] = { + "percentageCompleted": lambda n : setattr(self, 'percentage_completed', n.get_int_value()), + "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), + "type": lambda n : setattr(self, 'type', n.get_enum_value(AttackSimulationOperationType)), + } + 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_int_value("percentageCompleted", self.percentage_completed) + writer.write_str_value("tenantId", self.tenant_id) + writer.write_enum_value("type", self.type) + + diff --git a/msgraph/generated/models/attack_simulation_operation_collection_response.py b/msgraph/generated/models/attack_simulation_operation_collection_response.py new file mode 100644 index 00000000000..f9b28adcd62 --- /dev/null +++ b/msgraph/generated/models/attack_simulation_operation_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .attack_simulation_operation import AttackSimulationOperation + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class AttackSimulationOperationCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[AttackSimulationOperation]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AttackSimulationOperationCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AttackSimulationOperationCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AttackSimulationOperationCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .attack_simulation_operation import AttackSimulationOperation + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + from .attack_simulation_operation import AttackSimulationOperation + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(AttackSimulationOperation)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/attack_simulation_operation_type.py b/msgraph/generated/models/attack_simulation_operation_type.py new file mode 100644 index 00000000000..500629a8739 --- /dev/null +++ b/msgraph/generated/models/attack_simulation_operation_type.py @@ -0,0 +1,7 @@ +from enum import Enum + +class AttackSimulationOperationType(str, Enum): + CreateSimualation = "createSimualation", + UpdateSimulation = "updateSimulation", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/attack_simulation_repeat_offender.py b/msgraph/generated/models/attack_simulation_repeat_offender.py index e5b826208e7..c75dcf68a0b 100644 --- a/msgraph/generated/models/attack_simulation_repeat_offender.py +++ b/msgraph/generated/models/attack_simulation_repeat_offender.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "attackSimulationUser": lambda n : setattr(self, 'attack_simulation_user', n.get_object_value(AttackSimulationUser)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "repeatOffenceCount": lambda n : setattr(self, 'repeat_offence_count', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("attackSimulationUser", self.attack_simulation_user) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("repeatOffenceCount", self.repeat_offence_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attack_simulation_root.py b/msgraph/generated/models/attack_simulation_root.py index 68b2858ed39..b8bcc8ca37c 100644 --- a/msgraph/generated/models/attack_simulation_root.py +++ b/msgraph/generated/models/attack_simulation_root.py @@ -4,20 +4,38 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: + from .attack_simulation_operation import AttackSimulationOperation + from .end_user_notification import EndUserNotification from .entity import Entity + from .landing_page import LandingPage + from .login_page import LoginPage + from .payload import Payload from .simulation import Simulation from .simulation_automation import SimulationAutomation + from .training import Training from .entity import Entity @dataclass class AttackSimulationRoot(Entity): + # The endUserNotifications property + end_user_notifications: Optional[List[EndUserNotification]] = None + # The landingPages property + landing_pages: Optional[List[LandingPage]] = None + # The loginPages property + login_pages: Optional[List[LoginPage]] = None # The OdataType property odata_type: Optional[str] = None + # The operations property + operations: Optional[List[AttackSimulationOperation]] = None + # The payloads property + payloads: Optional[List[Payload]] = None # Represents simulation automation created to run on a tenant. simulation_automations: Optional[List[SimulationAutomation]] = None # Represents an attack simulation training campaign in a tenant. simulations: Optional[List[Simulation]] = None + # The trainings property + trainings: Optional[List[Training]] = None @staticmethod def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AttackSimulationRoot: @@ -35,17 +53,35 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .attack_simulation_operation import AttackSimulationOperation + from .end_user_notification import EndUserNotification from .entity import Entity + from .landing_page import LandingPage + from .login_page import LoginPage + from .payload import Payload from .simulation import Simulation from .simulation_automation import SimulationAutomation + from .training import Training + from .attack_simulation_operation import AttackSimulationOperation + from .end_user_notification import EndUserNotification from .entity import Entity + from .landing_page import LandingPage + from .login_page import LoginPage + from .payload import Payload from .simulation import Simulation from .simulation_automation import SimulationAutomation + from .training import Training fields: Dict[str, Callable[[Any], None]] = { + "endUserNotifications": lambda n : setattr(self, 'end_user_notifications', n.get_collection_of_object_values(EndUserNotification)), + "landingPages": lambda n : setattr(self, 'landing_pages', n.get_collection_of_object_values(LandingPage)), + "loginPages": lambda n : setattr(self, 'login_pages', n.get_collection_of_object_values(LoginPage)), + "operations": lambda n : setattr(self, 'operations', n.get_collection_of_object_values(AttackSimulationOperation)), + "payloads": lambda n : setattr(self, 'payloads', n.get_collection_of_object_values(Payload)), "simulationAutomations": lambda n : setattr(self, 'simulation_automations', n.get_collection_of_object_values(SimulationAutomation)), "simulations": lambda n : setattr(self, 'simulations', n.get_collection_of_object_values(Simulation)), + "trainings": lambda n : setattr(self, 'trainings', n.get_collection_of_object_values(Training)), } super_fields = super().get_field_deserializers() fields.update(super_fields) @@ -60,7 +96,13 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") super().serialize(writer) + writer.write_collection_of_object_values("endUserNotifications", self.end_user_notifications) + writer.write_collection_of_object_values("landingPages", self.landing_pages) + writer.write_collection_of_object_values("loginPages", self.login_pages) + writer.write_collection_of_object_values("operations", self.operations) + writer.write_collection_of_object_values("payloads", self.payloads) writer.write_collection_of_object_values("simulationAutomations", self.simulation_automations) writer.write_collection_of_object_values("simulations", self.simulations) + writer.write_collection_of_object_values("trainings", self.trainings) diff --git a/msgraph/generated/models/attack_simulation_simulation_user_coverage.py b/msgraph/generated/models/attack_simulation_simulation_user_coverage.py index 87732240bae..8692936153f 100644 --- a/msgraph/generated/models/attack_simulation_simulation_user_coverage.py +++ b/msgraph/generated/models/attack_simulation_simulation_user_coverage.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "clickCount": lambda n : setattr(self, 'click_count', n.get_int_value()), "compromisedCount": lambda n : setattr(self, 'compromised_count', n.get_int_value()), "latestSimulationDateTime": lambda n : setattr(self, 'latest_simulation_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "simulationCount": lambda n : setattr(self, 'simulation_count', n.get_int_value()), } return fields @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("clickCount", self.click_count) writer.write_int_value("compromisedCount", self.compromised_count) writer.write_datetime_value("latestSimulationDateTime", self.latest_simulation_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("simulationCount", self.simulation_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attack_simulation_training_user_coverage.py b/msgraph/generated/models/attack_simulation_training_user_coverage.py index c39c64b3011..9135f8d8d69 100644 --- a/msgraph/generated/models/attack_simulation_training_user_coverage.py +++ b/msgraph/generated/models/attack_simulation_training_user_coverage.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "attackSimulationUser": lambda n : setattr(self, 'attack_simulation_user', n.get_object_value(AttackSimulationUser)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "userTrainings": lambda n : setattr(self, 'user_trainings', n.get_collection_of_object_values(UserTrainingStatusInfo)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("attackSimulationUser", self.attack_simulation_user) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("userTrainings", self.user_trainings) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attack_simulation_user.py b/msgraph/generated/models/attack_simulation_user.py index 0d1f960de43..87638a5ff7e 100644 --- a/msgraph/generated/models/attack_simulation_user.py +++ b/msgraph/generated/models/attack_simulation_user.py @@ -17,7 +17,7 @@ class AttackSimulationUser(AdditionalDataHolder, BackedModel, Parsable): email: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # This is the id property value of the user resource that represents the user in the Azure Active Directory tenant. + # This is the id property value of the user resource that represents the user in the Microsoft Entra tenant. user_id: Optional[str] = None @staticmethod @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "email": lambda n : setattr(self, 'email', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "userId": lambda n : setattr(self, 'user_id', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("email", self.email) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("userId", self.user_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attendance_interval.py b/msgraph/generated/models/attendance_interval.py index ffea9f66af7..84f4cd6547b 100644 --- a/msgraph/generated/models/attendance_interval.py +++ b/msgraph/generated/models/attendance_interval.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "durationInSeconds": lambda n : setattr(self, 'duration_in_seconds', n.get_int_value()), "joinDateTime": lambda n : setattr(self, 'join_date_time', n.get_datetime_value()), "leaveDateTime": lambda n : setattr(self, 'leave_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("durationInSeconds", self.duration_in_seconds) writer.write_datetime_value("joinDateTime", self.join_date_time) writer.write_datetime_value("leaveDateTime", self.leave_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attendee_availability.py b/msgraph/generated/models/attendee_availability.py index 8631a1f2656..33b18d5f41b 100644 --- a/msgraph/generated/models/attendee_availability.py +++ b/msgraph/generated/models/attendee_availability.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "attendee": lambda n : setattr(self, 'attendee', n.get_object_value(AttendeeBase)), "availability": lambda n : setattr(self, 'availability', n.get_enum_value(FreeBusyStatus)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("attendee", self.attendee) writer.write_enum_value("availability", self.availability) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attribute_definition.py b/msgraph/generated/models/attribute_definition.py index 7fff86a64f7..a95f0e792b2 100644 --- a/msgraph/generated/models/attribute_definition.py +++ b/msgraph/generated/models/attribute_definition.py @@ -83,7 +83,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "multivalued": lambda n : setattr(self, 'multivalued', n.get_bool_value()), "mutability": lambda n : setattr(self, 'mutability', n.get_enum_value(Mutability)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "referencedObjects": lambda n : setattr(self, 'referenced_objects', n.get_collection_of_object_values(ReferencedObject)), "required": lambda n : setattr(self, 'required', n.get_bool_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(AttributeType)), @@ -107,7 +107,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("multivalued", self.multivalued) writer.write_enum_value("mutability", self.mutability) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("referencedObjects", self.referenced_objects) writer.write_bool_value("required", self.required) writer.write_enum_value("type", self.type) diff --git a/msgraph/generated/models/attribute_definition_metadata_entry.py b/msgraph/generated/models/attribute_definition_metadata_entry.py index ce24d71eb30..304b5401ff9 100644 --- a/msgraph/generated/models/attribute_definition_metadata_entry.py +++ b/msgraph/generated/models/attribute_definition_metadata_entry.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_enum_value(AttributeDefinitionMetadata)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attribute_mapping.py b/msgraph/generated/models/attribute_mapping.py index 8447af08fd6..66c2a8cc232 100644 --- a/msgraph/generated/models/attribute_mapping.py +++ b/msgraph/generated/models/attribute_mapping.py @@ -63,7 +63,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "flowBehavior": lambda n : setattr(self, 'flow_behavior', n.get_enum_value(AttributeFlowBehavior)), "flowType": lambda n : setattr(self, 'flow_type', n.get_enum_value(AttributeFlowType)), "matchingPriority": lambda n : setattr(self, 'matching_priority', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "source": lambda n : setattr(self, 'source', n.get_object_value(AttributeMappingSource)), "targetAttributeName": lambda n : setattr(self, 'target_attribute_name', n.get_str_value()), } @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("flowBehavior", self.flow_behavior) writer.write_enum_value("flowType", self.flow_type) writer.write_int_value("matchingPriority", self.matching_priority) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("source", self.source) writer.write_str_value("targetAttributeName", self.target_attribute_name) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attribute_mapping_parameter_schema.py b/msgraph/generated/models/attribute_mapping_parameter_schema.py index c95e7e7e123..291991f9025 100644 --- a/msgraph/generated/models/attribute_mapping_parameter_schema.py +++ b/msgraph/generated/models/attribute_mapping_parameter_schema.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowMultipleOccurrences": lambda n : setattr(self, 'allow_multiple_occurrences', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "required": lambda n : setattr(self, 'required', n.get_bool_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(AttributeType)), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("allowMultipleOccurrences", self.allow_multiple_occurrences) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("required", self.required) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/attribute_mapping_source.py b/msgraph/generated/models/attribute_mapping_source.py index e1be06c8fd0..fa6aaeabd51 100644 --- a/msgraph/generated/models/attribute_mapping_source.py +++ b/msgraph/generated/models/attribute_mapping_source.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "expression": lambda n : setattr(self, 'expression', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "parameters": lambda n : setattr(self, 'parameters', n.get_collection_of_object_values(StringKeyAttributeMappingSourceValuePair)), "type": lambda n : setattr(self, 'type', n.get_enum_value(AttributeMappingSourceType)), } @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("expression", self.expression) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("parameters", self.parameters) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/audio.py b/msgraph/generated/models/audio.py index 9080d981b21..9e9cdad335c 100644 --- a/msgraph/generated/models/audio.py +++ b/msgraph/generated/models/audio.py @@ -75,7 +75,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "genre": lambda n : setattr(self, 'genre', n.get_str_value()), "hasDrm": lambda n : setattr(self, 'has_drm', n.get_bool_value()), "isVariableBitrate": lambda n : setattr(self, 'is_variable_bitrate', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "title": lambda n : setattr(self, 'title', n.get_str_value()), "track": lambda n : setattr(self, 'track', n.get_int_value()), "trackCount": lambda n : setattr(self, 'track_count', n.get_int_value()), @@ -103,7 +103,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("genre", self.genre) writer.write_bool_value("hasDrm", self.has_drm) writer.write_bool_value("isVariableBitrate", self.is_variable_bitrate) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("title", self.title) writer.write_int_value("track", self.track) writer.write_int_value("trackCount", self.track_count) diff --git a/msgraph/generated/models/audio_conferencing.py b/msgraph/generated/models/audio_conferencing.py index c5e05e18ec5..9db9e1c0e7d 100644 --- a/msgraph/generated/models/audio_conferencing.py +++ b/msgraph/generated/models/audio_conferencing.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "conferenceId": lambda n : setattr(self, 'conference_id', n.get_str_value()), "dialinUrl": lambda n : setattr(self, 'dialin_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tollFreeNumber": lambda n : setattr(self, 'toll_free_number', n.get_str_value()), "tollFreeNumbers": lambda n : setattr(self, 'toll_free_numbers', n.get_collection_of_primitive_values(str)), "tollNumber": lambda n : setattr(self, 'toll_number', n.get_str_value()), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("conferenceId", self.conference_id) writer.write_str_value("dialinUrl", self.dialin_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("tollFreeNumber", self.toll_free_number) writer.write_collection_of_primitive_values("tollFreeNumbers", self.toll_free_numbers) writer.write_str_value("tollNumber", self.toll_number) diff --git a/msgraph/generated/models/audit_activity_initiator.py b/msgraph/generated/models/audit_activity_initiator.py index 967c1b2ce87..50eed4bc3b6 100644 --- a/msgraph/generated/models/audit_activity_initiator.py +++ b/msgraph/generated/models/audit_activity_initiator.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "app": lambda n : setattr(self, 'app', n.get_object_value(AppIdentity)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "user": lambda n : setattr(self, 'user', n.get_object_value(UserIdentity)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("app", self.app) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("user", self.user) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/audit_actor.py b/msgraph/generated/models/audit_actor.py index 91b2522991f..3553deb2a15 100644 --- a/msgraph/generated/models/audit_actor.py +++ b/msgraph/generated/models/audit_actor.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "applicationId": lambda n : setattr(self, 'application_id', n.get_str_value()), "auditActorType": lambda n : setattr(self, 'audit_actor_type', n.get_str_value()), "ipAddress": lambda n : setattr(self, 'ip_address', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "servicePrincipalName": lambda n : setattr(self, 'service_principal_name', n.get_str_value()), "userId": lambda n : setattr(self, 'user_id', n.get_str_value()), "userPermissions": lambda n : setattr(self, 'user_permissions', n.get_collection_of_primitive_values(str)), @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("applicationId", self.application_id) writer.write_str_value("auditActorType", self.audit_actor_type) writer.write_str_value("ipAddress", self.ip_address) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("servicePrincipalName", self.service_principal_name) writer.write_str_value("userId", self.user_id) writer.write_collection_of_primitive_values("userPermissions", self.user_permissions) diff --git a/msgraph/generated/models/audit_property.py b/msgraph/generated/models/audit_property.py index 6e9c3d6b0a4..a3e5e7eac53 100644 --- a/msgraph/generated/models/audit_property.py +++ b/msgraph/generated/models/audit_property.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "newValue": lambda n : setattr(self, 'new_value', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oldValue": lambda n : setattr(self, 'old_value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("newValue", self.new_value) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("oldValue", self.old_value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/audit_resource.py b/msgraph/generated/models/audit_resource.py index c4a82cbfc47..24112a89fca 100644 --- a/msgraph/generated/models/audit_resource.py +++ b/msgraph/generated/models/audit_resource.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "auditResourceType": lambda n : setattr(self, 'audit_resource_type', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "modifiedProperties": lambda n : setattr(self, 'modified_properties', n.get_collection_of_object_values(AuditProperty)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceId": lambda n : setattr(self, 'resource_id', n.get_str_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("auditResourceType", self.audit_resource_type) writer.write_str_value("displayName", self.display_name) writer.write_collection_of_object_values("modifiedProperties", self.modified_properties) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("resourceId", self.resource_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/authentication_context_class_reference.py b/msgraph/generated/models/authentication_context_class_reference.py index 8504db520ab..e455b437fb2 100644 --- a/msgraph/generated/models/authentication_context_class_reference.py +++ b/msgraph/generated/models/authentication_context_class_reference.py @@ -14,7 +14,7 @@ class AuthenticationContextClassReference(Entity): description: Optional[str] = None # The display name is the friendly name of the authenticationContextClassReference object. This value should be used to identify the authentication context class reference when building user-facing admin experiences. For example, a selection UX. display_name: Optional[str] = None - # Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it is set to false, it should not be shown in authentication context selection UX, or used to protect app resources. It will be shown and available for Conditional Access policy authoring. The default value is false. Supports $filter (eq). + # Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it's set to false, it shouldn't be shown in authentication context selection UX, or used to protect app resources. It's shown and available for Conditional Access policy authoring. The default value is false. Supports $filter (eq). is_available: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/authentication_method_feature_configuration.py b/msgraph/generated/models/authentication_method_feature_configuration.py index 38ac4b534f1..586cc3c1f40 100644 --- a/msgraph/generated/models/authentication_method_feature_configuration.py +++ b/msgraph/generated/models/authentication_method_feature_configuration.py @@ -21,7 +21,7 @@ class AuthenticationMethodFeatureConfiguration(AdditionalDataHolder, BackedModel include_target: Optional[FeatureTarget] = None # The OdataType property odata_type: Optional[str] = None - # Enable or disable the feature. Possible values are: default, enabled, disabled, unknownFutureValue. The default value is used when the configuration hasn't been explicitly set and uses the default behavior of Azure AD for the setting. The default value is disabled. + # Enable or disable the feature. Possible values are: default, enabled, disabled, unknownFutureValue. The default value is used when the configuration hasn't been explicitly set and uses the default behavior of Microsoft Entra ID for the setting. The default value is disabled. state: Optional[AdvancedConfigState] = None @staticmethod @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "excludeTarget": lambda n : setattr(self, 'exclude_target', n.get_object_value(FeatureTarget)), "includeTarget": lambda n : setattr(self, 'include_target', n.get_object_value(FeatureTarget)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(AdvancedConfigState)), } return fields @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("excludeTarget", self.exclude_target) writer.write_object_value("includeTarget", self.include_target) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/authentication_methods_policy.py b/msgraph/generated/models/authentication_methods_policy.py index 12d821e5818..fb7cfcaa163 100644 --- a/msgraph/generated/models/authentication_methods_policy.py +++ b/msgraph/generated/models/authentication_methods_policy.py @@ -5,8 +5,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .authentication_method_configuration import AuthenticationMethodConfiguration from .authentication_methods_policy_migration_state import AuthenticationMethodsPolicyMigrationState + from .authentication_method_configuration import AuthenticationMethodConfiguration from .entity import Entity from .registration_enforcement import RegistrationEnforcement @@ -49,13 +49,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .authentication_method_configuration import AuthenticationMethodConfiguration from .authentication_methods_policy_migration_state import AuthenticationMethodsPolicyMigrationState + from .authentication_method_configuration import AuthenticationMethodConfiguration from .entity import Entity from .registration_enforcement import RegistrationEnforcement - from .authentication_method_configuration import AuthenticationMethodConfiguration from .authentication_methods_policy_migration_state import AuthenticationMethodsPolicyMigrationState + from .authentication_method_configuration import AuthenticationMethodConfiguration from .entity import Entity from .registration_enforcement import RegistrationEnforcement diff --git a/msgraph/generated/models/authentication_methods_registration_campaign.py b/msgraph/generated/models/authentication_methods_registration_campaign.py index 6e11475a574..94c2a97adc4 100644 --- a/msgraph/generated/models/authentication_methods_registration_campaign.py +++ b/msgraph/generated/models/authentication_methods_registration_campaign.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "excludeTargets": lambda n : setattr(self, 'exclude_targets', n.get_collection_of_object_values(ExcludeTarget)), "includeTargets": lambda n : setattr(self, 'include_targets', n.get_collection_of_object_values(AuthenticationMethodsRegistrationCampaignIncludeTarget)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "snoozeDurationInDays": lambda n : setattr(self, 'snooze_duration_in_days', n.get_int_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(AdvancedConfigState)), } @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("excludeTargets", self.exclude_targets) writer.write_collection_of_object_values("includeTargets", self.include_targets) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("snoozeDurationInDays", self.snooze_duration_in_days) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/authentication_methods_registration_campaign_include_target.py b/msgraph/generated/models/authentication_methods_registration_campaign_include_target.py index 33940eae4d5..2c23370730e 100644 --- a/msgraph/generated/models/authentication_methods_registration_campaign_include_target.py +++ b/msgraph/generated/models/authentication_methods_registration_campaign_include_target.py @@ -14,7 +14,7 @@ class AuthenticationMethodsRegistrationCampaignIncludeTarget(AdditionalDataHolde # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # The object identifier of an Azure Active Directory user or group. + # The object identifier of a Microsoft Entra user or group. id: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "targetType": lambda n : setattr(self, 'target_type', n.get_enum_value(AuthenticationMethodTargetType)), "targetedAuthenticationMethod": lambda n : setattr(self, 'targeted_authentication_method', n.get_str_value()), } @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("targetType", self.target_type) writer.write_str_value("targetedAuthenticationMethod", self.targeted_authentication_method) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/authentication_methods_root.py b/msgraph/generated/models/authentication_methods_root.py index 5d788a51852..8f1d4480098 100644 --- a/msgraph/generated/models/authentication_methods_root.py +++ b/msgraph/generated/models/authentication_methods_root.py @@ -13,7 +13,7 @@ class AuthenticationMethodsRoot(Entity): # The OdataType property odata_type: Optional[str] = None - # Represents the state of a user's authentication methods, including which methods are registered and which features the user is registered and capable of (such as multi-factor authentication, self-service password reset, and passwordless authentication). + # Represents the state of a user's authentication methods, including which methods are registered and which features the user is registered and capable of (such as multifactor authentication, self-service password reset, and passwordless authentication). user_registration_details: Optional[List[UserRegistrationDetails]] = None @staticmethod diff --git a/msgraph/generated/models/authentication_strength_root.py b/msgraph/generated/models/authentication_strength_root.py index d8946e75b9e..ac3d6560cc8 100644 --- a/msgraph/generated/models/authentication_strength_root.py +++ b/msgraph/generated/models/authentication_strength_root.py @@ -4,8 +4,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_method_modes import AuthenticationMethodModes + from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_strength_policy import AuthenticationStrengthPolicy from .entity import Entity @@ -38,13 +38,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_method_modes import AuthenticationMethodModes + from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_strength_policy import AuthenticationStrengthPolicy from .entity import Entity - from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_method_modes import AuthenticationMethodModes + from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_strength_policy import AuthenticationStrengthPolicy from .entity import Entity diff --git a/msgraph/generated/models/authentication_strength_usage.py b/msgraph/generated/models/authentication_strength_usage.py index c87d8895db8..b4e282b07f9 100644 --- a/msgraph/generated/models/authentication_strength_usage.py +++ b/msgraph/generated/models/authentication_strength_usage.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "mfa": lambda n : setattr(self, 'mfa', n.get_collection_of_object_values(ConditionalAccessPolicy)), "none": lambda n : setattr(self, 'none_', n.get_collection_of_object_values(ConditionalAccessPolicy)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("mfa", self.mfa) writer.write_collection_of_object_values("none", self.none_) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/authorization_info.py b/msgraph/generated/models/authorization_info.py index 4abc53622f3..b0d8e84b5d8 100644 --- a/msgraph/generated/models/authorization_info.py +++ b/msgraph/generated/models/authorization_info.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "certificateUserIds": lambda n : setattr(self, 'certificate_user_ids', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("certificateUserIds", self.certificate_user_ids) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/authorization_policy.py b/msgraph/generated/models/authorization_policy.py index 1918ae373a5..7bde3748fd4 100644 --- a/msgraph/generated/models/authorization_policy.py +++ b/msgraph/generated/models/authorization_policy.py @@ -25,7 +25,7 @@ class AuthorizationPolicy(PolicyBase): allowed_to_sign_up_email_based_subscriptions: Optional[bool] = None # Indicates whether users can use the Self-Serve Password Reset feature on the tenant. allowed_to_use_s_s_p_r: Optional[bool] = None - # To disable the use of MSOL PowerShell, set this property to true. This also disables user-based access to the legacy service endpoint used by MSOL PowerShell. This doesn't affect Azure Active Directory Connect or Microsoft Graph. + # To disable the use of MSOL PowerShell, set this property to true. This also disables user-based access to the legacy service endpoint used by MSOL PowerShell. This doesn't affect Microsoft Entra Connect or Microsoft Graph. block_msol_power_shell: Optional[bool] = None # The defaultUserRolePermissions property default_user_role_permissions: Optional[DefaultUserRolePermissions] = None diff --git a/msgraph/generated/models/automatic_replies_mail_tips.py b/msgraph/generated/models/automatic_replies_mail_tips.py index 6a62571984a..4f433e7cc27 100644 --- a/msgraph/generated/models/automatic_replies_mail_tips.py +++ b/msgraph/generated/models/automatic_replies_mail_tips.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "message": lambda n : setattr(self, 'message', n.get_str_value()), "messageLanguage": lambda n : setattr(self, 'message_language', n.get_object_value(LocaleInfo)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "scheduledEndTime": lambda n : setattr(self, 'scheduled_end_time', n.get_object_value(DateTimeTimeZone)), "scheduledStartTime": lambda n : setattr(self, 'scheduled_start_time', n.get_object_value(DateTimeTimeZone)), } @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("message", self.message) writer.write_object_value("messageLanguage", self.message_language) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("scheduledEndTime", self.scheduled_end_time) writer.write_object_value("scheduledStartTime", self.scheduled_start_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/automatic_replies_setting.py b/msgraph/generated/models/automatic_replies_setting.py index d660aed548c..dfb4a7f8f03 100644 --- a/msgraph/generated/models/automatic_replies_setting.py +++ b/msgraph/generated/models/automatic_replies_setting.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "externalAudience": lambda n : setattr(self, 'external_audience', n.get_enum_value(ExternalAudienceScope)), "externalReplyMessage": lambda n : setattr(self, 'external_reply_message', n.get_str_value()), "internalReplyMessage": lambda n : setattr(self, 'internal_reply_message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "scheduledEndDateTime": lambda n : setattr(self, 'scheduled_end_date_time', n.get_object_value(DateTimeTimeZone)), "scheduledStartDateTime": lambda n : setattr(self, 'scheduled_start_date_time', n.get_object_value(DateTimeTimeZone)), "status": lambda n : setattr(self, 'status', n.get_enum_value(AutomaticRepliesStatus)), @@ -77,7 +77,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("externalAudience", self.external_audience) writer.write_str_value("externalReplyMessage", self.external_reply_message) writer.write_str_value("internalReplyMessage", self.internal_reply_message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("scheduledEndDateTime", self.scheduled_end_date_time) writer.write_object_value("scheduledStartDateTime", self.scheduled_start_date_time) writer.write_enum_value("status", self.status) diff --git a/msgraph/generated/models/availability_item.py b/msgraph/generated/models/availability_item.py index 76197fc2cef..88d0a8b7796 100644 --- a/msgraph/generated/models/availability_item.py +++ b/msgraph/generated/models/availability_item.py @@ -19,7 +19,7 @@ class AvailabilityItem(AdditionalDataHolder, BackedModel, Parsable): end_date_time: Optional[DateTimeTimeZone] = None # The OdataType property odata_type: Optional[str] = None - # Indicates the service ID in case of 1:n appointments. If the appointment is of type 1:n, this field will be present, otherwise, null. + # Indicates the service ID for 1:n appointments. If the appointment is of type 1:n, this field is present, otherwise, null. service_id: Optional[str] = None # The startDateTime property start_date_time: Optional[DateTimeTimeZone] = None @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_object_value(DateTimeTimeZone)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "serviceId": lambda n : setattr(self, 'service_id', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_object_value(DateTimeTimeZone)), "status": lambda n : setattr(self, 'status', n.get_enum_value(BookingsAvailabilityStatus)), @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("endDateTime", self.end_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("serviceId", self.service_id) writer.write_object_value("startDateTime", self.start_date_time) writer.write_enum_value("status", self.status) diff --git a/msgraph/generated/models/average_comparative_score.py b/msgraph/generated/models/average_comparative_score.py index 10bee683e32..090b6e59c52 100644 --- a/msgraph/generated/models/average_comparative_score.py +++ b/msgraph/generated/models/average_comparative_score.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "averageScore": lambda n : setattr(self, 'average_score', n.get_float_value()), "basis": lambda n : setattr(self, 'basis', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_float_value("averageScore", self.average_score) writer.write_str_value("basis", self.basis) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/models/azure_communication_services_user_identity.py similarity index 61% rename from msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py rename to msgraph/generated/models/azure_communication_services_user_identity.py index 171e61b95e6..000b89cb73a 100644 --- a/msgraph/generated/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py +++ b/msgraph/generated/models/azure_communication_services_user_identity.py @@ -4,37 +4,39 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .identity import Identity -from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse +from .identity import Identity @dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None +class AzureCommunicationServicesUserIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.azureCommunicationServicesUserIdentity" + # The azureCommunicationServicesResourceId property + azure_communication_services_resource_id: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AzureCommunicationServicesUserIdentity: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse + Returns: AzureCommunicationServicesUserIdentity """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() + return AzureCommunicationServicesUserIdentity() def 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 .identity import Identity - from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .identity import Identity fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + "azureCommunicationServicesResourceId": lambda n : setattr(self, 'azure_communication_services_resource_id', n.get_str_value()), } super_fields = super().get_field_deserializers() fields.update(super_fields) @@ -49,6 +51,6 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") super().serialize(writer) - writer.write_collection_of_primitive_values("value", self.value) + writer.write_str_value("azureCommunicationServicesResourceId", self.azure_communication_services_resource_id) diff --git a/msgraph/generated/models/base_collection_pagination_count_response.py b/msgraph/generated/models/base_collection_pagination_count_response.py index d94635425dd..372a0bca980 100644 --- a/msgraph/generated/models/base_collection_pagination_count_response.py +++ b/msgraph/generated/models/base_collection_pagination_count_response.py @@ -33,8 +33,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.count": lambda n : setattr(self, 'odata_count', n.get_int_value()), - "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), + "OdataCount": lambda n : setattr(self, 'odata_count', n.get_int_value()), + "OdataNextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), } return fields @@ -46,8 +46,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_int_value("@odata.count", self.odata_count) - writer.write_str_value("@odata.nextLink", self.odata_next_link) + writer.write_int_value("OdataCount", self.odata_count) + writer.write_str_value("OdataNextLink", self.odata_next_link) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/base_delta_function_response.py b/msgraph/generated/models/base_delta_function_response.py index 8ee6698291a..786947e7abd 100644 --- a/msgraph/generated/models/base_delta_function_response.py +++ b/msgraph/generated/models/base_delta_function_response.py @@ -33,8 +33,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.deltaLink": lambda n : setattr(self, 'odata_delta_link', n.get_str_value()), - "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), + "OdataDeltaLink": lambda n : setattr(self, 'odata_delta_link', n.get_str_value()), + "OdataNextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), } return fields @@ -46,8 +46,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.deltaLink", self.odata_delta_link) - writer.write_str_value("@odata.nextLink", self.odata_next_link) + writer.write_str_value("OdataDeltaLink", self.odata_delta_link) + writer.write_str_value("OdataNextLink", self.odata_next_link) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/base_end_user_notification.py b/msgraph/generated/models/base_end_user_notification.py new file mode 100644 index 00000000000..1e9be0686cb --- /dev/null +++ b/msgraph/generated/models/base_end_user_notification.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .end_user_notification import EndUserNotification + from .positive_reinforcement_notification import PositiveReinforcementNotification + from .simulation_notification import SimulationNotification + from .training_reminder_notification import TrainingReminderNotification + +@dataclass +class BaseEndUserNotification(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The defaultLanguage property + default_language: Optional[str] = None + # The endUserNotification property + end_user_notification: Optional[EndUserNotification] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> BaseEndUserNotification: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BaseEndUserNotification + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.positiveReinforcementNotification".casefold(): + from .positive_reinforcement_notification import PositiveReinforcementNotification + + return PositiveReinforcementNotification() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.simulationNotification".casefold(): + from .simulation_notification import SimulationNotification + + return SimulationNotification() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.trainingReminderNotification".casefold(): + from .training_reminder_notification import TrainingReminderNotification + + return TrainingReminderNotification() + return BaseEndUserNotification() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .end_user_notification import EndUserNotification + from .positive_reinforcement_notification import PositiveReinforcementNotification + from .simulation_notification import SimulationNotification + from .training_reminder_notification import TrainingReminderNotification + + from .end_user_notification import EndUserNotification + from .positive_reinforcement_notification import PositiveReinforcementNotification + from .simulation_notification import SimulationNotification + from .training_reminder_notification import TrainingReminderNotification + + fields: Dict[str, Callable[[Any], None]] = { + "defaultLanguage": lambda n : setattr(self, 'default_language', n.get_str_value()), + "endUserNotification": lambda n : setattr(self, 'end_user_notification', n.get_object_value(EndUserNotification)), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("defaultLanguage", self.default_language) + writer.write_object_value("endUserNotification", self.end_user_notification) + writer.write_str_value("OdataType", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/base_item.py b/msgraph/generated/models/base_item.py index b919b01f902..a882a5f983f 100644 --- a/msgraph/generated/models/base_item.py +++ b/msgraph/generated/models/base_item.py @@ -10,8 +10,8 @@ from .entity import Entity from .identity_set import IdentitySet from .item_reference import ItemReference - from .list_item import ListItem from .list_ import List_ + from .list_item import ListItem from .shared_drive_item import SharedDriveItem from .site import Site from .user import User @@ -94,8 +94,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .entity import Entity from .identity_set import IdentitySet from .item_reference import ItemReference - from .list_item import ListItem from .list_ import List_ + from .list_item import ListItem from .shared_drive_item import SharedDriveItem from .site import Site from .user import User @@ -105,8 +105,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .entity import Entity from .identity_set import IdentitySet from .item_reference import ItemReference - from .list_item import ListItem from .list_ import List_ + from .list_item import ListItem from .shared_drive_item import SharedDriveItem from .site import Site from .user import User diff --git a/msgraph/generated/models/bit_locker_removable_drive_policy.py b/msgraph/generated/models/bit_locker_removable_drive_policy.py index e933b917ff8..60d2769aa02 100644 --- a/msgraph/generated/models/bit_locker_removable_drive_policy.py +++ b/msgraph/generated/models/bit_locker_removable_drive_policy.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "blockCrossOrganizationWriteAccess": lambda n : setattr(self, 'block_cross_organization_write_access', n.get_bool_value()), "encryptionMethod": lambda n : setattr(self, 'encryption_method', n.get_enum_value(BitLockerEncryptionMethod)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "requireEncryptionForWriteAccess": lambda n : setattr(self, 'require_encryption_for_write_access', n.get_bool_value()), } return fields @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("blockCrossOrganizationWriteAccess", self.block_cross_organization_write_access) writer.write_enum_value("encryptionMethod", self.encryption_method) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("requireEncryptionForWriteAccess", self.require_encryption_for_write_access) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/booking_appointment.py b/msgraph/generated/models/booking_appointment.py index e89e50b1496..56eb59211cd 100644 --- a/msgraph/generated/models/booking_appointment.py +++ b/msgraph/generated/models/booking_appointment.py @@ -25,7 +25,7 @@ class BookingAppointment(Entity): anonymous_join_web_url: Optional[str] = None # The time zone of the customer. For a list of possible values, see dateTimeTimeZone. customer_time_zone: Optional[str] = None - # A collection of customer properties for an appointment. An appointment will contain a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. + # A collection of customer properties for an appointment. An appointment contains a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. customers: Optional[List[BookingCustomerInformationBase]] = None # The length of the appointment, denoted in ISO8601 format. duration: Optional[datetime.timedelta] = None @@ -41,7 +41,7 @@ class BookingAppointment(Entity): maximum_attendees_count: Optional[int] = None # The OdataType property odata_type: Optional[str] = None - # If true indicates that the bookingCustomer for this appointment does not wish to receive a confirmation for this appointment. + # If true indicates that the bookingCustomer for this appointment doesn't wish to receive a confirmation for this appointment. opt_out_of_customer_email: Optional[bool] = None # The amount of time to reserve after the appointment ends, for cleaning up, as an example. The value is expressed in ISO8601 format. post_buffer: Optional[datetime.timedelta] = None @@ -59,7 +59,7 @@ class BookingAppointment(Entity): service_id: Optional[str] = None # The location where the service is delivered. service_location: Optional[Location] = None - # The name of the bookingService associated with this appointment.This property is optional when creating a new appointment. If not specified, it is computed from the service associated with the appointment by the serviceId property. + # The name of the bookingService associated with this appointment.This property is optional when creating a new appointment. If not specified, it's computed from the service associated with the appointment by the serviceId property. service_name: Optional[str] = None # Notes from a bookingStaffMember. The value of this property is available only when reading this bookingAppointment by its ID. service_notes: Optional[str] = None diff --git a/msgraph/generated/models/booking_customer_information_base.py b/msgraph/generated/models/booking_customer_information_base.py index 24de5b258b7..4dd0bcbe91b 100644 --- a/msgraph/generated/models/booking_customer_information_base.py +++ b/msgraph/generated/models/booking_customer_information_base.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .booking_customer_information import BookingCustomerInformation fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/booking_question_answer.py b/msgraph/generated/models/booking_question_answer.py index 0ca217e11bd..6d01dfe9c6c 100644 --- a/msgraph/generated/models/booking_question_answer.py +++ b/msgraph/generated/models/booking_question_answer.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "answerInputType": lambda n : setattr(self, 'answer_input_type', n.get_enum_value(AnswerInputType)), "answerOptions": lambda n : setattr(self, 'answer_options', n.get_collection_of_primitive_values(str)), "isRequired": lambda n : setattr(self, 'is_required', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "question": lambda n : setattr(self, 'question', n.get_str_value()), "questionId": lambda n : setattr(self, 'question_id', n.get_str_value()), "selectedOptions": lambda n : setattr(self, 'selected_options', n.get_collection_of_primitive_values(str)), @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("answerInputType", self.answer_input_type) writer.write_collection_of_primitive_values("answerOptions", self.answer_options) writer.write_bool_value("isRequired", self.is_required) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("question", self.question) writer.write_str_value("questionId", self.question_id) writer.write_collection_of_primitive_values("selectedOptions", self.selected_options) diff --git a/msgraph/generated/models/booking_question_assignment.py b/msgraph/generated/models/booking_question_assignment.py index 950327093a7..4719bede016 100644 --- a/msgraph/generated/models/booking_question_assignment.py +++ b/msgraph/generated/models/booking_question_assignment.py @@ -15,7 +15,7 @@ class BookingQuestionAssignment(AdditionalDataHolder, BackedModel, Parsable): is_required: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None - # Indicates whether it is mandatory to answer the custom question. + # Indicates whether it's mandatory to answer the custom question. question_id: Optional[str] = None @staticmethod @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "isRequired": lambda n : setattr(self, 'is_required', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "questionId": lambda n : setattr(self, 'question_id', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isRequired", self.is_required) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("questionId", self.question_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/booking_reminder.py b/msgraph/generated/models/booking_reminder.py index 40fe17444ec..56585b3d197 100644 --- a/msgraph/generated/models/booking_reminder.py +++ b/msgraph/generated/models/booking_reminder.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "offset": lambda n : setattr(self, 'offset', n.get_timedelta_value()), "recipients": lambda n : setattr(self, 'recipients', n.get_enum_value(BookingReminderRecipients)), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_timedelta_value("offset", self.offset) writer.write_enum_value("recipients", self.recipients) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/booking_scheduling_policy.py b/msgraph/generated/models/booking_scheduling_policy.py index 086522a7342..146846270a8 100644 --- a/msgraph/generated/models/booking_scheduling_policy.py +++ b/msgraph/generated/models/booking_scheduling_policy.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowStaffSelection": lambda n : setattr(self, 'allow_staff_selection', n.get_bool_value()), "maximumAdvance": lambda n : setattr(self, 'maximum_advance', n.get_timedelta_value()), "minimumLeadTime": lambda n : setattr(self, 'minimum_lead_time', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sendConfirmationsToOwner": lambda n : setattr(self, 'send_confirmations_to_owner', n.get_bool_value()), "timeSlotInterval": lambda n : setattr(self, 'time_slot_interval', n.get_timedelta_value()), } @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowStaffSelection", self.allow_staff_selection) writer.write_timedelta_value("maximumAdvance", self.maximum_advance) writer.write_timedelta_value("minimumLeadTime", self.minimum_lead_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("sendConfirmationsToOwner", self.send_confirmations_to_owner) writer.write_timedelta_value("timeSlotInterval", self.time_slot_interval) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/booking_work_hours.py b/msgraph/generated/models/booking_work_hours.py index 62153810538..aa3f668af14 100644 --- a/msgraph/generated/models/booking_work_hours.py +++ b/msgraph/generated/models/booking_work_hours.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "day": lambda n : setattr(self, 'day', n.get_enum_value(DayOfWeek)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeSlots": lambda n : setattr(self, 'time_slots', n.get_collection_of_object_values(BookingWorkTimeSlot)), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("day", self.day) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("timeSlots", self.time_slots) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/booking_work_time_slot.py b/msgraph/generated/models/booking_work_time_slot.py index 2bd052eb578..d57948796f8 100644 --- a/msgraph/generated/models/booking_work_time_slot.py +++ b/msgraph/generated/models/booking_work_time_slot.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "endTime": lambda n : setattr(self, 'end_time', n.get_time_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startTime": lambda n : setattr(self, 'start_time', n.get_time_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_time_value("endTime", self.end_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_time_value("startTime", self.start_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/boolean_column.py b/msgraph/generated/models/boolean_column.py index a0a76fd38f6..ebc086d171f 100644 --- a/msgraph/generated/models/boolean_column.py +++ b/msgraph/generated/models/boolean_column.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/broadcast_meeting_caption_settings.py b/msgraph/generated/models/broadcast_meeting_caption_settings.py index f21eed8a6c1..0e820e51725 100644 --- a/msgraph/generated/models/broadcast_meeting_caption_settings.py +++ b/msgraph/generated/models/broadcast_meeting_caption_settings.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "isCaptionEnabled": lambda n : setattr(self, 'is_caption_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "spokenLanguage": lambda n : setattr(self, 'spoken_language', n.get_str_value()), "translationLanguages": lambda n : setattr(self, 'translation_languages', n.get_collection_of_primitive_values(str)), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isCaptionEnabled", self.is_caption_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("spokenLanguage", self.spoken_language) writer.write_collection_of_primitive_values("translationLanguages", self.translation_languages) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/broadcast_meeting_settings.py b/msgraph/generated/models/broadcast_meeting_settings.py index 4feb244227c..7f97b1630ce 100644 --- a/msgraph/generated/models/broadcast_meeting_settings.py +++ b/msgraph/generated/models/broadcast_meeting_settings.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isQuestionAndAnswerEnabled": lambda n : setattr(self, 'is_question_and_answer_enabled', n.get_bool_value()), "isRecordingEnabled": lambda n : setattr(self, 'is_recording_enabled', n.get_bool_value()), "isVideoOnDemandEnabled": lambda n : setattr(self, 'is_video_on_demand_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -77,7 +77,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isQuestionAndAnswerEnabled", self.is_question_and_answer_enabled) writer.write_bool_value("isRecordingEnabled", self.is_recording_enabled) writer.write_bool_value("isVideoOnDemandEnabled", self.is_video_on_demand_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/browser_shared_cookie_history.py b/msgraph/generated/models/browser_shared_cookie_history.py index ca7ffd8df34..50ce2b00ef3 100644 --- a/msgraph/generated/models/browser_shared_cookie_history.py +++ b/msgraph/generated/models/browser_shared_cookie_history.py @@ -63,7 +63,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "hostOnly": lambda n : setattr(self, 'host_only', n.get_bool_value()), "hostOrDomain": lambda n : setattr(self, 'host_or_domain', n.get_str_value()), "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(IdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "path": lambda n : setattr(self, 'path', n.get_str_value()), "publishedDateTime": lambda n : setattr(self, 'published_date_time', n.get_datetime_value()), "sourceEnvironment": lambda n : setattr(self, 'source_environment', n.get_enum_value(BrowserSharedCookieSourceEnvironment)), @@ -83,7 +83,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("hostOnly", self.host_only) writer.write_str_value("hostOrDomain", self.host_or_domain) writer.write_object_value("lastModifiedBy", self.last_modified_by) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("path", self.path) writer.write_datetime_value("publishedDateTime", self.published_date_time) writer.write_enum_value("sourceEnvironment", self.source_environment) diff --git a/msgraph/generated/models/browser_site_history.py b/msgraph/generated/models/browser_site_history.py index 71a6a31d479..247752e738b 100644 --- a/msgraph/generated/models/browser_site_history.py +++ b/msgraph/generated/models/browser_site_history.py @@ -70,7 +70,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "compatibilityMode": lambda n : setattr(self, 'compatibility_mode', n.get_enum_value(BrowserSiteCompatibilityMode)), "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(IdentitySet)), "mergeType": lambda n : setattr(self, 'merge_type', n.get_enum_value(BrowserSiteMergeType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "publishedDateTime": lambda n : setattr(self, 'published_date_time', n.get_datetime_value()), "targetEnvironment": lambda n : setattr(self, 'target_environment', n.get_enum_value(BrowserSiteTargetEnvironment)), } @@ -89,7 +89,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("compatibilityMode", self.compatibility_mode) writer.write_object_value("lastModifiedBy", self.last_modified_by) writer.write_enum_value("mergeType", self.merge_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("publishedDateTime", self.published_date_time) writer.write_enum_value("targetEnvironment", self.target_environment) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/bucket_aggregation_definition.py b/msgraph/generated/models/bucket_aggregation_definition.py index 150e4ee954b..81cccbd1db0 100644 --- a/msgraph/generated/models/bucket_aggregation_definition.py +++ b/msgraph/generated/models/bucket_aggregation_definition.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isDescending": lambda n : setattr(self, 'is_descending', n.get_bool_value()), "minimumCount": lambda n : setattr(self, 'minimum_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "prefixFilter": lambda n : setattr(self, 'prefix_filter', n.get_str_value()), "ranges": lambda n : setattr(self, 'ranges', n.get_collection_of_object_values(BucketAggregationRange)), "sortBy": lambda n : setattr(self, 'sort_by', n.get_enum_value(BucketAggregationSortProperty)), @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isDescending", self.is_descending) writer.write_int_value("minimumCount", self.minimum_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("prefixFilter", self.prefix_filter) writer.write_collection_of_object_values("ranges", self.ranges) writer.write_enum_value("sortBy", self.sort_by) diff --git a/msgraph/generated/models/bucket_aggregation_range.py b/msgraph/generated/models/bucket_aggregation_range.py index 045ff83707f..dced0ed6d70 100644 --- a/msgraph/generated/models/bucket_aggregation_range.py +++ b/msgraph/generated/models/bucket_aggregation_range.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "from": lambda n : setattr(self, 'from_', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "to": lambda n : setattr(self, 'to', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("from", self.from_) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("to", self.to) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/bundle.py b/msgraph/generated/models/bundle.py index cbb8a10ede6..9c4a7f1ad26 100644 --- a/msgraph/generated/models/bundle.py +++ b/msgraph/generated/models/bundle.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "album": lambda n : setattr(self, 'album', n.get_object_value(Album)), "childCount": lambda n : setattr(self, 'child_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("album", self.album) writer.write_int_value("childCount", self.child_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/calculated_column.py b/msgraph/generated/models/calculated_column.py index e236ec37f77..3f8d0a82b48 100644 --- a/msgraph/generated/models/calculated_column.py +++ b/msgraph/generated/models/calculated_column.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "format": lambda n : setattr(self, 'format', n.get_str_value()), "formula": lambda n : setattr(self, 'formula', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "outputType": lambda n : setattr(self, 'output_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("format", self.format) writer.write_str_value("formula", self.formula) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("outputType", self.output_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/calendar_sharing_message_action.py b/msgraph/generated/models/calendar_sharing_message_action.py index 44aee872340..2c788b90601 100644 --- a/msgraph/generated/models/calendar_sharing_message_action.py +++ b/msgraph/generated/models/calendar_sharing_message_action.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "action": lambda n : setattr(self, 'action', n.get_enum_value(CalendarSharingAction)), "actionType": lambda n : setattr(self, 'action_type', n.get_enum_value(CalendarSharingActionType)), "importance": lambda n : setattr(self, 'importance', n.get_enum_value(CalendarSharingActionImportance)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("action", self.action) writer.write_enum_value("actionType", self.action_type) writer.write_enum_value("importance", self.importance) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call.py b/msgraph/generated/models/call.py index b3216880d55..e7c94949f5b 100644 --- a/msgraph/generated/models/call.py +++ b/msgraph/generated/models/call.py @@ -43,7 +43,7 @@ class Call(Entity): chat_info: Optional[ChatInfo] = None # The contentSharingSessions property content_sharing_sessions: Optional[List[ContentSharingSession]] = None - # The direction of the call. The possible value are incoming or outgoing. Read-only. + # The direction of the call. The possible values are incoming or outgoing. Read-only. direction: Optional[CallDirection] = None # Call context associated with an incoming call. incoming_context: Optional[IncomingContext] = None @@ -63,7 +63,7 @@ class Call(Entity): participants: Optional[List[Participant]] = None # The list of requested modalities. Possible values are: unknown, audio, video, videoBasedScreenSharing, data. requested_modalities: Optional[List[Modality]] = None - # The result information. For example can hold termination reason. Read-only. + # The result information. For example, the result can hold termination reason. Read-only. result_info: Optional[ResultInfo] = None # The originator of the call. source: Optional[ParticipantInfo] = None diff --git a/msgraph/generated/models/call_media_state.py b/msgraph/generated/models/call_media_state.py index 96efa9c069c..fb9e693af43 100644 --- a/msgraph/generated/models/call_media_state.py +++ b/msgraph/generated/models/call_media_state.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "audio": lambda n : setattr(self, 'audio', n.get_enum_value(MediaState)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("audio", self.audio) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_options.py b/msgraph/generated/models/call_options.py index 76d618eeaa2..fa83fce5056 100644 --- a/msgraph/generated/models/call_options.py +++ b/msgraph/generated/models/call_options.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hideBotAfterEscalation": lambda n : setattr(self, 'hide_bot_after_escalation', n.get_bool_value()), "isContentSharingNotificationEnabled": lambda n : setattr(self, 'is_content_sharing_notification_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("hideBotAfterEscalation", self.hide_bot_after_escalation) writer.write_bool_value("isContentSharingNotificationEnabled", self.is_content_sharing_notification_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_participant_info.py b/msgraph/generated/models/call_participant_info.py index c50300f300f..3ad8c6ebf09 100644 --- a/msgraph/generated/models/call_participant_info.py +++ b/msgraph/generated/models/call_participant_info.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .identity_set import IdentitySet fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "participant": lambda n : setattr(self, 'participant', n.get_object_value(IdentitySet)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("participant", self.participant) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/device_info.py b/msgraph/generated/models/call_records/device_info.py index 446deac601c..d5fc747f647 100644 --- a/msgraph/generated/models/call_records/device_info.py +++ b/msgraph/generated/models/call_records/device_info.py @@ -84,7 +84,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lowSpeechLevelEventRatio": lambda n : setattr(self, 'low_speech_level_event_ratio', n.get_float_value()), "lowSpeechToNoiseEventRatio": lambda n : setattr(self, 'low_speech_to_noise_event_ratio', n.get_float_value()), "micGlitchRate": lambda n : setattr(self, 'mic_glitch_rate', n.get_float_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "receivedNoiseLevel": lambda n : setattr(self, 'received_noise_level', n.get_int_value()), "receivedSignalLevel": lambda n : setattr(self, 'received_signal_level', n.get_int_value()), "renderDeviceDriver": lambda n : setattr(self, 'render_device_driver', n.get_str_value()), @@ -117,7 +117,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_float_value("lowSpeechLevelEventRatio", self.low_speech_level_event_ratio) writer.write_float_value("lowSpeechToNoiseEventRatio", self.low_speech_to_noise_event_ratio) writer.write_float_value("micGlitchRate", self.mic_glitch_rate) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("receivedNoiseLevel", self.received_noise_level) writer.write_int_value("receivedSignalLevel", self.received_signal_level) writer.write_str_value("renderDeviceDriver", self.render_device_driver) diff --git a/msgraph/generated/models/call_records/direct_routing_log_row.py b/msgraph/generated/models/call_records/direct_routing_log_row.py index db78f6a5b30..9cd2acd7d32 100644 --- a/msgraph/generated/models/call_records/direct_routing_log_row.py +++ b/msgraph/generated/models/call_records/direct_routing_log_row.py @@ -88,7 +88,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "inviteDateTime": lambda n : setattr(self, 'invite_date_time', n.get_datetime_value()), "mediaBypassEnabled": lambda n : setattr(self, 'media_bypass_enabled', n.get_bool_value()), "mediaPathLocation": lambda n : setattr(self, 'media_path_location', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "signalingLocation": lambda n : setattr(self, 'signaling_location', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "successfulCall": lambda n : setattr(self, 'successful_call', n.get_bool_value()), @@ -121,7 +121,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("inviteDateTime", self.invite_date_time) writer.write_bool_value("mediaBypassEnabled", self.media_bypass_enabled) writer.write_str_value("mediaPathLocation", self.media_path_location) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("signalingLocation", self.signaling_location) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_bool_value("successfulCall", self.successful_call) diff --git a/msgraph/generated/models/call_records/endpoint.py b/msgraph/generated/models/call_records/endpoint.py index 2537e60c64f..7a8a61fa53a 100644 --- a/msgraph/generated/models/call_records/endpoint.py +++ b/msgraph/generated/models/call_records/endpoint.py @@ -58,7 +58,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .user_agent import UserAgent fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "userAgent": lambda n : setattr(self, 'user_agent', n.get_object_value(UserAgent)), } return fields @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("userAgent", self.user_agent) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/failure_info.py b/msgraph/generated/models/call_records/failure_info.py index 1ab23361314..fb4064dc583 100644 --- a/msgraph/generated/models/call_records/failure_info.py +++ b/msgraph/generated/models/call_records/failure_info.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .failure_stage import FailureStage fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reason": lambda n : setattr(self, 'reason', n.get_str_value()), "stage": lambda n : setattr(self, 'stage', n.get_enum_value(FailureStage)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("reason", self.reason) writer.write_enum_value("stage", self.stage) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/feedback_token_set.py b/msgraph/generated/models/call_records/feedback_token_set.py index bd5d9c71bb0..7ab8cd8ebf8 100644 --- a/msgraph/generated/models/call_records/feedback_token_set.py +++ b/msgraph/generated/models/call_records/feedback_token_set.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/media.py b/msgraph/generated/models/call_records/media.py index 921b4daf953..c7c48ab0957 100644 --- a/msgraph/generated/models/call_records/media.py +++ b/msgraph/generated/models/call_records/media.py @@ -61,7 +61,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "callerDevice": lambda n : setattr(self, 'caller_device', n.get_object_value(DeviceInfo)), "callerNetwork": lambda n : setattr(self, 'caller_network', n.get_object_value(NetworkInfo)), "label": lambda n : setattr(self, 'label', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "streams": lambda n : setattr(self, 'streams', n.get_collection_of_object_values(MediaStream)), } return fields @@ -79,7 +79,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("callerDevice", self.caller_device) writer.write_object_value("callerNetwork", self.caller_network) writer.write_str_value("label", self.label) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("streams", self.streams) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/media_stream.py b/msgraph/generated/models/call_records/media_stream.py index 716626229c9..0e98b66fd8a 100644 --- a/msgraph/generated/models/call_records/media_stream.py +++ b/msgraph/generated/models/call_records/media_stream.py @@ -127,7 +127,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "maxPacketLossRate": lambda n : setattr(self, 'max_packet_loss_rate', n.get_float_value()), "maxRatioOfConcealedSamples": lambda n : setattr(self, 'max_ratio_of_concealed_samples', n.get_float_value()), "maxRoundTripTime": lambda n : setattr(self, 'max_round_trip_time', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "packetUtilization": lambda n : setattr(self, 'packet_utilization', n.get_int_value()), "postForwardErrorCorrectionPacketLossRate": lambda n : setattr(self, 'post_forward_error_correction_packet_loss_rate', n.get_float_value()), "rmsFreezeDuration": lambda n : setattr(self, 'rms_freeze_duration', n.get_timedelta_value()), @@ -169,7 +169,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_float_value("maxPacketLossRate", self.max_packet_loss_rate) writer.write_float_value("maxRatioOfConcealedSamples", self.max_ratio_of_concealed_samples) writer.write_timedelta_value("maxRoundTripTime", self.max_round_trip_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("packetUtilization", self.packet_utilization) writer.write_float_value("postForwardErrorCorrectionPacketLossRate", self.post_forward_error_correction_packet_loss_rate) writer.write_timedelta_value("rmsFreezeDuration", self.rms_freeze_duration) diff --git a/msgraph/generated/models/call_records/network_info.py b/msgraph/generated/models/call_records/network_info.py index 2e46090bfca..041b5f51bdd 100644 --- a/msgraph/generated/models/call_records/network_info.py +++ b/msgraph/generated/models/call_records/network_info.py @@ -111,7 +111,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "linkSpeed": lambda n : setattr(self, 'link_speed', n.get_int_value()), "macAddress": lambda n : setattr(self, 'mac_address', n.get_str_value()), "networkTransportProtocol": lambda n : setattr(self, 'network_transport_protocol', n.get_enum_value(NetworkTransportProtocol)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "port": lambda n : setattr(self, 'port', n.get_int_value()), "receivedQualityEventRatio": lambda n : setattr(self, 'received_quality_event_ratio', n.get_float_value()), "reflexiveIPAddress": lambda n : setattr(self, 'reflexive_i_p_address', n.get_str_value()), @@ -149,7 +149,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("linkSpeed", self.link_speed) writer.write_str_value("macAddress", self.mac_address) writer.write_enum_value("networkTransportProtocol", self.network_transport_protocol) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("port", self.port) writer.write_float_value("receivedQualityEventRatio", self.received_quality_event_ratio) writer.write_str_value("reflexiveIPAddress", self.reflexive_i_p_address) diff --git a/msgraph/generated/models/call_records/pstn_call_log_row.py b/msgraph/generated/models/call_records/pstn_call_log_row.py index 7def34959ac..08f795fa8d8 100644 --- a/msgraph/generated/models/call_records/pstn_call_log_row.py +++ b/msgraph/generated/models/call_records/pstn_call_log_row.py @@ -101,7 +101,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "id": lambda n : setattr(self, 'id', n.get_str_value()), "inventoryType": lambda n : setattr(self, 'inventory_type', n.get_str_value()), "licenseCapability": lambda n : setattr(self, 'license_capability', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operator": lambda n : setattr(self, 'operator', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "tenantCountryCode": lambda n : setattr(self, 'tenant_country_code', n.get_str_value()), @@ -136,7 +136,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("id", self.id) writer.write_str_value("inventoryType", self.inventory_type) writer.write_str_value("licenseCapability", self.license_capability) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operator", self.operator) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_str_value("tenantCountryCode", self.tenant_country_code) diff --git a/msgraph/generated/models/call_records/trace_route_hop.py b/msgraph/generated/models/call_records/trace_route_hop.py index 0262b513ba7..092fbd7e682 100644 --- a/msgraph/generated/models/call_records/trace_route_hop.py +++ b/msgraph/generated/models/call_records/trace_route_hop.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hopCount": lambda n : setattr(self, 'hop_count', n.get_int_value()), "ipAddress": lambda n : setattr(self, 'ip_address', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "roundTripTime": lambda n : setattr(self, 'round_trip_time', n.get_timedelta_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("hopCount", self.hop_count) writer.write_str_value("ipAddress", self.ip_address) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_timedelta_value("roundTripTime", self.round_trip_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/user_agent.py b/msgraph/generated/models/call_records/user_agent.py index 6ab69a15418..0cd0bec3c52 100644 --- a/msgraph/generated/models/call_records/user_agent.py +++ b/msgraph/generated/models/call_records/user_agent.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "applicationVersion": lambda n : setattr(self, 'application_version', n.get_str_value()), "headerValue": lambda n : setattr(self, 'header_value', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("applicationVersion", self.application_version) writer.write_str_value("headerValue", self.header_value) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_records/user_feedback.py b/msgraph/generated/models/call_records/user_feedback.py index 4f548da1d2d..4d867ccb01c 100644 --- a/msgraph/generated/models/call_records/user_feedback.py +++ b/msgraph/generated/models/call_records/user_feedback.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .user_feedback_rating import UserFeedbackRating fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "rating": lambda n : setattr(self, 'rating', n.get_enum_value(UserFeedbackRating)), "text": lambda n : setattr(self, 'text', n.get_str_value()), "tokens": lambda n : setattr(self, 'tokens', n.get_object_value(FeedbackTokenSet)), @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("rating", self.rating) writer.write_str_value("text", self.text) writer.write_object_value("tokens", self.tokens) diff --git a/msgraph/generated/models/call_route.py b/msgraph/generated/models/call_route.py index 140282ec576..c76c87af65a 100644 --- a/msgraph/generated/models/call_route.py +++ b/msgraph/generated/models/call_route.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "final": lambda n : setattr(self, 'final', n.get_object_value(IdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "original": lambda n : setattr(self, 'original', n.get_object_value(IdentitySet)), "routingType": lambda n : setattr(self, 'routing_type', n.get_enum_value(RoutingType)), } @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("final", self.final) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("original", self.original) writer.write_enum_value("routingType", self.routing_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/call_transcript.py b/msgraph/generated/models/call_transcript.py new file mode 100644 index 00000000000..5405ad2a0e6 --- /dev/null +++ b/msgraph/generated/models/call_transcript.py @@ -0,0 +1,80 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .identity_set import IdentitySet + +from .entity import Entity + +@dataclass +class CallTranscript(Entity): + # The content of the transcript. Read-only. + content: Optional[bytes] = None + # Date and time at which the transcript was created. The DateTimeOffset 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 + # The unique identifier of the online meeting related to this transcript. Read-only. + meeting_id: Optional[str] = None + # The identity information of the organizer of the onlineMeeting related to this transcript. Read-only. + meeting_organizer: Optional[IdentitySet] = None + # The time-aligned metadata of the utterances in the transcript. Read-only. + metadata_content: Optional[bytes] = None + # The OdataType property + odata_type: Optional[str] = None + # The URL that can be used to access the content of the transcript. Read-only. + transcript_content_url: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CallTranscript: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CallTranscript + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CallTranscript() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .identity_set import IdentitySet + + from .entity import Entity + from .identity_set import IdentitySet + + fields: Dict[str, Callable[[Any], None]] = { + "content": lambda n : setattr(self, 'content', n.get_bytes_value()), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "meetingId": lambda n : setattr(self, 'meeting_id', n.get_str_value()), + "meetingOrganizer": lambda n : setattr(self, 'meeting_organizer', n.get_object_value(IdentitySet)), + "metadataContent": lambda n : setattr(self, 'metadata_content', n.get_bytes_value()), + "transcriptContentUrl": lambda n : setattr(self, 'transcript_content_url', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_bytes_value("content", self.content) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("meetingId", self.meeting_id) + writer.write_object_value("meetingOrganizer", self.meeting_organizer) + writer.write_bytes_value("metadataContent", self.metadata_content) + writer.write_str_value("transcriptContentUrl", self.transcript_content_url) + + diff --git a/msgraph/generated/models/call_transcript_collection_response.py b/msgraph/generated/models/call_transcript_collection_response.py new file mode 100644 index 00000000000..04d71143af2 --- /dev/null +++ b/msgraph/generated/models/call_transcript_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .call_transcript import CallTranscript + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CallTranscriptCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[CallTranscript]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CallTranscriptCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CallTranscriptCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CallTranscriptCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .call_transcript import CallTranscript + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .call_transcript import CallTranscript + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(CallTranscript)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/call_transcription_info.py b/msgraph/generated/models/call_transcription_info.py index 74e649718e9..87446a5fca5 100644 --- a/msgraph/generated/models/call_transcription_info.py +++ b/msgraph/generated/models/call_transcription_info.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(CallTranscriptionState)), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/certificate_authority.py b/msgraph/generated/models/certificate_authority.py index fae32a49442..278e58a613f 100644 --- a/msgraph/generated/models/certificate_authority.py +++ b/msgraph/generated/models/certificate_authority.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isRootAuthority": lambda n : setattr(self, 'is_root_authority', n.get_bool_value()), "issuer": lambda n : setattr(self, 'issuer', n.get_str_value()), "issuerSki": lambda n : setattr(self, 'issuer_ski', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isRootAuthority", self.is_root_authority) writer.write_str_value("issuer", self.issuer) writer.write_str_value("issuerSki", self.issuer_ski) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/certification.py b/msgraph/generated/models/certification.py index 5fa3c5e87df..d985e37fa74 100644 --- a/msgraph/generated/models/certification.py +++ b/msgraph/generated/models/certification.py @@ -14,7 +14,7 @@ class Certification(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # URL that shows certification details for the application. certification_details_url: Optional[str] = None - # The timestamp when the current certification for the application will expire. + # The timestamp when the current certification for the application expires. certification_expiration_date_time: Optional[datetime.datetime] = None # Indicates whether the application is certified by Microsoft. is_certified_by_microsoft: Optional[bool] = None @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isCertifiedByMicrosoft": lambda n : setattr(self, 'is_certified_by_microsoft', n.get_bool_value()), "isPublisherAttested": lambda n : setattr(self, 'is_publisher_attested', n.get_bool_value()), "lastCertificationDateTime": lambda n : setattr(self, 'last_certification_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("certificationExpirationDateTime", self.certification_expiration_date_time) writer.write_bool_value("isPublisherAttested", self.is_publisher_attested) writer.write_datetime_value("lastCertificationDateTime", self.last_certification_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/certification_control.py b/msgraph/generated/models/certification_control.py index 6d0f9eee5c0..a0aa3d7dc16 100644 --- a/msgraph/generated/models/certification_control.py +++ b/msgraph/generated/models/certification_control.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "url": lambda n : setattr(self, 'url', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("url", self.url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/channel_identity.py b/msgraph/generated/models/channel_identity.py index 5a049153b08..bd94715868e 100644 --- a/msgraph/generated/models/channel_identity.py +++ b/msgraph/generated/models/channel_identity.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "channelId": lambda n : setattr(self, 'channel_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "teamId": lambda n : setattr(self, 'team_id', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("channelId", self.channel_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("teamId", self.team_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_info.py b/msgraph/generated/models/chat_info.py index c3e83a98690..bd6335065be 100644 --- a/msgraph/generated/models/chat_info.py +++ b/msgraph/generated/models/chat_info.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "messageId": lambda n : setattr(self, 'message_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "replyChainMessageId": lambda n : setattr(self, 'reply_chain_message_id', n.get_str_value()), "threadId": lambda n : setattr(self, 'thread_id', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("messageId", self.message_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("replyChainMessageId", self.reply_chain_message_id) writer.write_str_value("threadId", self.thread_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_message_attachment.py b/msgraph/generated/models/chat_message_attachment.py index 30f551bddb9..cb462414306 100644 --- a/msgraph/generated/models/chat_message_attachment.py +++ b/msgraph/generated/models/chat_message_attachment.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "contentUrl": lambda n : setattr(self, 'content_url', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "teamsAppId": lambda n : setattr(self, 'teams_app_id', n.get_str_value()), "thumbnailUrl": lambda n : setattr(self, 'thumbnail_url', n.get_str_value()), } @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("contentUrl", self.content_url) writer.write_str_value("id", self.id) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("teamsAppId", self.teams_app_id) writer.write_str_value("thumbnailUrl", self.thumbnail_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_message_history_item.py b/msgraph/generated/models/chat_message_history_item.py index ded549849ee..f8a40f4067a 100644 --- a/msgraph/generated/models/chat_message_history_item.py +++ b/msgraph/generated/models/chat_message_history_item.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "actions": lambda n : setattr(self, 'actions', n.get_collection_of_enum_values(ChatMessageActions)), "modifiedDateTime": lambda n : setattr(self, 'modified_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reaction": lambda n : setattr(self, 'reaction', n.get_object_value(ChatMessageReaction)), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_enum_value("actions", self.actions) writer.write_datetime_value("modifiedDateTime", self.modified_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("reaction", self.reaction) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_message_mention.py b/msgraph/generated/models/chat_message_mention.py index 019354e8f00..1e97a7373ca 100644 --- a/msgraph/generated/models/chat_message_mention.py +++ b/msgraph/generated/models/chat_message_mention.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "id": lambda n : setattr(self, 'id', n.get_int_value()), "mentionText": lambda n : setattr(self, 'mention_text', n.get_str_value()), "mentioned": lambda n : setattr(self, 'mentioned', n.get_object_value(ChatMessageMentionedIdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("id", self.id) writer.write_str_value("mentionText", self.mention_text) writer.write_object_value("mentioned", self.mentioned) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_message_policy_violation.py b/msgraph/generated/models/chat_message_policy_violation.py index b93f608a4c4..25066a248be 100644 --- a/msgraph/generated/models/chat_message_policy_violation.py +++ b/msgraph/generated/models/chat_message_policy_violation.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "dlpAction": lambda n : setattr(self, 'dlp_action', n.get_collection_of_enum_values(ChatMessagePolicyViolationDlpActionTypes)), "justificationText": lambda n : setattr(self, 'justification_text', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "policyTip": lambda n : setattr(self, 'policy_tip', n.get_object_value(ChatMessagePolicyViolationPolicyTip)), "userAction": lambda n : setattr(self, 'user_action', n.get_collection_of_enum_values(ChatMessagePolicyViolationUserActionTypes)), "verdictDetails": lambda n : setattr(self, 'verdict_details', n.get_collection_of_enum_values(ChatMessagePolicyViolationVerdictDetailsTypes)), @@ -76,7 +76,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_enum_value("dlpAction", self.dlp_action) writer.write_str_value("justificationText", self.justification_text) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("policyTip", self.policy_tip) writer.write_enum_value("userAction", self.user_action) writer.write_enum_value("verdictDetails", self.verdict_details) diff --git a/msgraph/generated/models/chat_message_policy_violation_policy_tip.py b/msgraph/generated/models/chat_message_policy_violation_policy_tip.py index 0a4b103f114..9fa8d4d63d9 100644 --- a/msgraph/generated/models/chat_message_policy_violation_policy_tip.py +++ b/msgraph/generated/models/chat_message_policy_violation_policy_tip.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "complianceUrl": lambda n : setattr(self, 'compliance_url', n.get_str_value()), "generalText": lambda n : setattr(self, 'general_text', n.get_str_value()), "matchedConditionDescriptions": lambda n : setattr(self, 'matched_condition_descriptions', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("complianceUrl", self.compliance_url) writer.write_str_value("generalText", self.general_text) writer.write_collection_of_primitive_values("matchedConditionDescriptions", self.matched_condition_descriptions) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_message_reaction.py b/msgraph/generated/models/chat_message_reaction.py index 3d37e42600a..454119dea11 100644 --- a/msgraph/generated/models/chat_message_reaction.py +++ b/msgraph/generated/models/chat_message_reaction.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reactionType": lambda n : setattr(self, 'reaction_type', n.get_str_value()), "user": lambda n : setattr(self, 'user', n.get_object_value(ChatMessageReactionIdentitySet)), } @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("createdDateTime", self.created_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("reactionType", self.reaction_type) writer.write_object_value("user", self.user) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/chat_viewpoint.py b/msgraph/generated/models/chat_viewpoint.py index 3ddd9b52d35..8adab2c888c 100644 --- a/msgraph/generated/models/chat_viewpoint.py +++ b/msgraph/generated/models/chat_viewpoint.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isHidden": lambda n : setattr(self, 'is_hidden', n.get_bool_value()), "lastMessageReadDateTime": lambda n : setattr(self, 'last_message_read_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isHidden", self.is_hidden) writer.write_datetime_value("lastMessageReadDateTime", self.last_message_read_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/choice_column.py b/msgraph/generated/models/choice_column.py index 85cf7e84bef..7103cbed3e6 100644 --- a/msgraph/generated/models/choice_column.py +++ b/msgraph/generated/models/choice_column.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowTextEntry": lambda n : setattr(self, 'allow_text_entry', n.get_bool_value()), "choices": lambda n : setattr(self, 'choices', n.get_collection_of_primitive_values(str)), "displayAs": lambda n : setattr(self, 'display_as', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowTextEntry", self.allow_text_entry) writer.write_collection_of_primitive_values("choices", self.choices) writer.write_str_value("displayAs", self.display_as) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cloud_app_security_state.py b/msgraph/generated/models/cloud_app_security_state.py index 922b9d23a88..ac63acba632 100644 --- a/msgraph/generated/models/cloud_app_security_state.py +++ b/msgraph/generated/models/cloud_app_security_state.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "destinationServiceIp": lambda n : setattr(self, 'destination_service_ip', n.get_str_value()), "destinationServiceName": lambda n : setattr(self, 'destination_service_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "riskScore": lambda n : setattr(self, 'risk_score', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("destinationServiceIp", self.destination_service_ip) writer.write_str_value("destinationServiceName", self.destination_service_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("riskScore", self.risk_score) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cloud_communications.py b/msgraph/generated/models/cloud_communications.py index 9bcdef39ed8..1feda4a61cf 100644 --- a/msgraph/generated/models/cloud_communications.py +++ b/msgraph/generated/models/cloud_communications.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "callRecords": lambda n : setattr(self, 'call_records', n.get_collection_of_object_values(CallRecord)), "calls": lambda n : setattr(self, 'calls', n.get_collection_of_object_values(Call)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "onlineMeetings": lambda n : setattr(self, 'online_meetings', n.get_collection_of_object_values(OnlineMeeting)), "presences": lambda n : setattr(self, 'presences', n.get_collection_of_object_values(Presence)), } @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("callRecords", self.call_records) writer.write_collection_of_object_values("calls", self.calls) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("onlineMeetings", self.online_meetings) writer.write_collection_of_object_values("presences", self.presences) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_response.py b/msgraph/generated/models/coachmark_location.py similarity index 60% rename from msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_response.py rename to msgraph/generated/models/coachmark_location.py index 494877a8f9e..745c406abd5 100644 --- a/msgraph/generated/admin/service_announcement/messages/unarchive/unarchive_response.py +++ b/msgraph/generated/models/coachmark_location.py @@ -4,34 +4,50 @@ from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +if TYPE_CHECKING: + from .coachmark_location_type import CoachmarkLocationType + @dataclass -class UnarchiveResponse(AdditionalDataHolder, BackedModel, Parsable): +class CoachmarkLocation(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None + # The length property + length: Optional[int] = None + # The OdataType property + odata_type: Optional[str] = None + # The offset property + offset: Optional[int] = None + # The type property + type: Optional[CoachmarkLocationType] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> UnarchiveResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CoachmarkLocation: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: UnarchiveResponse + Returns: CoachmarkLocation """ if not parse_node: raise TypeError("parse_node cannot be null.") - return UnarchiveResponse() + return CoachmarkLocation() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .coachmark_location_type import CoachmarkLocationType + + from .coachmark_location_type import CoachmarkLocationType + fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), + "length": lambda n : setattr(self, 'length', n.get_int_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "offset": lambda n : setattr(self, 'offset', n.get_int_value()), + "type": lambda n : setattr(self, 'type', n.get_enum_value(CoachmarkLocationType)), } return fields @@ -43,7 +59,10 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) + writer.write_int_value("length", self.length) + writer.write_str_value("OdataType", self.odata_type) + writer.write_int_value("offset", self.offset) + writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/coachmark_location_type.py b/msgraph/generated/models/coachmark_location_type.py new file mode 100644 index 00000000000..537261aa667 --- /dev/null +++ b/msgraph/generated/models/coachmark_location_type.py @@ -0,0 +1,11 @@ +from enum import Enum + +class CoachmarkLocationType(str, Enum): + Unknown = "unknown", + FromEmail = "fromEmail", + Subject = "subject", + ExternalTag = "externalTag", + DisplayName = "displayName", + MessageBody = "messageBody", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/collapse_property.py b/msgraph/generated/models/collapse_property.py index 8f7de3e437e..f6a15b2d38a 100644 --- a/msgraph/generated/models/collapse_property.py +++ b/msgraph/generated/models/collapse_property.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "fields": lambda n : setattr(self, 'fields', n.get_collection_of_primitive_values(str)), "limit": lambda n : setattr(self, 'limit', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("fields", self.fields) writer.write_int_value("limit", self.limit) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/column_validation.py b/msgraph/generated/models/column_validation.py index c20cb6b0a6e..19dfdafb72f 100644 --- a/msgraph/generated/models/column_validation.py +++ b/msgraph/generated/models/column_validation.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "defaultLanguage": lambda n : setattr(self, 'default_language', n.get_str_value()), "descriptions": lambda n : setattr(self, 'descriptions', n.get_collection_of_object_values(DisplayNameLocalization)), "formula": lambda n : setattr(self, 'formula', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("defaultLanguage", self.default_language) writer.write_collection_of_object_values("descriptions", self.descriptions) writer.write_str_value("formula", self.formula) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/communications_application_identity.py b/msgraph/generated/models/communications_application_identity.py new file mode 100644 index 00000000000..b5f56b830a3 --- /dev/null +++ b/msgraph/generated/models/communications_application_identity.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity import Identity + +from .identity import Identity + +@dataclass +class CommunicationsApplicationIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsApplicationIdentity" + # The applicationType property + application_type: Optional[str] = None + # The hidden property + hidden: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsApplicationIdentity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsApplicationIdentity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsApplicationIdentity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity import Identity + + from .identity import Identity + + fields: Dict[str, Callable[[Any], None]] = { + "applicationType": lambda n : setattr(self, 'application_type', n.get_str_value()), + "hidden": lambda n : setattr(self, 'hidden', n.get_bool_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("applicationType", self.application_type) + writer.write_bool_value("hidden", self.hidden) + + diff --git a/msgraph/generated/models/communications_application_instance_identity.py b/msgraph/generated/models/communications_application_instance_identity.py new file mode 100644 index 00000000000..f229653fa16 --- /dev/null +++ b/msgraph/generated/models/communications_application_instance_identity.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity import Identity + +from .identity import Identity + +@dataclass +class CommunicationsApplicationInstanceIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsApplicationInstanceIdentity" + # The hidden property + hidden: Optional[bool] = None + # The tenantId property + tenant_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsApplicationInstanceIdentity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsApplicationInstanceIdentity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsApplicationInstanceIdentity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity import Identity + + from .identity import Identity + + fields: Dict[str, Callable[[Any], None]] = { + "hidden": lambda n : setattr(self, 'hidden', n.get_bool_value()), + "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_bool_value("hidden", self.hidden) + writer.write_str_value("tenantId", self.tenant_id) + + diff --git a/msgraph/generated/models/communications_encrypted_identity.py b/msgraph/generated/models/communications_encrypted_identity.py new file mode 100644 index 00000000000..879a0206ab1 --- /dev/null +++ b/msgraph/generated/models/communications_encrypted_identity.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity import Identity + +from .identity import Identity + +@dataclass +class CommunicationsEncryptedIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsEncryptedIdentity" + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsEncryptedIdentity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsEncryptedIdentity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsEncryptedIdentity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity import Identity + + from .identity import Identity + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/communications_guest_identity.py b/msgraph/generated/models/communications_guest_identity.py new file mode 100644 index 00000000000..8954f32927c --- /dev/null +++ b/msgraph/generated/models/communications_guest_identity.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity import Identity + +from .identity import Identity + +@dataclass +class CommunicationsGuestIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsGuestIdentity" + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsGuestIdentity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsGuestIdentity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsGuestIdentity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity import Identity + + from .identity import Identity + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/communications_identity_set.py b/msgraph/generated/models/communications_identity_set.py new file mode 100644 index 00000000000..9f369039c6e --- /dev/null +++ b/msgraph/generated/models/communications_identity_set.py @@ -0,0 +1,90 @@ +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 .endpoint_type import EndpointType + from .identity import Identity + from .identity_set import IdentitySet + +from .identity_set import IdentitySet + +@dataclass +class CommunicationsIdentitySet(IdentitySet): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsIdentitySet" + # The applicationInstance property + application_instance: Optional[Identity] = None + # The assertedIdentity property + asserted_identity: Optional[Identity] = None + # The azureCommunicationServicesUser property + azure_communication_services_user: Optional[Identity] = None + # The encrypted property + encrypted: Optional[Identity] = None + # The endpointType property + endpoint_type: Optional[EndpointType] = None + # The guest property + guest: Optional[Identity] = None + # The onPremises property + on_premises: Optional[Identity] = None + # The phone property + phone: Optional[Identity] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsIdentitySet: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsIdentitySet + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsIdentitySet() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .endpoint_type import EndpointType + from .identity import Identity + from .identity_set import IdentitySet + + from .endpoint_type import EndpointType + from .identity import Identity + from .identity_set import IdentitySet + + fields: Dict[str, Callable[[Any], None]] = { + "applicationInstance": lambda n : setattr(self, 'application_instance', n.get_object_value(Identity)), + "assertedIdentity": lambda n : setattr(self, 'asserted_identity', n.get_object_value(Identity)), + "azureCommunicationServicesUser": lambda n : setattr(self, 'azure_communication_services_user', n.get_object_value(Identity)), + "encrypted": lambda n : setattr(self, 'encrypted', n.get_object_value(Identity)), + "endpointType": lambda n : setattr(self, 'endpoint_type', n.get_enum_value(EndpointType)), + "guest": lambda n : setattr(self, 'guest', n.get_object_value(Identity)), + "onPremises": lambda n : setattr(self, 'on_premises', n.get_object_value(Identity)), + "phone": lambda n : setattr(self, 'phone', n.get_object_value(Identity)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("applicationInstance", self.application_instance) + writer.write_object_value("assertedIdentity", self.asserted_identity) + writer.write_object_value("azureCommunicationServicesUser", self.azure_communication_services_user) + writer.write_object_value("encrypted", self.encrypted) + writer.write_enum_value("endpointType", self.endpoint_type) + writer.write_object_value("guest", self.guest) + writer.write_object_value("onPremises", self.on_premises) + writer.write_object_value("phone", self.phone) + + diff --git a/msgraph/generated/models/communications_phone_identity.py b/msgraph/generated/models/communications_phone_identity.py new file mode 100644 index 00000000000..674f4365637 --- /dev/null +++ b/msgraph/generated/models/communications_phone_identity.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity import Identity + +from .identity import Identity + +@dataclass +class CommunicationsPhoneIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsPhoneIdentity" + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsPhoneIdentity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsPhoneIdentity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsPhoneIdentity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity import Identity + + from .identity import Identity + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/communications_user_identity.py b/msgraph/generated/models/communications_user_identity.py new file mode 100644 index 00000000000..04cd17788d0 --- /dev/null +++ b/msgraph/generated/models/communications_user_identity.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity import Identity + +from .identity import Identity + +@dataclass +class CommunicationsUserIdentity(Identity): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.communicationsUserIdentity" + # The tenantId property + tenant_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CommunicationsUserIdentity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CommunicationsUserIdentity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CommunicationsUserIdentity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity import Identity + + from .identity import Identity + + fields: Dict[str, Callable[[Any], None]] = { + "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("tenantId", self.tenant_id) + + diff --git a/msgraph/generated/models/compliance.py b/msgraph/generated/models/compliance.py index d409d74feac..869b52cca6a 100644 --- a/msgraph/generated/models/compliance.py +++ b/msgraph/generated/models/compliance.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/compliance_information.py b/msgraph/generated/models/compliance_information.py index a315addcadd..89fd2c9bd3a 100644 --- a/msgraph/generated/models/compliance_information.py +++ b/msgraph/generated/models/compliance_information.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "certificationControls": lambda n : setattr(self, 'certification_controls', n.get_collection_of_object_values(CertificationControl)), "certificationName": lambda n : setattr(self, 'certification_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("certificationControls", self.certification_controls) writer.write_str_value("certificationName", self.certification_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/compliance_management_partner_assignment.py b/msgraph/generated/models/compliance_management_partner_assignment.py index 03c6333cb39..06456739fd6 100644 --- a/msgraph/generated/models/compliance_management_partner_assignment.py +++ b/msgraph/generated/models/compliance_management_partner_assignment.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .device_and_app_management_assignment_target import DeviceAndAppManagementAssignmentTarget fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_object_value(DeviceAndAppManagementAssignmentTarget)), } return fields @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("target", self.target) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_applications.py b/msgraph/generated/models/conditional_access_applications.py index affe5ec17ce..79971cfeb55 100644 --- a/msgraph/generated/models/conditional_access_applications.py +++ b/msgraph/generated/models/conditional_access_applications.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "includeApplications": lambda n : setattr(self, 'include_applications', n.get_collection_of_primitive_values(str)), "includeAuthenticationContextClassReferences": lambda n : setattr(self, 'include_authentication_context_class_references', n.get_collection_of_primitive_values(str)), "includeUserActions": lambda n : setattr(self, 'include_user_actions', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("includeApplications", self.include_applications) writer.write_collection_of_primitive_values("includeAuthenticationContextClassReferences", self.include_authentication_context_class_references) writer.write_collection_of_primitive_values("includeUserActions", self.include_user_actions) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_client_applications.py b/msgraph/generated/models/conditional_access_client_applications.py index 17ec01bf281..302949b9be7 100644 --- a/msgraph/generated/models/conditional_access_client_applications.py +++ b/msgraph/generated/models/conditional_access_client_applications.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "excludeServicePrincipals": lambda n : setattr(self, 'exclude_service_principals', n.get_collection_of_primitive_values(str)), "includeServicePrincipals": lambda n : setattr(self, 'include_service_principals', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "servicePrincipalFilter": lambda n : setattr(self, 'service_principal_filter', n.get_object_value(ConditionalAccessFilter)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("excludeServicePrincipals", self.exclude_service_principals) writer.write_collection_of_primitive_values("includeServicePrincipals", self.include_service_principals) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("servicePrincipalFilter", self.service_principal_filter) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_condition_set.py b/msgraph/generated/models/conditional_access_condition_set.py index 9ad968ce7ef..51036fc96c6 100644 --- a/msgraph/generated/models/conditional_access_condition_set.py +++ b/msgraph/generated/models/conditional_access_condition_set.py @@ -84,7 +84,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "clientApplications": lambda n : setattr(self, 'client_applications', n.get_object_value(ConditionalAccessClientApplications)), "devices": lambda n : setattr(self, 'devices', n.get_object_value(ConditionalAccessDevices)), "locations": lambda n : setattr(self, 'locations', n.get_object_value(ConditionalAccessLocations)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "platforms": lambda n : setattr(self, 'platforms', n.get_object_value(ConditionalAccessPlatforms)), "servicePrincipalRiskLevels": lambda n : setattr(self, 'service_principal_risk_levels', n.get_collection_of_enum_values(RiskLevel)), "signInRiskLevels": lambda n : setattr(self, 'sign_in_risk_levels', n.get_collection_of_enum_values(RiskLevel)), @@ -106,7 +106,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("clientApplications", self.client_applications) writer.write_object_value("devices", self.devices) writer.write_object_value("locations", self.locations) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("platforms", self.platforms) writer.write_collection_of_enum_values("servicePrincipalRiskLevels", self.service_principal_risk_levels) writer.write_collection_of_enum_values("signInRiskLevels", self.sign_in_risk_levels) diff --git a/msgraph/generated/models/conditional_access_devices.py b/msgraph/generated/models/conditional_access_devices.py index af800baf9e6..8cdf1f18392 100644 --- a/msgraph/generated/models/conditional_access_devices.py +++ b/msgraph/generated/models/conditional_access_devices.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "deviceFilter": lambda n : setattr(self, 'device_filter', n.get_object_value(ConditionalAccessFilter)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("deviceFilter", self.device_filter) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_external_tenants.py b/msgraph/generated/models/conditional_access_external_tenants.py index 54de30343b6..040be13cf71 100644 --- a/msgraph/generated/models/conditional_access_external_tenants.py +++ b/msgraph/generated/models/conditional_access_external_tenants.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "membershipKind": lambda n : setattr(self, 'membership_kind', n.get_enum_value(ConditionalAccessExternalTenantsMembershipKind)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("membershipKind", self.membership_kind) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_filter.py b/msgraph/generated/models/conditional_access_filter.py index cbedd0085a9..e383c9237b5 100644 --- a/msgraph/generated/models/conditional_access_filter.py +++ b/msgraph/generated/models/conditional_access_filter.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "mode": lambda n : setattr(self, 'mode', n.get_enum_value(FilterMode)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "rule": lambda n : setattr(self, 'rule', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("mode", self.mode) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("rule", self.rule) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_grant_controls.py b/msgraph/generated/models/conditional_access_grant_controls.py index 641620fc757..4edb8648e69 100644 --- a/msgraph/generated/models/conditional_access_grant_controls.py +++ b/msgraph/generated/models/conditional_access_grant_controls.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "authenticationStrength": lambda n : setattr(self, 'authentication_strength', n.get_object_value(AuthenticationStrengthPolicy)), "builtInControls": lambda n : setattr(self, 'built_in_controls', n.get_collection_of_enum_values(ConditionalAccessGrantControl)), "customAuthenticationFactors": lambda n : setattr(self, 'custom_authentication_factors', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operator": lambda n : setattr(self, 'operator', n.get_str_value()), "termsOfUse": lambda n : setattr(self, 'terms_of_use', n.get_collection_of_primitive_values(str)), } @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("authenticationStrength", self.authentication_strength) writer.write_collection_of_enum_values("builtInControls", self.built_in_controls) writer.write_collection_of_primitive_values("customAuthenticationFactors", self.custom_authentication_factors) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operator", self.operator) writer.write_collection_of_primitive_values("termsOfUse", self.terms_of_use) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_guests_or_external_users.py b/msgraph/generated/models/conditional_access_guests_or_external_users.py index 95096eea883..96e5cea79f6 100644 --- a/msgraph/generated/models/conditional_access_guests_or_external_users.py +++ b/msgraph/generated/models/conditional_access_guests_or_external_users.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "externalTenants": lambda n : setattr(self, 'external_tenants', n.get_object_value(ConditionalAccessExternalTenants)), "guestOrExternalUserTypes": lambda n : setattr(self, 'guest_or_external_user_types', n.get_collection_of_enum_values(ConditionalAccessGuestOrExternalUserTypes)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("externalTenants", self.external_tenants) writer.write_enum_value("guestOrExternalUserTypes", self.guest_or_external_user_types) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_locations.py b/msgraph/generated/models/conditional_access_locations.py index 6461d5d10cb..618eb99c4a1 100644 --- a/msgraph/generated/models/conditional_access_locations.py +++ b/msgraph/generated/models/conditional_access_locations.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "excludeLocations": lambda n : setattr(self, 'exclude_locations', n.get_collection_of_primitive_values(str)), "includeLocations": lambda n : setattr(self, 'include_locations', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("excludeLocations", self.exclude_locations) writer.write_collection_of_primitive_values("includeLocations", self.include_locations) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_platforms.py b/msgraph/generated/models/conditional_access_platforms.py index b2252ed722d..ce90f86d955 100644 --- a/msgraph/generated/models/conditional_access_platforms.py +++ b/msgraph/generated/models/conditional_access_platforms.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "excludePlatforms": lambda n : setattr(self, 'exclude_platforms', n.get_collection_of_enum_values(ConditionalAccessDevicePlatform)), "includePlatforms": lambda n : setattr(self, 'include_platforms', n.get_collection_of_enum_values(ConditionalAccessDevicePlatform)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_enum_values("excludePlatforms", self.exclude_platforms) writer.write_collection_of_enum_values("includePlatforms", self.include_platforms) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_policy_detail.py b/msgraph/generated/models/conditional_access_policy_detail.py index 6ce61ad0f24..0892a17d68f 100644 --- a/msgraph/generated/models/conditional_access_policy_detail.py +++ b/msgraph/generated/models/conditional_access_policy_detail.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "conditions": lambda n : setattr(self, 'conditions', n.get_object_value(ConditionalAccessConditionSet)), "grantControls": lambda n : setattr(self, 'grant_controls', n.get_object_value(ConditionalAccessGrantControls)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sessionControls": lambda n : setattr(self, 'session_controls', n.get_object_value(ConditionalAccessSessionControls)), } return fields @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("conditions", self.conditions) writer.write_object_value("grantControls", self.grant_controls) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("sessionControls", self.session_controls) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_session_control.py b/msgraph/generated/models/conditional_access_session_control.py index f48a6a3a0fd..66a2b7ea29f 100644 --- a/msgraph/generated/models/conditional_access_session_control.py +++ b/msgraph/generated/models/conditional_access_session_control.py @@ -70,7 +70,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -83,7 +83,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_session_controls.py b/msgraph/generated/models/conditional_access_session_controls.py index 1171807a6a1..2047fa6e33d 100644 --- a/msgraph/generated/models/conditional_access_session_controls.py +++ b/msgraph/generated/models/conditional_access_session_controls.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "applicationEnforcedRestrictions": lambda n : setattr(self, 'application_enforced_restrictions', n.get_object_value(ApplicationEnforcedRestrictionsSessionControl)), "cloudAppSecurity": lambda n : setattr(self, 'cloud_app_security', n.get_object_value(CloudAppSecuritySessionControl)), "disableResilienceDefaults": lambda n : setattr(self, 'disable_resilience_defaults', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "persistentBrowser": lambda n : setattr(self, 'persistent_browser', n.get_object_value(PersistentBrowserSessionControl)), "signInFrequency": lambda n : setattr(self, 'sign_in_frequency', n.get_object_value(SignInFrequencySessionControl)), } @@ -77,7 +77,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("applicationEnforcedRestrictions", self.application_enforced_restrictions) writer.write_object_value("cloudAppSecurity", self.cloud_app_security) writer.write_bool_value("disableResilienceDefaults", self.disable_resilience_defaults) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("persistentBrowser", self.persistent_browser) writer.write_object_value("signInFrequency", self.sign_in_frequency) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/conditional_access_users.py b/msgraph/generated/models/conditional_access_users.py index 6e5353dd97f..5e46b7ddadd 100644 --- a/msgraph/generated/models/conditional_access_users.py +++ b/msgraph/generated/models/conditional_access_users.py @@ -62,7 +62,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "includeGuestsOrExternalUsers": lambda n : setattr(self, 'include_guests_or_external_users', n.get_object_value(ConditionalAccessGuestsOrExternalUsers)), "includeRoles": lambda n : setattr(self, 'include_roles', n.get_collection_of_primitive_values(str)), "includeUsers": lambda n : setattr(self, 'include_users', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("includeGuestsOrExternalUsers", self.include_guests_or_external_users) writer.write_collection_of_primitive_values("includeRoles", self.include_roles) writer.write_collection_of_primitive_values("includeUsers", self.include_users) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/configuration_manager_client_enabled_features.py b/msgraph/generated/models/configuration_manager_client_enabled_features.py index 1e6ab9037b5..eaa4dd5b756 100644 --- a/msgraph/generated/models/configuration_manager_client_enabled_features.py +++ b/msgraph/generated/models/configuration_manager_client_enabled_features.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "deviceConfiguration": lambda n : setattr(self, 'device_configuration', n.get_bool_value()), "inventory": lambda n : setattr(self, 'inventory', n.get_bool_value()), "modernApps": lambda n : setattr(self, 'modern_apps', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceAccess": lambda n : setattr(self, 'resource_access', n.get_bool_value()), "windowsUpdateForBusiness": lambda n : setattr(self, 'windows_update_for_business', n.get_bool_value()), } @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("deviceConfiguration", self.device_configuration) writer.write_bool_value("inventory", self.inventory) writer.write_bool_value("modernApps", self.modern_apps) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("resourceAccess", self.resource_access) writer.write_bool_value("windowsUpdateForBusiness", self.windows_update_for_business) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/container_filter.py b/msgraph/generated/models/container_filter.py index 4ee1f98909b..c0a26b52da7 100644 --- a/msgraph/generated/models/container_filter.py +++ b/msgraph/generated/models/container_filter.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "includedContainers": lambda n : setattr(self, 'included_containers', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("includedContainers", self.included_containers) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/content_approval_status_column.py b/msgraph/generated/models/content_approval_status_column.py index 88d54f6a204..58359469860 100644 --- a/msgraph/generated/models/content_approval_status_column.py +++ b/msgraph/generated/models/content_approval_status_column.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/content_type_info.py b/msgraph/generated/models/content_type_info.py index 2b437577faf..f946491296b 100644 --- a/msgraph/generated/models/content_type_info.py +++ b/msgraph/generated/models/content_type_info.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/content_type_order.py b/msgraph/generated/models/content_type_order.py index d5987bb02ac..188b1a826b1 100644 --- a/msgraph/generated/models/content_type_order.py +++ b/msgraph/generated/models/content_type_order.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "default": lambda n : setattr(self, 'default', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "position": lambda n : setattr(self, 'position', n.get_int_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("default", self.default) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("position", self.position) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/control_score.py b/msgraph/generated/models/control_score.py index 62c0f51eb37..448a4f007ae 100644 --- a/msgraph/generated/models/control_score.py +++ b/msgraph/generated/models/control_score.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "controlCategory": lambda n : setattr(self, 'control_category', n.get_str_value()), "controlName": lambda n : setattr(self, 'control_name', n.get_str_value()), "description": lambda n : setattr(self, 'description', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "score": lambda n : setattr(self, 'score', n.get_float_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("controlCategory", self.control_category) writer.write_str_value("controlName", self.control_name) writer.write_str_value("description", self.description) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_float_value("score", self.score) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/convert_id_result.py b/msgraph/generated/models/convert_id_result.py index 411152033a8..b28666ac94b 100644 --- a/msgraph/generated/models/convert_id_result.py +++ b/msgraph/generated/models/convert_id_result.py @@ -14,13 +14,13 @@ class ConvertIdResult(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) - # An error object indicating the reason for the conversion failure. This value is not present if the conversion succeeded. + # An error object indicating the reason for the conversion failure. This value isn't present if the conversion succeeded. error_details: Optional[GenericError] = None # The OdataType property odata_type: Optional[str] = None # The identifier that was converted. This value is the original, un-converted identifier. source_id: Optional[str] = None - # The converted identifier. This value is not present if the conversion failed. + # The converted identifier. This value isn't present if the conversion failed. target_id: Optional[str] = None @staticmethod @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "errorDetails": lambda n : setattr(self, 'error_details', n.get_object_value(GenericError)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sourceId": lambda n : setattr(self, 'source_id', n.get_str_value()), "targetId": lambda n : setattr(self, 'target_id', n.get_str_value()), } @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("errorDetails", self.error_details) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sourceId", self.source_id) writer.write_str_value("targetId", self.target_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/copy_notebook_model.py b/msgraph/generated/models/copy_notebook_model.py index 1a444930164..18ac7a97313 100644 --- a/msgraph/generated/models/copy_notebook_model.py +++ b/msgraph/generated/models/copy_notebook_model.py @@ -86,7 +86,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastModifiedTime": lambda n : setattr(self, 'last_modified_time', n.get_datetime_value()), "links": lambda n : setattr(self, 'links', n.get_object_value(NotebookLinks)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sectionGroupsUrl": lambda n : setattr(self, 'section_groups_url', n.get_str_value()), "sectionsUrl": lambda n : setattr(self, 'sections_url', n.get_str_value()), "self": lambda n : setattr(self, 'self', n.get_str_value()), @@ -113,7 +113,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("lastModifiedTime", self.last_modified_time) writer.write_object_value("links", self.links) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sectionGroupsUrl", self.section_groups_url) writer.write_str_value("sectionsUrl", self.sections_url) writer.write_str_value("self", self.self) diff --git a/msgraph/generated/models/cross_tenant_access_policy_b2_b_setting.py b/msgraph/generated/models/cross_tenant_access_policy_b2_b_setting.py index 9e07ab5c5af..d3a6c11c30d 100644 --- a/msgraph/generated/models/cross_tenant_access_policy_b2_b_setting.py +++ b/msgraph/generated/models/cross_tenant_access_policy_b2_b_setting.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "applications": lambda n : setattr(self, 'applications', n.get_object_value(CrossTenantAccessPolicyTargetConfiguration)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "usersAndGroups": lambda n : setattr(self, 'users_and_groups', n.get_object_value(CrossTenantAccessPolicyTargetConfiguration)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("applications", self.applications) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("usersAndGroups", self.users_and_groups) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cross_tenant_access_policy_configuration_partner.py b/msgraph/generated/models/cross_tenant_access_policy_configuration_partner.py index d10d336c696..40b5b66c104 100644 --- a/msgraph/generated/models/cross_tenant_access_policy_configuration_partner.py +++ b/msgraph/generated/models/cross_tenant_access_policy_configuration_partner.py @@ -27,7 +27,7 @@ class CrossTenantAccessPolicyConfigurationPartner(AdditionalDataHolder, BackedMo b2b_direct_connect_inbound: Optional[CrossTenantAccessPolicyB2BSetting] = None # Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. b2b_direct_connect_outbound: Optional[CrossTenantAccessPolicyB2BSetting] = None - # Defines the cross-tenant policy for the synchronization of users from a partner tenant. Use this user synchronization policy to streamline collaboration between users in a multi-tenant organization by automating the creation, update, and deletion of users from one tenant to another. + # Defines the cross-tenant policy for the synchronization of users from a partner tenant. Use this user synchronization policy to streamline collaboration between users in a multitenant organization by automating the creation, update, and deletion of users from one tenant to another. identity_synchronization: Optional[CrossTenantIdentitySyncPolicyPartner] = None # Determines the partner-specific configuration for trusting other Conditional Access claims from external Azure AD organizations. inbound_trust: Optional[CrossTenantAccessPolicyInboundTrust] = None @@ -73,7 +73,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "identitySynchronization": lambda n : setattr(self, 'identity_synchronization', n.get_object_value(CrossTenantIdentitySyncPolicyPartner)), "inboundTrust": lambda n : setattr(self, 'inbound_trust', n.get_object_value(CrossTenantAccessPolicyInboundTrust)), "isServiceProvider": lambda n : setattr(self, 'is_service_provider', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), } return fields @@ -94,7 +94,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("identitySynchronization", self.identity_synchronization) writer.write_object_value("inboundTrust", self.inbound_trust) writer.write_bool_value("isServiceProvider", self.is_service_provider) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("tenantId", self.tenant_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cross_tenant_access_policy_inbound_trust.py b/msgraph/generated/models/cross_tenant_access_policy_inbound_trust.py index 2eea1ec001a..f1c4c4fa112 100644 --- a/msgraph/generated/models/cross_tenant_access_policy_inbound_trust.py +++ b/msgraph/generated/models/cross_tenant_access_policy_inbound_trust.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isCompliantDeviceAccepted": lambda n : setattr(self, 'is_compliant_device_accepted', n.get_bool_value()), "isHybridAzureADJoinedDeviceAccepted": lambda n : setattr(self, 'is_hybrid_azure_a_d_joined_device_accepted', n.get_bool_value()), "isMfaAccepted": lambda n : setattr(self, 'is_mfa_accepted', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isCompliantDeviceAccepted", self.is_compliant_device_accepted) writer.write_bool_value("isHybridAzureADJoinedDeviceAccepted", self.is_hybrid_azure_a_d_joined_device_accepted) writer.write_bool_value("isMfaAccepted", self.is_mfa_accepted) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cross_tenant_access_policy_target.py b/msgraph/generated/models/cross_tenant_access_policy_target.py index d23606b2239..d16e012310c 100644 --- a/msgraph/generated/models/cross_tenant_access_policy_target.py +++ b/msgraph/generated/models/cross_tenant_access_policy_target.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .cross_tenant_access_policy_target_type import CrossTenantAccessPolicyTargetType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_str_value()), "targetType": lambda n : setattr(self, 'target_type', n.get_enum_value(CrossTenantAccessPolicyTargetType)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("target", self.target) writer.write_enum_value("targetType", self.target_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cross_tenant_access_policy_target_configuration.py b/msgraph/generated/models/cross_tenant_access_policy_target_configuration.py index 53c17a57d75..e5ff0d7cfc9 100644 --- a/msgraph/generated/models/cross_tenant_access_policy_target_configuration.py +++ b/msgraph/generated/models/cross_tenant_access_policy_target_configuration.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "accessType": lambda n : setattr(self, 'access_type', n.get_enum_value(CrossTenantAccessPolicyTargetConfigurationAccessType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "targets": lambda n : setattr(self, 'targets', n.get_collection_of_object_values(CrossTenantAccessPolicyTarget)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("accessType", self.access_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("targets", self.targets) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cross_tenant_identity_sync_policy_partner.py b/msgraph/generated/models/cross_tenant_identity_sync_policy_partner.py index d1fc19f4b53..e830e7eab7d 100644 --- a/msgraph/generated/models/cross_tenant_identity_sync_policy_partner.py +++ b/msgraph/generated/models/cross_tenant_identity_sync_policy_partner.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), "userSyncInbound": lambda n : setattr(self, 'user_sync_inbound', n.get_object_value(CrossTenantUserSyncInbound)), } @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("tenantId", self.tenant_id) writer.write_object_value("userSyncInbound", self.user_sync_inbound) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/cross_tenant_user_sync_inbound.py b/msgraph/generated/models/cross_tenant_user_sync_inbound.py index ca6ee9e3e23..4230e30c688 100644 --- a/msgraph/generated/models/cross_tenant_user_sync_inbound.py +++ b/msgraph/generated/models/cross_tenant_user_sync_inbound.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "isSyncAllowed": lambda n : setattr(self, 'is_sync_allowed', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isSyncAllowed", self.is_sync_allowed) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/currency_column.py b/msgraph/generated/models/currency_column.py index 0925f5d5962..d3549804d6a 100644 --- a/msgraph/generated/models/currency_column.py +++ b/msgraph/generated/models/currency_column.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "locale": lambda n : setattr(self, 'locale', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("locale", self.locale) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_extension_authentication_configuration.py b/msgraph/generated/models/custom_extension_authentication_configuration.py index c36b88896a1..9f6348a592a 100644 --- a/msgraph/generated/models/custom_extension_authentication_configuration.py +++ b/msgraph/generated/models/custom_extension_authentication_configuration.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .azure_ad_pop_token_authentication import AzureAdPopTokenAuthentication fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_extension_callback_configuration.py b/msgraph/generated/models/custom_extension_callback_configuration.py index 283e192b082..994bacdb6d2 100644 --- a/msgraph/generated/models/custom_extension_callback_configuration.py +++ b/msgraph/generated/models/custom_extension_callback_configuration.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .identity_governance.custom_task_extension_callback_configuration import CustomTaskExtensionCallbackConfiguration fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeoutDuration": lambda n : setattr(self, 'timeout_duration', n.get_timedelta_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_timedelta_value("timeoutDuration", self.timeout_duration) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_extension_callout_instance.py b/msgraph/generated/models/custom_extension_callout_instance.py index 60e118daaeb..c7e73bca651 100644 --- a/msgraph/generated/models/custom_extension_callout_instance.py +++ b/msgraph/generated/models/custom_extension_callout_instance.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "detail": lambda n : setattr(self, 'detail', n.get_str_value()), "externalCorrelationId": lambda n : setattr(self, 'external_correlation_id', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_enum_value(CustomExtensionCalloutInstanceStatus)), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("detail", self.detail) writer.write_str_value("externalCorrelationId", self.external_correlation_id) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_extension_client_configuration.py b/msgraph/generated/models/custom_extension_client_configuration.py index 72c40a22c8e..d4dc59d57a3 100644 --- a/msgraph/generated/models/custom_extension_client_configuration.py +++ b/msgraph/generated/models/custom_extension_client_configuration.py @@ -13,7 +13,7 @@ class CustomExtensionClientConfiguration(AdditionalDataHolder, BackedModel, Pars additional_data: Dict[str, Any] = field(default_factory=dict) # The OdataType property odata_type: Optional[str] = None - # The max duration in milliseconds that Azure AD will wait for a response from the external app before it shuts down the connection. The valid range is between 200 and 2000 milliseconds. Default duration is 1000. + # The max duration in milliseconds that Azure AD waits for a response from the external app before it shuts down the connection. The valid range is between 200 and 2000 milliseconds. Default duration is 1000. timeout_in_milliseconds: Optional[int] = None @staticmethod @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeoutInMilliseconds": lambda n : setattr(self, 'timeout_in_milliseconds', n.get_int_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("timeoutInMilliseconds", self.timeout_in_milliseconds) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_extension_data.py b/msgraph/generated/models/custom_extension_data.py index 9d08a4195dc..6747cac9f54 100644 --- a/msgraph/generated/models/custom_extension_data.py +++ b/msgraph/generated/models/custom_extension_data.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .identity_governance.custom_task_extension_callout_data import CustomTaskExtensionCalloutData fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_extension_endpoint_configuration.py b/msgraph/generated/models/custom_extension_endpoint_configuration.py index fc708a54a79..395fb87af79 100644 --- a/msgraph/generated/models/custom_extension_endpoint_configuration.py +++ b/msgraph/generated/models/custom_extension_endpoint_configuration.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .logic_app_trigger_endpoint_configuration import LogicAppTriggerEndpointConfiguration fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_security_attribute_value.py b/msgraph/generated/models/custom_security_attribute_value.py index ff95ccebf44..cbd786c831b 100644 --- a/msgraph/generated/models/custom_security_attribute_value.py +++ b/msgraph/generated/models/custom_security_attribute_value.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/custom_training_setting.py b/msgraph/generated/models/custom_training_setting.py new file mode 100644 index 00000000000..36df587dd60 --- /dev/null +++ b/msgraph/generated/models/custom_training_setting.py @@ -0,0 +1,75 @@ +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 .training_assigned_to import TrainingAssignedTo + from .training_setting import TrainingSetting + +from .training_setting import TrainingSetting + +@dataclass +class CustomTrainingSetting(TrainingSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.customTrainingSetting" + # The assignedTo property + assigned_to: Optional[List[TrainingAssignedTo]] = None + # The description property + description: Optional[str] = None + # The displayName property + display_name: Optional[str] = None + # The durationInMinutes property + duration_in_minutes: Optional[int] = None + # The url property + url: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CustomTrainingSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CustomTrainingSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CustomTrainingSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .training_assigned_to import TrainingAssignedTo + from .training_setting import TrainingSetting + + from .training_assigned_to import TrainingAssignedTo + from .training_setting import TrainingSetting + + fields: Dict[str, Callable[[Any], None]] = { + "assignedTo": lambda n : setattr(self, 'assigned_to', n.get_collection_of_enum_values(TrainingAssignedTo)), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "durationInMinutes": lambda n : setattr(self, 'duration_in_minutes', n.get_int_value()), + "url": lambda n : setattr(self, 'url', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_enum_values("assignedTo", self.assigned_to) + writer.write_str_value("description", self.description) + writer.write_str_value("displayName", self.display_name) + writer.write_int_value("durationInMinutes", self.duration_in_minutes) + writer.write_str_value("url", self.url) + + diff --git a/msgraph/generated/models/data_subject.py b/msgraph/generated/models/data_subject.py index 4a0a99aef58..a8d06f74309 100644 --- a/msgraph/generated/models/data_subject.py +++ b/msgraph/generated/models/data_subject.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "email": lambda n : setattr(self, 'email', n.get_str_value()), "firstName": lambda n : setattr(self, 'first_name', n.get_str_value()), "lastName": lambda n : setattr(self, 'last_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "residency": lambda n : setattr(self, 'residency', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("email", self.email) writer.write_str_value("firstName", self.first_name) writer.write_str_value("lastName", self.last_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("residency", self.residency) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/date_time_column.py b/msgraph/generated/models/date_time_column.py index cadd771c85a..2d748ecb540 100644 --- a/msgraph/generated/models/date_time_column.py +++ b/msgraph/generated/models/date_time_column.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayAs": lambda n : setattr(self, 'display_as', n.get_str_value()), "format": lambda n : setattr(self, 'format', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayAs", self.display_as) writer.write_str_value("format", self.format) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/date_time_time_zone.py b/msgraph/generated/models/date_time_time_zone.py index 26b084dd216..8fc1274e479 100644 --- a/msgraph/generated/models/date_time_time_zone.py +++ b/msgraph/generated/models/date_time_time_zone.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "dateTime": lambda n : setattr(self, 'date_time', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeZone": lambda n : setattr(self, 'time_zone', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("dateTime", self.date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("timeZone", self.time_zone) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/default_column_value.py b/msgraph/generated/models/default_column_value.py index f3fca1d2995..3978aef6a37 100644 --- a/msgraph/generated/models/default_column_value.py +++ b/msgraph/generated/models/default_column_value.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "formula": lambda n : setattr(self, 'formula', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("formula", self.formula) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/default_user_role_permissions.py b/msgraph/generated/models/default_user_role_permissions.py index 0ec34c4ff0a..b76e5d6975f 100644 --- a/msgraph/generated/models/default_user_role_permissions.py +++ b/msgraph/generated/models/default_user_role_permissions.py @@ -11,11 +11,11 @@ class DefaultUserRolePermissions(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) - # Indicates whether the default user role can create applications. This setting corresponds to the Users can register applications setting in the User settings menu in the Azure portal. + # Indicates whether the default user role can create applications. This setting corresponds to the Users can register applications setting in the User settings menu in the Microsoft Entra admin center. allowed_to_create_apps: Optional[bool] = None - # Indicates whether the default user role can create security groups. This setting corresponds to the following menus in the Azure portal: The Users can create security groups in Azure portals, API or PowerShell setting in the Group settings menu. Users can create security groups setting in the User settings menu. + # Indicates whether the default user role can create security groups. This setting corresponds to the following menus in the Microsoft Entra admin center: The Users can create security groups in Microsoft Entra admin centers, API or PowerShell setting in the Group settings menu. Users can create security groups setting in the User settings menu. allowed_to_create_security_groups: Optional[bool] = None - # Indicates whether the default user role can create tenants. This setting corresponds to the Restrict non-admin users from creating tenants setting in the User settings menu in the Azure portal. When this setting is false, users assigned the Tenant Creator role can still create tenants. + # Indicates whether the default user role can create tenants. This setting corresponds to the Restrict non-admin users from creating tenants setting in the User settings menu in the Microsoft Entra admin center. When this setting is false, users assigned the Tenant Creator role can still create tenants. allowed_to_create_tenants: Optional[bool] = None # Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role. allowed_to_read_bitlocker_keys_for_owned_device: Optional[bool] = None @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowedToCreateTenants": lambda n : setattr(self, 'allowed_to_create_tenants', n.get_bool_value()), "allowedToReadBitlockerKeysForOwnedDevice": lambda n : setattr(self, 'allowed_to_read_bitlocker_keys_for_owned_device', n.get_bool_value()), "allowedToReadOtherUsers": lambda n : setattr(self, 'allowed_to_read_other_users', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "permissionGrantPoliciesAssigned": lambda n : setattr(self, 'permission_grant_policies_assigned', n.get_collection_of_primitive_values(str)), } return fields @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowedToCreateTenants", self.allowed_to_create_tenants) writer.write_bool_value("allowedToReadBitlockerKeysForOwnedDevice", self.allowed_to_read_bitlocker_keys_for_owned_device) writer.write_bool_value("allowedToReadOtherUsers", self.allowed_to_read_other_users) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("permissionGrantPoliciesAssigned", self.permission_grant_policies_assigned) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/defender_detected_malware_actions.py b/msgraph/generated/models/defender_detected_malware_actions.py index bc2a8d63570..26b37ade7d9 100644 --- a/msgraph/generated/models/defender_detected_malware_actions.py +++ b/msgraph/generated/models/defender_detected_malware_actions.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "highSeverity": lambda n : setattr(self, 'high_severity', n.get_enum_value(DefenderThreatAction)), "lowSeverity": lambda n : setattr(self, 'low_severity', n.get_enum_value(DefenderThreatAction)), "moderateSeverity": lambda n : setattr(self, 'moderate_severity', n.get_enum_value(DefenderThreatAction)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "severeSeverity": lambda n : setattr(self, 'severe_severity', n.get_enum_value(DefenderThreatAction)), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("highSeverity", self.high_severity) writer.write_enum_value("lowSeverity", self.low_severity) writer.write_enum_value("moderateSeverity", self.moderate_severity) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("severeSeverity", self.severe_severity) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/delegated_admin_access_container.py b/msgraph/generated/models/delegated_admin_access_container.py index e4c8bab8c7a..b1d5550df3c 100644 --- a/msgraph/generated/models/delegated_admin_access_container.py +++ b/msgraph/generated/models/delegated_admin_access_container.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "accessContainerId": lambda n : setattr(self, 'access_container_id', n.get_str_value()), "accessContainerType": lambda n : setattr(self, 'access_container_type', n.get_enum_value(DelegatedAdminAccessContainerType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("accessContainerId", self.access_container_id) writer.write_enum_value("accessContainerType", self.access_container_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/delegated_admin_access_details.py b/msgraph/generated/models/delegated_admin_access_details.py index df137f1d251..7be9f38baf8 100644 --- a/msgraph/generated/models/delegated_admin_access_details.py +++ b/msgraph/generated/models/delegated_admin_access_details.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .unified_role import UnifiedRole fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "unifiedRoles": lambda n : setattr(self, 'unified_roles', n.get_collection_of_object_values(UnifiedRole)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("unifiedRoles", self.unified_roles) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/delegated_admin_relationship.py b/msgraph/generated/models/delegated_admin_relationship.py index ad79016adc2..6f0c74ed1dd 100644 --- a/msgraph/generated/models/delegated_admin_relationship.py +++ b/msgraph/generated/models/delegated_admin_relationship.py @@ -12,6 +12,7 @@ from .delegated_admin_relationship_request import DelegatedAdminRelationshipRequest from .delegated_admin_relationship_status import DelegatedAdminRelationshipStatus from .entity import Entity + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship from .entity import Entity @@ -53,6 +54,14 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> D """ if not parse_node: raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.resellerDelegatedAdminRelationship".casefold(): + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship + + return ResellerDelegatedAdminRelationship() return DelegatedAdminRelationship() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: @@ -67,6 +76,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .delegated_admin_relationship_request import DelegatedAdminRelationshipRequest from .delegated_admin_relationship_status import DelegatedAdminRelationshipStatus from .entity import Entity + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship from .delegated_admin_access_assignment import DelegatedAdminAccessAssignment from .delegated_admin_access_details import DelegatedAdminAccessDetails @@ -75,6 +85,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .delegated_admin_relationship_request import DelegatedAdminRelationshipRequest from .delegated_admin_relationship_status import DelegatedAdminRelationshipStatus from .entity import Entity + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship fields: Dict[str, Callable[[Any], None]] = { "accessAssignments": lambda n : setattr(self, 'access_assignments', n.get_collection_of_object_values(DelegatedAdminAccessAssignment)), diff --git a/msgraph/generated/models/delegated_admin_relationship_customer_participant.py b/msgraph/generated/models/delegated_admin_relationship_customer_participant.py index 341bc44e469..418ad6d6312 100644 --- a/msgraph/generated/models/delegated_admin_relationship_customer_participant.py +++ b/msgraph/generated/models/delegated_admin_relationship_customer_participant.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("tenantId", self.tenant_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/delegated_admin_relationship_request_action.py b/msgraph/generated/models/delegated_admin_relationship_request_action.py index 6c5e3abb50d..23641db59be 100644 --- a/msgraph/generated/models/delegated_admin_relationship_request_action.py +++ b/msgraph/generated/models/delegated_admin_relationship_request_action.py @@ -5,4 +5,5 @@ class DelegatedAdminRelationshipRequestAction(str, Enum): Approve = "approve", Terminate = "terminate", UnknownFutureValue = "unknownFutureValue", + Reject = "reject", diff --git a/msgraph/generated/models/deleted.py b/msgraph/generated/models/deleted.py index b2f2b4ca514..b2b0e1db7ab 100644 --- a/msgraph/generated/models/deleted.py +++ b/msgraph/generated/models/deleted.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/details_info.py b/msgraph/generated/models/details_info.py index f0ef2c2b063..7ad77a6aff4 100644 --- a/msgraph/generated/models/details_info.py +++ b/msgraph/generated/models/details_info.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_action_result.py b/msgraph/generated/models/device_action_result.py index 6fa64f4c2fe..c6b32727a91 100644 --- a/msgraph/generated/models/device_action_result.py +++ b/msgraph/generated/models/device_action_result.py @@ -99,7 +99,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "actionName": lambda n : setattr(self, 'action_name', n.get_str_value()), "actionState": lambda n : setattr(self, 'action_state', n.get_enum_value(ActionState)), "lastUpdatedDateTime": lambda n : setattr(self, 'last_updated_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), } return fields @@ -115,7 +115,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("actionName", self.action_name) writer.write_enum_value("actionState", self.action_state) writer.write_datetime_value("lastUpdatedDateTime", self.last_updated_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_and_app_management_assignment_target.py b/msgraph/generated/models/device_and_app_management_assignment_target.py index 0142e612f42..ffb8d47fd4b 100644 --- a/msgraph/generated/models/device_and_app_management_assignment_target.py +++ b/msgraph/generated/models/device_and_app_management_assignment_target.py @@ -77,7 +77,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .group_assignment_target import GroupAssignmentTarget fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -89,7 +89,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_and_app_management_data.py b/msgraph/generated/models/device_and_app_management_data.py index 18bf1d1dfad..dc1ead5ab21 100644 --- a/msgraph/generated/models/device_and_app_management_data.py +++ b/msgraph/generated/models/device_and_app_management_data.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_bytes_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bytes_value("content", self.content) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_compliance_policy_setting_state.py b/msgraph/generated/models/device_compliance_policy_setting_state.py index 2ef9066d54f..d2424cc3873 100644 --- a/msgraph/generated/models/device_compliance_policy_setting_state.py +++ b/msgraph/generated/models/device_compliance_policy_setting_state.py @@ -72,7 +72,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "errorCode": lambda n : setattr(self, 'error_code', n.get_int_value()), "errorDescription": lambda n : setattr(self, 'error_description', n.get_str_value()), "instanceDisplayName": lambda n : setattr(self, 'instance_display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "setting": lambda n : setattr(self, 'setting', n.get_str_value()), "settingName": lambda n : setattr(self, 'setting_name', n.get_str_value()), "sources": lambda n : setattr(self, 'sources', n.get_collection_of_object_values(SettingSource)), @@ -96,7 +96,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("errorCode", self.error_code) writer.write_str_value("errorDescription", self.error_description) writer.write_str_value("instanceDisplayName", self.instance_display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("setting", self.setting) writer.write_str_value("settingName", self.setting_name) writer.write_collection_of_object_values("sources", self.sources) diff --git a/msgraph/generated/models/device_configuration_setting_state.py b/msgraph/generated/models/device_configuration_setting_state.py index b28425855b6..3ef332891e4 100644 --- a/msgraph/generated/models/device_configuration_setting_state.py +++ b/msgraph/generated/models/device_configuration_setting_state.py @@ -72,7 +72,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "errorCode": lambda n : setattr(self, 'error_code', n.get_int_value()), "errorDescription": lambda n : setattr(self, 'error_description', n.get_str_value()), "instanceDisplayName": lambda n : setattr(self, 'instance_display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "setting": lambda n : setattr(self, 'setting', n.get_str_value()), "settingName": lambda n : setattr(self, 'setting_name', n.get_str_value()), "sources": lambda n : setattr(self, 'sources', n.get_collection_of_object_values(SettingSource)), @@ -96,7 +96,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("errorCode", self.error_code) writer.write_str_value("errorDescription", self.error_description) writer.write_str_value("instanceDisplayName", self.instance_display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("setting", self.setting) writer.write_str_value("settingName", self.setting_name) writer.write_collection_of_object_values("sources", self.sources) diff --git a/msgraph/generated/models/device_detail.py b/msgraph/generated/models/device_detail.py index 54b93682c9a..1ea10ea8870 100644 --- a/msgraph/generated/models/device_detail.py +++ b/msgraph/generated/models/device_detail.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "isCompliant": lambda n : setattr(self, 'is_compliant', n.get_bool_value()), "isManaged": lambda n : setattr(self, 'is_managed', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operatingSystem": lambda n : setattr(self, 'operating_system', n.get_str_value()), "trustType": lambda n : setattr(self, 'trust_type', n.get_str_value()), } @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_bool_value("isCompliant", self.is_compliant) writer.write_bool_value("isManaged", self.is_managed) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operatingSystem", self.operating_system) writer.write_str_value("trustType", self.trust_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_enrollment_platform_restriction.py b/msgraph/generated/models/device_enrollment_platform_restriction.py index cd2e37249f8..22a36b3d14a 100644 --- a/msgraph/generated/models/device_enrollment_platform_restriction.py +++ b/msgraph/generated/models/device_enrollment_platform_restriction.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "osMaximumVersion": lambda n : setattr(self, 'os_maximum_version', n.get_str_value()), "osMinimumVersion": lambda n : setattr(self, 'os_minimum_version', n.get_str_value()), "personalDeviceEnrollmentBlocked": lambda n : setattr(self, 'personal_device_enrollment_blocked', n.get_bool_value()), @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("osMaximumVersion", self.os_maximum_version) writer.write_str_value("osMinimumVersion", self.os_minimum_version) writer.write_bool_value("personalDeviceEnrollmentBlocked", self.personal_device_enrollment_blocked) diff --git a/msgraph/generated/models/device_exchange_access_state_summary.py b/msgraph/generated/models/device_exchange_access_state_summary.py index 067db11bfaa..3bf23841ee5 100644 --- a/msgraph/generated/models/device_exchange_access_state_summary.py +++ b/msgraph/generated/models/device_exchange_access_state_summary.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowedDeviceCount": lambda n : setattr(self, 'allowed_device_count', n.get_int_value()), "blockedDeviceCount": lambda n : setattr(self, 'blocked_device_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "quarantinedDeviceCount": lambda n : setattr(self, 'quarantined_device_count', n.get_int_value()), "unavailableDeviceCount": lambda n : setattr(self, 'unavailable_device_count', n.get_int_value()), "unknownDeviceCount": lambda n : setattr(self, 'unknown_device_count', n.get_int_value()), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("allowedDeviceCount", self.allowed_device_count) writer.write_int_value("blockedDeviceCount", self.blocked_device_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("quarantinedDeviceCount", self.quarantined_device_count) writer.write_int_value("unavailableDeviceCount", self.unavailable_device_count) writer.write_int_value("unknownDeviceCount", self.unknown_device_count) diff --git a/msgraph/generated/models/device_geo_location.py b/msgraph/generated/models/device_geo_location.py index cac28e87542..16aa08ef487 100644 --- a/msgraph/generated/models/device_geo_location.py +++ b/msgraph/generated/models/device_geo_location.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastCollectedDateTime": lambda n : setattr(self, 'last_collected_date_time', n.get_datetime_value()), "latitude": lambda n : setattr(self, 'latitude', n.get_float_value()), "longitude": lambda n : setattr(self, 'longitude', n.get_float_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "speed": lambda n : setattr(self, 'speed', n.get_float_value()), "verticalAccuracy": lambda n : setattr(self, 'vertical_accuracy', n.get_float_value()), } @@ -77,7 +77,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("lastCollectedDateTime", self.last_collected_date_time) writer.write_float_value("latitude", self.latitude) writer.write_float_value("longitude", self.longitude) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_float_value("speed", self.speed) writer.write_float_value("verticalAccuracy", self.vertical_accuracy) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_health_attestation_state.py b/msgraph/generated/models/device_health_attestation_state.py index 7a1cc166d6e..3838fc6002d 100644 --- a/msgraph/generated/models/device_health_attestation_state.py +++ b/msgraph/generated/models/device_health_attestation_state.py @@ -115,7 +115,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "healthStatusMismatchInfo": lambda n : setattr(self, 'health_status_mismatch_info', n.get_str_value()), "issuedDateTime": lambda n : setattr(self, 'issued_date_time', n.get_datetime_value()), "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operatingSystemKernelDebugging": lambda n : setattr(self, 'operating_system_kernel_debugging', n.get_str_value()), "operatingSystemRevListInfo": lambda n : setattr(self, 'operating_system_rev_list_info', n.get_str_value()), "pcrHashAlgorithm": lambda n : setattr(self, 'pcr_hash_algorithm', n.get_str_value()), @@ -159,7 +159,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("healthStatusMismatchInfo", self.health_status_mismatch_info) writer.write_datetime_value("issuedDateTime", self.issued_date_time) writer.write_str_value("lastUpdateDateTime", self.last_update_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operatingSystemKernelDebugging", self.operating_system_kernel_debugging) writer.write_str_value("operatingSystemRevListInfo", self.operating_system_rev_list_info) writer.write_str_value("pcrHashAlgorithm", self.pcr_hash_algorithm) diff --git a/msgraph/generated/models/device_management_partner_assignment.py b/msgraph/generated/models/device_management_partner_assignment.py index 8aebb7277bf..d45d1d6d6dc 100644 --- a/msgraph/generated/models/device_management_partner_assignment.py +++ b/msgraph/generated/models/device_management_partner_assignment.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .device_and_app_management_assignment_target import DeviceAndAppManagementAssignmentTarget fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_object_value(DeviceAndAppManagementAssignmentTarget)), } return fields @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("target", self.target) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_management_settings.py b/msgraph/generated/models/device_management_settings.py index 8b120dd9c9f..a8ac93ac81c 100644 --- a/msgraph/generated/models/device_management_settings.py +++ b/msgraph/generated/models/device_management_settings.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "deviceComplianceCheckinThresholdDays": lambda n : setattr(self, 'device_compliance_checkin_threshold_days', n.get_int_value()), "isScheduledActionEnabled": lambda n : setattr(self, 'is_scheduled_action_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "secureByDefault": lambda n : setattr(self, 'secure_by_default', n.get_bool_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("deviceComplianceCheckinThresholdDays", self.device_compliance_checkin_threshold_days) writer.write_bool_value("isScheduledActionEnabled", self.is_scheduled_action_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("secureByDefault", self.secure_by_default) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/device_operating_system_summary.py b/msgraph/generated/models/device_operating_system_summary.py index d655cddc508..2eee73ee836 100644 --- a/msgraph/generated/models/device_operating_system_summary.py +++ b/msgraph/generated/models/device_operating_system_summary.py @@ -67,7 +67,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "configMgrDeviceCount": lambda n : setattr(self, 'config_mgr_device_count', n.get_int_value()), "iosCount": lambda n : setattr(self, 'ios_count', n.get_int_value()), "macOSCount": lambda n : setattr(self, 'mac_o_s_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "unknownCount": lambda n : setattr(self, 'unknown_count', n.get_int_value()), "windowsCount": lambda n : setattr(self, 'windows_count', n.get_int_value()), "windowsMobileCount": lambda n : setattr(self, 'windows_mobile_count', n.get_int_value()), @@ -91,7 +91,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("configMgrDeviceCount", self.config_mgr_device_count) writer.write_int_value("iosCount", self.ios_count) writer.write_int_value("macOSCount", self.mac_o_s_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("unknownCount", self.unknown_count) writer.write_int_value("windowsCount", self.windows_count) writer.write_int_value("windowsMobileCount", self.windows_mobile_count) diff --git a/msgraph/generated/models/device_protection_overview.py b/msgraph/generated/models/device_protection_overview.py index c85352a2d42..baf2134d3b8 100644 --- a/msgraph/generated/models/device_protection_overview.py +++ b/msgraph/generated/models/device_protection_overview.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "cleanDeviceCount": lambda n : setattr(self, 'clean_device_count', n.get_int_value()), "criticalFailuresDeviceCount": lambda n : setattr(self, 'critical_failures_device_count', n.get_int_value()), "inactiveThreatAgentDeviceCount": lambda n : setattr(self, 'inactive_threat_agent_device_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "pendingFullScanDeviceCount": lambda n : setattr(self, 'pending_full_scan_device_count', n.get_int_value()), "pendingManualStepsDeviceCount": lambda n : setattr(self, 'pending_manual_steps_device_count', n.get_int_value()), "pendingOfflineScanDeviceCount": lambda n : setattr(self, 'pending_offline_scan_device_count', n.get_int_value()), @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("cleanDeviceCount", self.clean_device_count) writer.write_int_value("criticalFailuresDeviceCount", self.critical_failures_device_count) writer.write_int_value("inactiveThreatAgentDeviceCount", self.inactive_threat_agent_device_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("pendingFullScanDeviceCount", self.pending_full_scan_device_count) writer.write_int_value("pendingManualStepsDeviceCount", self.pending_manual_steps_device_count) writer.write_int_value("pendingOfflineScanDeviceCount", self.pending_offline_scan_device_count) diff --git a/msgraph/generated/models/dictionary.py b/msgraph/generated/models/dictionary.py index 4181a07d9da..4d9896b89d0 100644 --- a/msgraph/generated/models/dictionary.py +++ b/msgraph/generated/models/dictionary.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .result_template_dictionary import ResultTemplateDictionary fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/directory_definition.py b/msgraph/generated/models/directory_definition.py index 0269ed1f712..7d83c28ab95 100644 --- a/msgraph/generated/models/directory_definition.py +++ b/msgraph/generated/models/directory_definition.py @@ -25,7 +25,7 @@ class DirectoryDefinition(Entity): odata_type: Optional[str] = None # Whether this object is read-only. read_only: Optional[bool] = None - # Read only value that indicates version discovered. null if discovery has not yet occurred. + # Read only value that indicates version discovered. null if discovery hasn't yet occurred. version: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/display_name_localization.py b/msgraph/generated/models/display_name_localization.py index 815f961048e..a0892f94d80 100644 --- a/msgraph/generated/models/display_name_localization.py +++ b/msgraph/generated/models/display_name_localization.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "languageTag": lambda n : setattr(self, 'language_tag', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("languageTag", self.language_tag) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/document_set.py b/msgraph/generated/models/document_set.py index def68deb75f..c2fbcfb4dc6 100644 --- a/msgraph/generated/models/document_set.py +++ b/msgraph/generated/models/document_set.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowedContentTypes": lambda n : setattr(self, 'allowed_content_types', n.get_collection_of_object_values(ContentTypeInfo)), "defaultContents": lambda n : setattr(self, 'default_contents', n.get_collection_of_object_values(DocumentSetContent)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "propagateWelcomePageChanges": lambda n : setattr(self, 'propagate_welcome_page_changes', n.get_bool_value()), "sharedColumns": lambda n : setattr(self, 'shared_columns', n.get_collection_of_object_values(ColumnDefinition)), "shouldPrefixNameToFile": lambda n : setattr(self, 'should_prefix_name_to_file', n.get_bool_value()), @@ -79,7 +79,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("allowedContentTypes", self.allowed_content_types) writer.write_collection_of_object_values("defaultContents", self.default_contents) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("propagateWelcomePageChanges", self.propagate_welcome_page_changes) writer.write_collection_of_object_values("sharedColumns", self.shared_columns) writer.write_bool_value("shouldPrefixNameToFile", self.should_prefix_name_to_file) diff --git a/msgraph/generated/models/document_set_content.py b/msgraph/generated/models/document_set_content.py index f1be8b55222..2f11c0c6852 100644 --- a/msgraph/generated/models/document_set_content.py +++ b/msgraph/generated/models/document_set_content.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "contentType": lambda n : setattr(self, 'content_type', n.get_object_value(ContentTypeInfo)), "fileName": lambda n : setattr(self, 'file_name', n.get_str_value()), "folderName": lambda n : setattr(self, 'folder_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("contentType", self.content_type) writer.write_str_value("fileName", self.file_name) writer.write_str_value("folderName", self.folder_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/document_set_version_item.py b/msgraph/generated/models/document_set_version_item.py index 94e0fb2c2eb..5e066660fa2 100644 --- a/msgraph/generated/models/document_set_version_item.py +++ b/msgraph/generated/models/document_set_version_item.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "itemId": lambda n : setattr(self, 'item_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "title": lambda n : setattr(self, 'title', n.get_str_value()), "versionId": lambda n : setattr(self, 'version_id', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("itemId", self.item_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("title", self.title) writer.write_str_value("versionId", self.version_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/domain_state.py b/msgraph/generated/models/domain_state.py index f087a46c5ae..f22332abebb 100644 --- a/msgraph/generated/models/domain_state.py +++ b/msgraph/generated/models/domain_state.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "lastActionDateTime": lambda n : setattr(self, 'last_action_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operation": lambda n : setattr(self, 'operation', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_str_value()), } @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("lastActionDateTime", self.last_action_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operation", self.operation) writer.write_str_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/drive_item_uploadable_properties.py b/msgraph/generated/models/drive_item_uploadable_properties.py index d48fc62e97c..6954e459584 100644 --- a/msgraph/generated/models/drive_item_uploadable_properties.py +++ b/msgraph/generated/models/drive_item_uploadable_properties.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "fileSize": lambda n : setattr(self, 'file_size', n.get_int_value()), "fileSystemInfo": lambda n : setattr(self, 'file_system_info', n.get_object_value(FileSystemInfo)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("fileSize", self.file_size) writer.write_object_value("fileSystemInfo", self.file_system_info) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/drive_recipient.py b/msgraph/generated/models/drive_recipient.py index 33a5744d34c..c95614b2269 100644 --- a/msgraph/generated/models/drive_recipient.py +++ b/msgraph/generated/models/drive_recipient.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "alias": lambda n : setattr(self, 'alias', n.get_str_value()), "email": lambda n : setattr(self, 'email', n.get_str_value()), "objectId": lambda n : setattr(self, 'object_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("alias", self.alias) writer.write_str_value("email", self.email) writer.write_str_value("objectId", self.object_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/edge_search_engine_base.py b/msgraph/generated/models/edge_search_engine_base.py index 32cbef0a108..021a3ff5bf9 100644 --- a/msgraph/generated/models/edge_search_engine_base.py +++ b/msgraph/generated/models/edge_search_engine_base.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .edge_search_engine_custom import EdgeSearchEngineCustom fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_assignment_grade.py b/msgraph/generated/models/education_assignment_grade.py index 7f8e414a25a..7cdc5289287 100644 --- a/msgraph/generated/models/education_assignment_grade.py +++ b/msgraph/generated/models/education_assignment_grade.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "gradedBy": lambda n : setattr(self, 'graded_by', n.get_object_value(IdentitySet)), "gradedDateTime": lambda n : setattr(self, 'graded_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("gradedBy", self.graded_by) writer.write_datetime_value("gradedDateTime", self.graded_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_assignment_grade_type.py b/msgraph/generated/models/education_assignment_grade_type.py index b5cfa564f91..cac6f3e60cf 100644 --- a/msgraph/generated/models/education_assignment_grade_type.py +++ b/msgraph/generated/models/education_assignment_grade_type.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .education_assignment_points_grade_type import EducationAssignmentPointsGradeType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_assignment_recipient.py b/msgraph/generated/models/education_assignment_recipient.py index 2cf2e15f45c..1526de984ea 100644 --- a/msgraph/generated/models/education_assignment_recipient.py +++ b/msgraph/generated/models/education_assignment_recipient.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .education_assignment_individual_recipient import EducationAssignmentIndividualRecipient fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_course.py b/msgraph/generated/models/education_course.py index 3a3341d7b8c..2d2dde5bf54 100644 --- a/msgraph/generated/models/education_course.py +++ b/msgraph/generated/models/education_course.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "description": lambda n : setattr(self, 'description', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "externalId": lambda n : setattr(self, 'external_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "subject": lambda n : setattr(self, 'subject', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("description", self.description) writer.write_str_value("displayName", self.display_name) writer.write_str_value("externalId", self.external_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("subject", self.subject) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_feedback.py b/msgraph/generated/models/education_feedback.py index 3f2960c3e73..3c679930c21 100644 --- a/msgraph/generated/models/education_feedback.py +++ b/msgraph/generated/models/education_feedback.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "feedbackBy": lambda n : setattr(self, 'feedback_by', n.get_object_value(IdentitySet)), "feedbackDateTime": lambda n : setattr(self, 'feedback_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "text": lambda n : setattr(self, 'text', n.get_object_value(EducationItemBody)), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("feedbackBy", self.feedback_by) writer.write_datetime_value("feedbackDateTime", self.feedback_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("text", self.text) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_item_body.py b/msgraph/generated/models/education_item_body.py index cf3a8b766a7..f9168e3ad49 100644 --- a/msgraph/generated/models/education_item_body.py +++ b/msgraph/generated/models/education_item_body.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_str_value()), "contentType": lambda n : setattr(self, 'content_type', n.get_enum_value(BodyType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("content", self.content) writer.write_enum_value("contentType", self.content_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_on_premises_info.py b/msgraph/generated/models/education_on_premises_info.py index b640143b82c..7181e38ef5e 100644 --- a/msgraph/generated/models/education_on_premises_info.py +++ b/msgraph/generated/models/education_on_premises_info.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "immutableId": lambda n : setattr(self, 'immutable_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("immutableId", self.immutable_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_resource.py b/msgraph/generated/models/education_resource.py index 8827cfab757..e5d4cc68de5 100644 --- a/msgraph/generated/models/education_resource.py +++ b/msgraph/generated/models/education_resource.py @@ -114,7 +114,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(IdentitySet)), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -127,7 +127,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_root.py b/msgraph/generated/models/education_root.py index 3ae2f788fc9..2f19c00d296 100644 --- a/msgraph/generated/models/education_root.py +++ b/msgraph/generated/models/education_root.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "classes": lambda n : setattr(self, 'classes', n.get_collection_of_object_values(EducationClass)), "me": lambda n : setattr(self, 'me', n.get_object_value(EducationUser)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "schools": lambda n : setattr(self, 'schools', n.get_collection_of_object_values(EducationSchool)), "users": lambda n : setattr(self, 'users', n.get_collection_of_object_values(EducationUser)), } @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("classes", self.classes) writer.write_object_value("me", self.me) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("schools", self.schools) writer.write_collection_of_object_values("users", self.users) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_student.py b/msgraph/generated/models/education_student.py index a01901b2261..8a8d07ef487 100644 --- a/msgraph/generated/models/education_student.py +++ b/msgraph/generated/models/education_student.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "gender": lambda n : setattr(self, 'gender', n.get_enum_value(EducationGender)), "grade": lambda n : setattr(self, 'grade', n.get_str_value()), "graduationYear": lambda n : setattr(self, 'graduation_year', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "studentNumber": lambda n : setattr(self, 'student_number', n.get_str_value()), } return fields @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("gender", self.gender) writer.write_str_value("grade", self.grade) writer.write_str_value("graduationYear", self.graduation_year) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("studentNumber", self.student_number) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_submission_recipient.py b/msgraph/generated/models/education_submission_recipient.py index 35ef8661579..1491d4710a5 100644 --- a/msgraph/generated/models/education_submission_recipient.py +++ b/msgraph/generated/models/education_submission_recipient.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .education_submission_individual_recipient import EducationSubmissionIndividualRecipient fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_teacher.py b/msgraph/generated/models/education_teacher.py index 593c306ad74..d026146bda7 100644 --- a/msgraph/generated/models/education_teacher.py +++ b/msgraph/generated/models/education_teacher.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "externalId": lambda n : setattr(self, 'external_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "teacherNumber": lambda n : setattr(self, 'teacher_number', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("externalId", self.external_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("teacherNumber", self.teacher_number) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/education_term.py b/msgraph/generated/models/education_term.py index 5586633331e..2a2c8d31273 100644 --- a/msgraph/generated/models/education_term.py +++ b/msgraph/generated/models/education_term.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "endDate": lambda n : setattr(self, 'end_date', n.get_date_value()), "externalId": lambda n : setattr(self, 'external_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDate": lambda n : setattr(self, 'start_date', n.get_date_value()), } return fields @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_date_value("endDate", self.end_date) writer.write_str_value("externalId", self.external_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_date_value("startDate", self.start_date) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/email_address.py b/msgraph/generated/models/email_address.py index 237f28c2851..128b0889db2 100644 --- a/msgraph/generated/models/email_address.py +++ b/msgraph/generated/models/email_address.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "address": lambda n : setattr(self, 'address', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("address", self.address) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/email_authentication_method_configuration.py b/msgraph/generated/models/email_authentication_method_configuration.py index 5eb27d3b83d..5634baf04a0 100644 --- a/msgraph/generated/models/email_authentication_method_configuration.py +++ b/msgraph/generated/models/email_authentication_method_configuration.py @@ -14,7 +14,7 @@ class EmailAuthenticationMethodConfiguration(AuthenticationMethodConfiguration): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.emailAuthenticationMethodConfiguration" - # Determines whether email OTP is usable by external users for authentication. Possible values are: default, enabled, disabled, unknownFutureValue. Tenants in the default state who didn't use public preview will automatically have email OTP enabled beginning in October 2021. + # Determines whether email OTP is usable by external users for authentication. Possible values are: default, enabled, disabled, unknownFutureValue. Tenants in the default state who didn't use public preview have email OTP enabled beginning in October 2021. allow_external_id_to_use_email_otp: Optional[ExternalEmailOtpState] = None # A collection of groups that are enabled to use the authentication method. include_targets: Optional[List[AuthenticationMethodTarget]] = None diff --git a/msgraph/generated/models/email_file_assessment_request.py b/msgraph/generated/models/email_file_assessment_request.py index 68de4dcfd70..11d03ab9ad2 100644 --- a/msgraph/generated/models/email_file_assessment_request.py +++ b/msgraph/generated/models/email_file_assessment_request.py @@ -13,7 +13,7 @@ class EmailFileAssessmentRequest(ThreatAssessmentRequest): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.emailFileAssessmentRequest" - # Base64 encoded .eml email file content. The file content cannot fetch back because it isn't stored. + # Base64 encoded .eml email file content. The file content can't fetch back because it isn't stored. content_data: Optional[str] = None # The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. destination_routing_reason: Optional[MailDestinationRoutingReason] = None diff --git a/msgraph/generated/models/email_payload_detail.py b/msgraph/generated/models/email_payload_detail.py new file mode 100644 index 00000000000..df95bc70624 --- /dev/null +++ b/msgraph/generated/models/email_payload_detail.py @@ -0,0 +1,68 @@ +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 .payload_detail import PayloadDetail + +from .payload_detail import PayloadDetail + +@dataclass +class EmailPayloadDetail(PayloadDetail): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.emailPayloadDetail" + # The fromEmail property + from_email: Optional[str] = None + # The fromName property + from_name: Optional[str] = None + # The isExternalSender property + is_external_sender: Optional[bool] = None + # The subject property + subject: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EmailPayloadDetail: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EmailPayloadDetail + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EmailPayloadDetail() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .payload_detail import PayloadDetail + + from .payload_detail import PayloadDetail + + fields: Dict[str, Callable[[Any], None]] = { + "fromEmail": lambda n : setattr(self, 'from_email', n.get_str_value()), + "fromName": lambda n : setattr(self, 'from_name', n.get_str_value()), + "isExternalSender": lambda n : setattr(self, 'is_external_sender', n.get_bool_value()), + "subject": lambda n : setattr(self, 'subject', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("fromEmail", self.from_email) + writer.write_str_value("fromName", self.from_name) + writer.write_bool_value("isExternalSender", self.is_external_sender) + writer.write_str_value("subject", self.subject) + + diff --git a/msgraph/generated/models/email_settings.py b/msgraph/generated/models/email_settings.py index e35312bb48d..e5bd78a734f 100644 --- a/msgraph/generated/models/email_settings.py +++ b/msgraph/generated/models/email_settings.py @@ -35,7 +35,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "senderDomain": lambda n : setattr(self, 'sender_domain', n.get_str_value()), "useCompanyBranding": lambda n : setattr(self, 'use_company_branding', n.get_bool_value()), } @@ -49,7 +49,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("senderDomain", self.sender_domain) writer.write_bool_value("useCompanyBranding", self.use_company_branding) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/employee_experience.py b/msgraph/generated/models/employee_experience.py index fa72c34b80c..c2e4b34526b 100644 --- a/msgraph/generated/models/employee_experience.py +++ b/msgraph/generated/models/employee_experience.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "learningCourseActivities": lambda n : setattr(self, 'learning_course_activities', n.get_collection_of_object_values(LearningCourseActivity)), "learningProviders": lambda n : setattr(self, 'learning_providers', n.get_collection_of_object_values(LearningProvider)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("learningCourseActivities", self.learning_course_activities) writer.write_collection_of_object_values("learningProviders", self.learning_providers) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/employee_org_data.py b/msgraph/generated/models/employee_org_data.py index 9dc76537a42..12a028b898e 100644 --- a/msgraph/generated/models/employee_org_data.py +++ b/msgraph/generated/models/employee_org_data.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "costCenter": lambda n : setattr(self, 'cost_center', n.get_str_value()), "division": lambda n : setattr(self, 'division', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("costCenter", self.cost_center) writer.write_str_value("division", self.division) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/end_user_notification.py b/msgraph/generated/models/end_user_notification.py new file mode 100644 index 00000000000..2282621129e --- /dev/null +++ b/msgraph/generated/models/end_user_notification.py @@ -0,0 +1,112 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_identity import EmailIdentity + from .end_user_notification_detail import EndUserNotificationDetail + from .end_user_notification_type import EndUserNotificationType + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + +from .entity import Entity + +@dataclass +class EndUserNotification(Entity): + # The createdBy property + created_by: Optional[EmailIdentity] = None + # The createdDateTime property + created_date_time: Optional[datetime.datetime] = None + # The description property + description: Optional[str] = None + # The details property + details: Optional[List[EndUserNotificationDetail]] = None + # The displayName property + display_name: Optional[str] = None + # The lastModifiedBy property + last_modified_by: Optional[EmailIdentity] = None + # The lastModifiedDateTime property + last_modified_date_time: Optional[datetime.datetime] = None + # The notificationType property + notification_type: Optional[EndUserNotificationType] = None + # The OdataType property + odata_type: Optional[str] = None + # The source property + source: Optional[SimulationContentSource] = None + # The status property + status: Optional[SimulationContentStatus] = None + # The supportedLocales property + supported_locales: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EndUserNotification: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EndUserNotification + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EndUserNotification() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .end_user_notification_detail import EndUserNotificationDetail + from .end_user_notification_type import EndUserNotificationType + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + from .email_identity import EmailIdentity + from .end_user_notification_detail import EndUserNotificationDetail + from .end_user_notification_type import EndUserNotificationType + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + fields: Dict[str, Callable[[Any], None]] = { + "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(EmailIdentity)), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "details": lambda n : setattr(self, 'details', n.get_collection_of_object_values(EndUserNotificationDetail)), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), + "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), + "notificationType": lambda n : setattr(self, 'notification_type', n.get_enum_value(EndUserNotificationType)), + "source": lambda n : setattr(self, 'source', n.get_enum_value(SimulationContentSource)), + "status": lambda n : setattr(self, 'status', n.get_enum_value(SimulationContentStatus)), + "supportedLocales": lambda n : setattr(self, 'supported_locales', n.get_collection_of_primitive_values(str)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("createdBy", self.created_by) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("description", self.description) + writer.write_collection_of_object_values("details", self.details) + writer.write_str_value("displayName", self.display_name) + writer.write_object_value("lastModifiedBy", self.last_modified_by) + writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) + writer.write_enum_value("notificationType", self.notification_type) + writer.write_enum_value("source", self.source) + writer.write_enum_value("status", self.status) + writer.write_collection_of_primitive_values("supportedLocales", self.supported_locales) + + diff --git a/msgraph/generated/models/end_user_notification_collection_response.py b/msgraph/generated/models/end_user_notification_collection_response.py new file mode 100644 index 00000000000..def8f72ff0e --- /dev/null +++ b/msgraph/generated/models/end_user_notification_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .end_user_notification import EndUserNotification + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class EndUserNotificationCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[EndUserNotification]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EndUserNotificationCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EndUserNotificationCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EndUserNotificationCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .end_user_notification import EndUserNotification + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .end_user_notification import EndUserNotification + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(EndUserNotification)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/end_user_notification_detail.py b/msgraph/generated/models/end_user_notification_detail.py new file mode 100644 index 00000000000..210768dc750 --- /dev/null +++ b/msgraph/generated/models/end_user_notification_detail.py @@ -0,0 +1,79 @@ +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 .email_identity import EmailIdentity + from .entity import Entity + +from .entity import Entity + +@dataclass +class EndUserNotificationDetail(Entity): + # The emailContent property + email_content: Optional[str] = None + # The isDefaultLangauge property + is_default_langauge: Optional[bool] = None + # The language property + language: Optional[str] = None + # The locale property + locale: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The sentFrom property + sent_from: Optional[EmailIdentity] = None + # The subject property + subject: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EndUserNotificationDetail: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EndUserNotificationDetail + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EndUserNotificationDetail() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .entity import Entity + + from .email_identity import EmailIdentity + from .entity import Entity + + fields: Dict[str, Callable[[Any], None]] = { + "emailContent": lambda n : setattr(self, 'email_content', n.get_str_value()), + "isDefaultLangauge": lambda n : setattr(self, 'is_default_langauge', n.get_bool_value()), + "language": lambda n : setattr(self, 'language', n.get_str_value()), + "locale": lambda n : setattr(self, 'locale', n.get_str_value()), + "sentFrom": lambda n : setattr(self, 'sent_from', n.get_object_value(EmailIdentity)), + "subject": lambda n : setattr(self, 'subject', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("emailContent", self.email_content) + writer.write_bool_value("isDefaultLangauge", self.is_default_langauge) + writer.write_str_value("language", self.language) + writer.write_str_value("locale", self.locale) + writer.write_object_value("sentFrom", self.sent_from) + writer.write_str_value("subject", self.subject) + + diff --git a/msgraph/generated/models/end_user_notification_detail_collection_response.py b/msgraph/generated/models/end_user_notification_detail_collection_response.py new file mode 100644 index 00000000000..8851556773c --- /dev/null +++ b/msgraph/generated/models/end_user_notification_detail_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .end_user_notification_detail import EndUserNotificationDetail + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class EndUserNotificationDetailCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[EndUserNotificationDetail]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EndUserNotificationDetailCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EndUserNotificationDetailCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EndUserNotificationDetailCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .end_user_notification_detail import EndUserNotificationDetail + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .end_user_notification_detail import EndUserNotificationDetail + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(EndUserNotificationDetail)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/end_user_notification_preference.py b/msgraph/generated/models/end_user_notification_preference.py new file mode 100644 index 00000000000..4e8e7a116e7 --- /dev/null +++ b/msgraph/generated/models/end_user_notification_preference.py @@ -0,0 +1,8 @@ +from enum import Enum + +class EndUserNotificationPreference(str, Enum): + Unknown = "unknown", + Microsoft = "microsoft", + Custom = "custom", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/end_user_notification_setting.py b/msgraph/generated/models/end_user_notification_setting.py new file mode 100644 index 00000000000..a1055543627 --- /dev/null +++ b/msgraph/generated/models/end_user_notification_setting.py @@ -0,0 +1,92 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .end_user_notification_preference import EndUserNotificationPreference + from .end_user_notification_setting_type import EndUserNotificationSettingType + from .no_training_notification_setting import NoTrainingNotificationSetting + from .positive_reinforcement_notification import PositiveReinforcementNotification + from .training_notification_setting import TrainingNotificationSetting + +@dataclass +class EndUserNotificationSetting(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The notificationPreference property + notification_preference: Optional[EndUserNotificationPreference] = None + # The OdataType property + odata_type: Optional[str] = None + # The positiveReinforcement property + positive_reinforcement: Optional[PositiveReinforcementNotification] = None + # The settingType property + setting_type: Optional[EndUserNotificationSettingType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EndUserNotificationSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EndUserNotificationSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.noTrainingNotificationSetting".casefold(): + from .no_training_notification_setting import NoTrainingNotificationSetting + + return NoTrainingNotificationSetting() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.trainingNotificationSetting".casefold(): + from .training_notification_setting import TrainingNotificationSetting + + return TrainingNotificationSetting() + return EndUserNotificationSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .end_user_notification_preference import EndUserNotificationPreference + from .end_user_notification_setting_type import EndUserNotificationSettingType + from .no_training_notification_setting import NoTrainingNotificationSetting + from .positive_reinforcement_notification import PositiveReinforcementNotification + from .training_notification_setting import TrainingNotificationSetting + + from .end_user_notification_preference import EndUserNotificationPreference + from .end_user_notification_setting_type import EndUserNotificationSettingType + from .no_training_notification_setting import NoTrainingNotificationSetting + from .positive_reinforcement_notification import PositiveReinforcementNotification + from .training_notification_setting import TrainingNotificationSetting + + fields: Dict[str, Callable[[Any], None]] = { + "notificationPreference": lambda n : setattr(self, 'notification_preference', n.get_enum_value(EndUserNotificationPreference)), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "positiveReinforcement": lambda n : setattr(self, 'positive_reinforcement', n.get_object_value(PositiveReinforcementNotification)), + "settingType": lambda n : setattr(self, 'setting_type', n.get_enum_value(EndUserNotificationSettingType)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_enum_value("notificationPreference", self.notification_preference) + writer.write_str_value("OdataType", self.odata_type) + writer.write_object_value("positiveReinforcement", self.positive_reinforcement) + writer.write_enum_value("settingType", self.setting_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/end_user_notification_setting_type.py b/msgraph/generated/models/end_user_notification_setting_type.py new file mode 100644 index 00000000000..e4f6636bb6a --- /dev/null +++ b/msgraph/generated/models/end_user_notification_setting_type.py @@ -0,0 +1,9 @@ +from enum import Enum + +class EndUserNotificationSettingType(str, Enum): + Unknown = "unknown", + NoTraining = "noTraining", + TrainingSelected = "trainingSelected", + NoNotification = "noNotification", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/end_user_notification_type.py b/msgraph/generated/models/end_user_notification_type.py new file mode 100644 index 00000000000..9470075f5ca --- /dev/null +++ b/msgraph/generated/models/end_user_notification_type.py @@ -0,0 +1,10 @@ +from enum import Enum + +class EndUserNotificationType(str, Enum): + Unknown = "unknown", + PositiveReinforcement = "positiveReinforcement", + NoTraining = "noTraining", + TrainingAssignment = "trainingAssignment", + TrainingReminder = "trainingReminder", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/entitlement_management_schedule.py b/msgraph/generated/models/entitlement_management_schedule.py index 6c5451f8f5c..e4249786d67 100644 --- a/msgraph/generated/models/entitlement_management_schedule.py +++ b/msgraph/generated/models/entitlement_management_schedule.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "expiration": lambda n : setattr(self, 'expiration', n.get_object_value(ExpirationPattern)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recurrence": lambda n : setattr(self, 'recurrence', n.get_object_value(PatternedRecurrence)), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("expiration", self.expiration) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("recurrence", self.recurrence) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/entity.py b/msgraph/generated/models/entity.py index 745b9e48efb..b9b9f5d06b8 100644 --- a/msgraph/generated/models/entity.py +++ b/msgraph/generated/models/entity.py @@ -34,8 +34,8 @@ from .activity_based_timeout_policy import ActivityBasedTimeoutPolicy from .activity_history_item import ActivityHistoryItem from .add_large_gallery_view_operation import AddLargeGalleryViewOperation - from .admin_consent_request_policy import AdminConsentRequestPolicy from .administrative_unit import AdministrativeUnit + from .admin_consent_request_policy import AdminConsentRequestPolicy from .agreement import Agreement from .agreement_acceptance import AgreementAcceptance from .agreement_file import AgreementFile @@ -55,24 +55,25 @@ from .android_work_profile_custom_configuration import AndroidWorkProfileCustomConfiguration from .android_work_profile_general_device_configuration import AndroidWorkProfileGeneralDeviceConfiguration from .anonymous_guest_conversation_member import AnonymousGuestConversationMember - from .app_catalogs import AppCatalogs - from .app_consent_approval_route import AppConsentApprovalRoute - from .app_consent_request import AppConsentRequest from .apple_device_features_configuration_base import AppleDeviceFeaturesConfigurationBase from .apple_managed_identity_provider import AppleManagedIdentityProvider from .apple_push_notification_certificate import ApplePushNotificationCertificate from .application import Application from .application_template import ApplicationTemplate + from .approval import Approval + from .approval_stage import ApprovalStage + from .app_catalogs import AppCatalogs + from .app_consent_approval_route import AppConsentApprovalRoute + from .app_consent_request import AppConsentRequest from .app_log_collection_request import AppLogCollectionRequest from .app_management_policy import AppManagementPolicy from .app_role_assignment import AppRoleAssignment - from .approval import Approval - from .approval_stage import ApprovalStage from .app_scope import AppScope from .associated_team_info import AssociatedTeamInfo from .attachment import Attachment from .attachment_base import AttachmentBase from .attachment_session import AttachmentSession + from .attack_simulation_operation import AttackSimulationOperation from .attack_simulation_root import AttackSimulationRoot from .attendance_record import AttendanceRecord from .attribute_mapping_function_schema import AttributeMappingFunctionSchema @@ -85,10 +86,10 @@ from .authentication_context_class_reference import AuthenticationContextClassReference from .authentication_flows_policy import AuthenticationFlowsPolicy from .authentication_method import AuthenticationMethod - from .authentication_method_configuration import AuthenticationMethodConfiguration - from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_methods_policy import AuthenticationMethodsPolicy from .authentication_methods_root import AuthenticationMethodsRoot + from .authentication_method_configuration import AuthenticationMethodConfiguration + from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_method_target import AuthenticationMethodTarget from .authentication_strength_policy import AuthenticationStrengthPolicy from .authentication_strength_root import AuthenticationStrengthRoot @@ -121,6 +122,7 @@ from .call_records.call_record import CallRecord from .call_records.segment import Segment from .call_records.session import Session + from .call_transcript import CallTranscript from .cancel_media_processing_operation import CancelMediaProcessingOperation from .certificate_based_auth_configuration import CertificateBasedAuthConfiguration from .change_tracked_entity import ChangeTrackedEntity @@ -220,7 +222,6 @@ from .drive import Drive from .drive_item import DriveItem from .drive_item_version import DriveItemVersion - from .e_book_install_summary import EBookInstallSummary from .edge import Edge from .edition_upgrade_configuration import EditionUpgradeConfiguration from .education_assignment import EducationAssignment @@ -245,6 +246,8 @@ from .email_file_assessment_request import EmailFileAssessmentRequest from .employee_experience_user import EmployeeExperienceUser from .endpoint import Endpoint + from .end_user_notification import EndUserNotification + from .end_user_notification_detail import EndUserNotificationDetail from .enrollment_configuration_assignment import EnrollmentConfigurationAssignment from .enrollment_troubleshooting_event import EnrollmentTroubleshootingEvent from .enterprise_code_signing_certificate import EnterpriseCodeSigningCertificate @@ -265,6 +268,7 @@ from .external_connectors.identity import Identity from .external_connectors.schema import Schema from .external_domain_name import ExternalDomainName + from .e_book_install_summary import EBookInstallSummary from .feature_rollout_policy import FeatureRolloutPolicy from .federated_identity_credential import FederatedIdentityCredential from .fido2_authentication_method import Fido2AuthenticationMethod @@ -308,12 +312,12 @@ from .internet_explorer_mode import InternetExplorerMode from .invitation import Invitation from .invite_participants_operation import InviteParticipantsOperation + from .iosi_pad_o_s_web_clip import IosiPadOSWebClip from .ios_certificate_profile import IosCertificateProfile from .ios_compliance_policy import IosCompliancePolicy from .ios_custom_configuration import IosCustomConfiguration from .ios_device_features_configuration import IosDeviceFeaturesConfiguration from .ios_general_device_configuration import IosGeneralDeviceConfiguration - from .iosi_pad_o_s_web_clip import IosiPadOSWebClip from .ios_lob_app import IosLobApp from .ios_lob_app_provisioning_configuration_assignment import IosLobAppProvisioningConfigurationAssignment from .ios_managed_app_protection import IosManagedAppProtection @@ -330,6 +334,8 @@ from .item_activity_stat import ItemActivityStat from .item_analytics import ItemAnalytics from .item_attachment import ItemAttachment + from .landing_page import LandingPage + from .landing_page_detail import LandingPageDetail from .learning_assignment import LearningAssignment from .learning_content import LearningContent from .learning_course_activity import LearningCourseActivity @@ -337,10 +343,11 @@ from .learning_self_initiated_course import LearningSelfInitiatedCourse from .license_details import LicenseDetails from .linked_resource import LinkedResource + from .list_ import List_ from .list_item import ListItem from .list_item_version import ListItemVersion - from .list_ import List_ from .localized_notification_message import LocalizedNotificationMessage + from .login_page import LoginPage from .long_running_operation import LongRunningOperation from .mac_o_s_compliance_policy import MacOSCompliancePolicy from .mac_o_s_custom_configuration import MacOSCustomConfiguration @@ -404,7 +411,6 @@ from .named_location import NamedLocation from .notebook import Notebook from .notification_message_template import NotificationMessageTemplate - from .o_auth2_permission_grant import OAuth2PermissionGrant from .offer_shift_request import OfferShiftRequest from .office_graph_insights import OfficeGraphInsights from .onenote import Onenote @@ -430,10 +436,13 @@ from .outlook_category import OutlookCategory from .outlook_item import OutlookItem from .outlook_user import OutlookUser + from .o_auth2_permission_grant import OAuth2PermissionGrant from .participant import Participant from .participant_joining_notification import ParticipantJoiningNotification from .participant_left_notification import ParticipantLeftNotification from .password_authentication_method import PasswordAuthenticationMethod + from .payload import Payload + from .people_admin_settings import PeopleAdminSettings from .permission import Permission from .permission_grant_condition_set import PermissionGrantConditionSet from .permission_grant_policy import PermissionGrantPolicy @@ -457,12 +466,12 @@ from .policy_root import PolicyRoot from .post import Post from .presence import Presence - from .print_connector import PrintConnector - from .print_document import PrintDocument from .printer import Printer from .printer_base import PrinterBase from .printer_create_operation import PrinterCreateOperation from .printer_share import PrinterShare + from .print_connector import PrintConnector + from .print_document import PrintDocument from .print_job import PrintJob from .print_operation import PrintOperation from .print_service import PrintService @@ -473,6 +482,18 @@ from .print_usage import PrintUsage from .print_usage_by_printer import PrintUsageByPrinter from .print_usage_by_user import PrintUsageByUser + from .privileged_access_group import PrivilegedAccessGroup + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .privileged_access_root import PrivilegedAccessRoot + from .privileged_access_schedule import PrivilegedAccessSchedule + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + from .profile_card_property import ProfileCardProperty from .profile_photo import ProfilePhoto from .provisioning_object_summary import ProvisioningObjectSummary from .rbac_application import RbacApplication @@ -480,14 +501,15 @@ from .reference_attachment import ReferenceAttachment from .remote_assistance_partner import RemoteAssistancePartner from .request import Request + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship from .resource_operation import ResourceOperation from .resource_specific_permission_grant import ResourceSpecificPermissionGrant from .rich_long_running_operation import RichLongRunningOperation - from .risk_detection import RiskDetection from .risky_service_principal import RiskyServicePrincipal from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .risky_user import RiskyUser from .risky_user_history_item import RiskyUserHistoryItem + from .risk_detection import RiskDetection from .role_assignment import RoleAssignment from .role_definition import RoleDefinition from .room import Room @@ -508,8 +530,8 @@ from .security.article_indicator import ArticleIndicator from .security.artifact import Artifact from .security.case import Case - from .security.case_operation import CaseOperation from .security.cases_root import CasesRoot + from .security.case_operation import CaseOperation from .security.data_set import DataSet from .security.data_source import DataSource from .security.data_source_container import DataSourceContainer @@ -529,10 +551,12 @@ from .security.ediscovery_search import EdiscoverySearch from .security.ediscovery_tag_operation import EdiscoveryTagOperation from .security.host import Host + from .security.hostname import Hostname from .security.host_component import HostComponent from .security.host_cookie import HostCookie - from .security.hostname import Hostname + from .security.host_pair import HostPair from .security.host_reputation import HostReputation + from .security.host_ssl_certificate import HostSslCertificate from .security.host_tracker import HostTracker from .security.incident import Incident from .security.indicator import Indicator @@ -545,6 +569,8 @@ from .security.search import Search from .security.security import Security from .security.site_source import SiteSource + from .security.ssl_certificate import SslCertificate + from .security.subdomain import Subdomain from .security.tag import Tag from .security.threat_intelligence import ThreatIntelligence from .security.triggers_root import TriggersRoot @@ -554,6 +580,9 @@ from .security.user_source import UserSource from .security.vulnerability import Vulnerability from .security.vulnerability_component import VulnerabilityComponent + from .security.whois_base_record import WhoisBaseRecord + from .security.whois_history_record import WhoisHistoryRecord + from .security.whois_record import WhoisRecord from .security_reports_root import SecurityReportsRoot from .service_announcement import ServiceAnnouncement from .service_announcement_attachment import ServiceAnnouncementAttachment @@ -603,7 +632,6 @@ from .targeted_managed_app_protection import TargetedManagedAppProtection from .task_file_attachment import TaskFileAttachment from .team import Team - from .team_info import TeamInfo from .teams_app import TeamsApp from .teams_app_definition import TeamsAppDefinition from .teams_app_installation import TeamsAppInstallation @@ -616,6 +644,7 @@ from .teamwork_hosted_content import TeamworkHostedContent from .teamwork_tag import TeamworkTag from .teamwork_tag_member import TeamworkTagMember + from .team_info import TeamInfo from .telecom_expense_management_partner import TelecomExpenseManagementPartner from .temporary_access_pass_authentication_method import TemporaryAccessPassAuthenticationMethod from .temporary_access_pass_authentication_method_configuration import TemporaryAccessPassAuthenticationMethodConfiguration @@ -640,6 +669,8 @@ from .todo_task_list import TodoTaskList from .token_issuance_policy import TokenIssuancePolicy from .token_lifetime_policy import TokenLifetimePolicy + from .training import Training + from .training_language_detail import TrainingLanguageDetail from .trending import Trending from .unified_rbac_resource_action import UnifiedRbacResourceAction from .unified_rbac_resource_namespace import UnifiedRbacResourceNamespace @@ -744,8 +775,8 @@ from .workbook_chart_axis_format import WorkbookChartAxisFormat from .workbook_chart_axis_title import WorkbookChartAxisTitle from .workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat - from .workbook_chart_data_label_format import WorkbookChartDataLabelFormat from .workbook_chart_data_labels import WorkbookChartDataLabels + from .workbook_chart_data_label_format import WorkbookChartDataLabelFormat from .workbook_chart_fill import WorkbookChartFill from .workbook_chart_font import WorkbookChartFont from .workbook_chart_gridlines import WorkbookChartGridlines @@ -763,8 +794,8 @@ from .workbook_comment_reply import WorkbookCommentReply from .workbook_filter import WorkbookFilter from .workbook_format_protection import WorkbookFormatProtection - from .workbook_function_result import WorkbookFunctionResult from .workbook_functions import WorkbookFunctions + from .workbook_function_result import WorkbookFunctionResult from .workbook_named_item import WorkbookNamedItem from .workbook_operation import WorkbookOperation from .workbook_pivot_table import WorkbookPivotTable @@ -1082,6 +1113,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .attachment_session import AttachmentSession return AttachmentSession() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.attackSimulationOperation".casefold(): + from .attack_simulation_operation import AttackSimulationOperation + + return AttackSimulationOperation() if mapping_value and mapping_value.casefold() == "#microsoft.graph.attackSimulationRoot".casefold(): from .attack_simulation_root import AttackSimulationRoot @@ -1274,6 +1309,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .call_records.session import Session return Session() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.callTranscript".casefold(): + from .call_transcript import CallTranscript + + return CallTranscript() if mapping_value and mapping_value.casefold() == "#microsoft.graph.cancelMediaProcessingOperation".casefold(): from .cancel_media_processing_operation import CancelMediaProcessingOperation @@ -1770,6 +1809,14 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .endpoint import Endpoint return Endpoint() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.endUserNotification".casefold(): + from .end_user_notification import EndUserNotification + + return EndUserNotification() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.endUserNotificationDetail".casefold(): + from .end_user_notification_detail import EndUserNotificationDetail + + return EndUserNotificationDetail() if mapping_value and mapping_value.casefold() == "#microsoft.graph.enrollmentConfigurationAssignment".casefold(): from .enrollment_configuration_assignment import EnrollmentConfigurationAssignment @@ -2111,6 +2158,14 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .item_attachment import ItemAttachment return ItemAttachment() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.landingPage".casefold(): + from .landing_page import LandingPage + + return LandingPage() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.landingPageDetail".casefold(): + from .landing_page_detail import LandingPageDetail + + return LandingPageDetail() if mapping_value and mapping_value.casefold() == "#microsoft.graph.learningAssignment".casefold(): from .learning_assignment import LearningAssignment @@ -2155,6 +2210,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .localized_notification_message import LocalizedNotificationMessage return LocalizedNotificationMessage() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.loginPage".casefold(): + from .login_page import LoginPage + + return LoginPage() if mapping_value and mapping_value.casefold() == "#microsoft.graph.longRunningOperation".casefold(): from .long_running_operation import LongRunningOperation @@ -2527,6 +2586,14 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .password_authentication_method import PasswordAuthenticationMethod return PasswordAuthenticationMethod() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.payload".casefold(): + from .payload import Payload + + return Payload() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.peopleAdminSettings".casefold(): + from .people_admin_settings import PeopleAdminSettings + + return PeopleAdminSettings() if mapping_value and mapping_value.casefold() == "#microsoft.graph.permission".casefold(): from .permission import Permission @@ -2683,6 +2750,54 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .print_usage_by_user import PrintUsageByUser return PrintUsageByUser() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroup".casefold(): + from .privileged_access_group import PrivilegedAccessGroup + + return PrivilegedAccessGroup() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentSchedule".casefold(): + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + return PrivilegedAccessGroupAssignmentSchedule() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance".casefold(): + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + return PrivilegedAccessGroupAssignmentScheduleInstance() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest".casefold(): + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + return PrivilegedAccessGroupAssignmentScheduleRequest() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilitySchedule".casefold(): + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return PrivilegedAccessGroupEligibilitySchedule() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance".casefold(): + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + return PrivilegedAccessGroupEligibilityScheduleInstance() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest".casefold(): + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + return PrivilegedAccessGroupEligibilityScheduleRequest() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessRoot".casefold(): + from .privileged_access_root import PrivilegedAccessRoot + + return PrivilegedAccessRoot() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessSchedule".casefold(): + from .privileged_access_schedule import PrivilegedAccessSchedule + + return PrivilegedAccessSchedule() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessScheduleInstance".casefold(): + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + + return PrivilegedAccessScheduleInstance() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessScheduleRequest".casefold(): + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + + return PrivilegedAccessScheduleRequest() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.profileCardProperty".casefold(): + from .profile_card_property import ProfileCardProperty + + return ProfileCardProperty() if mapping_value and mapping_value.casefold() == "#microsoft.graph.profilePhoto".casefold(): from .profile_photo import ProfilePhoto @@ -2711,6 +2826,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .request import Request return Request() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.resellerDelegatedAdminRelationship".casefold(): + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship + + return ResellerDelegatedAdminRelationship() if mapping_value and mapping_value.casefold() == "#microsoft.graph.resourceOperation".casefold(): from .resource_operation import ResourceOperation @@ -2924,10 +3043,18 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .security.hostname import Hostname return Hostname() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.hostPair".casefold(): + from .security.host_pair import HostPair + + return HostPair() if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.hostReputation".casefold(): from .security.host_reputation import HostReputation return HostReputation() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.hostSslCertificate".casefold(): + from .security.host_ssl_certificate import HostSslCertificate + + return HostSslCertificate() if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.hostTracker".casefold(): from .security.host_tracker import HostTracker @@ -2972,6 +3099,14 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .security.site_source import SiteSource return SiteSource() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.sslCertificate".casefold(): + from .security.ssl_certificate import SslCertificate + + return SslCertificate() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.subdomain".casefold(): + from .security.subdomain import Subdomain + + return Subdomain() if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.tag".casefold(): from .security.tag import Tag @@ -3008,6 +3143,18 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .security.vulnerability_component import VulnerabilityComponent return VulnerabilityComponent() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.whoisBaseRecord".casefold(): + from .security.whois_base_record import WhoisBaseRecord + + return WhoisBaseRecord() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.whoisHistoryRecord".casefold(): + from .security.whois_history_record import WhoisHistoryRecord + + return WhoisHistoryRecord() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.whoisRecord".casefold(): + from .security.whois_record import WhoisRecord + + return WhoisRecord() if mapping_value and mapping_value.casefold() == "#microsoft.graph.securityReportsRoot".casefold(): from .security_reports_root import SecurityReportsRoot @@ -3353,6 +3500,14 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> E from .token_lifetime_policy import TokenLifetimePolicy return TokenLifetimePolicy() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.training".casefold(): + from .training import Training + + return Training() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.trainingLanguageDetail".casefold(): + from .training_language_detail import TrainingLanguageDetail + + return TrainingLanguageDetail() if mapping_value and mapping_value.casefold() == "#microsoft.graph.trending".casefold(): from .trending import Trending @@ -3961,8 +4116,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .activity_based_timeout_policy import ActivityBasedTimeoutPolicy from .activity_history_item import ActivityHistoryItem from .add_large_gallery_view_operation import AddLargeGalleryViewOperation - from .admin_consent_request_policy import AdminConsentRequestPolicy from .administrative_unit import AdministrativeUnit + from .admin_consent_request_policy import AdminConsentRequestPolicy from .agreement import Agreement from .agreement_acceptance import AgreementAcceptance from .agreement_file import AgreementFile @@ -3982,24 +4137,25 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .android_work_profile_custom_configuration import AndroidWorkProfileCustomConfiguration from .android_work_profile_general_device_configuration import AndroidWorkProfileGeneralDeviceConfiguration from .anonymous_guest_conversation_member import AnonymousGuestConversationMember - from .app_catalogs import AppCatalogs - from .app_consent_approval_route import AppConsentApprovalRoute - from .app_consent_request import AppConsentRequest from .apple_device_features_configuration_base import AppleDeviceFeaturesConfigurationBase from .apple_managed_identity_provider import AppleManagedIdentityProvider from .apple_push_notification_certificate import ApplePushNotificationCertificate from .application import Application from .application_template import ApplicationTemplate + from .approval import Approval + from .approval_stage import ApprovalStage + from .app_catalogs import AppCatalogs + from .app_consent_approval_route import AppConsentApprovalRoute + from .app_consent_request import AppConsentRequest from .app_log_collection_request import AppLogCollectionRequest from .app_management_policy import AppManagementPolicy from .app_role_assignment import AppRoleAssignment - from .approval import Approval - from .approval_stage import ApprovalStage from .app_scope import AppScope from .associated_team_info import AssociatedTeamInfo from .attachment import Attachment from .attachment_base import AttachmentBase from .attachment_session import AttachmentSession + from .attack_simulation_operation import AttackSimulationOperation from .attack_simulation_root import AttackSimulationRoot from .attendance_record import AttendanceRecord from .attribute_mapping_function_schema import AttributeMappingFunctionSchema @@ -4012,10 +4168,10 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .authentication_context_class_reference import AuthenticationContextClassReference from .authentication_flows_policy import AuthenticationFlowsPolicy from .authentication_method import AuthenticationMethod - from .authentication_method_configuration import AuthenticationMethodConfiguration - from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_methods_policy import AuthenticationMethodsPolicy from .authentication_methods_root import AuthenticationMethodsRoot + from .authentication_method_configuration import AuthenticationMethodConfiguration + from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_method_target import AuthenticationMethodTarget from .authentication_strength_policy import AuthenticationStrengthPolicy from .authentication_strength_root import AuthenticationStrengthRoot @@ -4048,6 +4204,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .call_records.call_record import CallRecord from .call_records.segment import Segment from .call_records.session import Session + from .call_transcript import CallTranscript from .cancel_media_processing_operation import CancelMediaProcessingOperation from .certificate_based_auth_configuration import CertificateBasedAuthConfiguration from .change_tracked_entity import ChangeTrackedEntity @@ -4147,7 +4304,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .drive import Drive from .drive_item import DriveItem from .drive_item_version import DriveItemVersion - from .e_book_install_summary import EBookInstallSummary from .edge import Edge from .edition_upgrade_configuration import EditionUpgradeConfiguration from .education_assignment import EducationAssignment @@ -4172,6 +4328,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .email_file_assessment_request import EmailFileAssessmentRequest from .employee_experience_user import EmployeeExperienceUser from .endpoint import Endpoint + from .end_user_notification import EndUserNotification + from .end_user_notification_detail import EndUserNotificationDetail from .enrollment_configuration_assignment import EnrollmentConfigurationAssignment from .enrollment_troubleshooting_event import EnrollmentTroubleshootingEvent from .enterprise_code_signing_certificate import EnterpriseCodeSigningCertificate @@ -4192,6 +4350,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_connectors.identity import Identity from .external_connectors.schema import Schema from .external_domain_name import ExternalDomainName + from .e_book_install_summary import EBookInstallSummary from .feature_rollout_policy import FeatureRolloutPolicy from .federated_identity_credential import FederatedIdentityCredential from .fido2_authentication_method import Fido2AuthenticationMethod @@ -4235,12 +4394,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .internet_explorer_mode import InternetExplorerMode from .invitation import Invitation from .invite_participants_operation import InviteParticipantsOperation + from .iosi_pad_o_s_web_clip import IosiPadOSWebClip from .ios_certificate_profile import IosCertificateProfile from .ios_compliance_policy import IosCompliancePolicy from .ios_custom_configuration import IosCustomConfiguration from .ios_device_features_configuration import IosDeviceFeaturesConfiguration from .ios_general_device_configuration import IosGeneralDeviceConfiguration - from .iosi_pad_o_s_web_clip import IosiPadOSWebClip from .ios_lob_app import IosLobApp from .ios_lob_app_provisioning_configuration_assignment import IosLobAppProvisioningConfigurationAssignment from .ios_managed_app_protection import IosManagedAppProtection @@ -4257,6 +4416,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .item_activity_stat import ItemActivityStat from .item_analytics import ItemAnalytics from .item_attachment import ItemAttachment + from .landing_page import LandingPage + from .landing_page_detail import LandingPageDetail from .learning_assignment import LearningAssignment from .learning_content import LearningContent from .learning_course_activity import LearningCourseActivity @@ -4264,10 +4425,11 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .learning_self_initiated_course import LearningSelfInitiatedCourse from .license_details import LicenseDetails from .linked_resource import LinkedResource + from .list_ import List_ from .list_item import ListItem from .list_item_version import ListItemVersion - from .list_ import List_ from .localized_notification_message import LocalizedNotificationMessage + from .login_page import LoginPage from .long_running_operation import LongRunningOperation from .mac_o_s_compliance_policy import MacOSCompliancePolicy from .mac_o_s_custom_configuration import MacOSCustomConfiguration @@ -4331,7 +4493,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .named_location import NamedLocation from .notebook import Notebook from .notification_message_template import NotificationMessageTemplate - from .o_auth2_permission_grant import OAuth2PermissionGrant from .offer_shift_request import OfferShiftRequest from .office_graph_insights import OfficeGraphInsights from .onenote import Onenote @@ -4357,10 +4518,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .outlook_category import OutlookCategory from .outlook_item import OutlookItem from .outlook_user import OutlookUser + from .o_auth2_permission_grant import OAuth2PermissionGrant from .participant import Participant from .participant_joining_notification import ParticipantJoiningNotification from .participant_left_notification import ParticipantLeftNotification from .password_authentication_method import PasswordAuthenticationMethod + from .payload import Payload + from .people_admin_settings import PeopleAdminSettings from .permission import Permission from .permission_grant_condition_set import PermissionGrantConditionSet from .permission_grant_policy import PermissionGrantPolicy @@ -4384,12 +4548,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .policy_root import PolicyRoot from .post import Post from .presence import Presence - from .print_connector import PrintConnector - from .print_document import PrintDocument from .printer import Printer from .printer_base import PrinterBase from .printer_create_operation import PrinterCreateOperation from .printer_share import PrinterShare + from .print_connector import PrintConnector + from .print_document import PrintDocument from .print_job import PrintJob from .print_operation import PrintOperation from .print_service import PrintService @@ -4400,6 +4564,18 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .print_usage import PrintUsage from .print_usage_by_printer import PrintUsageByPrinter from .print_usage_by_user import PrintUsageByUser + from .privileged_access_group import PrivilegedAccessGroup + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .privileged_access_root import PrivilegedAccessRoot + from .privileged_access_schedule import PrivilegedAccessSchedule + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + from .profile_card_property import ProfileCardProperty from .profile_photo import ProfilePhoto from .provisioning_object_summary import ProvisioningObjectSummary from .rbac_application import RbacApplication @@ -4407,14 +4583,15 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .reference_attachment import ReferenceAttachment from .remote_assistance_partner import RemoteAssistancePartner from .request import Request + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship from .resource_operation import ResourceOperation from .resource_specific_permission_grant import ResourceSpecificPermissionGrant from .rich_long_running_operation import RichLongRunningOperation - from .risk_detection import RiskDetection from .risky_service_principal import RiskyServicePrincipal from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .risky_user import RiskyUser from .risky_user_history_item import RiskyUserHistoryItem + from .risk_detection import RiskDetection from .role_assignment import RoleAssignment from .role_definition import RoleDefinition from .room import Room @@ -4435,8 +4612,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.article_indicator import ArticleIndicator from .security.artifact import Artifact from .security.case import Case - from .security.case_operation import CaseOperation from .security.cases_root import CasesRoot + from .security.case_operation import CaseOperation from .security.data_set import DataSet from .security.data_source import DataSource from .security.data_source_container import DataSourceContainer @@ -4456,10 +4633,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.ediscovery_search import EdiscoverySearch from .security.ediscovery_tag_operation import EdiscoveryTagOperation from .security.host import Host + from .security.hostname import Hostname from .security.host_component import HostComponent from .security.host_cookie import HostCookie - from .security.hostname import Hostname + from .security.host_pair import HostPair from .security.host_reputation import HostReputation + from .security.host_ssl_certificate import HostSslCertificate from .security.host_tracker import HostTracker from .security.incident import Incident from .security.indicator import Indicator @@ -4472,6 +4651,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.search import Search from .security.security import Security from .security.site_source import SiteSource + from .security.ssl_certificate import SslCertificate + from .security.subdomain import Subdomain from .security.tag import Tag from .security.threat_intelligence import ThreatIntelligence from .security.triggers_root import TriggersRoot @@ -4481,6 +4662,9 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.user_source import UserSource from .security.vulnerability import Vulnerability from .security.vulnerability_component import VulnerabilityComponent + from .security.whois_base_record import WhoisBaseRecord + from .security.whois_history_record import WhoisHistoryRecord + from .security.whois_record import WhoisRecord from .security_reports_root import SecurityReportsRoot from .service_announcement import ServiceAnnouncement from .service_announcement_attachment import ServiceAnnouncementAttachment @@ -4530,7 +4714,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .targeted_managed_app_protection import TargetedManagedAppProtection from .task_file_attachment import TaskFileAttachment from .team import Team - from .team_info import TeamInfo from .teams_app import TeamsApp from .teams_app_definition import TeamsAppDefinition from .teams_app_installation import TeamsAppInstallation @@ -4543,6 +4726,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teamwork_hosted_content import TeamworkHostedContent from .teamwork_tag import TeamworkTag from .teamwork_tag_member import TeamworkTagMember + from .team_info import TeamInfo from .telecom_expense_management_partner import TelecomExpenseManagementPartner from .temporary_access_pass_authentication_method import TemporaryAccessPassAuthenticationMethod from .temporary_access_pass_authentication_method_configuration import TemporaryAccessPassAuthenticationMethodConfiguration @@ -4567,6 +4751,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .todo_task_list import TodoTaskList from .token_issuance_policy import TokenIssuancePolicy from .token_lifetime_policy import TokenLifetimePolicy + from .training import Training + from .training_language_detail import TrainingLanguageDetail from .trending import Trending from .unified_rbac_resource_action import UnifiedRbacResourceAction from .unified_rbac_resource_namespace import UnifiedRbacResourceNamespace @@ -4671,8 +4857,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .workbook_chart_axis_format import WorkbookChartAxisFormat from .workbook_chart_axis_title import WorkbookChartAxisTitle from .workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat - from .workbook_chart_data_label_format import WorkbookChartDataLabelFormat from .workbook_chart_data_labels import WorkbookChartDataLabels + from .workbook_chart_data_label_format import WorkbookChartDataLabelFormat from .workbook_chart_fill import WorkbookChartFill from .workbook_chart_font import WorkbookChartFont from .workbook_chart_gridlines import WorkbookChartGridlines @@ -4690,8 +4876,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .workbook_comment_reply import WorkbookCommentReply from .workbook_filter import WorkbookFilter from .workbook_format_protection import WorkbookFormatProtection - from .workbook_function_result import WorkbookFunctionResult from .workbook_functions import WorkbookFunctions + from .workbook_function_result import WorkbookFunctionResult from .workbook_named_item import WorkbookNamedItem from .workbook_operation import WorkbookOperation from .workbook_pivot_table import WorkbookPivotTable @@ -4740,8 +4926,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .activity_based_timeout_policy import ActivityBasedTimeoutPolicy from .activity_history_item import ActivityHistoryItem from .add_large_gallery_view_operation import AddLargeGalleryViewOperation - from .admin_consent_request_policy import AdminConsentRequestPolicy from .administrative_unit import AdministrativeUnit + from .admin_consent_request_policy import AdminConsentRequestPolicy from .agreement import Agreement from .agreement_acceptance import AgreementAcceptance from .agreement_file import AgreementFile @@ -4761,24 +4947,25 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .android_work_profile_custom_configuration import AndroidWorkProfileCustomConfiguration from .android_work_profile_general_device_configuration import AndroidWorkProfileGeneralDeviceConfiguration from .anonymous_guest_conversation_member import AnonymousGuestConversationMember - from .app_catalogs import AppCatalogs - from .app_consent_approval_route import AppConsentApprovalRoute - from .app_consent_request import AppConsentRequest from .apple_device_features_configuration_base import AppleDeviceFeaturesConfigurationBase from .apple_managed_identity_provider import AppleManagedIdentityProvider from .apple_push_notification_certificate import ApplePushNotificationCertificate from .application import Application from .application_template import ApplicationTemplate + from .approval import Approval + from .approval_stage import ApprovalStage + from .app_catalogs import AppCatalogs + from .app_consent_approval_route import AppConsentApprovalRoute + from .app_consent_request import AppConsentRequest from .app_log_collection_request import AppLogCollectionRequest from .app_management_policy import AppManagementPolicy from .app_role_assignment import AppRoleAssignment - from .approval import Approval - from .approval_stage import ApprovalStage from .app_scope import AppScope from .associated_team_info import AssociatedTeamInfo from .attachment import Attachment from .attachment_base import AttachmentBase from .attachment_session import AttachmentSession + from .attack_simulation_operation import AttackSimulationOperation from .attack_simulation_root import AttackSimulationRoot from .attendance_record import AttendanceRecord from .attribute_mapping_function_schema import AttributeMappingFunctionSchema @@ -4791,10 +4978,10 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .authentication_context_class_reference import AuthenticationContextClassReference from .authentication_flows_policy import AuthenticationFlowsPolicy from .authentication_method import AuthenticationMethod - from .authentication_method_configuration import AuthenticationMethodConfiguration - from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_methods_policy import AuthenticationMethodsPolicy from .authentication_methods_root import AuthenticationMethodsRoot + from .authentication_method_configuration import AuthenticationMethodConfiguration + from .authentication_method_mode_detail import AuthenticationMethodModeDetail from .authentication_method_target import AuthenticationMethodTarget from .authentication_strength_policy import AuthenticationStrengthPolicy from .authentication_strength_root import AuthenticationStrengthRoot @@ -4827,6 +5014,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .call_records.call_record import CallRecord from .call_records.segment import Segment from .call_records.session import Session + from .call_transcript import CallTranscript from .cancel_media_processing_operation import CancelMediaProcessingOperation from .certificate_based_auth_configuration import CertificateBasedAuthConfiguration from .change_tracked_entity import ChangeTrackedEntity @@ -4926,7 +5114,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .drive import Drive from .drive_item import DriveItem from .drive_item_version import DriveItemVersion - from .e_book_install_summary import EBookInstallSummary from .edge import Edge from .edition_upgrade_configuration import EditionUpgradeConfiguration from .education_assignment import EducationAssignment @@ -4951,6 +5138,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .email_file_assessment_request import EmailFileAssessmentRequest from .employee_experience_user import EmployeeExperienceUser from .endpoint import Endpoint + from .end_user_notification import EndUserNotification + from .end_user_notification_detail import EndUserNotificationDetail from .enrollment_configuration_assignment import EnrollmentConfigurationAssignment from .enrollment_troubleshooting_event import EnrollmentTroubleshootingEvent from .enterprise_code_signing_certificate import EnterpriseCodeSigningCertificate @@ -4971,6 +5160,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_connectors.identity import Identity from .external_connectors.schema import Schema from .external_domain_name import ExternalDomainName + from .e_book_install_summary import EBookInstallSummary from .feature_rollout_policy import FeatureRolloutPolicy from .federated_identity_credential import FederatedIdentityCredential from .fido2_authentication_method import Fido2AuthenticationMethod @@ -5014,12 +5204,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .internet_explorer_mode import InternetExplorerMode from .invitation import Invitation from .invite_participants_operation import InviteParticipantsOperation + from .iosi_pad_o_s_web_clip import IosiPadOSWebClip from .ios_certificate_profile import IosCertificateProfile from .ios_compliance_policy import IosCompliancePolicy from .ios_custom_configuration import IosCustomConfiguration from .ios_device_features_configuration import IosDeviceFeaturesConfiguration from .ios_general_device_configuration import IosGeneralDeviceConfiguration - from .iosi_pad_o_s_web_clip import IosiPadOSWebClip from .ios_lob_app import IosLobApp from .ios_lob_app_provisioning_configuration_assignment import IosLobAppProvisioningConfigurationAssignment from .ios_managed_app_protection import IosManagedAppProtection @@ -5036,6 +5226,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .item_activity_stat import ItemActivityStat from .item_analytics import ItemAnalytics from .item_attachment import ItemAttachment + from .landing_page import LandingPage + from .landing_page_detail import LandingPageDetail from .learning_assignment import LearningAssignment from .learning_content import LearningContent from .learning_course_activity import LearningCourseActivity @@ -5043,10 +5235,11 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .learning_self_initiated_course import LearningSelfInitiatedCourse from .license_details import LicenseDetails from .linked_resource import LinkedResource + from .list_ import List_ from .list_item import ListItem from .list_item_version import ListItemVersion - from .list_ import List_ from .localized_notification_message import LocalizedNotificationMessage + from .login_page import LoginPage from .long_running_operation import LongRunningOperation from .mac_o_s_compliance_policy import MacOSCompliancePolicy from .mac_o_s_custom_configuration import MacOSCustomConfiguration @@ -5110,7 +5303,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .named_location import NamedLocation from .notebook import Notebook from .notification_message_template import NotificationMessageTemplate - from .o_auth2_permission_grant import OAuth2PermissionGrant from .offer_shift_request import OfferShiftRequest from .office_graph_insights import OfficeGraphInsights from .onenote import Onenote @@ -5136,10 +5328,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .outlook_category import OutlookCategory from .outlook_item import OutlookItem from .outlook_user import OutlookUser + from .o_auth2_permission_grant import OAuth2PermissionGrant from .participant import Participant from .participant_joining_notification import ParticipantJoiningNotification from .participant_left_notification import ParticipantLeftNotification from .password_authentication_method import PasswordAuthenticationMethod + from .payload import Payload + from .people_admin_settings import PeopleAdminSettings from .permission import Permission from .permission_grant_condition_set import PermissionGrantConditionSet from .permission_grant_policy import PermissionGrantPolicy @@ -5163,12 +5358,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .policy_root import PolicyRoot from .post import Post from .presence import Presence - from .print_connector import PrintConnector - from .print_document import PrintDocument from .printer import Printer from .printer_base import PrinterBase from .printer_create_operation import PrinterCreateOperation from .printer_share import PrinterShare + from .print_connector import PrintConnector + from .print_document import PrintDocument from .print_job import PrintJob from .print_operation import PrintOperation from .print_service import PrintService @@ -5179,6 +5374,18 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .print_usage import PrintUsage from .print_usage_by_printer import PrintUsageByPrinter from .print_usage_by_user import PrintUsageByUser + from .privileged_access_group import PrivilegedAccessGroup + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .privileged_access_root import PrivilegedAccessRoot + from .privileged_access_schedule import PrivilegedAccessSchedule + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + from .profile_card_property import ProfileCardProperty from .profile_photo import ProfilePhoto from .provisioning_object_summary import ProvisioningObjectSummary from .rbac_application import RbacApplication @@ -5186,14 +5393,15 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .reference_attachment import ReferenceAttachment from .remote_assistance_partner import RemoteAssistancePartner from .request import Request + from .reseller_delegated_admin_relationship import ResellerDelegatedAdminRelationship from .resource_operation import ResourceOperation from .resource_specific_permission_grant import ResourceSpecificPermissionGrant from .rich_long_running_operation import RichLongRunningOperation - from .risk_detection import RiskDetection from .risky_service_principal import RiskyServicePrincipal from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .risky_user import RiskyUser from .risky_user_history_item import RiskyUserHistoryItem + from .risk_detection import RiskDetection from .role_assignment import RoleAssignment from .role_definition import RoleDefinition from .room import Room @@ -5214,8 +5422,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.article_indicator import ArticleIndicator from .security.artifact import Artifact from .security.case import Case - from .security.case_operation import CaseOperation from .security.cases_root import CasesRoot + from .security.case_operation import CaseOperation from .security.data_set import DataSet from .security.data_source import DataSource from .security.data_source_container import DataSourceContainer @@ -5235,10 +5443,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.ediscovery_search import EdiscoverySearch from .security.ediscovery_tag_operation import EdiscoveryTagOperation from .security.host import Host + from .security.hostname import Hostname from .security.host_component import HostComponent from .security.host_cookie import HostCookie - from .security.hostname import Hostname + from .security.host_pair import HostPair from .security.host_reputation import HostReputation + from .security.host_ssl_certificate import HostSslCertificate from .security.host_tracker import HostTracker from .security.incident import Incident from .security.indicator import Indicator @@ -5251,6 +5461,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.search import Search from .security.security import Security from .security.site_source import SiteSource + from .security.ssl_certificate import SslCertificate + from .security.subdomain import Subdomain from .security.tag import Tag from .security.threat_intelligence import ThreatIntelligence from .security.triggers_root import TriggersRoot @@ -5260,6 +5472,9 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security.user_source import UserSource from .security.vulnerability import Vulnerability from .security.vulnerability_component import VulnerabilityComponent + from .security.whois_base_record import WhoisBaseRecord + from .security.whois_history_record import WhoisHistoryRecord + from .security.whois_record import WhoisRecord from .security_reports_root import SecurityReportsRoot from .service_announcement import ServiceAnnouncement from .service_announcement_attachment import ServiceAnnouncementAttachment @@ -5309,7 +5524,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .targeted_managed_app_protection import TargetedManagedAppProtection from .task_file_attachment import TaskFileAttachment from .team import Team - from .team_info import TeamInfo from .teams_app import TeamsApp from .teams_app_definition import TeamsAppDefinition from .teams_app_installation import TeamsAppInstallation @@ -5322,6 +5536,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teamwork_hosted_content import TeamworkHostedContent from .teamwork_tag import TeamworkTag from .teamwork_tag_member import TeamworkTagMember + from .team_info import TeamInfo from .telecom_expense_management_partner import TelecomExpenseManagementPartner from .temporary_access_pass_authentication_method import TemporaryAccessPassAuthenticationMethod from .temporary_access_pass_authentication_method_configuration import TemporaryAccessPassAuthenticationMethodConfiguration @@ -5346,6 +5561,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .todo_task_list import TodoTaskList from .token_issuance_policy import TokenIssuancePolicy from .token_lifetime_policy import TokenLifetimePolicy + from .training import Training + from .training_language_detail import TrainingLanguageDetail from .trending import Trending from .unified_rbac_resource_action import UnifiedRbacResourceAction from .unified_rbac_resource_namespace import UnifiedRbacResourceNamespace @@ -5450,8 +5667,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .workbook_chart_axis_format import WorkbookChartAxisFormat from .workbook_chart_axis_title import WorkbookChartAxisTitle from .workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat - from .workbook_chart_data_label_format import WorkbookChartDataLabelFormat from .workbook_chart_data_labels import WorkbookChartDataLabels + from .workbook_chart_data_label_format import WorkbookChartDataLabelFormat from .workbook_chart_fill import WorkbookChartFill from .workbook_chart_font import WorkbookChartFont from .workbook_chart_gridlines import WorkbookChartGridlines @@ -5469,8 +5686,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .workbook_comment_reply import WorkbookCommentReply from .workbook_filter import WorkbookFilter from .workbook_format_protection import WorkbookFormatProtection - from .workbook_function_result import WorkbookFunctionResult from .workbook_functions import WorkbookFunctions + from .workbook_function_result import WorkbookFunctionResult from .workbook_named_item import WorkbookNamedItem from .workbook_operation import WorkbookOperation from .workbook_pivot_table import WorkbookPivotTable @@ -5492,7 +5709,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -5505,7 +5722,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/event_message_detail.py b/msgraph/generated/models/event_message_detail.py index 1f074af47dc..93ab264fd3f 100644 --- a/msgraph/generated/models/event_message_detail.py +++ b/msgraph/generated/models/event_message_detail.py @@ -25,15 +25,15 @@ from .message_pinned_event_message_detail import MessagePinnedEventMessageDetail from .message_unpinned_event_message_detail import MessageUnpinnedEventMessageDetail from .tab_updated_event_message_detail import TabUpdatedEventMessageDetail + from .teams_app_installed_event_message_detail import TeamsAppInstalledEventMessageDetail + from .teams_app_removed_event_message_detail import TeamsAppRemovedEventMessageDetail + from .teams_app_upgraded_event_message_detail import TeamsAppUpgradedEventMessageDetail from .team_archived_event_message_detail import TeamArchivedEventMessageDetail from .team_created_event_message_detail import TeamCreatedEventMessageDetail from .team_description_updated_event_message_detail import TeamDescriptionUpdatedEventMessageDetail from .team_joining_disabled_event_message_detail import TeamJoiningDisabledEventMessageDetail from .team_joining_enabled_event_message_detail import TeamJoiningEnabledEventMessageDetail from .team_renamed_event_message_detail import TeamRenamedEventMessageDetail - from .teams_app_installed_event_message_detail import TeamsAppInstalledEventMessageDetail - from .teams_app_removed_event_message_detail import TeamsAppRemovedEventMessageDetail - from .teams_app_upgraded_event_message_detail import TeamsAppUpgradedEventMessageDetail from .team_unarchived_event_message_detail import TeamUnarchivedEventMessageDetail @dataclass @@ -206,15 +206,15 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .message_pinned_event_message_detail import MessagePinnedEventMessageDetail from .message_unpinned_event_message_detail import MessageUnpinnedEventMessageDetail from .tab_updated_event_message_detail import TabUpdatedEventMessageDetail + from .teams_app_installed_event_message_detail import TeamsAppInstalledEventMessageDetail + from .teams_app_removed_event_message_detail import TeamsAppRemovedEventMessageDetail + from .teams_app_upgraded_event_message_detail import TeamsAppUpgradedEventMessageDetail from .team_archived_event_message_detail import TeamArchivedEventMessageDetail from .team_created_event_message_detail import TeamCreatedEventMessageDetail from .team_description_updated_event_message_detail import TeamDescriptionUpdatedEventMessageDetail from .team_joining_disabled_event_message_detail import TeamJoiningDisabledEventMessageDetail from .team_joining_enabled_event_message_detail import TeamJoiningEnabledEventMessageDetail from .team_renamed_event_message_detail import TeamRenamedEventMessageDetail - from .teams_app_installed_event_message_detail import TeamsAppInstalledEventMessageDetail - from .teams_app_removed_event_message_detail import TeamsAppRemovedEventMessageDetail - from .teams_app_upgraded_event_message_detail import TeamsAppUpgradedEventMessageDetail from .team_unarchived_event_message_detail import TeamUnarchivedEventMessageDetail from .call_ended_event_message_detail import CallEndedEventMessageDetail @@ -237,19 +237,19 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .message_pinned_event_message_detail import MessagePinnedEventMessageDetail from .message_unpinned_event_message_detail import MessageUnpinnedEventMessageDetail from .tab_updated_event_message_detail import TabUpdatedEventMessageDetail + from .teams_app_installed_event_message_detail import TeamsAppInstalledEventMessageDetail + from .teams_app_removed_event_message_detail import TeamsAppRemovedEventMessageDetail + from .teams_app_upgraded_event_message_detail import TeamsAppUpgradedEventMessageDetail from .team_archived_event_message_detail import TeamArchivedEventMessageDetail from .team_created_event_message_detail import TeamCreatedEventMessageDetail from .team_description_updated_event_message_detail import TeamDescriptionUpdatedEventMessageDetail from .team_joining_disabled_event_message_detail import TeamJoiningDisabledEventMessageDetail from .team_joining_enabled_event_message_detail import TeamJoiningEnabledEventMessageDetail from .team_renamed_event_message_detail import TeamRenamedEventMessageDetail - from .teams_app_installed_event_message_detail import TeamsAppInstalledEventMessageDetail - from .teams_app_removed_event_message_detail import TeamsAppRemovedEventMessageDetail - from .teams_app_upgraded_event_message_detail import TeamsAppUpgradedEventMessageDetail from .team_unarchived_event_message_detail import TeamUnarchivedEventMessageDetail fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -261,7 +261,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/exclude_target.py b/msgraph/generated/models/exclude_target.py index dbb31719b8f..1396b0ea725 100644 --- a/msgraph/generated/models/exclude_target.py +++ b/msgraph/generated/models/exclude_target.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "targetType": lambda n : setattr(self, 'target_type', n.get_enum_value(AuthenticationMethodTargetType)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("targetType", self.target_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/expiration_pattern.py b/msgraph/generated/models/expiration_pattern.py index 8bdcadfb62d..0adf33a6e57 100644 --- a/msgraph/generated/models/expiration_pattern.py +++ b/msgraph/generated/models/expiration_pattern.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "duration": lambda n : setattr(self, 'duration', n.get_timedelta_value()), "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(ExpirationPatternType)), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_timedelta_value("duration", self.duration) writer.write_datetime_value("endDateTime", self.end_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/expression_input_object.py b/msgraph/generated/models/expression_input_object.py index 0e1b79963ae..5b60e3b9663 100644 --- a/msgraph/generated/models/expression_input_object.py +++ b/msgraph/generated/models/expression_input_object.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "definition": lambda n : setattr(self, 'definition', n.get_object_value(ObjectDefinition)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "properties": lambda n : setattr(self, 'properties', n.get_collection_of_object_values(StringKeyObjectValuePair)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("definition", self.definition) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("properties", self.properties) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/extension_schema_property.py b/msgraph/generated/models/extension_schema_property.py index 70f2f021e93..eae9c93eb4a 100644 --- a/msgraph/generated/models/extension_schema_property.py +++ b/msgraph/generated/models/extension_schema_property.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/acl.py b/msgraph/generated/models/external_connectors/acl.py index 84da726fffb..0da228ff04d 100644 --- a/msgraph/generated/models/external_connectors/acl.py +++ b/msgraph/generated/models/external_connectors/acl.py @@ -21,7 +21,7 @@ class Acl(AdditionalDataHolder, BackedModel, Parsable): odata_type: Optional[str] = None # The type property type: Optional[AclType] = None - # The unique identifer of the identity. In case of Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. In case of external groups value is set to the ID of the externalGroup + # The unique identifer of the identity. For Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. For external groups value is set to the ID of the externalGroup value: Optional[str] = None @staticmethod @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "accessType": lambda n : setattr(self, 'access_type', n.get_enum_value(AccessType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(AclType)), "value": lambda n : setattr(self, 'value', n.get_str_value()), } @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("accessType", self.access_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/activity_settings.py b/msgraph/generated/models/external_connectors/activity_settings.py index 47cea3ef56b..125922b7a75 100644 --- a/msgraph/generated/models/external_connectors/activity_settings.py +++ b/msgraph/generated/models/external_connectors/activity_settings.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .url_to_item_resolver_base import UrlToItemResolverBase fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "urlToItemResolvers": lambda n : setattr(self, 'url_to_item_resolvers', n.get_collection_of_object_values(UrlToItemResolverBase)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("urlToItemResolvers", self.url_to_item_resolvers) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/configuration.py b/msgraph/generated/models/external_connectors/configuration.py index 76859327724..bf64ed4b992 100644 --- a/msgraph/generated/models/external_connectors/configuration.py +++ b/msgraph/generated/models/external_connectors/configuration.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "authorizedAppIds": lambda n : setattr(self, 'authorized_app_ids', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("authorizedAppIds", self.authorized_app_ids) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/display_template.py b/msgraph/generated/models/external_connectors/display_template.py index e3fcd99b629..bf06c72f8ad 100644 --- a/msgraph/generated/models/external_connectors/display_template.py +++ b/msgraph/generated/models/external_connectors/display_template.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), "layout": lambda n : setattr(self, 'layout', n.get_object_value(Json)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "priority": lambda n : setattr(self, 'priority', n.get_int_value()), "rules": lambda n : setattr(self, 'rules', n.get_collection_of_object_values(PropertyRule)), } @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) writer.write_object_value("layout", self.layout) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("priority", self.priority) writer.write_collection_of_object_values("rules", self.rules) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/external.py b/msgraph/generated/models/external_connectors/external.py index 529f80d0b9e..5312f8c2ffc 100644 --- a/msgraph/generated/models/external_connectors/external.py +++ b/msgraph/generated/models/external_connectors/external.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "connections": lambda n : setattr(self, 'connections', n.get_collection_of_object_values(ExternalConnection)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("connections", self.connections) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/external_item_content.py b/msgraph/generated/models/external_connectors/external_item_content.py index 632dc012709..bd83445f8f5 100644 --- a/msgraph/generated/models/external_connectors/external_item_content.py +++ b/msgraph/generated/models/external_connectors/external_item_content.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_item_content_type import ExternalItemContentType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(ExternalItemContentType)), "value": lambda n : setattr(self, 'value', n.get_str_value()), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/label.py b/msgraph/generated/models/external_connectors/label.py index 2eef31fc4e8..cb258999fbf 100644 --- a/msgraph/generated/models/external_connectors/label.py +++ b/msgraph/generated/models/external_connectors/label.py @@ -11,4 +11,5 @@ class Label(str, Enum): FileName = "fileName", FileExtension = "fileExtension", UnknownFutureValue = "unknownFutureValue", + IconUrl = "iconUrl", diff --git a/msgraph/generated/models/external_connectors/properties.py b/msgraph/generated/models/external_connectors/properties.py index 60b99fdb74f..9f353553157 100644 --- a/msgraph/generated/models/external_connectors/properties.py +++ b/msgraph/generated/models/external_connectors/properties.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/property_.py b/msgraph/generated/models/external_connectors/property_.py index 6b3701bae4f..5035e7ed2cd 100644 --- a/msgraph/generated/models/external_connectors/property_.py +++ b/msgraph/generated/models/external_connectors/property_.py @@ -15,7 +15,7 @@ class Property_(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) - # A set of aliases or a friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. + # A set of aliases or a friendly name for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. aliases: Optional[List[str]] = None # Specifies if the property is queryable. Queryable properties can be used in Keyword Query Language (KQL) queries. Optional. is_queryable: Optional[bool] = None @@ -23,9 +23,9 @@ class Property_(AdditionalDataHolder, BackedModel, Parsable): is_refinable: Optional[bool] = None # Specifies if the property is retrievable. Retrievable properties are returned in the result set when items are returned by the search API. Retrievable properties are also available to add to the display template used to render search results. Optional. is_retrievable: Optional[bool] = None - # Specifies if the property is searchable. Only properties of type String or StringCollection can be searchable. Non-searchable properties are not added to the search index. Optional. + # Specifies if the property is searchable. Only properties of type String or StringCollection can be searchable. Nonsearchable properties aren't added to the search index. Optional. is_searchable: Optional[bool] = None - # Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (e.g. better relevance). The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, iconUrl, unknownFutureValue. Optional. + # Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (for example, better relevance). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl. You must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: iconUrl. labels: Optional[List[Label]] = None # The name of the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Required. name: Optional[str] = None @@ -64,7 +64,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isSearchable": lambda n : setattr(self, 'is_searchable', n.get_bool_value()), "labels": lambda n : setattr(self, 'labels', n.get_collection_of_enum_values(Label)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(PropertyType)), } return fields @@ -84,7 +84,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isSearchable", self.is_searchable) writer.write_collection_of_enum_values("labels", self.labels) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/property_rule.py b/msgraph/generated/models/external_connectors/property_rule.py index f1a7f42e85e..fc768d71c9c 100644 --- a/msgraph/generated/models/external_connectors/property_rule.py +++ b/msgraph/generated/models/external_connectors/property_rule.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .rule_operation import RuleOperation fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operation": lambda n : setattr(self, 'operation', n.get_enum_value(RuleOperation)), "property": lambda n : setattr(self, 'property_', n.get_str_value()), "values": lambda n : setattr(self, 'values', n.get_collection_of_primitive_values(str)), @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("operation", self.operation) writer.write_str_value("property", self.property_) writer.write_collection_of_primitive_values("values", self.values) diff --git a/msgraph/generated/models/external_connectors/search_settings.py b/msgraph/generated/models/external_connectors/search_settings.py index cf0ea49868d..196bac60cee 100644 --- a/msgraph/generated/models/external_connectors/search_settings.py +++ b/msgraph/generated/models/external_connectors/search_settings.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .display_template import DisplayTemplate fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "searchResultTemplates": lambda n : setattr(self, 'search_result_templates', n.get_collection_of_object_values(DisplayTemplate)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("searchResultTemplates", self.search_result_templates) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/url_match_info.py b/msgraph/generated/models/external_connectors/url_match_info.py index 68f363aeac1..6118c44bb70 100644 --- a/msgraph/generated/models/external_connectors/url_match_info.py +++ b/msgraph/generated/models/external_connectors/url_match_info.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "baseUrls": lambda n : setattr(self, 'base_urls', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "urlPattern": lambda n : setattr(self, 'url_pattern', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("baseUrls", self.base_urls) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("urlPattern", self.url_pattern) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_connectors/url_to_item_resolver_base.py b/msgraph/generated/models/external_connectors/url_to_item_resolver_base.py index 165b4f884b0..fc4e0baae95 100644 --- a/msgraph/generated/models/external_connectors/url_to_item_resolver_base.py +++ b/msgraph/generated/models/external_connectors/url_to_item_resolver_base.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .item_id_resolver import ItemIdResolver fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "priority": lambda n : setattr(self, 'priority', n.get_int_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("priority", self.priority) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/external_link.py b/msgraph/generated/models/external_link.py index f8ba8ffcac3..f8f8e6cf63b 100644 --- a/msgraph/generated/models/external_link.py +++ b/msgraph/generated/models/external_link.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "href": lambda n : setattr(self, 'href', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("href", self.href) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/extract_sensitivity_labels_result.py b/msgraph/generated/models/extract_sensitivity_labels_result.py index 414e1b576c0..99e4552fd57 100644 --- a/msgraph/generated/models/extract_sensitivity_labels_result.py +++ b/msgraph/generated/models/extract_sensitivity_labels_result.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "labels": lambda n : setattr(self, 'labels', n.get_collection_of_object_values(SensitivityLabelAssignment)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("labels", self.labels) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/feature_target.py b/msgraph/generated/models/feature_target.py index 118c6b3572b..96145b3f1a1 100644 --- a/msgraph/generated/models/feature_target.py +++ b/msgraph/generated/models/feature_target.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "targetType": lambda n : setattr(self, 'target_type', n.get_enum_value(FeatureTargetType)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("targetType", self.target_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/fido2_key_restrictions.py b/msgraph/generated/models/fido2_key_restrictions.py index c743dd36993..4cb191fea5f 100644 --- a/msgraph/generated/models/fido2_key_restrictions.py +++ b/msgraph/generated/models/fido2_key_restrictions.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "aaGuids": lambda n : setattr(self, 'aa_guids', n.get_collection_of_primitive_values(str)), "enforcementType": lambda n : setattr(self, 'enforcement_type', n.get_enum_value(Fido2RestrictionEnforcementType)), "isEnforced": lambda n : setattr(self, 'is_enforced', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("aaGuids", self.aa_guids) writer.write_enum_value("enforcementType", self.enforcement_type) writer.write_bool_value("isEnforced", self.is_enforced) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/file.py b/msgraph/generated/models/file.py index e6d7423b74e..172f9d103af 100644 --- a/msgraph/generated/models/file.py +++ b/msgraph/generated/models/file.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hashes": lambda n : setattr(self, 'hashes', n.get_object_value(Hashes)), "mimeType": lambda n : setattr(self, 'mime_type', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "processingMetadata": lambda n : setattr(self, 'processing_metadata', n.get_bool_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("hashes", self.hashes) writer.write_str_value("mimeType", self.mime_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("processingMetadata", self.processing_metadata) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/file_assessment_request.py b/msgraph/generated/models/file_assessment_request.py index 57d16a9e5ce..9fc0d4dd9a7 100644 --- a/msgraph/generated/models/file_assessment_request.py +++ b/msgraph/generated/models/file_assessment_request.py @@ -12,7 +12,7 @@ class FileAssessmentRequest(ThreatAssessmentRequest): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.fileAssessmentRequest" - # Base64 encoded file content. The file content cannot fetch back because it isn't stored. + # Base64 encoded file content. The file content can't fetch back because it isn't stored. content_data: Optional[str] = None # The file name. file_name: Optional[str] = None diff --git a/msgraph/generated/models/file_encryption_info.py b/msgraph/generated/models/file_encryption_info.py new file mode 100644 index 00000000000..5ad1a4482a5 --- /dev/null +++ b/msgraph/generated/models/file_encryption_info.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class FileEncryptionInfo(AdditionalDataHolder, BackedModel, Parsable): + """ + Contains properties for file encryption information for the content version of a line of business app. + """ + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The key used to encrypt the file content. + encryption_key: Optional[bytes] = None + # The file digest prior to encryption. ProfileVersion1 requires a non-null FileDigest. + file_digest: Optional[bytes] = None + # The file digest algorithm. ProfileVersion1 currently only supports SHA256 for the FileDigestAlgorithm. + file_digest_algorithm: Optional[str] = None + # The initialization vector (IV) used for the encryption algorithm. Must be 16 bytes. + initialization_vector: Optional[bytes] = None + # The hash of the concatenation of the IV and encrypted file content. Must be 32 bytes. + mac: Optional[bytes] = None + # The key used to compute the message authentication code of the concatenation of the IV and encrypted file content. Must be 32 bytes. + mac_key: Optional[bytes] = None + # The OdataType property + odata_type: Optional[str] = None + # The profile identifier. Maps to the strategy used to encrypt the file. Currently, only ProfileVersion1 is supported. + profile_identifier: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FileEncryptionInfo: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FileEncryptionInfo + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FileEncryptionInfo() + + 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]] = { + "encryptionKey": lambda n : setattr(self, 'encryption_key', n.get_bytes_value()), + "fileDigest": lambda n : setattr(self, 'file_digest', n.get_bytes_value()), + "fileDigestAlgorithm": lambda n : setattr(self, 'file_digest_algorithm', n.get_str_value()), + "initializationVector": lambda n : setattr(self, 'initialization_vector', n.get_bytes_value()), + "mac": lambda n : setattr(self, 'mac', n.get_bytes_value()), + "macKey": lambda n : setattr(self, 'mac_key', n.get_bytes_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "profileIdentifier": lambda n : setattr(self, 'profile_identifier', 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_bytes_value("encryptionKey", self.encryption_key) + writer.write_bytes_value("fileDigest", self.file_digest) + writer.write_str_value("fileDigestAlgorithm", self.file_digest_algorithm) + writer.write_bytes_value("initializationVector", self.initialization_vector) + writer.write_bytes_value("mac", self.mac) + writer.write_bytes_value("macKey", self.mac_key) + writer.write_str_value("OdataType", self.odata_type) + writer.write_str_value("profileIdentifier", self.profile_identifier) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/file_hash.py b/msgraph/generated/models/file_hash.py index bda6db81de3..308ccf9f4f3 100644 --- a/msgraph/generated/models/file_hash.py +++ b/msgraph/generated/models/file_hash.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hashType": lambda n : setattr(self, 'hash_type', n.get_enum_value(FileHashType)), "hashValue": lambda n : setattr(self, 'hash_value', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_enum_value("hashType", self.hash_type) writer.write_str_value("hashValue", self.hash_value) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/file_security_state.py b/msgraph/generated/models/file_security_state.py index 65bf858e05e..7e0b72caf71 100644 --- a/msgraph/generated/models/file_security_state.py +++ b/msgraph/generated/models/file_security_state.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "fileHash": lambda n : setattr(self, 'file_hash', n.get_object_value(FileHash)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "path": lambda n : setattr(self, 'path', n.get_str_value()), "riskScore": lambda n : setattr(self, 'risk_score', n.get_str_value()), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("fileHash", self.file_hash) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("path", self.path) writer.write_str_value("riskScore", self.risk_score) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/file_system_info.py b/msgraph/generated/models/file_system_info.py index 72da393ad34..9a73d1d4e4f 100644 --- a/msgraph/generated/models/file_system_info.py +++ b/msgraph/generated/models/file_system_info.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "lastAccessedDateTime": lambda n : setattr(self, 'last_accessed_date_time', n.get_datetime_value()), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_datetime_value("lastAccessedDateTime", self.last_accessed_date_time) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/filter.py b/msgraph/generated/models/filter.py index bf06b9c16c9..87fcf0ac4f0 100644 --- a/msgraph/generated/models/filter.py +++ b/msgraph/generated/models/filter.py @@ -16,9 +16,9 @@ class Filter(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # *Experimental* Filter group set used to decide whether given object belongs and should be processed as part of this object mapping. An object is considered in scope if ANY of the groups in the collection is evaluated to true. category_filter_groups: Optional[List[FilterGroup]] = None - # Filter group set used to decide whether given object is in scope for provisioning. This is the filter which should be used in most cases. If an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is not satisfied any longer, such object will get de-provisioned'. An object is considered in scope if ANY of the groups in the collection is evaluated to true. + # Filter group set used to decide whether given object is in scope for provisioning. This is the filter which should be used in most cases. If an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter isn't satisfied any longer, such object will get deprovisioned'. An object is considered in scope if ANY of the groups in the collection is evaluated to true. groups: Optional[List[FilterGroup]] = None - # *Experimental* Filter group set used to filter out objects at the early stage of reading them from the directory. If an object doesn't satisfy this filter it will not be processed further. Important to understand is that if an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is no longer satisfied, such object will NOT get de-provisioned. An object is considered in scope if ANY of the groups in the collection is evaluated to true. + # *Experimental* Filter group set used to filter out objects at the early stage of reading them from the directory. If an object doesn't satisfy this filter, then it will not be processed further. Important to understand is that if an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is no longer satisfied, such object will NOT get deprovisioned. An object is considered in scope if ANY of the groups in the collection is evaluated to true. input_filter_groups: Optional[List[FilterGroup]] = None # The OdataType property odata_type: Optional[str] = None @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "categoryFilterGroups": lambda n : setattr(self, 'category_filter_groups', n.get_collection_of_object_values(FilterGroup)), "groups": lambda n : setattr(self, 'groups', n.get_collection_of_object_values(FilterGroup)), "inputFilterGroups": lambda n : setattr(self, 'input_filter_groups', n.get_collection_of_object_values(FilterGroup)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("categoryFilterGroups", self.category_filter_groups) writer.write_collection_of_object_values("groups", self.groups) writer.write_collection_of_object_values("inputFilterGroups", self.input_filter_groups) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/filter_clause.py b/msgraph/generated/models/filter_clause.py index 2bb379a310c..bd97fc38896 100644 --- a/msgraph/generated/models/filter_clause.py +++ b/msgraph/generated/models/filter_clause.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .filter_operand import FilterOperand fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operatorName": lambda n : setattr(self, 'operator_name', n.get_str_value()), "sourceOperandName": lambda n : setattr(self, 'source_operand_name', n.get_str_value()), "targetOperand": lambda n : setattr(self, 'target_operand', n.get_object_value(FilterOperand)), @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operatorName", self.operator_name) writer.write_str_value("sourceOperandName", self.source_operand_name) writer.write_object_value("targetOperand", self.target_operand) diff --git a/msgraph/generated/models/filter_group.py b/msgraph/generated/models/filter_group.py index ffd90600b62..ca6092d2e98 100644 --- a/msgraph/generated/models/filter_group.py +++ b/msgraph/generated/models/filter_group.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "clauses": lambda n : setattr(self, 'clauses', n.get_collection_of_object_values(FilterClause)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("clauses", self.clauses) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/filter_operand.py b/msgraph/generated/models/filter_operand.py index d184d313216..c79f33ad565 100644 --- a/msgraph/generated/models/filter_operand.py +++ b/msgraph/generated/models/filter_operand.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "values": lambda n : setattr(self, 'values', n.get_collection_of_primitive_values(str)), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("values", self.values) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/folder.py b/msgraph/generated/models/folder.py index 1a84761a28b..6153c278cbe 100644 --- a/msgraph/generated/models/folder.py +++ b/msgraph/generated/models/folder.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "childCount": lambda n : setattr(self, 'child_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "view": lambda n : setattr(self, 'view', n.get_object_value(FolderView)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("childCount", self.child_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("view", self.view) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/folder_view.py b/msgraph/generated/models/folder_view.py index edae6d805b9..72e1e51cb6f 100644 --- a/msgraph/generated/models/folder_view.py +++ b/msgraph/generated/models/folder_view.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sortBy": lambda n : setattr(self, 'sort_by', n.get_str_value()), "sortOrder": lambda n : setattr(self, 'sort_order', n.get_str_value()), "viewType": lambda n : setattr(self, 'view_type', n.get_str_value()), @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sortBy", self.sort_by) writer.write_str_value("sortOrder", self.sort_order) writer.write_str_value("viewType", self.view_type) diff --git a/msgraph/generated/models/followup_flag.py b/msgraph/generated/models/followup_flag.py index 2f9934cf189..67e8c4cddd2 100644 --- a/msgraph/generated/models/followup_flag.py +++ b/msgraph/generated/models/followup_flag.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "completedDateTime": lambda n : setattr(self, 'completed_date_time', n.get_object_value(DateTimeTimeZone)), "dueDateTime": lambda n : setattr(self, 'due_date_time', n.get_object_value(DateTimeTimeZone)), "flagStatus": lambda n : setattr(self, 'flag_status', n.get_enum_value(FollowupFlagStatus)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_object_value(DateTimeTimeZone)), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("completedDateTime", self.completed_date_time) writer.write_object_value("dueDateTime", self.due_date_time) writer.write_enum_value("flagStatus", self.flag_status) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("startDateTime", self.start_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/free_busy_error.py b/msgraph/generated/models/free_busy_error.py index e9cfb9ca2b5..9666f6eb53d 100644 --- a/msgraph/generated/models/free_busy_error.py +++ b/msgraph/generated/models/free_busy_error.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "responseCode": lambda n : setattr(self, 'response_code', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("responseCode", self.response_code) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/generic_error.py b/msgraph/generated/models/generic_error.py index 06b314e33a4..c1984918f4f 100644 --- a/msgraph/generated/models/generic_error.py +++ b/msgraph/generated/models/generic_error.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/geo_coordinates.py b/msgraph/generated/models/geo_coordinates.py index dd9d8b5e5af..b6519857dd9 100644 --- a/msgraph/generated/models/geo_coordinates.py +++ b/msgraph/generated/models/geo_coordinates.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "altitude": lambda n : setattr(self, 'altitude', n.get_float_value()), "latitude": lambda n : setattr(self, 'latitude', n.get_float_value()), "longitude": lambda n : setattr(self, 'longitude', n.get_float_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_float_value("altitude", self.altitude) writer.write_float_value("latitude", self.latitude) writer.write_float_value("longitude", self.longitude) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/geolocation_column.py b/msgraph/generated/models/geolocation_column.py index d12deda321f..43994450bdb 100644 --- a/msgraph/generated/models/geolocation_column.py +++ b/msgraph/generated/models/geolocation_column.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/group_filter.py b/msgraph/generated/models/group_filter.py index c91d8d31e79..7345c32f98b 100644 --- a/msgraph/generated/models/group_filter.py +++ b/msgraph/generated/models/group_filter.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "includedGroups": lambda n : setattr(self, 'included_groups', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("includedGroups", self.included_groups) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/hashes.py b/msgraph/generated/models/hashes.py index c1056967673..eea61a9eb8a 100644 --- a/msgraph/generated/models/hashes.py +++ b/msgraph/generated/models/hashes.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "crc32Hash": lambda n : setattr(self, 'crc32_hash', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "quickXorHash": lambda n : setattr(self, 'quick_xor_hash', n.get_str_value()), "sha1Hash": lambda n : setattr(self, 'sha1_hash', n.get_str_value()), "sha256Hash": lambda n : setattr(self, 'sha256_hash', n.get_str_value()), @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("crc32Hash", self.crc32_hash) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("quickXorHash", self.quick_xor_hash) writer.write_str_value("sha1Hash", self.sha1_hash) writer.write_str_value("sha256Hash", self.sha256_hash) diff --git a/msgraph/generated/models/host_security_state.py b/msgraph/generated/models/host_security_state.py index df26193deaa..f159c126233 100644 --- a/msgraph/generated/models/host_security_state.py +++ b/msgraph/generated/models/host_security_state.py @@ -23,7 +23,7 @@ class HostSecurityState(AdditionalDataHolder, BackedModel, Parsable): net_bios_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # Host Operating System. (For example, Windows10, MacOS, RHEL, etc.). + # Host Operating System. (For example, Windows 10, macOS, RHEL, etc.). os: Optional[str] = None # Private (not routable) IPv4 or IPv6 address (see RFC 1918) at the time of the alert. private_ip_address: Optional[str] = None @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isAzureAdRegistered": lambda n : setattr(self, 'is_azure_ad_registered', n.get_bool_value()), "isHybridAzureDomainJoined": lambda n : setattr(self, 'is_hybrid_azure_domain_joined', n.get_bool_value()), "netBiosName": lambda n : setattr(self, 'net_bios_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "os": lambda n : setattr(self, 'os', n.get_str_value()), "privateIpAddress": lambda n : setattr(self, 'private_ip_address', n.get_str_value()), "publicIpAddress": lambda n : setattr(self, 'public_ip_address', n.get_str_value()), @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isAzureAdRegistered", self.is_azure_ad_registered) writer.write_bool_value("isHybridAzureDomainJoined", self.is_hybrid_azure_domain_joined) writer.write_str_value("netBiosName", self.net_bios_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("os", self.os) writer.write_str_value("privateIpAddress", self.private_ip_address) writer.write_str_value("publicIpAddress", self.public_ip_address) diff --git a/msgraph/generated/models/hyperlink_or_picture_column.py b/msgraph/generated/models/hyperlink_or_picture_column.py index 6e93c6e1a30..3e856ab0c11 100644 --- a/msgraph/generated/models/hyperlink_or_picture_column.py +++ b/msgraph/generated/models/hyperlink_or_picture_column.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "isPicture": lambda n : setattr(self, 'is_picture', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isPicture", self.is_picture) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity.py b/msgraph/generated/models/identity.py index 19163f4ffd0..aedbb6627f4 100644 --- a/msgraph/generated/models/identity.py +++ b/msgraph/generated/models/identity.py @@ -5,6 +5,13 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: + from .azure_communication_services_user_identity import AzureCommunicationServicesUserIdentity + from .communications_application_identity import CommunicationsApplicationIdentity + from .communications_application_instance_identity import CommunicationsApplicationInstanceIdentity + from .communications_encrypted_identity import CommunicationsEncryptedIdentity + from .communications_guest_identity import CommunicationsGuestIdentity + from .communications_phone_identity import CommunicationsPhoneIdentity + from .communications_user_identity import CommunicationsUserIdentity from .email_identity import EmailIdentity from .initiator import Initiator from .provisioned_identity import ProvisionedIdentity @@ -25,7 +32,7 @@ class Identity(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 display name of the identity. Note that this might not always be available or up to date. For example, if a user changes their display name, the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. + # The display name of the identity. The display name might not always be available or up to date. For example, if a user changes their display name, the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. display_name: Optional[str] = None # Unique identifier for the identity. id: Optional[str] = None @@ -45,6 +52,34 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> I mapping_value = parse_node.get_child_node("@odata.type").get_str_value() except AttributeError: mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.azureCommunicationServicesUserIdentity".casefold(): + from .azure_communication_services_user_identity import AzureCommunicationServicesUserIdentity + + return AzureCommunicationServicesUserIdentity() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsApplicationIdentity".casefold(): + from .communications_application_identity import CommunicationsApplicationIdentity + + return CommunicationsApplicationIdentity() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsApplicationInstanceIdentity".casefold(): + from .communications_application_instance_identity import CommunicationsApplicationInstanceIdentity + + return CommunicationsApplicationInstanceIdentity() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsEncryptedIdentity".casefold(): + from .communications_encrypted_identity import CommunicationsEncryptedIdentity + + return CommunicationsEncryptedIdentity() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsGuestIdentity".casefold(): + from .communications_guest_identity import CommunicationsGuestIdentity + + return CommunicationsGuestIdentity() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsPhoneIdentity".casefold(): + from .communications_phone_identity import CommunicationsPhoneIdentity + + return CommunicationsPhoneIdentity() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsUserIdentity".casefold(): + from .communications_user_identity import CommunicationsUserIdentity + + return CommunicationsUserIdentity() if mapping_value and mapping_value.casefold() == "#microsoft.graph.emailIdentity".casefold(): from .email_identity import EmailIdentity @@ -100,6 +135,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .azure_communication_services_user_identity import AzureCommunicationServicesUserIdentity + from .communications_application_identity import CommunicationsApplicationIdentity + from .communications_application_instance_identity import CommunicationsApplicationInstanceIdentity + from .communications_encrypted_identity import CommunicationsEncryptedIdentity + from .communications_guest_identity import CommunicationsGuestIdentity + from .communications_phone_identity import CommunicationsPhoneIdentity + from .communications_user_identity import CommunicationsUserIdentity from .email_identity import EmailIdentity from .initiator import Initiator from .provisioned_identity import ProvisionedIdentity @@ -113,6 +155,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teamwork_user_identity import TeamworkUserIdentity from .user_identity import UserIdentity + from .azure_communication_services_user_identity import AzureCommunicationServicesUserIdentity + from .communications_application_identity import CommunicationsApplicationIdentity + from .communications_application_instance_identity import CommunicationsApplicationInstanceIdentity + from .communications_encrypted_identity import CommunicationsEncryptedIdentity + from .communications_guest_identity import CommunicationsGuestIdentity + from .communications_phone_identity import CommunicationsPhoneIdentity + from .communications_user_identity import CommunicationsUserIdentity from .email_identity import EmailIdentity from .initiator import Initiator from .provisioned_identity import ProvisionedIdentity @@ -129,7 +178,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -143,7 +192,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_governance/identity_governance.py b/msgraph/generated/models/identity_governance/identity_governance.py index d79347768ed..f7dff187ada 100644 --- a/msgraph/generated/models/identity_governance/identity_governance.py +++ b/msgraph/generated/models/identity_governance/identity_governance.py @@ -8,6 +8,7 @@ from ..access_review_set import AccessReviewSet from ..app_consent_approval_route import AppConsentApprovalRoute from ..entitlement_management import EntitlementManagement + from ..privileged_access_root import PrivilegedAccessRoot from ..terms_of_use_container import TermsOfUseContainer from .lifecycle_workflows_container import LifecycleWorkflowsContainer @@ -28,6 +29,8 @@ class IdentityGovernance(AdditionalDataHolder, BackedModel, Parsable): lifecycle_workflows: Optional[LifecycleWorkflowsContainer] = None # The OdataType property odata_type: Optional[str] = None + # The privilegedAccess property + privileged_access: Optional[PrivilegedAccessRoot] = None # The termsOfUse property terms_of_use: Optional[TermsOfUseContainer] = None @@ -50,12 +53,14 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from ..access_review_set import AccessReviewSet from ..app_consent_approval_route import AppConsentApprovalRoute from ..entitlement_management import EntitlementManagement + from ..privileged_access_root import PrivilegedAccessRoot from ..terms_of_use_container import TermsOfUseContainer from .lifecycle_workflows_container import LifecycleWorkflowsContainer from ..access_review_set import AccessReviewSet from ..app_consent_approval_route import AppConsentApprovalRoute from ..entitlement_management import EntitlementManagement + from ..privileged_access_root import PrivilegedAccessRoot from ..terms_of_use_container import TermsOfUseContainer from .lifecycle_workflows_container import LifecycleWorkflowsContainer @@ -64,7 +69,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "appConsent": lambda n : setattr(self, 'app_consent', n.get_object_value(AppConsentApprovalRoute)), "entitlementManagement": lambda n : setattr(self, 'entitlement_management', n.get_object_value(EntitlementManagement)), "lifecycleWorkflows": lambda n : setattr(self, 'lifecycle_workflows', n.get_object_value(LifecycleWorkflowsContainer)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "privilegedAccess": lambda n : setattr(self, 'privileged_access', n.get_object_value(PrivilegedAccessRoot)), "termsOfUse": lambda n : setattr(self, 'terms_of_use', n.get_object_value(TermsOfUseContainer)), } return fields @@ -81,7 +87,8 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("appConsent", self.app_consent) writer.write_object_value("entitlementManagement", self.entitlement_management) writer.write_object_value("lifecycleWorkflows", self.lifecycle_workflows) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) + writer.write_object_value("privilegedAccess", self.privileged_access) writer.write_object_value("termsOfUse", self.terms_of_use) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_governance/parameter.py b/msgraph/generated/models/identity_governance/parameter.py index 755423b6083..412504a0515 100644 --- a/msgraph/generated/models/identity_governance/parameter.py +++ b/msgraph/generated/models/identity_governance/parameter.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "valueType": lambda n : setattr(self, 'value_type', n.get_enum_value(ValueType)), "values": lambda n : setattr(self, 'values', n.get_collection_of_primitive_values(str)), } @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("valueType", self.value_type) writer.write_collection_of_primitive_values("values", self.values) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_governance/run_summary.py b/msgraph/generated/models/identity_governance/run_summary.py index 9fa18d97715..4b83ef5c265 100644 --- a/msgraph/generated/models/identity_governance/run_summary.py +++ b/msgraph/generated/models/identity_governance/run_summary.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "failedRuns": lambda n : setattr(self, 'failed_runs', n.get_int_value()), "failedTasks": lambda n : setattr(self, 'failed_tasks', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "successfulRuns": lambda n : setattr(self, 'successful_runs', n.get_int_value()), "totalRuns": lambda n : setattr(self, 'total_runs', n.get_int_value()), "totalTasks": lambda n : setattr(self, 'total_tasks', n.get_int_value()), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("failedRuns", self.failed_runs) writer.write_int_value("failedTasks", self.failed_tasks) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("successfulRuns", self.successful_runs) writer.write_int_value("totalRuns", self.total_runs) writer.write_int_value("totalTasks", self.total_tasks) diff --git a/msgraph/generated/models/identity_governance/task_report_summary.py b/msgraph/generated/models/identity_governance/task_report_summary.py index cffb55bbaa8..8c8859fc7ad 100644 --- a/msgraph/generated/models/identity_governance/task_report_summary.py +++ b/msgraph/generated/models/identity_governance/task_report_summary.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "failedTasks": lambda n : setattr(self, 'failed_tasks', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "successfulTasks": lambda n : setattr(self, 'successful_tasks', n.get_int_value()), "totalTasks": lambda n : setattr(self, 'total_tasks', n.get_int_value()), "unprocessedTasks": lambda n : setattr(self, 'unprocessed_tasks', n.get_int_value()), @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("failedTasks", self.failed_tasks) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("successfulTasks", self.successful_tasks) writer.write_int_value("totalTasks", self.total_tasks) writer.write_int_value("unprocessedTasks", self.unprocessed_tasks) diff --git a/msgraph/generated/models/identity_governance/user_summary.py b/msgraph/generated/models/identity_governance/user_summary.py index 389fa4a81c6..44bcd3e7304 100644 --- a/msgraph/generated/models/identity_governance/user_summary.py +++ b/msgraph/generated/models/identity_governance/user_summary.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "failedTasks": lambda n : setattr(self, 'failed_tasks', n.get_int_value()), "failedUsers": lambda n : setattr(self, 'failed_users', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "successfulUsers": lambda n : setattr(self, 'successful_users', n.get_int_value()), "totalTasks": lambda n : setattr(self, 'total_tasks', n.get_int_value()), "totalUsers": lambda n : setattr(self, 'total_users', n.get_int_value()), @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("failedTasks", self.failed_tasks) writer.write_int_value("failedUsers", self.failed_users) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("successfulUsers", self.successful_users) writer.write_int_value("totalTasks", self.total_tasks) writer.write_int_value("totalUsers", self.total_users) diff --git a/msgraph/generated/models/identity_governance/workflow.py b/msgraph/generated/models/identity_governance/workflow.py index 316d8c2b125..515454090bd 100644 --- a/msgraph/generated/models/identity_governance/workflow.py +++ b/msgraph/generated/models/identity_governance/workflow.py @@ -19,7 +19,7 @@ class Workflow(WorkflowBase): odata_type: Optional[str] = "#microsoft.graph.identityGovernance.workflow" # When the workflow was deleted.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. deleted_date_time: Optional[datetime.datetime] = None - # The unique identifier of the Azure AD identity that last modified the workflow object. + # The unique identifier of the Microsoft Entra identity that last modified the workflow object. execution_scope: Optional[List[UserProcessingResult]] = None # Identifier used for individually addressing a specific workflow.Supports $filter(eq, ne) and $orderby. id: Optional[str] = None diff --git a/msgraph/generated/models/identity_governance/workflow_base.py b/msgraph/generated/models/identity_governance/workflow_base.py index 02b7debb86a..fe054a2a2a8 100644 --- a/msgraph/generated/models/identity_governance/workflow_base.py +++ b/msgraph/generated/models/identity_governance/workflow_base.py @@ -36,7 +36,7 @@ class WorkflowBase(AdditionalDataHolder, BackedModel, Parsable): is_enabled: Optional[bool] = None # If true, the Lifecycle Workflow engine executes the workflow based on the schedule defined by tenant settings. Can't be true for a disabled workflow (where isEnabled is false). is_scheduling_enabled: Optional[bool] = None - # The unique identifier of the Azure Active Directory identity that last modified the workflow. + # The unique identifier of the Microsoft Entra identity that last modified the workflow. last_modified_by: Optional[User] = None # When the workflow was last modified. last_modified_date_time: Optional[datetime.datetime] = None @@ -98,7 +98,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isSchedulingEnabled": lambda n : setattr(self, 'is_scheduling_enabled', n.get_bool_value()), "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(User)), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tasks": lambda n : setattr(self, 'tasks', n.get_collection_of_object_values(Task)), } return fields @@ -121,7 +121,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isSchedulingEnabled", self.is_scheduling_enabled) writer.write_object_value("lastModifiedBy", self.last_modified_by) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("tasks", self.tasks) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_governance/workflow_execution_conditions.py b/msgraph/generated/models/identity_governance/workflow_execution_conditions.py index 3f443d0a113..c4dee99e120 100644 --- a/msgraph/generated/models/identity_governance/workflow_execution_conditions.py +++ b/msgraph/generated/models/identity_governance/workflow_execution_conditions.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .trigger_and_scope_based_conditions import TriggerAndScopeBasedConditions fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_governance/workflow_execution_trigger.py b/msgraph/generated/models/identity_governance/workflow_execution_trigger.py index 111e3424a7b..f3c92735cfa 100644 --- a/msgraph/generated/models/identity_governance/workflow_execution_trigger.py +++ b/msgraph/generated/models/identity_governance/workflow_execution_trigger.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .time_based_attribute_trigger import TimeBasedAttributeTrigger fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_protection_root.py b/msgraph/generated/models/identity_protection_root.py index 19867a9dbd2..00bd49674b5 100644 --- a/msgraph/generated/models/identity_protection_root.py +++ b/msgraph/generated/models/identity_protection_root.py @@ -5,9 +5,9 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .risk_detection import RiskDetection from .risky_service_principal import RiskyServicePrincipal from .risky_user import RiskyUser + from .risk_detection import RiskDetection from .service_principal_risk_detection import ServicePrincipalRiskDetection @dataclass @@ -19,13 +19,13 @@ class IdentityProtectionRoot(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The OdataType property odata_type: Optional[str] = None - # Risk detection in Azure AD Identity Protection and the associated information about the detection. + # Risk detection in Microsoft Entra ID Protection and the associated information about the detection. risk_detections: Optional[List[RiskDetection]] = None - # Azure AD service principals that are at risk. + # Microsoft Entra service principals that are at risk. risky_service_principals: Optional[List[RiskyServicePrincipal]] = None - # Users that are flagged as at-risk by Azure AD Identity Protection. + # Users that are flagged as at-risk by Microsoft Entra ID Protection. risky_users: Optional[List[RiskyUser]] = None - # Represents information about detected at-risk service principals in an Azure AD tenant. + # Represents information about detected at-risk service principals in a Microsoft Entra tenant. service_principal_risk_detections: Optional[List[ServicePrincipalRiskDetection]] = None @staticmethod @@ -44,18 +44,18 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .risk_detection import RiskDetection from .risky_service_principal import RiskyServicePrincipal from .risky_user import RiskyUser + from .risk_detection import RiskDetection from .service_principal_risk_detection import ServicePrincipalRiskDetection - from .risk_detection import RiskDetection from .risky_service_principal import RiskyServicePrincipal from .risky_user import RiskyUser + from .risk_detection import RiskDetection from .service_principal_risk_detection import ServicePrincipalRiskDetection fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "riskDetections": lambda n : setattr(self, 'risk_detections', n.get_collection_of_object_values(RiskDetection)), "riskyServicePrincipals": lambda n : setattr(self, 'risky_service_principals', n.get_collection_of_object_values(RiskyServicePrincipal)), "riskyUsers": lambda n : setattr(self, 'risky_users', n.get_collection_of_object_values(RiskyUser)), @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("riskDetections", self.risk_detections) writer.write_collection_of_object_values("riskyServicePrincipals", self.risky_service_principals) writer.write_collection_of_object_values("riskyUsers", self.risky_users) diff --git a/msgraph/generated/models/identity_security_defaults_enforcement_policy.py b/msgraph/generated/models/identity_security_defaults_enforcement_policy.py index e1e82972efd..511ea1a6bbd 100644 --- a/msgraph/generated/models/identity_security_defaults_enforcement_policy.py +++ b/msgraph/generated/models/identity_security_defaults_enforcement_policy.py @@ -12,7 +12,7 @@ class IdentitySecurityDefaultsEnforcementPolicy(PolicyBase): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy" - # If set to true, Azure Active Directory security defaults is enabled for the tenant. + # If set to true, Microsoft Entra security defaults are enabled for the tenant. is_enabled: Optional[bool] = None @staticmethod diff --git a/msgraph/generated/models/identity_set.py b/msgraph/generated/models/identity_set.py index d487495dacb..27005fa4353 100644 --- a/msgraph/generated/models/identity_set.py +++ b/msgraph/generated/models/identity_set.py @@ -8,6 +8,7 @@ from .chat_message_from_identity_set import ChatMessageFromIdentitySet from .chat_message_mentioned_identity_set import ChatMessageMentionedIdentitySet from .chat_message_reaction_identity_set import ChatMessageReactionIdentitySet + from .communications_identity_set import CommunicationsIdentitySet from .identity import Identity from .share_point_identity_set import SharePointIdentitySet @@ -52,6 +53,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> I from .chat_message_reaction_identity_set import ChatMessageReactionIdentitySet return ChatMessageReactionIdentitySet() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsIdentitySet".casefold(): + from .communications_identity_set import CommunicationsIdentitySet + + return CommunicationsIdentitySet() if mapping_value and mapping_value.casefold() == "#microsoft.graph.sharePointIdentitySet".casefold(): from .share_point_identity_set import SharePointIdentitySet @@ -66,19 +71,21 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .chat_message_from_identity_set import ChatMessageFromIdentitySet from .chat_message_mentioned_identity_set import ChatMessageMentionedIdentitySet from .chat_message_reaction_identity_set import ChatMessageReactionIdentitySet + from .communications_identity_set import CommunicationsIdentitySet from .identity import Identity from .share_point_identity_set import SharePointIdentitySet from .chat_message_from_identity_set import ChatMessageFromIdentitySet from .chat_message_mentioned_identity_set import ChatMessageMentionedIdentitySet from .chat_message_reaction_identity_set import ChatMessageReactionIdentitySet + from .communications_identity_set import CommunicationsIdentitySet from .identity import Identity from .share_point_identity_set import SharePointIdentitySet fields: Dict[str, Callable[[Any], None]] = { "application": lambda n : setattr(self, 'application', n.get_object_value(Identity)), "device": lambda n : setattr(self, 'device', n.get_object_value(Identity)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "user": lambda n : setattr(self, 'user', n.get_object_value(Identity)), } return fields @@ -93,7 +100,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("application", self.application) writer.write_object_value("device", self.device) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("user", self.user) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_source.py b/msgraph/generated/models/identity_source.py index c21f51cca80..9eebc9d5734 100644 --- a/msgraph/generated/models/identity_source.py +++ b/msgraph/generated/models/identity_source.py @@ -67,7 +67,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_domain_federation import ExternalDomainFederation fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -79,7 +79,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/identity_user_flow_attribute_assignment.py b/msgraph/generated/models/identity_user_flow_attribute_assignment.py index 745d2c83dfd..81580e79631 100644 --- a/msgraph/generated/models/identity_user_flow_attribute_assignment.py +++ b/msgraph/generated/models/identity_user_flow_attribute_assignment.py @@ -15,11 +15,11 @@ class IdentityUserFlowAttributeAssignment(Entity): # The display name of the identityUserFlowAttribute within a user flow. display_name: Optional[str] = None - # Determines whether the identityUserFlowAttribute is optional. true means the user doesn't have to provide a value. false means the user cannot complete sign-up without providing a value. + # Determines whether the identityUserFlowAttribute is optional. true means the user doesn't have to provide a value. false means the user can't complete sign-up without providing a value. is_optional: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None - # Determines whether the identityUserFlowAttribute requires verification. This is only used for verifying the user's phone number or email address. + # Determines whether the identityUserFlowAttribute requires verification, and is only used for verifying the user's phone number or email address. requires_verification: Optional[bool] = None # The user attribute that you want to add to your user flow. user_attribute: Optional[IdentityUserFlowAttribute] = None diff --git a/msgraph/generated/models/idle_session_sign_out.py b/msgraph/generated/models/idle_session_sign_out.py index ae3e7e7693e..f0be5048f19 100644 --- a/msgraph/generated/models/idle_session_sign_out.py +++ b/msgraph/generated/models/idle_session_sign_out.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "signOutAfterInSeconds": lambda n : setattr(self, 'sign_out_after_in_seconds', n.get_int_value()), "warnAfterInSeconds": lambda n : setattr(self, 'warn_after_in_seconds', n.get_int_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("signOutAfterInSeconds", self.sign_out_after_in_seconds) writer.write_int_value("warnAfterInSeconds", self.warn_after_in_seconds) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/image.py b/msgraph/generated/models/image.py index e9ad6c16856..843b84af2c8 100644 --- a/msgraph/generated/models/image.py +++ b/msgraph/generated/models/image.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "height": lambda n : setattr(self, 'height', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "width": lambda n : setattr(self, 'width', n.get_int_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("height", self.height) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("width", self.width) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/image_info.py b/msgraph/generated/models/image_info.py index 91d6e95c07e..906ee0f19d2 100644 --- a/msgraph/generated/models/image_info.py +++ b/msgraph/generated/models/image_info.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "alternateText": lambda n : setattr(self, 'alternate_text', n.get_str_value()), "alternativeText": lambda n : setattr(self, 'alternative_text', n.get_str_value()), "iconUrl": lambda n : setattr(self, 'icon_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("alternateText", self.alternate_text) writer.write_str_value("alternativeText", self.alternative_text) writer.write_str_value("iconUrl", self.icon_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/implicit_grant_settings.py b/msgraph/generated/models/implicit_grant_settings.py index c2961d24e3d..0a2eac5226e 100644 --- a/msgraph/generated/models/implicit_grant_settings.py +++ b/msgraph/generated/models/implicit_grant_settings.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "enableAccessTokenIssuance": lambda n : setattr(self, 'enable_access_token_issuance', n.get_bool_value()), "enableIdTokenIssuance": lambda n : setattr(self, 'enable_id_token_issuance', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("enableAccessTokenIssuance", self.enable_access_token_issuance) writer.write_bool_value("enableIdTokenIssuance", self.enable_id_token_issuance) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/imported_windows_autopilot_device_identity_state.py b/msgraph/generated/models/imported_windows_autopilot_device_identity_state.py index 91f4b3c9f28..4d1617290e8 100644 --- a/msgraph/generated/models/imported_windows_autopilot_device_identity_state.py +++ b/msgraph/generated/models/imported_windows_autopilot_device_identity_state.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "deviceErrorName": lambda n : setattr(self, 'device_error_name', n.get_str_value()), "deviceImportStatus": lambda n : setattr(self, 'device_import_status', n.get_enum_value(ImportedWindowsAutopilotDeviceIdentityImportStatus)), "deviceRegistrationId": lambda n : setattr(self, 'device_registration_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("deviceErrorName", self.device_error_name) writer.write_enum_value("deviceImportStatus", self.device_import_status) writer.write_str_value("deviceRegistrationId", self.device_registration_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/inbound_outbound_policy_configuration.py b/msgraph/generated/models/inbound_outbound_policy_configuration.py index 6ad38c007d2..42fe5fa0807 100644 --- a/msgraph/generated/models/inbound_outbound_policy_configuration.py +++ b/msgraph/generated/models/inbound_outbound_policy_configuration.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "inboundAllowed": lambda n : setattr(self, 'inbound_allowed', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "outboundAllowed": lambda n : setattr(self, 'outbound_allowed', n.get_bool_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("inboundAllowed", self.inbound_allowed) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("outboundAllowed", self.outbound_allowed) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/include_all_account_target_content.py b/msgraph/generated/models/include_all_account_target_content.py new file mode 100644 index 00000000000..31098b9f748 --- /dev/null +++ b/msgraph/generated/models/include_all_account_target_content.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .account_target_content import AccountTargetContent + +from .account_target_content import AccountTargetContent + +@dataclass +class IncludeAllAccountTargetContent(AccountTargetContent): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.includeAllAccountTargetContent" + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IncludeAllAccountTargetContent: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IncludeAllAccountTargetContent + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IncludeAllAccountTargetContent() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .account_target_content import AccountTargetContent + + from .account_target_content import AccountTargetContent + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/incoming_context.py b/msgraph/generated/models/incoming_context.py index 8d31c559af5..b080e547ba8 100644 --- a/msgraph/generated/models/incoming_context.py +++ b/msgraph/generated/models/incoming_context.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "observedParticipantId": lambda n : setattr(self, 'observed_participant_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "onBehalfOf": lambda n : setattr(self, 'on_behalf_of', n.get_object_value(IdentitySet)), "sourceParticipantId": lambda n : setattr(self, 'source_participant_id', n.get_str_value()), "transferor": lambda n : setattr(self, 'transferor', n.get_object_value(IdentitySet)), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("observedParticipantId", self.observed_participant_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("onBehalfOf", self.on_behalf_of) writer.write_str_value("sourceParticipantId", self.source_participant_id) writer.write_object_value("transferor", self.transferor) diff --git a/msgraph/generated/models/incomplete_data.py b/msgraph/generated/models/incomplete_data.py index f91277c5055..0b73eb3d3d5 100644 --- a/msgraph/generated/models/incomplete_data.py +++ b/msgraph/generated/models/incomplete_data.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "missingDataBeforeDateTime": lambda n : setattr(self, 'missing_data_before_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "wasThrottled": lambda n : setattr(self, 'was_throttled', n.get_bool_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("missingDataBeforeDateTime", self.missing_data_before_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("wasThrottled", self.was_throttled) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/information_protection.py b/msgraph/generated/models/information_protection.py index d28c537480b..ec0b5bffeb0 100644 --- a/msgraph/generated/models/information_protection.py +++ b/msgraph/generated/models/information_protection.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "bitlocker": lambda n : setattr(self, 'bitlocker', n.get_object_value(Bitlocker)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "threatAssessmentRequests": lambda n : setattr(self, 'threat_assessment_requests', n.get_collection_of_object_values(ThreatAssessmentRequest)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("bitlocker", self.bitlocker) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("threatAssessmentRequests", self.threat_assessment_requests) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/informational_url.py b/msgraph/generated/models/informational_url.py index c6a2d383ecc..eb8edc8917b 100644 --- a/msgraph/generated/models/informational_url.py +++ b/msgraph/generated/models/informational_url.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "logoUrl": lambda n : setattr(self, 'logo_url', n.get_str_value()), "marketingUrl": lambda n : setattr(self, 'marketing_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "privacyStatementUrl": lambda n : setattr(self, 'privacy_statement_url', n.get_str_value()), "supportUrl": lambda n : setattr(self, 'support_url', n.get_str_value()), "termsOfServiceUrl": lambda n : setattr(self, 'terms_of_service_url', n.get_str_value()), @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("logoUrl", self.logo_url) writer.write_str_value("marketingUrl", self.marketing_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("privacyStatementUrl", self.privacy_statement_url) writer.write_str_value("supportUrl", self.support_url) writer.write_str_value("termsOfServiceUrl", self.terms_of_service_url) diff --git a/msgraph/generated/models/insight_identity.py b/msgraph/generated/models/insight_identity.py index 384ed4eef19..7c23a46424d 100644 --- a/msgraph/generated/models/insight_identity.py +++ b/msgraph/generated/models/insight_identity.py @@ -15,7 +15,7 @@ class InsightIdentity(AdditionalDataHolder, BackedModel, Parsable): address: Optional[str] = None # The display name of the user who shared the item. display_name: Optional[str] = None - # The id of the user who shared the item. + # The ID of the user who shared the item. id: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "address": lambda n : setattr(self, 'address', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("address", self.address) writer.write_str_value("displayName", self.display_name) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/integer_range.py b/msgraph/generated/models/integer_range.py index a5c0ee2e438..662d7b35997 100644 --- a/msgraph/generated/models/integer_range.py +++ b/msgraph/generated/models/integer_range.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "end": lambda n : setattr(self, 'end', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "start": lambda n : setattr(self, 'start', n.get_int_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("end", self.end) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("start", self.start) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/internal_domain_federation.py b/msgraph/generated/models/internal_domain_federation.py index 05389aa53ee..e51d518f13b 100644 --- a/msgraph/generated/models/internal_domain_federation.py +++ b/msgraph/generated/models/internal_domain_federation.py @@ -15,17 +15,17 @@ class InternalDomainFederation(SamlOrWsFedProvider): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.internalDomainFederation" - # URL of the endpoint used by active clients when authenticating with federated domains set up for single sign-on in Azure Active Directory (Azure AD). Corresponds to the ActiveLogOnUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. + # URL of the endpoint used by active clients when authenticating with federated domains set up for single sign-on in Microsoft Entra ID. Corresponds to the ActiveLogOnUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. active_sign_in_uri: Optional[str] = None - # Determines whether Azure AD accepts the MFA performed by the federated IdP when a federated user accesses an application that is governed by a conditional access policy that requires MFA. The possible values are: acceptIfMfaDoneByFederatedIdp, enforceMfaByFederatedIdp, rejectMfaByFederatedIdp, unknownFutureValue. For more information, see federatedIdpMfaBehavior values. + # Determines whether Microsoft Entra ID accepts the MFA performed by the federated IdP when a federated user accesses an application that is governed by a conditional access policy that requires MFA. The possible values are: acceptIfMfaDoneByFederatedIdp, enforceMfaByFederatedIdp, rejectMfaByFederatedIdp, unknownFutureValue. For more information, see federatedIdpMfaBehavior values. federated_idp_mfa_behavior: Optional[FederatedIdpMfaBehavior] = None - # If true, when SAML authentication requests are sent to the federated SAML IdP, Azure AD will sign those requests using the OrgID signing key. If false (default), the SAML authentication requests sent to the federated IdP are not signed. + # If true, when SAML authentication requests are sent to the federated SAML IdP, Microsoft Entra ID will sign those requests using the OrgID signing key. If false (default), the SAML authentication requests sent to the federated IdP are not signed. is_signed_authentication_request_required: Optional[bool] = None # Fallback token signing certificate that is used to sign tokens when the primary signing certificate expires. Formatted as Base64 encoded strings of the public portion of the federated IdP's token signing certificate. Needs to be compatible with the X509Certificate2 class. Much like the signingCertificate, the nextSigningCertificate property is used if a rollover is required outside of the auto-rollover update, a new federation service is being set up, or if the new token signing certificate is not present in the federation properties after the federation service certificate has been updated. next_signing_certificate: Optional[str] = None # Sets the preferred behavior for the sign-in prompt. The possible values are: translateToFreshPasswordAuthentication, nativeSupport, disabled, unknownFutureValue. prompt_login_behavior: Optional[PromptLoginBehavior] = None - # URI that clients are redirected to when they sign out of Azure AD services. Corresponds to the LogOffUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. + # URI that clients are redirected to when they sign out of Microsoft Entra services. Corresponds to the LogOffUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. sign_out_uri: Optional[str] = None # Provides status and timestamp of the last update of the signing certificate. signing_certificate_update_status: Optional[SigningCertificateUpdateStatus] = None diff --git a/msgraph/generated/models/internet_message_header.py b/msgraph/generated/models/internet_message_header.py index 8f10c6606f1..ed36a66583b 100644 --- a/msgraph/generated/models/internet_message_header.py +++ b/msgraph/generated/models/internet_message_header.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/intune_brand.py b/msgraph/generated/models/intune_brand.py index cb558c35dd0..e038addfdf5 100644 --- a/msgraph/generated/models/intune_brand.py +++ b/msgraph/generated/models/intune_brand.py @@ -79,7 +79,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "darkBackgroundLogo": lambda n : setattr(self, 'dark_background_logo', n.get_object_value(MimeContent)), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "lightBackgroundLogo": lambda n : setattr(self, 'light_background_logo', n.get_object_value(MimeContent)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "onlineSupportSiteName": lambda n : setattr(self, 'online_support_site_name', n.get_str_value()), "onlineSupportSiteUrl": lambda n : setattr(self, 'online_support_site_url', n.get_str_value()), "privacyUrl": lambda n : setattr(self, 'privacy_url', n.get_str_value()), @@ -105,7 +105,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("darkBackgroundLogo", self.dark_background_logo) writer.write_str_value("displayName", self.display_name) writer.write_object_value("lightBackgroundLogo", self.light_background_logo) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("onlineSupportSiteName", self.online_support_site_name) writer.write_str_value("onlineSupportSiteUrl", self.online_support_site_url) writer.write_str_value("privacyUrl", self.privacy_url) diff --git a/msgraph/generated/models/investigation_security_state.py b/msgraph/generated/models/investigation_security_state.py index 0c03bffd9fe..81271b8f5aa 100644 --- a/msgraph/generated/models/investigation_security_state.py +++ b/msgraph/generated/models/investigation_security_state.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/invitation.py b/msgraph/generated/models/invitation.py index c8cf75a395e..c157d0ab4e7 100644 --- a/msgraph/generated/models/invitation.py +++ b/msgraph/generated/models/invitation.py @@ -20,11 +20,11 @@ class Invitation(Entity): invited_user: Optional[User] = None # The display name of the user being invited. invited_user_display_name: Optional[str] = None - # The email address of the user being invited. Required. The following special characters are not permitted in the email address:Tilde (~)Exclamation point (!)Number sign (#)Dollar sign ($)Percent (%)Circumflex (^)Ampersand (&)Asterisk (*)Parentheses (( ))Plus sign (+)Equal sign (=)Brackets ([ ])Braces ({ })Backslash (/)Slash mark (/)Pipe (/|)Semicolon (;)Colon (:)Quotation marks (')Angle brackets (< >)Question mark (?)Comma (,)However, the following exceptions apply:A period (.) or a hyphen (-) is permitted anywhere in the user name, except at the beginning or end of the name.An underscore (_) is permitted anywhere in the user name. This includes at the beginning or end of the name. + # The email address of the user being invited. Required. The following special characters aren't permitted in the email address:Tilde (~)Exclamation point (!)Number sign (#)Dollar sign ($)Percent (%)Circumflex (^)Ampersand (&)Asterisk (*)Parentheses (( ))Plus sign (+)Equal sign (=)Brackets ([ ])Braces ({ })Backslash (/)Slash mark (/)Pipe (/|)Semicolon (;)Colon (:)Quotation marks (')Angle brackets (< >)Question mark (?)Comma (,)However, the following exceptions apply:A period (.) or a hyphen (-) is permitted anywhere in the user name, except at the beginning or end of the name.An underscore (_) is permitted anywhere in the user name. This includes at the beginning or end of the name. invited_user_email_address: Optional[str] = None # Additional configuration for the message being sent to the invited user, including customizing message text, language and cc recipient list. invited_user_message_info: Optional[InvitedUserMessageInfo] = None - # The userType of the user being invited. By default, this is Guest. You can invite as Member if you are a company administrator. + # The userType of the user being invited. By default, this is Guest. You can invite as Member if you're a company administrator. invited_user_type: Optional[str] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/invitation_participant_info.py b/msgraph/generated/models/invitation_participant_info.py index e924aaa834e..48c27077858 100644 --- a/msgraph/generated/models/invitation_participant_info.py +++ b/msgraph/generated/models/invitation_participant_info.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hidden": lambda n : setattr(self, 'hidden', n.get_bool_value()), "identity": lambda n : setattr(self, 'identity', n.get_object_value(IdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "participantId": lambda n : setattr(self, 'participant_id', n.get_str_value()), "removeFromDefaultAudioRoutingGroup": lambda n : setattr(self, 'remove_from_default_audio_routing_group', n.get_bool_value()), "replacesCallId": lambda n : setattr(self, 'replaces_call_id', n.get_str_value()), @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("hidden", self.hidden) writer.write_object_value("identity", self.identity) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("participantId", self.participant_id) writer.write_bool_value("removeFromDefaultAudioRoutingGroup", self.remove_from_default_audio_routing_group) writer.write_str_value("replacesCallId", self.replaces_call_id) diff --git a/msgraph/generated/models/invited_user_message_info.py b/msgraph/generated/models/invited_user_message_info.py index 482aded13dd..2be073adb27 100644 --- a/msgraph/generated/models/invited_user_message_info.py +++ b/msgraph/generated/models/invited_user_message_info.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "ccRecipients": lambda n : setattr(self, 'cc_recipients', n.get_collection_of_object_values(Recipient)), "customizedMessageBody": lambda n : setattr(self, 'customized_message_body', n.get_str_value()), "messageLanguage": lambda n : setattr(self, 'message_language', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("ccRecipients", self.cc_recipients) writer.write_str_value("customizedMessageBody", self.customized_message_body) writer.write_str_value("messageLanguage", self.message_language) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ios_device_type.py b/msgraph/generated/models/ios_device_type.py index 6935c06fce1..fcf2e395bf4 100644 --- a/msgraph/generated/models/ios_device_type.py +++ b/msgraph/generated/models/ios_device_type.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "iPad": lambda n : setattr(self, 'i_pad', n.get_bool_value()), "iPhoneAndIPod": lambda n : setattr(self, 'i_phone_and_i_pod', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("iPad", self.i_pad) writer.write_bool_value("iPhoneAndIPod", self.i_phone_and_i_pod) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ios_home_screen_folder_page.py b/msgraph/generated/models/ios_home_screen_folder_page.py index b718706dfd3..1851150ff9b 100644 --- a/msgraph/generated/models/ios_home_screen_folder_page.py +++ b/msgraph/generated/models/ios_home_screen_folder_page.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "apps": lambda n : setattr(self, 'apps', n.get_collection_of_object_values(IosHomeScreenApp)), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("apps", self.apps) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ios_home_screen_item.py b/msgraph/generated/models/ios_home_screen_item.py index 7c606ab3079..a8eb8f2cbfa 100644 --- a/msgraph/generated/models/ios_home_screen_item.py +++ b/msgraph/generated/models/ios_home_screen_item.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ios_home_screen_page.py b/msgraph/generated/models/ios_home_screen_page.py index 535657325f5..f8336673ab4 100644 --- a/msgraph/generated/models/ios_home_screen_page.py +++ b/msgraph/generated/models/ios_home_screen_page.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "icons": lambda n : setattr(self, 'icons', n.get_collection_of_object_values(IosHomeScreenItem)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_collection_of_object_values("icons", self.icons) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ios_minimum_operating_system.py b/msgraph/generated/models/ios_minimum_operating_system.py index 7e9f0bba053..43a5602f132 100644 --- a/msgraph/generated/models/ios_minimum_operating_system.py +++ b/msgraph/generated/models/ios_minimum_operating_system.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "v10_0": lambda n : setattr(self, 'v10_0', n.get_bool_value()), "v11_0": lambda n : setattr(self, 'v11_0', n.get_bool_value()), "v12_0": lambda n : setattr(self, 'v12_0', n.get_bool_value()), @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("v10_0", self.v10_0) writer.write_bool_value("v11_0", self.v11_0) writer.write_bool_value("v12_0", self.v12_0) diff --git a/msgraph/generated/models/ios_network_usage_rule.py b/msgraph/generated/models/ios_network_usage_rule.py index 6f641e547a5..823fcb807f5 100644 --- a/msgraph/generated/models/ios_network_usage_rule.py +++ b/msgraph/generated/models/ios_network_usage_rule.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "cellularDataBlockWhenRoaming": lambda n : setattr(self, 'cellular_data_block_when_roaming', n.get_bool_value()), "cellularDataBlocked": lambda n : setattr(self, 'cellular_data_blocked', n.get_bool_value()), "managedApps": lambda n : setattr(self, 'managed_apps', n.get_collection_of_object_values(AppListItem)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("cellularDataBlockWhenRoaming", self.cellular_data_block_when_roaming) writer.write_bool_value("cellularDataBlocked", self.cellular_data_blocked) writer.write_collection_of_object_values("managedApps", self.managed_apps) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ios_notification_settings.py b/msgraph/generated/models/ios_notification_settings.py index 963ce1a141b..01765d09d1a 100644 --- a/msgraph/generated/models/ios_notification_settings.py +++ b/msgraph/generated/models/ios_notification_settings.py @@ -64,7 +64,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "badgesEnabled": lambda n : setattr(self, 'badges_enabled', n.get_bool_value()), "bundleID": lambda n : setattr(self, 'bundle_i_d', n.get_str_value()), "enabled": lambda n : setattr(self, 'enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "publisher": lambda n : setattr(self, 'publisher', n.get_str_value()), "showInNotificationCenter": lambda n : setattr(self, 'show_in_notification_center', n.get_bool_value()), "showOnLockScreen": lambda n : setattr(self, 'show_on_lock_screen', n.get_bool_value()), @@ -85,7 +85,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("badgesEnabled", self.badges_enabled) writer.write_str_value("bundleID", self.bundle_i_d) writer.write_bool_value("enabled", self.enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("publisher", self.publisher) writer.write_bool_value("showInNotificationCenter", self.show_in_notification_center) writer.write_bool_value("showOnLockScreen", self.show_on_lock_screen) diff --git a/msgraph/generated/models/ip_named_location.py b/msgraph/generated/models/ip_named_location.py index 6f4972f633d..2234faa2bc6 100644 --- a/msgraph/generated/models/ip_named_location.py +++ b/msgraph/generated/models/ip_named_location.py @@ -11,7 +11,7 @@ @dataclass class IpNamedLocation(NamedLocation): - # List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC5969. Required. + # List of IP address ranges in IPv4 CIDR format (for example, 1.2.3.4/32) or any allowable IPv6 format from IETF RFC5969. Required. ip_ranges: Optional[List[IpRange]] = None # true if this location is explicitly trusted. Optional. Default value is false. is_trusted: Optional[bool] = None diff --git a/msgraph/generated/models/ip_range.py b/msgraph/generated/models/ip_range.py index 8dc06abf341..64576e7b00a 100644 --- a/msgraph/generated/models/ip_range.py +++ b/msgraph/generated/models/ip_range.py @@ -67,7 +67,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .i_pv6_range import IPv6Range fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -79,7 +79,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/item_action_stat.py b/msgraph/generated/models/item_action_stat.py index 18e42e30fb1..b6fc2afedd2 100644 --- a/msgraph/generated/models/item_action_stat.py +++ b/msgraph/generated/models/item_action_stat.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "actionCount": lambda n : setattr(self, 'action_count', n.get_int_value()), "actorCount": lambda n : setattr(self, 'actor_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("actionCount", self.action_count) writer.write_int_value("actorCount", self.actor_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/item_body.py b/msgraph/generated/models/item_body.py index 047661233bf..9f31fd6c049 100644 --- a/msgraph/generated/models/item_body.py +++ b/msgraph/generated/models/item_body.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_str_value()), "contentType": lambda n : setattr(self, 'content_type', n.get_enum_value(BodyType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("content", self.content) writer.write_enum_value("contentType", self.content_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/item_preview_info.py b/msgraph/generated/models/item_preview_info.py index 2b35fc14394..0b2bb7edd31 100644 --- a/msgraph/generated/models/item_preview_info.py +++ b/msgraph/generated/models/item_preview_info.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "getUrl": lambda n : setattr(self, 'get_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "postParameters": lambda n : setattr(self, 'post_parameters', n.get_str_value()), "postUrl": lambda n : setattr(self, 'post_url', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("getUrl", self.get_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("postParameters", self.post_parameters) writer.write_str_value("postUrl", self.post_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/item_reference.py b/msgraph/generated/models/item_reference.py index b73a38d08f7..88d03d39711 100644 --- a/msgraph/generated/models/item_reference.py +++ b/msgraph/generated/models/item_reference.py @@ -58,7 +58,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "driveType": lambda n : setattr(self, 'drive_type', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "path": lambda n : setattr(self, 'path', n.get_str_value()), "shareId": lambda n : setattr(self, 'share_id', n.get_str_value()), "sharepointIds": lambda n : setattr(self, 'sharepoint_ids', n.get_object_value(SharepointIds)), @@ -78,7 +78,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("driveType", self.drive_type) writer.write_str_value("id", self.id) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("path", self.path) writer.write_str_value("shareId", self.share_id) writer.write_object_value("sharepointIds", self.sharepoint_ids) diff --git a/msgraph/generated/models/join_meeting_id_settings.py b/msgraph/generated/models/join_meeting_id_settings.py index 68f40461784..d3dd3897d3c 100644 --- a/msgraph/generated/models/join_meeting_id_settings.py +++ b/msgraph/generated/models/join_meeting_id_settings.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isPasscodeRequired": lambda n : setattr(self, 'is_passcode_required', n.get_bool_value()), "joinMeetingId": lambda n : setattr(self, 'join_meeting_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "passcode": lambda n : setattr(self, 'passcode', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isPasscodeRequired", self.is_passcode_required) writer.write_str_value("joinMeetingId", self.join_meeting_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("passcode", self.passcode) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/json.py b/msgraph/generated/models/json.py index 63874705b85..bb61d046ec9 100644 --- a/msgraph/generated/models/json.py +++ b/msgraph/generated/models/json.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/key_credential.py b/msgraph/generated/models/key_credential.py index 6b7adb250d1..415e147d1bf 100644 --- a/msgraph/generated/models/key_credential.py +++ b/msgraph/generated/models/key_credential.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), "key": lambda n : setattr(self, 'key', n.get_bytes_value()), "keyId": lambda n : setattr(self, 'key_id', n.get_uuid_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), "usage": lambda n : setattr(self, 'usage', n.get_str_value()), @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("endDateTime", self.end_date_time) writer.write_bytes_value("key", self.key) writer.write_uuid_value("keyId", self.key_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_str_value("type", self.type) writer.write_str_value("usage", self.usage) diff --git a/msgraph/generated/models/key_credential_configuration.py b/msgraph/generated/models/key_credential_configuration.py index add0ebde468..0a37d9c9fff 100644 --- a/msgraph/generated/models/key_credential_configuration.py +++ b/msgraph/generated/models/key_credential_configuration.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "maxLifetime": lambda n : setattr(self, 'max_lifetime', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "restrictForAppsCreatedAfterDateTime": lambda n : setattr(self, 'restrict_for_apps_created_after_date_time', n.get_datetime_value()), "restrictionType": lambda n : setattr(self, 'restriction_type', n.get_enum_value(AppKeyCredentialRestrictionType)), } @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_timedelta_value("maxLifetime", self.max_lifetime) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("restrictForAppsCreatedAfterDateTime", self.restrict_for_apps_created_after_date_time) writer.write_enum_value("restrictionType", self.restriction_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/key_value.py b/msgraph/generated/models/key_value.py index 720a02e2507..1ca86b00cb4 100644 --- a/msgraph/generated/models/key_value.py +++ b/msgraph/generated/models/key_value.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/key_value_pair.py b/msgraph/generated/models/key_value_pair.py index 8bdc97b6363..0250f48f8b1 100644 --- a/msgraph/generated/models/key_value_pair.py +++ b/msgraph/generated/models/key_value_pair.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/landing_page.py b/msgraph/generated/models/landing_page.py new file mode 100644 index 00000000000..0b7c7b6aa2d --- /dev/null +++ b/msgraph/generated/models/landing_page.py @@ -0,0 +1,109 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_identity import EmailIdentity + from .entity import Entity + from .landing_page_detail import LandingPageDetail + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + +from .entity import Entity + +@dataclass +class LandingPage(Entity): + # The createdBy property + created_by: Optional[EmailIdentity] = None + # The createdDateTime property + created_date_time: Optional[datetime.datetime] = None + # The description property + description: Optional[str] = None + # The details property + details: Optional[List[LandingPageDetail]] = None + # The displayName property + display_name: Optional[str] = None + # The lastModifiedBy property + last_modified_by: Optional[EmailIdentity] = None + # The lastModifiedDateTime property + last_modified_date_time: Optional[datetime.datetime] = None + # The locale property + locale: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The source property + source: Optional[SimulationContentSource] = None + # The status property + status: Optional[SimulationContentStatus] = None + # The supportedLocales property + supported_locales: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> LandingPage: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LandingPage + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LandingPage() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .entity import Entity + from .landing_page_detail import LandingPageDetail + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + from .email_identity import EmailIdentity + from .entity import Entity + from .landing_page_detail import LandingPageDetail + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + fields: Dict[str, Callable[[Any], None]] = { + "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(EmailIdentity)), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "details": lambda n : setattr(self, 'details', n.get_collection_of_object_values(LandingPageDetail)), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), + "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), + "locale": lambda n : setattr(self, 'locale', n.get_str_value()), + "source": lambda n : setattr(self, 'source', n.get_enum_value(SimulationContentSource)), + "status": lambda n : setattr(self, 'status', n.get_enum_value(SimulationContentStatus)), + "supportedLocales": lambda n : setattr(self, 'supported_locales', n.get_collection_of_primitive_values(str)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("createdBy", self.created_by) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("description", self.description) + writer.write_collection_of_object_values("details", self.details) + writer.write_str_value("displayName", self.display_name) + writer.write_object_value("lastModifiedBy", self.last_modified_by) + writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) + writer.write_str_value("locale", self.locale) + writer.write_enum_value("source", self.source) + writer.write_enum_value("status", self.status) + writer.write_collection_of_primitive_values("supportedLocales", self.supported_locales) + + diff --git a/msgraph/generated/models/landing_page_collection_response.py b/msgraph/generated/models/landing_page_collection_response.py new file mode 100644 index 00000000000..1a56a8f2530 --- /dev/null +++ b/msgraph/generated/models/landing_page_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .landing_page import LandingPage + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class LandingPageCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[LandingPage]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> LandingPageCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LandingPageCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LandingPageCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .landing_page import LandingPage + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .landing_page import LandingPage + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(LandingPage)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/landing_page_detail.py b/msgraph/generated/models/landing_page_detail.py new file mode 100644 index 00000000000..928b1553e15 --- /dev/null +++ b/msgraph/generated/models/landing_page_detail.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + +from .entity import Entity + +@dataclass +class LandingPageDetail(Entity): + # The content property + content: Optional[str] = None + # The isDefaultLangauge property + is_default_langauge: Optional[bool] = None + # The language property + language: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> LandingPageDetail: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LandingPageDetail + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LandingPageDetail() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + + from .entity import Entity + + fields: Dict[str, Callable[[Any], None]] = { + "content": lambda n : setattr(self, 'content', n.get_str_value()), + "isDefaultLangauge": lambda n : setattr(self, 'is_default_langauge', n.get_bool_value()), + "language": lambda n : setattr(self, 'language', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("content", self.content) + writer.write_bool_value("isDefaultLangauge", self.is_default_langauge) + writer.write_str_value("language", self.language) + + diff --git a/msgraph/generated/models/landing_page_detail_collection_response.py b/msgraph/generated/models/landing_page_detail_collection_response.py new file mode 100644 index 00000000000..16e8aed7278 --- /dev/null +++ b/msgraph/generated/models/landing_page_detail_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .landing_page_detail import LandingPageDetail + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class LandingPageDetailCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[LandingPageDetail]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> LandingPageDetailCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LandingPageDetailCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LandingPageDetailCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .landing_page_detail import LandingPageDetail + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .landing_page_detail import LandingPageDetail + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(LandingPageDetail)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/license_assignment_state.py b/msgraph/generated/models/license_assignment_state.py index 9ee48b62979..4371380680b 100644 --- a/msgraph/generated/models/license_assignment_state.py +++ b/msgraph/generated/models/license_assignment_state.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "disabledPlans": lambda n : setattr(self, 'disabled_plans', n.get_collection_of_primitive_values(UUID)), "error": lambda n : setattr(self, 'error', n.get_str_value()), "lastUpdatedDateTime": lambda n : setattr(self, 'last_updated_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "skuId": lambda n : setattr(self, 'sku_id', n.get_uuid_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), } @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("disabledPlans", self.disabled_plans) writer.write_str_value("error", self.error) writer.write_datetime_value("lastUpdatedDateTime", self.last_updated_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_uuid_value("skuId", self.sku_id) writer.write_str_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/license_processing_state.py b/msgraph/generated/models/license_processing_state.py index bff47965290..9e81079302d 100644 --- a/msgraph/generated/models/license_processing_state.py +++ b/msgraph/generated/models/license_processing_state.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/license_units_detail.py b/msgraph/generated/models/license_units_detail.py index bb1c15b982a..0800a8c6fee 100644 --- a/msgraph/generated/models/license_units_detail.py +++ b/msgraph/generated/models/license_units_detail.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "enabled": lambda n : setattr(self, 'enabled', n.get_int_value()), "lockedOut": lambda n : setattr(self, 'locked_out', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "suspended": lambda n : setattr(self, 'suspended', n.get_int_value()), "warning": lambda n : setattr(self, 'warning', n.get_int_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("enabled", self.enabled) writer.write_int_value("lockedOut", self.locked_out) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("suspended", self.suspended) writer.write_int_value("warning", self.warning) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/list_.py b/msgraph/generated/models/list_.py index 5856380b647..5d2111560a5 100644 --- a/msgraph/generated/models/list_.py +++ b/msgraph/generated/models/list_.py @@ -27,11 +27,11 @@ class List_(BaseItem): content_types: Optional[List[ContentType]] = None # The displayable title of the list. display_name: Optional[str] = None - # Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + # Allows access to the list as a drive resource with driveItems. Only present on document libraries. drive: Optional[Drive] = None # All items contained in the list. items: Optional[List[ListItem]] = None - # Provides additional details about the list. + # Contains more details about the list. list_: Optional[ListInfo] = None # The collection of long-running operations on the list. operations: Optional[List[RichLongRunningOperation]] = None @@ -39,7 +39,7 @@ class List_(BaseItem): sharepoint_ids: Optional[SharepointIds] = None # The set of subscriptions on the list. subscriptions: Optional[List[Subscription]] = None - # If present, indicates that this is a system-managed list. Read-only. + # If present, indicates that the list is system-managed. Read-only. system: Optional[SystemFacet] = None @staticmethod diff --git a/msgraph/generated/models/list_info.py b/msgraph/generated/models/list_info.py index 1fa465186bb..342b30fc7cb 100644 --- a/msgraph/generated/models/list_info.py +++ b/msgraph/generated/models/list_info.py @@ -13,7 +13,7 @@ class ListInfo(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # If true, indicates that content types are enabled for this list. content_types_enabled: Optional[bool] = None - # If true, indicates that the list is not normally visible in the SharePoint user experience. + # If true, indicates that the list isn't normally visible in the SharePoint user experience. hidden: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "contentTypesEnabled": lambda n : setattr(self, 'content_types_enabled', n.get_bool_value()), "hidden": lambda n : setattr(self, 'hidden', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "template": lambda n : setattr(self, 'template', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("contentTypesEnabled", self.content_types_enabled) writer.write_bool_value("hidden", self.hidden) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("template", self.template) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/lobby_bypass_settings.py b/msgraph/generated/models/lobby_bypass_settings.py index 86730ff9959..f02f75bc1cb 100644 --- a/msgraph/generated/models/lobby_bypass_settings.py +++ b/msgraph/generated/models/lobby_bypass_settings.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isDialInBypassEnabled": lambda n : setattr(self, 'is_dial_in_bypass_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "scope": lambda n : setattr(self, 'scope', n.get_enum_value(LobbyBypassScope)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isDialInBypassEnabled", self.is_dial_in_bypass_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("scope", self.scope) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/locale_info.py b/msgraph/generated/models/locale_info.py index 633a9ac3ce7..9f6201e56d2 100644 --- a/msgraph/generated/models/locale_info.py +++ b/msgraph/generated/models/locale_info.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "locale": lambda n : setattr(self, 'locale', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("locale", self.locale) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/location.py b/msgraph/generated/models/location.py index bf018150552..abc650cdb4c 100644 --- a/msgraph/generated/models/location.py +++ b/msgraph/generated/models/location.py @@ -80,7 +80,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "locationEmailAddress": lambda n : setattr(self, 'location_email_address', n.get_str_value()), "locationType": lambda n : setattr(self, 'location_type', n.get_enum_value(LocationType)), "locationUri": lambda n : setattr(self, 'location_uri', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "uniqueId": lambda n : setattr(self, 'unique_id', n.get_str_value()), "uniqueIdType": lambda n : setattr(self, 'unique_id_type', n.get_enum_value(LocationUniqueIdType)), } @@ -100,7 +100,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("locationEmailAddress", self.location_email_address) writer.write_enum_value("locationType", self.location_type) writer.write_str_value("locationUri", self.location_uri) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("uniqueId", self.unique_id) writer.write_enum_value("uniqueIdType", self.unique_id_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/location_constraint.py b/msgraph/generated/models/location_constraint.py index 64d4bda4b89..d5ebccc74f7 100644 --- a/msgraph/generated/models/location_constraint.py +++ b/msgraph/generated/models/location_constraint.py @@ -14,7 +14,7 @@ class LocationConstraint(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 client requests the service to include in the response a meeting location for the meeting. If this is true and all the resources are busy, findMeetingTimes will not return any meeting time suggestions. If this is false and all the resources are busy, findMeetingTimes would still look for meeting times without locations. + # The client requests the service to include in the response a meeting location for the meeting. If this is true and all the resources are busy, findMeetingTimes won't return any meeting time suggestions. If this is false and all the resources are busy, findMeetingTimes would still look for meeting times without locations. is_required: Optional[bool] = None # Constraint information for one or more locations that the client requests for the meeting. locations: Optional[List[LocationConstraintItem]] = None @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isRequired": lambda n : setattr(self, 'is_required', n.get_bool_value()), "locations": lambda n : setattr(self, 'locations', n.get_collection_of_object_values(LocationConstraintItem)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "suggestLocation": lambda n : setattr(self, 'suggest_location', n.get_bool_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isRequired", self.is_required) writer.write_collection_of_object_values("locations", self.locations) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("suggestLocation", self.suggest_location) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/login_page.py b/msgraph/generated/models/login_page.py new file mode 100644 index 00000000000..bb4cefc1e0b --- /dev/null +++ b/msgraph/generated/models/login_page.py @@ -0,0 +1,102 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_identity import EmailIdentity + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + +from .entity import Entity + +@dataclass +class LoginPage(Entity): + # The content property + content: Optional[str] = None + # The createdBy property + created_by: Optional[EmailIdentity] = None + # The createdDateTime property + created_date_time: Optional[datetime.datetime] = None + # The description property + description: Optional[str] = None + # The displayName property + display_name: Optional[str] = None + # The language property + language: Optional[str] = None + # The lastModifiedBy property + last_modified_by: Optional[EmailIdentity] = None + # The lastModifiedDateTime property + last_modified_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None + # The source property + source: Optional[SimulationContentSource] = None + # The status property + status: Optional[SimulationContentStatus] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> LoginPage: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LoginPage + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LoginPage() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + from .email_identity import EmailIdentity + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + fields: Dict[str, Callable[[Any], None]] = { + "content": lambda n : setattr(self, 'content', n.get_str_value()), + "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(EmailIdentity)), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "language": lambda n : setattr(self, 'language', n.get_str_value()), + "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), + "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), + "source": lambda n : setattr(self, 'source', n.get_enum_value(SimulationContentSource)), + "status": lambda n : setattr(self, 'status', n.get_enum_value(SimulationContentStatus)), + } + 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_str_value("content", self.content) + writer.write_object_value("createdBy", self.created_by) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("description", self.description) + writer.write_str_value("displayName", self.display_name) + writer.write_str_value("language", self.language) + writer.write_object_value("lastModifiedBy", self.last_modified_by) + writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) + writer.write_enum_value("source", self.source) + writer.write_enum_value("status", self.status) + + diff --git a/msgraph/generated/models/login_page_collection_response.py b/msgraph/generated/models/login_page_collection_response.py new file mode 100644 index 00000000000..c928ae02994 --- /dev/null +++ b/msgraph/generated/models/login_page_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .login_page import LoginPage + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class LoginPageCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[LoginPage]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> LoginPageCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LoginPageCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LoginPageCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .login_page import LoginPage + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .login_page import LoginPage + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(LoginPage)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/login_page_layout_configuration.py b/msgraph/generated/models/login_page_layout_configuration.py index 95fd6ac5d48..5d4bbc428db 100644 --- a/msgraph/generated/models/login_page_layout_configuration.py +++ b/msgraph/generated/models/login_page_layout_configuration.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isFooterShown": lambda n : setattr(self, 'is_footer_shown', n.get_bool_value()), "isHeaderShown": lambda n : setattr(self, 'is_header_shown', n.get_bool_value()), "layoutTemplateType": lambda n : setattr(self, 'layout_template_type', n.get_enum_value(LayoutTemplateType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isFooterShown", self.is_footer_shown) writer.write_bool_value("isHeaderShown", self.is_header_shown) writer.write_enum_value("layoutTemplateType", self.layout_template_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/login_page_text_visibility_settings.py b/msgraph/generated/models/login_page_text_visibility_settings.py index 34d9272b604..ed91c5e2f86 100644 --- a/msgraph/generated/models/login_page_text_visibility_settings.py +++ b/msgraph/generated/models/login_page_text_visibility_settings.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "hidePrivacyAndCookies": lambda n : setattr(self, 'hide_privacy_and_cookies', n.get_bool_value()), "hideResetItNow": lambda n : setattr(self, 'hide_reset_it_now', n.get_bool_value()), "hideTermsOfUse": lambda n : setattr(self, 'hide_terms_of_use', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("hidePrivacyAndCookies", self.hide_privacy_and_cookies) writer.write_bool_value("hideResetItNow", self.hide_reset_it_now) writer.write_bool_value("hideTermsOfUse", self.hide_terms_of_use) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/long_running_operation.py b/msgraph/generated/models/long_running_operation.py index d67e0e8e324..7ae600d3610 100644 --- a/msgraph/generated/models/long_running_operation.py +++ b/msgraph/generated/models/long_running_operation.py @@ -5,6 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: + from .attack_simulation_operation import AttackSimulationOperation from .entity import Entity from .long_running_operation_status import LongRunningOperationStatus from .rich_long_running_operation import RichLongRunningOperation @@ -39,6 +40,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> L mapping_value = parse_node.get_child_node("@odata.type").get_str_value() except AttributeError: mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.attackSimulationOperation".casefold(): + from .attack_simulation_operation import AttackSimulationOperation + + return AttackSimulationOperation() if mapping_value and mapping_value.casefold() == "#microsoft.graph.richLongRunningOperation".casefold(): from .rich_long_running_operation import RichLongRunningOperation @@ -50,10 +55,12 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .attack_simulation_operation import AttackSimulationOperation from .entity import Entity from .long_running_operation_status import LongRunningOperationStatus from .rich_long_running_operation import RichLongRunningOperation + from .attack_simulation_operation import AttackSimulationOperation from .entity import Entity from .long_running_operation_status import LongRunningOperationStatus from .rich_long_running_operation import RichLongRunningOperation diff --git a/msgraph/generated/models/lookup_column.py b/msgraph/generated/models/lookup_column.py index dcfd45f3202..3c2469718fc 100644 --- a/msgraph/generated/models/lookup_column.py +++ b/msgraph/generated/models/lookup_column.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowUnlimitedLength": lambda n : setattr(self, 'allow_unlimited_length', n.get_bool_value()), "columnName": lambda n : setattr(self, 'column_name', n.get_str_value()), "listId": lambda n : setattr(self, 'list_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "primaryLookupColumnId": lambda n : setattr(self, 'primary_lookup_column_id', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowUnlimitedLength", self.allow_unlimited_length) writer.write_str_value("columnName", self.column_name) writer.write_str_value("listId", self.list_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("primaryLookupColumnId", self.primary_lookup_column_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mac_o_s_included_app.py b/msgraph/generated/models/mac_o_s_included_app.py index 6ae81768884..846351e7435 100644 --- a/msgraph/generated/models/mac_o_s_included_app.py +++ b/msgraph/generated/models/mac_o_s_included_app.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "bundleId": lambda n : setattr(self, 'bundle_id', n.get_str_value()), "bundleVersion": lambda n : setattr(self, 'bundle_version', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("bundleId", self.bundle_id) writer.write_str_value("bundleVersion", self.bundle_version) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mac_o_s_lob_child_app.py b/msgraph/generated/models/mac_o_s_lob_child_app.py index 430d5aa7911..61242136fa3 100644 --- a/msgraph/generated/models/mac_o_s_lob_child_app.py +++ b/msgraph/generated/models/mac_o_s_lob_child_app.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "buildNumber": lambda n : setattr(self, 'build_number', n.get_str_value()), "bundleId": lambda n : setattr(self, 'bundle_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "versionNumber": lambda n : setattr(self, 'version_number', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("buildNumber", self.build_number) writer.write_str_value("bundleId", self.bundle_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("versionNumber", self.version_number) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mac_o_s_minimum_operating_system.py b/msgraph/generated/models/mac_o_s_minimum_operating_system.py index 01683bc602f..d5e3b8006fa 100644 --- a/msgraph/generated/models/mac_o_s_minimum_operating_system.py +++ b/msgraph/generated/models/mac_o_s_minimum_operating_system.py @@ -58,7 +58,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "v10_10": lambda n : setattr(self, 'v10_10', n.get_bool_value()), "v10_11": lambda n : setattr(self, 'v10_11', n.get_bool_value()), "v10_12": lambda n : setattr(self, 'v10_12', n.get_bool_value()), @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("v10_10", self.v10_10) writer.write_bool_value("v10_11", self.v10_11) writer.write_bool_value("v10_12", self.v10_12) diff --git a/msgraph/generated/models/mail_tips.py b/msgraph/generated/models/mail_tips.py index e08c92e07fa..e27b32bb421 100644 --- a/msgraph/generated/models/mail_tips.py +++ b/msgraph/generated/models/mail_tips.py @@ -83,7 +83,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isModerated": lambda n : setattr(self, 'is_moderated', n.get_bool_value()), "mailboxFull": lambda n : setattr(self, 'mailbox_full', n.get_bool_value()), "maxMessageSize": lambda n : setattr(self, 'max_message_size', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recipientScope": lambda n : setattr(self, 'recipient_scope', n.get_collection_of_enum_values(RecipientScopeType)), "recipientSuggestions": lambda n : setattr(self, 'recipient_suggestions', n.get_collection_of_object_values(Recipient)), "totalMemberCount": lambda n : setattr(self, 'total_member_count', n.get_int_value()), @@ -107,7 +107,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isModerated", self.is_moderated) writer.write_bool_value("mailboxFull", self.mailbox_full) writer.write_int_value("maxMessageSize", self.max_message_size) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("recipientScope", self.recipient_scope) writer.write_collection_of_object_values("recipientSuggestions", self.recipient_suggestions) writer.write_int_value("totalMemberCount", self.total_member_count) diff --git a/msgraph/generated/models/mail_tips_error.py b/msgraph/generated/models/mail_tips_error.py index b4c29309db2..7a8d3fba7a1 100644 --- a/msgraph/generated/models/mail_tips_error.py +++ b/msgraph/generated/models/mail_tips_error.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mailbox_settings.py b/msgraph/generated/models/mailbox_settings.py index c274e162df9..3059758c08d 100644 --- a/msgraph/generated/models/mailbox_settings.py +++ b/msgraph/generated/models/mailbox_settings.py @@ -73,7 +73,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dateFormat": lambda n : setattr(self, 'date_format', n.get_str_value()), "delegateMeetingMessageDeliveryOptions": lambda n : setattr(self, 'delegate_meeting_message_delivery_options', n.get_enum_value(DelegateMeetingMessageDeliveryOptions)), "language": lambda n : setattr(self, 'language', n.get_object_value(LocaleInfo)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeFormat": lambda n : setattr(self, 'time_format', n.get_str_value()), "timeZone": lambda n : setattr(self, 'time_zone', n.get_str_value()), "userPurpose": lambda n : setattr(self, 'user_purpose', n.get_enum_value(UserPurpose)), @@ -94,7 +94,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("dateFormat", self.date_format) writer.write_enum_value("delegateMeetingMessageDeliveryOptions", self.delegate_meeting_message_delivery_options) writer.write_object_value("language", self.language) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("timeFormat", self.time_format) writer.write_str_value("timeZone", self.time_zone) writer.write_enum_value("userPurpose", self.user_purpose) diff --git a/msgraph/generated/models/malware.py b/msgraph/generated/models/malware.py index cc00a47bb38..c7a9fbf9204 100644 --- a/msgraph/generated/models/malware.py +++ b/msgraph/generated/models/malware.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/malware_state.py b/msgraph/generated/models/malware_state.py index 9b87b46c48d..a87ead7b84c 100644 --- a/msgraph/generated/models/malware_state.py +++ b/msgraph/generated/models/malware_state.py @@ -13,7 +13,7 @@ class MalwareState(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # Provider-generated malware category (for example, trojan, ransomware, etc.). category: Optional[str] = None - # Provider-generated malware family (for example, 'wannacry', 'notpetya', etc.). + # Provider-generated malware family (for example, 'wannacry,' 'notpetya,' etc.). family: Optional[str] = None # Provider-generated malware variant name (for example, Trojan:Win32/Powessere.H). name: Optional[str] = None @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "category": lambda n : setattr(self, 'category', n.get_str_value()), "family": lambda n : setattr(self, 'family', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "severity": lambda n : setattr(self, 'severity', n.get_str_value()), "wasRunning": lambda n : setattr(self, 'was_running', n.get_bool_value()), } @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("category", self.category) writer.write_str_value("family", self.family) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("severity", self.severity) writer.write_bool_value("wasRunning", self.was_running) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/managed_app_diagnostic_status.py b/msgraph/generated/models/managed_app_diagnostic_status.py index 73f9ec149cf..b9b76ac6ca4 100644 --- a/msgraph/generated/models/managed_app_diagnostic_status.py +++ b/msgraph/generated/models/managed_app_diagnostic_status.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "mitigationInstruction": lambda n : setattr(self, 'mitigation_instruction', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), "validationName": lambda n : setattr(self, 'validation_name', n.get_str_value()), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("mitigationInstruction", self.mitigation_instruction) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("state", self.state) writer.write_str_value("validationName", self.validation_name) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/managed_app_policy_deployment_summary_per_app.py b/msgraph/generated/models/managed_app_policy_deployment_summary_per_app.py index ccf9a3620a7..e08253faf2e 100644 --- a/msgraph/generated/models/managed_app_policy_deployment_summary_per_app.py +++ b/msgraph/generated/models/managed_app_policy_deployment_summary_per_app.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "configurationAppliedUserCount": lambda n : setattr(self, 'configuration_applied_user_count', n.get_int_value()), "mobileAppIdentifier": lambda n : setattr(self, 'mobile_app_identifier', n.get_object_value(MobileAppIdentifier)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("configurationAppliedUserCount", self.configuration_applied_user_count) writer.write_object_value("mobileAppIdentifier", self.mobile_app_identifier) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/managed_e_book.py b/msgraph/generated/models/managed_e_book.py index 591fb8902df..fa8cbb10ce0 100644 --- a/msgraph/generated/models/managed_e_book.py +++ b/msgraph/generated/models/managed_e_book.py @@ -6,8 +6,8 @@ if TYPE_CHECKING: from .device_install_state import DeviceInstallState - from .e_book_install_summary import EBookInstallSummary from .entity import Entity + from .e_book_install_summary import EBookInstallSummary from .ios_vpp_e_book import IosVppEBook from .managed_e_book_assignment import ManagedEBookAssignment from .mime_content import MimeContent @@ -74,16 +74,16 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .device_install_state import DeviceInstallState - from .e_book_install_summary import EBookInstallSummary from .entity import Entity + from .e_book_install_summary import EBookInstallSummary from .ios_vpp_e_book import IosVppEBook from .managed_e_book_assignment import ManagedEBookAssignment from .mime_content import MimeContent from .user_install_state_summary import UserInstallStateSummary from .device_install_state import DeviceInstallState - from .e_book_install_summary import EBookInstallSummary from .entity import Entity + from .e_book_install_summary import EBookInstallSummary from .ios_vpp_e_book import IosVppEBook from .managed_e_book_assignment import ManagedEBookAssignment from .mime_content import MimeContent diff --git a/msgraph/generated/models/media_config.py b/msgraph/generated/models/media_config.py index a94b657311b..e704994a09d 100644 --- a/msgraph/generated/models/media_config.py +++ b/msgraph/generated/models/media_config.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .service_hosted_media_config import ServiceHostedMediaConfig fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_australia.py b/msgraph/generated/models/media_content_rating_australia.py index efe68a4e868..21beb1fe56d 100644 --- a/msgraph/generated/models/media_content_rating_australia.py +++ b/msgraph/generated/models/media_content_rating_australia.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingAustraliaMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingAustraliaTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_canada.py b/msgraph/generated/models/media_content_rating_canada.py index ab143cd5933..184dc30dee6 100644 --- a/msgraph/generated/models/media_content_rating_canada.py +++ b/msgraph/generated/models/media_content_rating_canada.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingCanadaMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingCanadaTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_france.py b/msgraph/generated/models/media_content_rating_france.py index 41363b61b90..21d42ddc936 100644 --- a/msgraph/generated/models/media_content_rating_france.py +++ b/msgraph/generated/models/media_content_rating_france.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingFranceMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingFranceTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_germany.py b/msgraph/generated/models/media_content_rating_germany.py index a9d10eb5c1b..4ac15283a1a 100644 --- a/msgraph/generated/models/media_content_rating_germany.py +++ b/msgraph/generated/models/media_content_rating_germany.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingGermanyMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingGermanyTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_ireland.py b/msgraph/generated/models/media_content_rating_ireland.py index f58d4260e43..6f1fe076560 100644 --- a/msgraph/generated/models/media_content_rating_ireland.py +++ b/msgraph/generated/models/media_content_rating_ireland.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingIrelandMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingIrelandTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_japan.py b/msgraph/generated/models/media_content_rating_japan.py index 7db513d0a1c..e19ff2250dd 100644 --- a/msgraph/generated/models/media_content_rating_japan.py +++ b/msgraph/generated/models/media_content_rating_japan.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingJapanMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingJapanTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_new_zealand.py b/msgraph/generated/models/media_content_rating_new_zealand.py index 541753a7fb6..2318edc4106 100644 --- a/msgraph/generated/models/media_content_rating_new_zealand.py +++ b/msgraph/generated/models/media_content_rating_new_zealand.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingNewZealandMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingNewZealandTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_united_kingdom.py b/msgraph/generated/models/media_content_rating_united_kingdom.py index b56475e4abb..be5f0227e2d 100644 --- a/msgraph/generated/models/media_content_rating_united_kingdom.py +++ b/msgraph/generated/models/media_content_rating_united_kingdom.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingUnitedKingdomMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingUnitedKingdomTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_content_rating_united_states.py b/msgraph/generated/models/media_content_rating_united_states.py index 1527addce01..412bcea42cc 100644 --- a/msgraph/generated/models/media_content_rating_united_states.py +++ b/msgraph/generated/models/media_content_rating_united_states.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "movieRating": lambda n : setattr(self, 'movie_rating', n.get_enum_value(RatingUnitedStatesMoviesType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tvRating": lambda n : setattr(self, 'tv_rating', n.get_enum_value(RatingUnitedStatesTelevisionType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("movieRating", self.movie_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("tvRating", self.tv_rating) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_info.py b/msgraph/generated/models/media_info.py index d9eae92d262..6acf85e9c15 100644 --- a/msgraph/generated/models/media_info.py +++ b/msgraph/generated/models/media_info.py @@ -13,9 +13,9 @@ class MediaInfo(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The OdataType property odata_type: Optional[str] = None - # Optional. Used to uniquely identity the resource. If passed in, the prompt uri will be cached against this resourceId as a key. + # Optional. Used to uniquely identity the resource. If passed in, the prompt uri is against this resourceId as a key. resource_id: Optional[str] = None - # Path to the prompt that will be played. Currently supports only Wave file (.wav) format, single-channel, 16-bit samples with a 16,000 (16KHz) sampling rate. + # Path to the prompt that will be played. Currently supports only Wave file (.wav) format, single-channel, 16-bit samples with a 16,000 (16 KHz) sampling rate. uri: Optional[str] = None @staticmethod @@ -35,7 +35,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceId": lambda n : setattr(self, 'resource_id', n.get_str_value()), "uri": lambda n : setattr(self, 'uri', n.get_str_value()), } @@ -49,7 +49,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("resourceId", self.resource_id) writer.write_str_value("uri", self.uri) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/media_stream.py b/msgraph/generated/models/media_stream.py index ffe5cecc2a9..0a4f1d2874f 100644 --- a/msgraph/generated/models/media_stream.py +++ b/msgraph/generated/models/media_stream.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "direction": lambda n : setattr(self, 'direction', n.get_enum_value(MediaDirection)), "label": lambda n : setattr(self, 'label', n.get_str_value()), "mediaType": lambda n : setattr(self, 'media_type', n.get_enum_value(Modality)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "serverMuted": lambda n : setattr(self, 'server_muted', n.get_bool_value()), "sourceId": lambda n : setattr(self, 'source_id', n.get_str_value()), } @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("direction", self.direction) writer.write_str_value("label", self.label) writer.write_enum_value("mediaType", self.media_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("serverMuted", self.server_muted) writer.write_str_value("sourceId", self.source_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/meeting_info.py b/msgraph/generated/models/meeting_info.py index 27a1bb6ea66..ba6ec2bf755 100644 --- a/msgraph/generated/models/meeting_info.py +++ b/msgraph/generated/models/meeting_info.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .token_meeting_info import TokenMeetingInfo fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/meeting_participant_info.py b/msgraph/generated/models/meeting_participant_info.py index 16dd35bb997..66af0571342 100644 --- a/msgraph/generated/models/meeting_participant_info.py +++ b/msgraph/generated/models/meeting_participant_info.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "identity": lambda n : setattr(self, 'identity', n.get_object_value(IdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "role": lambda n : setattr(self, 'role', n.get_enum_value(OnlineMeetingRole)), "upn": lambda n : setattr(self, 'upn', n.get_str_value()), } @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("identity", self.identity) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("role", self.role) writer.write_str_value("upn", self.upn) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/meeting_participants.py b/msgraph/generated/models/meeting_participants.py index 8b085965f39..43634a5f115 100644 --- a/msgraph/generated/models/meeting_participants.py +++ b/msgraph/generated/models/meeting_participants.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "attendees": lambda n : setattr(self, 'attendees', n.get_collection_of_object_values(MeetingParticipantInfo)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "organizer": lambda n : setattr(self, 'organizer', n.get_object_value(MeetingParticipantInfo)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("attendees", self.attendees) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("organizer", self.organizer) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/meeting_time_suggestion.py b/msgraph/generated/models/meeting_time_suggestion.py index 69b991b1e75..c0080ff41f8 100644 --- a/msgraph/generated/models/meeting_time_suggestion.py +++ b/msgraph/generated/models/meeting_time_suggestion.py @@ -65,7 +65,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "confidence": lambda n : setattr(self, 'confidence', n.get_float_value()), "locations": lambda n : setattr(self, 'locations', n.get_collection_of_object_values(Location)), "meetingTimeSlot": lambda n : setattr(self, 'meeting_time_slot', n.get_object_value(TimeSlot)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "order": lambda n : setattr(self, 'order', n.get_int_value()), "organizerAvailability": lambda n : setattr(self, 'organizer_availability', n.get_enum_value(FreeBusyStatus)), "suggestionReason": lambda n : setattr(self, 'suggestion_reason', n.get_str_value()), @@ -84,7 +84,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_float_value("confidence", self.confidence) writer.write_collection_of_object_values("locations", self.locations) writer.write_object_value("meetingTimeSlot", self.meeting_time_slot) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("order", self.order) writer.write_enum_value("organizerAvailability", self.organizer_availability) writer.write_str_value("suggestionReason", self.suggestion_reason) diff --git a/msgraph/generated/models/meeting_time_suggestions_result.py b/msgraph/generated/models/meeting_time_suggestions_result.py index 52e656f1522..cc5c54d9f8c 100644 --- a/msgraph/generated/models/meeting_time_suggestions_result.py +++ b/msgraph/generated/models/meeting_time_suggestions_result.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "emptySuggestionsReason": lambda n : setattr(self, 'empty_suggestions_reason', n.get_str_value()), "meetingTimeSuggestions": lambda n : setattr(self, 'meeting_time_suggestions', n.get_collection_of_object_values(MeetingTimeSuggestion)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("emptySuggestionsReason", self.empty_suggestions_reason) writer.write_collection_of_object_values("meetingTimeSuggestions", self.meeting_time_suggestions) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/message_rule_actions.py b/msgraph/generated/models/message_rule_actions.py index 21c2ff47195..ae3c4db06a6 100644 --- a/msgraph/generated/models/message_rule_actions.py +++ b/msgraph/generated/models/message_rule_actions.py @@ -71,7 +71,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "markAsRead": lambda n : setattr(self, 'mark_as_read', n.get_bool_value()), "markImportance": lambda n : setattr(self, 'mark_importance', n.get_enum_value(Importance)), "moveToFolder": lambda n : setattr(self, 'move_to_folder', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "permanentDelete": lambda n : setattr(self, 'permanent_delete', n.get_bool_value()), "redirectTo": lambda n : setattr(self, 'redirect_to', n.get_collection_of_object_values(Recipient)), "stopProcessingRules": lambda n : setattr(self, 'stop_processing_rules', n.get_bool_value()), @@ -94,7 +94,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("markAsRead", self.mark_as_read) writer.write_enum_value("markImportance", self.mark_importance) writer.write_str_value("moveToFolder", self.move_to_folder) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("permanentDelete", self.permanent_delete) writer.write_collection_of_object_values("redirectTo", self.redirect_to) writer.write_bool_value("stopProcessingRules", self.stop_processing_rules) diff --git a/msgraph/generated/models/message_rule_predicates.py b/msgraph/generated/models/message_rule_predicates.py index bd77e75282a..8f92bc3edab 100644 --- a/msgraph/generated/models/message_rule_predicates.py +++ b/msgraph/generated/models/message_rule_predicates.py @@ -130,7 +130,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isVoicemail": lambda n : setattr(self, 'is_voicemail', n.get_bool_value()), "messageActionFlag": lambda n : setattr(self, 'message_action_flag', n.get_enum_value(MessageActionFlag)), "notSentToMe": lambda n : setattr(self, 'not_sent_to_me', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recipientContains": lambda n : setattr(self, 'recipient_contains', n.get_collection_of_primitive_values(str)), "senderContains": lambda n : setattr(self, 'sender_contains', n.get_collection_of_primitive_values(str)), "sensitivity": lambda n : setattr(self, 'sensitivity', n.get_enum_value(Sensitivity)), @@ -172,7 +172,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isVoicemail", self.is_voicemail) writer.write_enum_value("messageActionFlag", self.message_action_flag) writer.write_bool_value("notSentToMe", self.not_sent_to_me) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("recipientContains", self.recipient_contains) writer.write_collection_of_primitive_values("senderContains", self.sender_contains) writer.write_enum_value("sensitivity", self.sensitivity) diff --git a/msgraph/generated/models/message_security_state.py b/msgraph/generated/models/message_security_state.py index eeb1ab69d7e..611811db552 100644 --- a/msgraph/generated/models/message_security_state.py +++ b/msgraph/generated/models/message_security_state.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "messageReceivedDateTime": lambda n : setattr(self, 'message_received_date_time', n.get_datetime_value()), "messageSubject": lambda n : setattr(self, 'message_subject', n.get_str_value()), "networkMessageId": lambda n : setattr(self, 'network_message_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -80,7 +80,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("messageReceivedDateTime", self.message_received_date_time) writer.write_str_value("messageSubject", self.message_subject) writer.write_str_value("networkMessageId", self.network_message_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/microsoft_authenticator_authentication_method.py b/msgraph/generated/models/microsoft_authenticator_authentication_method.py index 35c8b8d50aa..0fd6589c9f0 100644 --- a/msgraph/generated/models/microsoft_authenticator_authentication_method.py +++ b/msgraph/generated/models/microsoft_authenticator_authentication_method.py @@ -14,9 +14,9 @@ class MicrosoftAuthenticatorAuthenticationMethod(AuthenticationMethod): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod" - # The date and time that this app was registered. This property is null if the device is not registered for passwordless Phone Sign-In. + # The date and time that this app was registered. This property is null if the device isn't registered for passwordless Phone Sign-In. created_date_time: Optional[datetime.datetime] = None - # The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. + # The registered device on which Microsoft Authenticator resides. This property is null if the device isn't registered for passwordless Phone Sign-In. device: Optional[Device] = None # Tags containing app metadata. device_tag: Optional[str] = None diff --git a/msgraph/generated/models/microsoft_authenticator_feature_settings.py b/msgraph/generated/models/microsoft_authenticator_feature_settings.py index ec1be192eb3..8212ef7279d 100644 --- a/msgraph/generated/models/microsoft_authenticator_feature_settings.py +++ b/msgraph/generated/models/microsoft_authenticator_feature_settings.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayAppInformationRequiredState": lambda n : setattr(self, 'display_app_information_required_state', n.get_object_value(AuthenticationMethodFeatureConfiguration)), "displayLocationInformationRequiredState": lambda n : setattr(self, 'display_location_information_required_state', n.get_object_value(AuthenticationMethodFeatureConfiguration)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("displayAppInformationRequiredState", self.display_app_information_required_state) writer.write_object_value("displayLocationInformationRequiredState", self.display_location_information_required_state) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/microsoft_custom_training_setting.py b/msgraph/generated/models/microsoft_custom_training_setting.py new file mode 100644 index 00000000000..f9c189b65f5 --- /dev/null +++ b/msgraph/generated/models/microsoft_custom_training_setting.py @@ -0,0 +1,71 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + from .training_completion_duration import TrainingCompletionDuration + from .training_setting import TrainingSetting + +from .training_setting import TrainingSetting + +@dataclass +class MicrosoftCustomTrainingSetting(TrainingSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.microsoftCustomTrainingSetting" + # The completionDateTime property + completion_date_time: Optional[datetime.datetime] = None + # The trainingAssignmentMappings property + training_assignment_mappings: Optional[List[MicrosoftTrainingAssignmentMapping]] = None + # The trainingCompletionDuration property + training_completion_duration: Optional[TrainingCompletionDuration] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MicrosoftCustomTrainingSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MicrosoftCustomTrainingSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MicrosoftCustomTrainingSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + from .training_completion_duration import TrainingCompletionDuration + from .training_setting import TrainingSetting + + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + from .training_completion_duration import TrainingCompletionDuration + from .training_setting import TrainingSetting + + fields: Dict[str, Callable[[Any], None]] = { + "completionDateTime": lambda n : setattr(self, 'completion_date_time', n.get_datetime_value()), + "trainingAssignmentMappings": lambda n : setattr(self, 'training_assignment_mappings', n.get_collection_of_object_values(MicrosoftTrainingAssignmentMapping)), + "trainingCompletionDuration": lambda n : setattr(self, 'training_completion_duration', n.get_enum_value(TrainingCompletionDuration)), + } + 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_datetime_value("completionDateTime", self.completion_date_time) + writer.write_collection_of_object_values("trainingAssignmentMappings", self.training_assignment_mappings) + writer.write_enum_value("trainingCompletionDuration", self.training_completion_duration) + + diff --git a/msgraph/generated/models/microsoft_managed_training_setting.py b/msgraph/generated/models/microsoft_managed_training_setting.py new file mode 100644 index 00000000000..d7e8dcdc0d8 --- /dev/null +++ b/msgraph/generated/models/microsoft_managed_training_setting.py @@ -0,0 +1,64 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .training_completion_duration import TrainingCompletionDuration + from .training_setting import TrainingSetting + +from .training_setting import TrainingSetting + +@dataclass +class MicrosoftManagedTrainingSetting(TrainingSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.microsoftManagedTrainingSetting" + # The completionDateTime property + completion_date_time: Optional[datetime.datetime] = None + # The trainingCompletionDuration property + training_completion_duration: Optional[TrainingCompletionDuration] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MicrosoftManagedTrainingSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MicrosoftManagedTrainingSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MicrosoftManagedTrainingSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .training_completion_duration import TrainingCompletionDuration + from .training_setting import TrainingSetting + + from .training_completion_duration import TrainingCompletionDuration + from .training_setting import TrainingSetting + + fields: Dict[str, Callable[[Any], None]] = { + "completionDateTime": lambda n : setattr(self, 'completion_date_time', n.get_datetime_value()), + "trainingCompletionDuration": lambda n : setattr(self, 'training_completion_duration', n.get_enum_value(TrainingCompletionDuration)), + } + 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_datetime_value("completionDateTime", self.completion_date_time) + writer.write_enum_value("trainingCompletionDuration", self.training_completion_duration) + + diff --git a/msgraph/generated/models/microsoft_training_assignment_mapping.py b/msgraph/generated/models/microsoft_training_assignment_mapping.py new file mode 100644 index 00000000000..39c51b5a0cf --- /dev/null +++ b/msgraph/generated/models/microsoft_training_assignment_mapping.py @@ -0,0 +1,66 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .training import Training + from .training_assigned_to import TrainingAssignedTo + from .training_setting import TrainingSetting + +from .training_setting import TrainingSetting + +@dataclass +class MicrosoftTrainingAssignmentMapping(TrainingSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.microsoftTrainingAssignmentMapping" + # The assignedTo property + assigned_to: Optional[List[TrainingAssignedTo]] = None + # The training property + training: Optional[Training] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MicrosoftTrainingAssignmentMapping: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MicrosoftTrainingAssignmentMapping + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MicrosoftTrainingAssignmentMapping() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .training import Training + from .training_assigned_to import TrainingAssignedTo + from .training_setting import TrainingSetting + + from .training import Training + from .training_assigned_to import TrainingAssignedTo + from .training_setting import TrainingSetting + + fields: Dict[str, Callable[[Any], None]] = { + "assignedTo": lambda n : setattr(self, 'assigned_to', n.get_collection_of_enum_values(TrainingAssignedTo)), + "training": lambda n : setattr(self, 'training', n.get_object_value(Training)), + } + 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_enum_values("assignedTo", self.assigned_to) + writer.write_object_value("training", self.training) + + diff --git a/msgraph/generated/models/mime_content.py b/msgraph/generated/models/mime_content.py index f52e46d0598..7e1d11dba42 100644 --- a/msgraph/generated/models/mime_content.py +++ b/msgraph/generated/models/mime_content.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_bytes_value()), } @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_bytes_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mobile_app_assignment_settings.py b/msgraph/generated/models/mobile_app_assignment_settings.py index 9f57f3d28d4..ace6ae854f5 100644 --- a/msgraph/generated/models/mobile_app_assignment_settings.py +++ b/msgraph/generated/models/mobile_app_assignment_settings.py @@ -98,7 +98,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .windows_universal_app_x_app_assignment_settings import WindowsUniversalAppXAppAssignmentSettings fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -110,7 +110,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mobile_app_content_collection_response.py b/msgraph/generated/models/mobile_app_content_collection_response.py new file mode 100644 index 00000000000..1f495796514 --- /dev/null +++ b/msgraph/generated/models/mobile_app_content_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_app_content import MobileAppContent + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class MobileAppContentCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[MobileAppContent]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MobileAppContentCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MobileAppContentCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MobileAppContentCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_app_content import MobileAppContent + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_app_content import MobileAppContent + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(MobileAppContent)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/mobile_app_content_file_collection_response.py b/msgraph/generated/models/mobile_app_content_file_collection_response.py new file mode 100644 index 00000000000..658a5daabea --- /dev/null +++ b/msgraph/generated/models/mobile_app_content_file_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_app_content_file import MobileAppContentFile + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class MobileAppContentFileCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[MobileAppContentFile]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MobileAppContentFileCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MobileAppContentFileCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MobileAppContentFileCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_app_content_file import MobileAppContentFile + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_app_content_file import MobileAppContentFile + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(MobileAppContentFile)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/mobile_app_identifier.py b/msgraph/generated/models/mobile_app_identifier.py index e0e3256bdd2..9aa8ba8596c 100644 --- a/msgraph/generated/models/mobile_app_identifier.py +++ b/msgraph/generated/models/mobile_app_identifier.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .ios_mobile_app_identifier import IosMobileAppIdentifier fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mobile_app_install_time_settings.py b/msgraph/generated/models/mobile_app_install_time_settings.py index 284053ccde3..7c4c047a602 100644 --- a/msgraph/generated/models/mobile_app_install_time_settings.py +++ b/msgraph/generated/models/mobile_app_install_time_settings.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "deadlineDateTime": lambda n : setattr(self, 'deadline_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "useLocalTime": lambda n : setattr(self, 'use_local_time', n.get_bool_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("deadlineDateTime", self.deadline_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_bool_value("useLocalTime", self.use_local_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/mobile_contained_app_collection_response.py b/msgraph/generated/models/mobile_contained_app_collection_response.py new file mode 100644 index 00000000000..40a37c17a93 --- /dev/null +++ b/msgraph/generated/models/mobile_contained_app_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_contained_app import MobileContainedApp + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class MobileContainedAppCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[MobileContainedApp]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> MobileContainedAppCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MobileContainedAppCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MobileContainedAppCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_contained_app import MobileContainedApp + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .mobile_contained_app import MobileContainedApp + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(MobileContainedApp)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/modified_property.py b/msgraph/generated/models/modified_property.py index 614836b2e80..41591b90fab 100644 --- a/msgraph/generated/models/modified_property.py +++ b/msgraph/generated/models/modified_property.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "newValue": lambda n : setattr(self, 'new_value', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oldValue": lambda n : setattr(self, 'old_value', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("newValue", self.new_value) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("oldValue", self.old_value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/network_connection.py b/msgraph/generated/models/network_connection.py index 40a49e0db3e..c80138d717f 100644 --- a/msgraph/generated/models/network_connection.py +++ b/msgraph/generated/models/network_connection.py @@ -98,7 +98,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "natDestinationPort": lambda n : setattr(self, 'nat_destination_port', n.get_str_value()), "natSourceAddress": lambda n : setattr(self, 'nat_source_address', n.get_str_value()), "natSourcePort": lambda n : setattr(self, 'nat_source_port', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "protocol": lambda n : setattr(self, 'protocol', n.get_enum_value(SecurityNetworkProtocol)), "riskScore": lambda n : setattr(self, 'risk_score', n.get_str_value()), "sourceAddress": lambda n : setattr(self, 'source_address', n.get_str_value()), @@ -130,7 +130,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("natDestinationPort", self.nat_destination_port) writer.write_str_value("natSourceAddress", self.nat_source_address) writer.write_str_value("natSourcePort", self.nat_source_port) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("protocol", self.protocol) writer.write_str_value("riskScore", self.risk_score) writer.write_str_value("sourceAddress", self.source_address) diff --git a/msgraph/generated/models/no_training_notification_setting.py b/msgraph/generated/models/no_training_notification_setting.py new file mode 100644 index 00000000000..1bcd585f28a --- /dev/null +++ b/msgraph/generated/models/no_training_notification_setting.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .end_user_notification_setting import EndUserNotificationSetting + from .simulation_notification import SimulationNotification + +from .end_user_notification_setting import EndUserNotificationSetting + +@dataclass +class NoTrainingNotificationSetting(EndUserNotificationSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.noTrainingNotificationSetting" + # The simulationNotification property + simulation_notification: Optional[SimulationNotification] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> NoTrainingNotificationSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NoTrainingNotificationSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NoTrainingNotificationSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .end_user_notification_setting import EndUserNotificationSetting + from .simulation_notification import SimulationNotification + + from .end_user_notification_setting import EndUserNotificationSetting + from .simulation_notification import SimulationNotification + + fields: Dict[str, Callable[[Any], None]] = { + "simulationNotification": lambda n : setattr(self, 'simulation_notification', n.get_object_value(SimulationNotification)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("simulationNotification", self.simulation_notification) + + diff --git a/msgraph/generated/models/no_training_setting.py b/msgraph/generated/models/no_training_setting.py new file mode 100644 index 00000000000..6bda695e53a --- /dev/null +++ b/msgraph/generated/models/no_training_setting.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .training_setting import TrainingSetting + +from .training_setting import TrainingSetting + +@dataclass +class NoTrainingSetting(TrainingSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.noTrainingSetting" + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> NoTrainingSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NoTrainingSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NoTrainingSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .training_setting import TrainingSetting + + from .training_setting import TrainingSetting + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/notebook_links.py b/msgraph/generated/models/notebook_links.py index 5834cfc149c..0c11f2fd2ae 100644 --- a/msgraph/generated/models/notebook_links.py +++ b/msgraph/generated/models/notebook_links.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_link import ExternalLink fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oneNoteClientUrl": lambda n : setattr(self, 'one_note_client_url', n.get_object_value(ExternalLink)), "oneNoteWebUrl": lambda n : setattr(self, 'one_note_web_url', n.get_object_value(ExternalLink)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("oneNoteClientUrl", self.one_note_client_url) writer.write_object_value("oneNoteWebUrl", self.one_note_web_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/notification_delivery_frequency.py b/msgraph/generated/models/notification_delivery_frequency.py new file mode 100644 index 00000000000..f150b41c290 --- /dev/null +++ b/msgraph/generated/models/notification_delivery_frequency.py @@ -0,0 +1,8 @@ +from enum import Enum + +class NotificationDeliveryFrequency(str, Enum): + Unknown = "unknown", + Weekly = "weekly", + BiWeekly = "biWeekly", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/notification_delivery_preference.py b/msgraph/generated/models/notification_delivery_preference.py new file mode 100644 index 00000000000..fee3ec3ad61 --- /dev/null +++ b/msgraph/generated/models/notification_delivery_preference.py @@ -0,0 +1,8 @@ +from enum import Enum + +class NotificationDeliveryPreference(str, Enum): + Unknown = "unknown", + DeliverImmedietly = "deliverImmedietly", + DeliverAfterCampaignEnd = "deliverAfterCampaignEnd", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/number_column.py b/msgraph/generated/models/number_column.py index 9da3368546f..68693a65038 100644 --- a/msgraph/generated/models/number_column.py +++ b/msgraph/generated/models/number_column.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayAs": lambda n : setattr(self, 'display_as', n.get_str_value()), "maximum": lambda n : setattr(self, 'maximum', n.get_float_value()), "minimum": lambda n : setattr(self, 'minimum', n.get_float_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayAs", self.display_as) writer.write_float_value("maximum", self.maximum) writer.write_float_value("minimum", self.minimum) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/o_auth_app_scope.py b/msgraph/generated/models/o_auth_app_scope.py new file mode 100644 index 00000000000..811a4405092 --- /dev/null +++ b/msgraph/generated/models/o_auth_app_scope.py @@ -0,0 +1,13 @@ +from enum import Enum + +class OAuthAppScope(str, Enum): + Unknown = "unknown", + ReadCalendar = "readCalendar", + ReadContact = "readContact", + ReadMail = "readMail", + ReadAllChat = "readAllChat", + ReadAllFile = "readAllFile", + ReadAndWriteMail = "readAndWriteMail", + SendMail = "sendMail", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/models/o_auth_consent_app_detail.py similarity index 66% rename from msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_post_request_body.py rename to msgraph/generated/models/o_auth_consent_app_detail.py index 6df44acfcae..2ca32e894a5 100644 --- a/msgraph/generated/identity_governance/entitlement_management/connected_organizations/item/external_sponsors/validate_properties/validate_properties_post_request_body.py +++ b/msgraph/generated/models/o_auth_consent_app_detail.py @@ -3,45 +3,51 @@ from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID + +if TYPE_CHECKING: + from .o_auth_app_scope import OAuthAppScope @dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): +class OAuthConsentAppDetail(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) + # The appScope property + app_scope: Optional[OAuthAppScope] = None + # The displayLogo property + display_logo: Optional[str] = None # The displayName property display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None + # The OdataType property + odata_type: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> OAuthConsentAppDetail: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody + Returns: OAuthConsentAppDetail """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() + return OAuthConsentAppDetail() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .o_auth_app_scope import OAuthAppScope + + from .o_auth_app_scope import OAuthAppScope + fields: Dict[str, Callable[[Any], None]] = { + "appScope": lambda n : setattr(self, 'app_scope', n.get_enum_value(OAuthAppScope)), + "displayLogo": lambda n : setattr(self, 'display_logo', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -53,10 +59,10 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") + writer.write_enum_value("appScope", self.app_scope) + writer.write_str_value("displayLogo", self.display_logo) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/o_data_errors/inner_error.py b/msgraph/generated/models/o_data_errors/inner_error.py index dd003ead61b..87484e1f01c 100644 --- a/msgraph/generated/models/o_data_errors/inner_error.py +++ b/msgraph/generated/models/o_data_errors/inner_error.py @@ -38,10 +38,10 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "client-request-id": lambda n : setattr(self, 'client_request_id', n.get_str_value()), + "clientRequestId": lambda n : setattr(self, 'client_request_id', n.get_str_value()), "Date": lambda n : setattr(self, 'date', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), - "request-id": lambda n : setattr(self, 'request_id', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "requestId": lambda n : setattr(self, 'request_id', n.get_str_value()), } return fields @@ -53,10 +53,10 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("client-request-id", self.client_request_id) + writer.write_str_value("clientRequestId", self.client_request_id) writer.write_datetime_value("Date", self.date) - writer.write_str_value("@odata.type", self.odata_type) - writer.write_str_value("request-id", self.request_id) + writer.write_str_value("OdataType", self.odata_type) + writer.write_str_value("requestId", self.request_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/o_data_errors/o_data_error.py b/msgraph/generated/models/o_data_errors/o_data_error.py index d238e504b70..785564134a0 100644 --- a/msgraph/generated/models/o_data_errors/o_data_error.py +++ b/msgraph/generated/models/o_data_errors/o_data_error.py @@ -54,4 +54,12 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("error", self.error) writer.write_additional_data_value(self.additional_data) + @property + def primary_message(self) -> str: + """ + The primary error message. + """ + if self.error is not None: + return '' if self.error.message is None else self.error.message + return '' diff --git a/msgraph/generated/models/object_definition.py b/msgraph/generated/models/object_definition.py index 0c8971c901e..517850bef9d 100644 --- a/msgraph/generated/models/object_definition.py +++ b/msgraph/generated/models/object_definition.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "attributes": lambda n : setattr(self, 'attributes', n.get_collection_of_object_values(AttributeDefinition)), "metadata": lambda n : setattr(self, 'metadata', n.get_collection_of_object_values(ObjectDefinitionMetadataEntry)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "supportedApis": lambda n : setattr(self, 'supported_apis', n.get_collection_of_primitive_values(str)), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("attributes", self.attributes) writer.write_collection_of_object_values("metadata", self.metadata) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("supportedApis", self.supported_apis) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/object_definition_metadata_entry.py b/msgraph/generated/models/object_definition_metadata_entry.py index b96e1aaf966..61a2992b5b0 100644 --- a/msgraph/generated/models/object_definition_metadata_entry.py +++ b/msgraph/generated/models/object_definition_metadata_entry.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_enum_value(ObjectDefinitionMetadata)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/object_identity.py b/msgraph/generated/models/object_identity.py index 0d2b6b5eb21..1bf12efdc3c 100644 --- a/msgraph/generated/models/object_identity.py +++ b/msgraph/generated/models/object_identity.py @@ -11,7 +11,7 @@ class ObjectIdentity(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) - # 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 external users from other Azure AD organization, this is the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. + # 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. issuer_assigned_id: Optional[str] = None @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "issuer": lambda n : setattr(self, 'issuer', n.get_str_value()), "issuerAssignedId": lambda n : setattr(self, 'issuer_assigned_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "signInType": lambda n : setattr(self, 'sign_in_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("issuer", self.issuer) writer.write_str_value("issuerAssignedId", self.issuer_assigned_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("signInType", self.sign_in_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/object_mapping.py b/msgraph/generated/models/object_mapping.py index 05179398388..6bcdd0ba155 100644 --- a/msgraph/generated/models/object_mapping.py +++ b/msgraph/generated/models/object_mapping.py @@ -68,7 +68,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "flowTypes": lambda n : setattr(self, 'flow_types', n.get_collection_of_enum_values(ObjectFlowTypes)), "metadata": lambda n : setattr(self, 'metadata', n.get_collection_of_object_values(ObjectMappingMetadataEntry)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "scope": lambda n : setattr(self, 'scope', n.get_object_value(Filter)), "sourceObjectName": lambda n : setattr(self, 'source_object_name', n.get_str_value()), "targetObjectName": lambda n : setattr(self, 'target_object_name', n.get_str_value()), @@ -88,7 +88,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("flowTypes", self.flow_types) writer.write_collection_of_object_values("metadata", self.metadata) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("scope", self.scope) writer.write_str_value("sourceObjectName", self.source_object_name) writer.write_str_value("targetObjectName", self.target_object_name) diff --git a/msgraph/generated/models/object_mapping_metadata_entry.py b/msgraph/generated/models/object_mapping_metadata_entry.py index 93bfe56c31a..05a685811be 100644 --- a/msgraph/generated/models/object_mapping_metadata_entry.py +++ b/msgraph/generated/models/object_mapping_metadata_entry.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_enum_value(ObjectMappingMetadata)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/oma_setting.py b/msgraph/generated/models/oma_setting.py index c0791892a36..4253551fd56 100644 --- a/msgraph/generated/models/oma_setting.py +++ b/msgraph/generated/models/oma_setting.py @@ -99,7 +99,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "omaUri": lambda n : setattr(self, 'oma_uri', n.get_str_value()), } return fields @@ -114,7 +114,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("omaUri", self.oma_uri) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/on_premises_accidental_deletion_prevention.py b/msgraph/generated/models/on_premises_accidental_deletion_prevention.py index acbc045a7bd..fddf033d462 100644 --- a/msgraph/generated/models/on_premises_accidental_deletion_prevention.py +++ b/msgraph/generated/models/on_premises_accidental_deletion_prevention.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "alertThreshold": lambda n : setattr(self, 'alert_threshold', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "synchronizationPreventionType": lambda n : setattr(self, 'synchronization_prevention_type', n.get_enum_value(OnPremisesDirectorySynchronizationDeletionPreventionType)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("alertThreshold", self.alert_threshold) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("synchronizationPreventionType", self.synchronization_prevention_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/on_premises_directory_synchronization_configuration.py b/msgraph/generated/models/on_premises_directory_synchronization_configuration.py index fda0ceb8f0f..4a7ed68bfe0 100644 --- a/msgraph/generated/models/on_premises_directory_synchronization_configuration.py +++ b/msgraph/generated/models/on_premises_directory_synchronization_configuration.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "accidentalDeletionPrevention": lambda n : setattr(self, 'accidental_deletion_prevention', n.get_object_value(OnPremisesAccidentalDeletionPrevention)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("accidentalDeletionPrevention", self.accidental_deletion_prevention) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/on_premises_directory_synchronization_feature.py b/msgraph/generated/models/on_premises_directory_synchronization_feature.py index 92e6770545f..4e870f06369 100644 --- a/msgraph/generated/models/on_premises_directory_synchronization_feature.py +++ b/msgraph/generated/models/on_premises_directory_synchronization_feature.py @@ -15,7 +15,7 @@ class OnPremisesDirectorySynchronizationFeature(AdditionalDataHolder, BackedMode block_cloud_object_takeover_through_hard_match_enabled: Optional[bool] = None # Use to block soft match for all objects if enabled for the tenant. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching has been completed and is no longer needed. block_soft_match_enabled: Optional[bool] = None - # When true, persists the values of Mobile and OtherMobile in on-premises AD during sync cycles instead of values of MobilePhone or AlternateMobilePhones in Azure AD. + # When true, persists the values of Mobile and OtherMobile in on-premises AD during sync cycles instead of values of MobilePhone or AlternateMobilePhones in Microsoft Entra ID. bypass_dir_sync_overrides_enabled: Optional[bool] = None # Used to indicate that cloud password policy applies to users whose passwords are synchronized from on-premises. cloud_password_policy_for_password_synced_users_enabled: Optional[bool] = None @@ -25,7 +25,7 @@ class OnPremisesDirectorySynchronizationFeature(AdditionalDataHolder, BackedMode concurrent_org_id_provisioning_enabled: Optional[bool] = None # Used to indicate that device write-back is enabled. device_writeback_enabled: Optional[bool] = None - # Used to indicate that directory extensions are being synced from on-premises AD to Azure AD. + # Used to indicate that directory extensions are being synced from on-premises AD to Microsoft Entra ID. directory_extensions_enabled: Optional[bool] = None # Used to indicate that for a Microsoft Forefront Online Protection for Exchange (FOPE) migrated tenant, the conflicting proxy address should be migrated over. fope_conflict_resolution_enabled: Optional[bool] = None @@ -35,7 +35,7 @@ class OnPremisesDirectorySynchronizationFeature(AdditionalDataHolder, BackedMode odata_type: Optional[str] = None # Used to indicate on-premise password synchronization is enabled. password_sync_enabled: Optional[bool] = None - # Used to indicate that writeback of password resets from Azure AD to on-premises AD is enabled. + # Used to indicate that writeback of password resets from Microsoft Entra ID to on-premises AD is enabled. password_writeback_enabled: Optional[bool] = None # Used to indicate that we should quarantine objects with conflicting proxy address. quarantine_upon_proxy_addresses_conflict_enabled: Optional[bool] = None @@ -79,7 +79,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "directoryExtensionsEnabled": lambda n : setattr(self, 'directory_extensions_enabled', n.get_bool_value()), "fopeConflictResolutionEnabled": lambda n : setattr(self, 'fope_conflict_resolution_enabled', n.get_bool_value()), "groupWriteBackEnabled": lambda n : setattr(self, 'group_write_back_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "passwordSyncEnabled": lambda n : setattr(self, 'password_sync_enabled', n.get_bool_value()), "passwordWritebackEnabled": lambda n : setattr(self, 'password_writeback_enabled', n.get_bool_value()), "quarantineUponProxyAddressesConflictEnabled": lambda n : setattr(self, 'quarantine_upon_proxy_addresses_conflict_enabled', n.get_bool_value()), @@ -110,7 +110,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("directoryExtensionsEnabled", self.directory_extensions_enabled) writer.write_bool_value("fopeConflictResolutionEnabled", self.fope_conflict_resolution_enabled) writer.write_bool_value("groupWriteBackEnabled", self.group_write_back_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("passwordSyncEnabled", self.password_sync_enabled) writer.write_bool_value("passwordWritebackEnabled", self.password_writeback_enabled) writer.write_bool_value("quarantineUponProxyAddressesConflictEnabled", self.quarantine_upon_proxy_addresses_conflict_enabled) diff --git a/msgraph/generated/models/on_premises_extension_attributes.py b/msgraph/generated/models/on_premises_extension_attributes.py index 3d98fbe7646..600633c1436 100644 --- a/msgraph/generated/models/on_premises_extension_attributes.py +++ b/msgraph/generated/models/on_premises_extension_attributes.py @@ -76,7 +76,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "extensionAttribute7": lambda n : setattr(self, 'extension_attribute7', n.get_str_value()), "extensionAttribute8": lambda n : setattr(self, 'extension_attribute8', n.get_str_value()), "extensionAttribute9": lambda n : setattr(self, 'extension_attribute9', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -103,7 +103,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("extensionAttribute7", self.extension_attribute7) writer.write_str_value("extensionAttribute8", self.extension_attribute8) writer.write_str_value("extensionAttribute9", self.extension_attribute9) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/on_premises_provisioning_error.py b/msgraph/generated/models/on_premises_provisioning_error.py index 7a2305b477f..e62a2e69621 100644 --- a/msgraph/generated/models/on_premises_provisioning_error.py +++ b/msgraph/generated/models/on_premises_provisioning_error.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "category": lambda n : setattr(self, 'category', n.get_str_value()), "occurredDateTime": lambda n : setattr(self, 'occurred_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "propertyCausingError": lambda n : setattr(self, 'property_causing_error', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("category", self.category) writer.write_datetime_value("occurredDateTime", self.occurred_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("propertyCausingError", self.property_causing_error) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/onenote.py b/msgraph/generated/models/onenote.py index e7c06a292b4..3f731129513 100644 --- a/msgraph/generated/models/onenote.py +++ b/msgraph/generated/models/onenote.py @@ -20,11 +20,11 @@ class Onenote(Entity): notebooks: Optional[List[Notebook]] = None # The OdataType property odata_type: Optional[str] = None - # The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. + # The status of OneNote operations. Getting an operations collection isn't supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. operations: Optional[List[OnenoteOperation]] = None # The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. pages: Optional[List[OnenotePage]] = None - # The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + # The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. resources: Optional[List[OnenoteResource]] = None # The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. section_groups: Optional[List[SectionGroup]] = None diff --git a/msgraph/generated/models/onenote_entity_hierarchy_model.py b/msgraph/generated/models/onenote_entity_hierarchy_model.py index 06016f9a624..b23684caaf7 100644 --- a/msgraph/generated/models/onenote_entity_hierarchy_model.py +++ b/msgraph/generated/models/onenote_entity_hierarchy_model.py @@ -17,11 +17,11 @@ class OnenoteEntityHierarchyModel(OnenoteEntitySchemaObjectModel): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.onenoteEntityHierarchyModel" - # Identity of the user, device, and application which created the item. Read-only. + # Identity of the user, device, and application that created the item. Read-only. created_by: Optional[IdentitySet] = None # The name of the notebook. display_name: Optional[str] = None - # Identity of the user, device, and application which created the item. Read-only. + # Identity of the user, device, and application that created the item. Read-only. last_modified_by: Optional[IdentitySet] = None # The date and time when the notebook was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. last_modified_date_time: Optional[datetime.datetime] = None diff --git a/msgraph/generated/models/onenote_operation_error.py b/msgraph/generated/models/onenote_operation_error.py index 54bab6810e4..6f0b9985964 100644 --- a/msgraph/generated/models/onenote_operation_error.py +++ b/msgraph/generated/models/onenote_operation_error.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/onenote_page_preview.py b/msgraph/generated/models/onenote_page_preview.py index 5aed4798add..5bab5a7145c 100644 --- a/msgraph/generated/models/onenote_page_preview.py +++ b/msgraph/generated/models/onenote_page_preview.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "links": lambda n : setattr(self, 'links', n.get_object_value(OnenotePagePreviewLinks)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "previewText": lambda n : setattr(self, 'preview_text', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("links", self.links) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("previewText", self.preview_text) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/onenote_page_preview_links.py b/msgraph/generated/models/onenote_page_preview_links.py index 44f1282da4c..cf03a2fb5eb 100644 --- a/msgraph/generated/models/onenote_page_preview_links.py +++ b/msgraph/generated/models/onenote_page_preview_links.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_link import ExternalLink fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "previewImageUrl": lambda n : setattr(self, 'preview_image_url', n.get_object_value(ExternalLink)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("previewImageUrl", self.preview_image_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/onenote_patch_content_command.py b/msgraph/generated/models/onenote_patch_content_command.py index 43a083df4a1..4f31015dc64 100644 --- a/msgraph/generated/models/onenote_patch_content_command.py +++ b/msgraph/generated/models/onenote_patch_content_command.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "action": lambda n : setattr(self, 'action', n.get_enum_value(OnenotePatchActionType)), "content": lambda n : setattr(self, 'content', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "position": lambda n : setattr(self, 'position', n.get_enum_value(OnenotePatchInsertPosition)), "target": lambda n : setattr(self, 'target', n.get_str_value()), } @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_enum_value("action", self.action) writer.write_str_value("content", self.content) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("position", self.position) writer.write_str_value("target", self.target) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/online_meeting.py b/msgraph/generated/models/online_meeting.py index 74e2909e899..756b8d25a54 100644 --- a/msgraph/generated/models/online_meeting.py +++ b/msgraph/generated/models/online_meeting.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from .audio_conferencing import AudioConferencing from .broadcast_meeting_settings import BroadcastMeetingSettings + from .call_transcript import CallTranscript from .chat_info import ChatInfo from .entity import Entity from .item_body import ItemBody @@ -37,11 +38,11 @@ class OnlineMeeting(Entity): allowed_presenters: Optional[OnlineMeetingPresenters] = None # The attendance reports of an online meeting. Read-only. attendance_reports: Optional[List[MeetingAttendanceReport]] = None - # The content stream of the attendee report of a Microsoft Teams live event. Read-only. + # The attendeeReport property attendee_report: Optional[bytes] = None # The phone access (dial-in) information for an online meeting. Read-only. audio_conferencing: Optional[AudioConferencing] = None - # Settings related to a live event. + # The broadcastSettings property broadcast_settings: Optional[BroadcastMeetingSettings] = None # The chat information associated with this online meeting. chat_info: Optional[ChatInfo] = None @@ -51,7 +52,7 @@ class OnlineMeeting(Entity): end_date_time: Optional[datetime.datetime] = None # The externalId property external_id: Optional[str] = None - # Indicates if this is a Teams live event. + # The isBroadcast property is_broadcast: Optional[bool] = None # Indicates whether to announce when callers join or leave. is_entry_exit_announced: Optional[bool] = None @@ -75,6 +76,8 @@ class OnlineMeeting(Entity): start_date_time: Optional[datetime.datetime] = None # The subject of the online meeting. subject: Optional[str] = None + # The transcripts of an online meeting. Read-only. + transcripts: Optional[List[CallTranscript]] = None # The video teleconferencing ID. Read-only. video_teleconference_id: Optional[str] = None # Specifies whether a watermark should be applied to a content type by the client application. @@ -98,6 +101,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ from .audio_conferencing import AudioConferencing from .broadcast_meeting_settings import BroadcastMeetingSettings + from .call_transcript import CallTranscript from .chat_info import ChatInfo from .entity import Entity from .item_body import ItemBody @@ -112,6 +116,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .audio_conferencing import AudioConferencing from .broadcast_meeting_settings import BroadcastMeetingSettings + from .call_transcript import CallTranscript from .chat_info import ChatInfo from .entity import Entity from .item_body import ItemBody @@ -150,6 +155,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "shareMeetingChatHistoryDefault": lambda n : setattr(self, 'share_meeting_chat_history_default', n.get_enum_value(MeetingChatHistoryDefaultMode)), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "subject": lambda n : setattr(self, 'subject', n.get_str_value()), + "transcripts": lambda n : setattr(self, 'transcripts', n.get_collection_of_object_values(CallTranscript)), "videoTeleconferenceId": lambda n : setattr(self, 'video_teleconference_id', n.get_str_value()), "watermarkProtection": lambda n : setattr(self, 'watermark_protection', n.get_object_value(WatermarkProtectionValues)), } @@ -191,6 +197,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("shareMeetingChatHistoryDefault", self.share_meeting_chat_history_default) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_str_value("subject", self.subject) + writer.write_collection_of_object_values("transcripts", self.transcripts) writer.write_str_value("videoTeleconferenceId", self.video_teleconference_id) writer.write_object_value("watermarkProtection", self.watermark_protection) diff --git a/msgraph/generated/models/online_meeting_info.py b/msgraph/generated/models/online_meeting_info.py index 17945d94a96..9bf3ab95289 100644 --- a/msgraph/generated/models/online_meeting_info.py +++ b/msgraph/generated/models/online_meeting_info.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "conferenceId": lambda n : setattr(self, 'conference_id', n.get_str_value()), "joinUrl": lambda n : setattr(self, 'join_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "phones": lambda n : setattr(self, 'phones', n.get_collection_of_object_values(Phone)), "quickDial": lambda n : setattr(self, 'quick_dial', n.get_str_value()), "tollFreeNumbers": lambda n : setattr(self, 'toll_free_numbers', n.get_collection_of_primitive_values(str)), @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("conferenceId", self.conference_id) writer.write_str_value("joinUrl", self.join_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("phones", self.phones) writer.write_str_value("quickDial", self.quick_dial) writer.write_collection_of_primitive_values("tollFreeNumbers", self.toll_free_numbers) diff --git a/msgraph/generated/models/online_meeting_restricted.py b/msgraph/generated/models/online_meeting_restricted.py index eabae0c717c..693bf6ec5a5 100644 --- a/msgraph/generated/models/online_meeting_restricted.py +++ b/msgraph/generated/models/online_meeting_restricted.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "contentSharingDisabled": lambda n : setattr(self, 'content_sharing_disabled', n.get_collection_of_enum_values(OnlineMeetingContentSharingDisabledReason)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "videoDisabled": lambda n : setattr(self, 'video_disabled', n.get_collection_of_enum_values(OnlineMeetingVideoDisabledReason)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("contentSharingDisabled", self.content_sharing_disabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("videoDisabled", self.video_disabled) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/operation_error.py b/msgraph/generated/models/operation_error.py index 5579120a639..c09709d5d91 100644 --- a/msgraph/generated/models/operation_error.py +++ b/msgraph/generated/models/operation_error.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/optional_claim.py b/msgraph/generated/models/optional_claim.py index c04bb62b392..86adabc45d1 100644 --- a/msgraph/generated/models/optional_claim.py +++ b/msgraph/generated/models/optional_claim.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "additionalProperties": lambda n : setattr(self, 'additional_properties', n.get_collection_of_primitive_values(str)), "essential": lambda n : setattr(self, 'essential', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "source": lambda n : setattr(self, 'source', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("additionalProperties", self.additional_properties) writer.write_bool_value("essential", self.essential) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("source", self.source) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/optional_claims.py b/msgraph/generated/models/optional_claims.py index eeba9658b44..13aa559a14d 100644 --- a/msgraph/generated/models/optional_claims.py +++ b/msgraph/generated/models/optional_claims.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "accessToken": lambda n : setattr(self, 'access_token', n.get_collection_of_object_values(OptionalClaim)), "idToken": lambda n : setattr(self, 'id_token', n.get_collection_of_object_values(OptionalClaim)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "saml2Token": lambda n : setattr(self, 'saml2_token', n.get_collection_of_object_values(OptionalClaim)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("accessToken", self.access_token) writer.write_collection_of_object_values("idToken", self.id_token) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("saml2Token", self.saml2_token) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/organizational_branding_properties.py b/msgraph/generated/models/organizational_branding_properties.py index 91945a9313f..4df96c7cd20 100644 --- a/msgraph/generated/models/organizational_branding_properties.py +++ b/msgraph/generated/models/organizational_branding_properties.py @@ -48,7 +48,7 @@ class OrganizationalBrandingProperties(Entity): custom_terms_of_use_text: Optional[str] = None # A custom URL to replace the default URL of the 'Terms of Use' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128characters. custom_terms_of_use_url: Optional[str] = None - # A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + # A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. favicon: Optional[bytes] = None # A relative url for the favicon above that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. favicon_relative_url: Optional[str] = None diff --git a/msgraph/generated/models/os_version_count.py b/msgraph/generated/models/os_version_count.py index b93fbcb24cf..a03e3c3901c 100644 --- a/msgraph/generated/models/os_version_count.py +++ b/msgraph/generated/models/os_version_count.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "deviceCount": lambda n : setattr(self, 'device_count', n.get_int_value()), "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "osVersion": lambda n : setattr(self, 'os_version', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("deviceCount", self.device_count) writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("osVersion", self.os_version) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/outlook_geo_coordinates.py b/msgraph/generated/models/outlook_geo_coordinates.py index db0d1a328b3..272a2d4a7d1 100644 --- a/msgraph/generated/models/outlook_geo_coordinates.py +++ b/msgraph/generated/models/outlook_geo_coordinates.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "altitudeAccuracy": lambda n : setattr(self, 'altitude_accuracy', n.get_float_value()), "latitude": lambda n : setattr(self, 'latitude', n.get_float_value()), "longitude": lambda n : setattr(self, 'longitude', n.get_float_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_float_value("altitudeAccuracy", self.altitude_accuracy) writer.write_float_value("latitude", self.latitude) writer.write_float_value("longitude", self.longitude) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/package.py b/msgraph/generated/models/package.py index 3f3589545bd..15b2346be74 100644 --- a/msgraph/generated/models/package.py +++ b/msgraph/generated/models/package.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/page_links.py b/msgraph/generated/models/page_links.py index c817054e015..2066c559d32 100644 --- a/msgraph/generated/models/page_links.py +++ b/msgraph/generated/models/page_links.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_link import ExternalLink fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oneNoteClientUrl": lambda n : setattr(self, 'one_note_client_url', n.get_object_value(ExternalLink)), "oneNoteWebUrl": lambda n : setattr(self, 'one_note_web_url', n.get_object_value(ExternalLink)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("oneNoteClientUrl", self.one_note_client_url) writer.write_object_value("oneNoteWebUrl", self.one_note_web_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/parental_control_settings.py b/msgraph/generated/models/parental_control_settings.py index 4dabb9777e3..a707d9719c8 100644 --- a/msgraph/generated/models/parental_control_settings.py +++ b/msgraph/generated/models/parental_control_settings.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "countriesBlockedForMinors": lambda n : setattr(self, 'countries_blocked_for_minors', n.get_collection_of_primitive_values(str)), "legalAgeGroupRule": lambda n : setattr(self, 'legal_age_group_rule', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("countriesBlockedForMinors", self.countries_blocked_for_minors) writer.write_str_value("legalAgeGroupRule", self.legal_age_group_rule) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/parse_expression_response.py b/msgraph/generated/models/parse_expression_response.py index 266c2c84320..a678f853080 100644 --- a/msgraph/generated/models/parse_expression_response.py +++ b/msgraph/generated/models/parse_expression_response.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "error": lambda n : setattr(self, 'error', n.get_object_value(PublicError)), "evaluationResult": lambda n : setattr(self, 'evaluation_result', n.get_collection_of_primitive_values(str)), "evaluationSucceeded": lambda n : setattr(self, 'evaluation_succeeded', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "parsedExpression": lambda n : setattr(self, 'parsed_expression', n.get_object_value(AttributeMappingSource)), "parsingSucceeded": lambda n : setattr(self, 'parsing_succeeded', n.get_bool_value()), } @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("error", self.error) writer.write_collection_of_primitive_values("evaluationResult", self.evaluation_result) writer.write_bool_value("evaluationSucceeded", self.evaluation_succeeded) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("parsedExpression", self.parsed_expression) writer.write_bool_value("parsingSucceeded", self.parsing_succeeded) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/participant_info.py b/msgraph/generated/models/participant_info.py index a72a759a0d6..22ef7781b3e 100644 --- a/msgraph/generated/models/participant_info.py +++ b/msgraph/generated/models/participant_info.py @@ -27,7 +27,7 @@ class ParticipantInfo(AdditionalDataHolder, BackedModel, Parsable): odata_type: Optional[str] = None # The participant ID of the participant. Read-only. participant_id: Optional[str] = None - # The home region of the participant. This can be a country, a continent, or a larger geographic region. This does not change based on the participant's current physical location. Read-only. + # The home region of the participant. This can be a country, a continent, or a larger geographic region. This doesn't change based on the participant's current physical location. Read-only. region: Optional[str] = None @staticmethod @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "endpointType": lambda n : setattr(self, 'endpoint_type', n.get_enum_value(EndpointType)), "identity": lambda n : setattr(self, 'identity', n.get_object_value(IdentitySet)), "languageId": lambda n : setattr(self, 'language_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "participantId": lambda n : setattr(self, 'participant_id', n.get_str_value()), "region": lambda n : setattr(self, 'region', n.get_str_value()), } @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("endpointType", self.endpoint_type) writer.write_object_value("identity", self.identity) writer.write_str_value("languageId", self.language_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("participantId", self.participant_id) writer.write_str_value("region", self.region) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/password_credential.py b/msgraph/generated/models/password_credential.py index 6fa9eb5a1df..038c591a866 100644 --- a/msgraph/generated/models/password_credential.py +++ b/msgraph/generated/models/password_credential.py @@ -25,7 +25,7 @@ class PasswordCredential(AdditionalDataHolder, BackedModel, Parsable): key_id: Optional[UUID] = None # The OdataType property odata_type: Optional[str] = None - # Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. + # Read-only; Contains the strong passwords generated by Microsoft Entra ID that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. secret_text: Optional[str] = None # The date and time at which the password becomes valid. 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. Optional. start_date_time: Optional[datetime.datetime] = None @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), "hint": lambda n : setattr(self, 'hint', n.get_str_value()), "keyId": lambda n : setattr(self, 'key_id', n.get_uuid_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "secretText": lambda n : setattr(self, 'secret_text', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), } @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("endDateTime", self.end_date_time) writer.write_str_value("hint", self.hint) writer.write_uuid_value("keyId", self.key_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("secretText", self.secret_text) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/password_credential_configuration.py b/msgraph/generated/models/password_credential_configuration.py index 024aa4853f3..1a178354b24 100644 --- a/msgraph/generated/models/password_credential_configuration.py +++ b/msgraph/generated/models/password_credential_configuration.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "maxLifetime": lambda n : setattr(self, 'max_lifetime', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "restrictForAppsCreatedAfterDateTime": lambda n : setattr(self, 'restrict_for_apps_created_after_date_time', n.get_datetime_value()), "restrictionType": lambda n : setattr(self, 'restriction_type', n.get_enum_value(AppCredentialRestrictionType)), } @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_timedelta_value("maxLifetime", self.max_lifetime) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("restrictForAppsCreatedAfterDateTime", self.restrict_for_apps_created_after_date_time) writer.write_enum_value("restrictionType", self.restriction_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/password_profile.py b/msgraph/generated/models/password_profile.py index 4f99ba6faf1..a3b7697262e 100644 --- a/msgraph/generated/models/password_profile.py +++ b/msgraph/generated/models/password_profile.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "forceChangePasswordNextSignIn": lambda n : setattr(self, 'force_change_password_next_sign_in', n.get_bool_value()), "forceChangePasswordNextSignInWithMfa": lambda n : setattr(self, 'force_change_password_next_sign_in_with_mfa', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "password": lambda n : setattr(self, 'password', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("forceChangePasswordNextSignIn", self.force_change_password_next_sign_in) writer.write_bool_value("forceChangePasswordNextSignInWithMfa", self.force_change_password_next_sign_in_with_mfa) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("password", self.password) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/password_reset_response.py b/msgraph/generated/models/password_reset_response.py index 930192827d1..82934111255 100644 --- a/msgraph/generated/models/password_reset_response.py +++ b/msgraph/generated/models/password_reset_response.py @@ -11,7 +11,7 @@ class PasswordResetResponse(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 Azure AD-generated password. + # The Microsoft Entra ID-generated password. new_password: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "newPassword": lambda n : setattr(self, 'new_password', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("newPassword", self.new_password) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/patterned_recurrence.py b/msgraph/generated/models/patterned_recurrence.py index 71d4817128c..a0e0f6f735b 100644 --- a/msgraph/generated/models/patterned_recurrence.py +++ b/msgraph/generated/models/patterned_recurrence.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .recurrence_range import RecurrenceRange fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "pattern": lambda n : setattr(self, 'pattern', n.get_object_value(RecurrencePattern)), "range": lambda n : setattr(self, 'range', n.get_object_value(RecurrenceRange)), } @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("pattern", self.pattern) writer.write_object_value("range", self.range) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/payload.py b/msgraph/generated/models/payload.py new file mode 100644 index 00000000000..cbc251f69fd --- /dev/null +++ b/msgraph/generated/models/payload.py @@ -0,0 +1,174 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_identity import EmailIdentity + from .entity import Entity + from .payload_brand import PayloadBrand + from .payload_complexity import PayloadComplexity + from .payload_delivery_platform import PayloadDeliveryPlatform + from .payload_detail import PayloadDetail + from .payload_industry import PayloadIndustry + from .payload_theme import PayloadTheme + from .simulation_attack_technique import SimulationAttackTechnique + from .simulation_attack_type import SimulationAttackType + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + +from .entity import Entity + +@dataclass +class Payload(Entity): + # The brand property + brand: Optional[PayloadBrand] = None + # The complexity property + complexity: Optional[PayloadComplexity] = None + # The createdBy property + created_by: Optional[EmailIdentity] = None + # The createdDateTime property + created_date_time: Optional[datetime.datetime] = None + # The description property + description: Optional[str] = None + # The detail property + detail: Optional[PayloadDetail] = None + # The displayName property + display_name: Optional[str] = None + # The industry property + industry: Optional[PayloadIndustry] = None + # The isAutomated property + is_automated: Optional[bool] = None + # The isControversial property + is_controversial: Optional[bool] = None + # The isCurrentEvent property + is_current_event: Optional[bool] = None + # The language property + language: Optional[str] = None + # The lastModifiedBy property + last_modified_by: Optional[EmailIdentity] = None + # The lastModifiedDateTime property + last_modified_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None + # The payloadTags property + payload_tags: Optional[List[str]] = None + # The platform property + platform: Optional[PayloadDeliveryPlatform] = None + # The predictedCompromiseRate property + predicted_compromise_rate: Optional[float] = None + # The simulationAttackType property + simulation_attack_type: Optional[SimulationAttackType] = None + # The source property + source: Optional[SimulationContentSource] = None + # The status property + status: Optional[SimulationContentStatus] = None + # The technique property + technique: Optional[SimulationAttackTechnique] = None + # The theme property + theme: Optional[PayloadTheme] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> Payload: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Payload + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Payload() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .entity import Entity + from .payload_brand import PayloadBrand + from .payload_complexity import PayloadComplexity + from .payload_delivery_platform import PayloadDeliveryPlatform + from .payload_detail import PayloadDetail + from .payload_industry import PayloadIndustry + from .payload_theme import PayloadTheme + from .simulation_attack_technique import SimulationAttackTechnique + from .simulation_attack_type import SimulationAttackType + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + from .email_identity import EmailIdentity + from .entity import Entity + from .payload_brand import PayloadBrand + from .payload_complexity import PayloadComplexity + from .payload_delivery_platform import PayloadDeliveryPlatform + from .payload_detail import PayloadDetail + from .payload_industry import PayloadIndustry + from .payload_theme import PayloadTheme + from .simulation_attack_technique import SimulationAttackTechnique + from .simulation_attack_type import SimulationAttackType + from .simulation_content_source import SimulationContentSource + from .simulation_content_status import SimulationContentStatus + + fields: Dict[str, Callable[[Any], None]] = { + "brand": lambda n : setattr(self, 'brand', n.get_enum_value(PayloadBrand)), + "complexity": lambda n : setattr(self, 'complexity', n.get_enum_value(PayloadComplexity)), + "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(EmailIdentity)), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "detail": lambda n : setattr(self, 'detail', n.get_object_value(PayloadDetail)), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "industry": lambda n : setattr(self, 'industry', n.get_enum_value(PayloadIndustry)), + "isAutomated": lambda n : setattr(self, 'is_automated', n.get_bool_value()), + "isControversial": lambda n : setattr(self, 'is_controversial', n.get_bool_value()), + "isCurrentEvent": lambda n : setattr(self, 'is_current_event', n.get_bool_value()), + "language": lambda n : setattr(self, 'language', n.get_str_value()), + "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), + "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), + "payloadTags": lambda n : setattr(self, 'payload_tags', n.get_collection_of_primitive_values(str)), + "platform": lambda n : setattr(self, 'platform', n.get_enum_value(PayloadDeliveryPlatform)), + "predictedCompromiseRate": lambda n : setattr(self, 'predicted_compromise_rate', n.get_float_value()), + "simulationAttackType": lambda n : setattr(self, 'simulation_attack_type', n.get_enum_value(SimulationAttackType)), + "source": lambda n : setattr(self, 'source', n.get_enum_value(SimulationContentSource)), + "status": lambda n : setattr(self, 'status', n.get_enum_value(SimulationContentStatus)), + "technique": lambda n : setattr(self, 'technique', n.get_enum_value(SimulationAttackTechnique)), + "theme": lambda n : setattr(self, 'theme', n.get_enum_value(PayloadTheme)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("brand", self.brand) + writer.write_enum_value("complexity", self.complexity) + writer.write_object_value("createdBy", self.created_by) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("description", self.description) + writer.write_object_value("detail", self.detail) + writer.write_str_value("displayName", self.display_name) + writer.write_enum_value("industry", self.industry) + writer.write_bool_value("isAutomated", self.is_automated) + writer.write_bool_value("isControversial", self.is_controversial) + writer.write_bool_value("isCurrentEvent", self.is_current_event) + writer.write_str_value("language", self.language) + writer.write_object_value("lastModifiedBy", self.last_modified_by) + writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) + writer.write_collection_of_primitive_values("payloadTags", self.payload_tags) + writer.write_enum_value("platform", self.platform) + writer.write_float_value("predictedCompromiseRate", self.predicted_compromise_rate) + writer.write_enum_value("simulationAttackType", self.simulation_attack_type) + writer.write_enum_value("source", self.source) + writer.write_enum_value("status", self.status) + writer.write_enum_value("technique", self.technique) + writer.write_enum_value("theme", self.theme) + + diff --git a/msgraph/generated/models/payload_brand.py b/msgraph/generated/models/payload_brand.py new file mode 100644 index 00000000000..01880c77384 --- /dev/null +++ b/msgraph/generated/models/payload_brand.py @@ -0,0 +1,25 @@ +from enum import Enum + +class PayloadBrand(str, Enum): + Unknown = "unknown", + Other = "other", + AmericanExpress = "americanExpress", + CapitalOne = "capitalOne", + Dhl = "dhl", + DocuSign = "docuSign", + Dropbox = "dropbox", + Facebook = "facebook", + FirstAmerican = "firstAmerican", + Microsoft = "microsoft", + Netflix = "netflix", + Scotiabank = "scotiabank", + SendGrid = "sendGrid", + StewartTitle = "stewartTitle", + Tesco = "tesco", + WellsFargo = "wellsFargo", + SyrinxCloud = "syrinxCloud", + Adobe = "adobe", + Teams = "teams", + Zoom = "zoom", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/payload_coachmark.py b/msgraph/generated/models/payload_coachmark.py new file mode 100644 index 00000000000..ed243f931bc --- /dev/null +++ b/msgraph/generated/models/payload_coachmark.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .coachmark_location import CoachmarkLocation + +@dataclass +class PayloadCoachmark(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The coachmarkLocation property + coachmark_location: Optional[CoachmarkLocation] = None + # The description property + description: Optional[str] = None + # The indicator property + indicator: Optional[str] = None + # The isValid property + is_valid: Optional[bool] = None + # The language property + language: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The order property + order: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PayloadCoachmark: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PayloadCoachmark + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PayloadCoachmark() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .coachmark_location import CoachmarkLocation + + from .coachmark_location import CoachmarkLocation + + fields: Dict[str, Callable[[Any], None]] = { + "coachmarkLocation": lambda n : setattr(self, 'coachmark_location', n.get_object_value(CoachmarkLocation)), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "indicator": lambda n : setattr(self, 'indicator', n.get_str_value()), + "isValid": lambda n : setattr(self, 'is_valid', n.get_bool_value()), + "language": lambda n : setattr(self, 'language', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "order": lambda n : setattr(self, 'order', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("coachmarkLocation", self.coachmark_location) + writer.write_str_value("description", self.description) + writer.write_str_value("indicator", self.indicator) + writer.write_bool_value("isValid", self.is_valid) + writer.write_str_value("language", self.language) + writer.write_str_value("OdataType", self.odata_type) + writer.write_str_value("order", self.order) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/chats/item/permission_grants/delta/delta_response.py b/msgraph/generated/models/payload_collection_response.py similarity index 66% rename from msgraph/generated/chats/item/permission_grants/delta/delta_response.py rename to msgraph/generated/models/payload_collection_response.py index cb883a33a6d..4f6d5bd89d5 100644 --- a/msgraph/generated/chats/item/permission_grants/delta/delta_response.py +++ b/msgraph/generated/models/payload_collection_response.py @@ -4,40 +4,40 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .payload import Payload -from .....models.base_delta_function_response import BaseDeltaFunctionResponse +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class PayloadCollectionResponse(BaseCollectionPaginationCountResponse): # The value property - value: Optional[List[DirectoryObject]] = None + value: Optional[List[Payload]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PayloadCollectionResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: PayloadCollectionResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return PayloadCollectionResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .payload import Payload - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .payload import Payload fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Payload)), } super_fields = super().get_field_deserializers() fields.update(super_fields) diff --git a/msgraph/generated/models/payload_complexity.py b/msgraph/generated/models/payload_complexity.py new file mode 100644 index 00000000000..360ebce9d85 --- /dev/null +++ b/msgraph/generated/models/payload_complexity.py @@ -0,0 +1,9 @@ +from enum import Enum + +class PayloadComplexity(str, Enum): + Unknown = "unknown", + Low = "low", + Medium = "medium", + High = "high", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/payload_detail.py b/msgraph/generated/models/payload_detail.py new file mode 100644 index 00000000000..b421aaee37a --- /dev/null +++ b/msgraph/generated/models/payload_detail.py @@ -0,0 +1,79 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_payload_detail import EmailPayloadDetail + from .payload_coachmark import PayloadCoachmark + +@dataclass +class PayloadDetail(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The coachmarks property + coachmarks: Optional[List[PayloadCoachmark]] = None + # The content property + content: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The phishingUrl property + phishing_url: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PayloadDetail: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PayloadDetail + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.emailPayloadDetail".casefold(): + from .email_payload_detail import EmailPayloadDetail + + return EmailPayloadDetail() + return PayloadDetail() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_payload_detail import EmailPayloadDetail + from .payload_coachmark import PayloadCoachmark + + from .email_payload_detail import EmailPayloadDetail + from .payload_coachmark import PayloadCoachmark + + fields: Dict[str, Callable[[Any], None]] = { + "coachmarks": lambda n : setattr(self, 'coachmarks', n.get_collection_of_object_values(PayloadCoachmark)), + "content": lambda n : setattr(self, 'content', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "phishingUrl": lambda n : setattr(self, 'phishing_url', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_collection_of_object_values("coachmarks", self.coachmarks) + writer.write_str_value("content", self.content) + writer.write_str_value("OdataType", self.odata_type) + writer.write_str_value("phishingUrl", self.phishing_url) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/payload_industry.py b/msgraph/generated/models/payload_industry.py new file mode 100644 index 00000000000..64f5db76990 --- /dev/null +++ b/msgraph/generated/models/payload_industry.py @@ -0,0 +1,26 @@ +from enum import Enum + +class PayloadIndustry(str, Enum): + Unknown = "unknown", + Other = "other", + Banking = "banking", + BusinessServices = "businessServices", + ConsumerServices = "consumerServices", + Education = "education", + Energy = "energy", + Construction = "construction", + Consulting = "consulting", + FinancialServices = "financialServices", + Government = "government", + Hospitality = "hospitality", + Insurance = "insurance", + Legal = "legal", + CourierServices = "courierServices", + IT = "IT", + Healthcare = "healthcare", + Manufacturing = "manufacturing", + Retail = "retail", + Telecom = "telecom", + RealEstate = "realEstate", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/payload_theme.py b/msgraph/generated/models/payload_theme.py new file mode 100644 index 00000000000..fa27c8ddb8c --- /dev/null +++ b/msgraph/generated/models/payload_theme.py @@ -0,0 +1,36 @@ +from enum import Enum + +class PayloadTheme(str, Enum): + Unknown = "unknown", + Other = "other", + AccountActivation = "accountActivation", + AccountVerification = "accountVerification", + Billing = "billing", + CleanUpMail = "cleanUpMail", + Controversial = "controversial", + DocumentReceived = "documentReceived", + Expense = "expense", + Fax = "fax", + FinanceReport = "financeReport", + IncomingMessages = "incomingMessages", + Invoice = "invoice", + ItemReceived = "itemReceived", + LoginAlert = "loginAlert", + MailReceived = "mailReceived", + Password = "password", + Payment = "payment", + Payroll = "payroll", + PersonalizedOffer = "personalizedOffer", + Quarantine = "quarantine", + RemoteWork = "remoteWork", + ReviewMessage = "reviewMessage", + SecurityUpdate = "securityUpdate", + ServiceSuspended = "serviceSuspended", + SignatureRequired = "signatureRequired", + UpgradeMailboxStorage = "upgradeMailboxStorage", + VerifyMailbox = "verifyMailbox", + Voicemail = "voicemail", + Advertisement = "advertisement", + EmployeeEngagement = "employeeEngagement", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/pending_content_update.py b/msgraph/generated/models/pending_content_update.py index b3f33f50307..4c8e41225d4 100644 --- a/msgraph/generated/models/pending_content_update.py +++ b/msgraph/generated/models/pending_content_update.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "queuedDateTime": lambda n : setattr(self, 'queued_date_time', n.get_datetime_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("queuedDateTime", self.queued_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/pending_operations.py b/msgraph/generated/models/pending_operations.py index 597955136cf..debf2d01ffa 100644 --- a/msgraph/generated/models/pending_operations.py +++ b/msgraph/generated/models/pending_operations.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .pending_content_update import PendingContentUpdate fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "pendingContentUpdate": lambda n : setattr(self, 'pending_content_update', n.get_object_value(PendingContentUpdate)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("pendingContentUpdate", self.pending_content_update) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/people_admin_settings.py b/msgraph/generated/models/people_admin_settings.py new file mode 100644 index 00000000000..84855f797d4 --- /dev/null +++ b/msgraph/generated/models/people_admin_settings.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .profile_card_property import ProfileCardProperty + +from .entity import Entity + +@dataclass +class PeopleAdminSettings(Entity): + # The OdataType property + odata_type: Optional[str] = None + # The profileCardProperties property + profile_card_properties: Optional[List[ProfileCardProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PeopleAdminSettings: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PeopleAdminSettings + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PeopleAdminSettings() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .profile_card_property import ProfileCardProperty + + from .entity import Entity + from .profile_card_property import ProfileCardProperty + + fields: Dict[str, Callable[[Any], None]] = { + "profileCardProperties": lambda n : setattr(self, 'profile_card_properties', n.get_collection_of_object_values(ProfileCardProperty)), + } + 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("profileCardProperties", self.profile_card_properties) + + diff --git a/msgraph/generated/models/permission_grant_condition_set.py b/msgraph/generated/models/permission_grant_condition_set.py index db7414d6c53..c8362899894 100644 --- a/msgraph/generated/models/permission_grant_condition_set.py +++ b/msgraph/generated/models/permission_grant_condition_set.py @@ -15,19 +15,19 @@ class PermissionGrantConditionSet(Entity): client_application_ids: Optional[List[str]] = None # A list of Microsoft Partner Network (MPN) IDs for verified publishers of the client application, or a list with the single value all to match with client apps from any publisher. Default is the single value all. client_application_publisher_ids: Optional[List[str]] = None - # A list of Azure Active Directory tenant IDs in which the client application is registered, or a list with the single value all to match with client apps registered in any tenant. Default is the single value all. + # A list of Microsoft Entra tenant IDs in which the client application is registered, or a list with the single value all to match with client apps registered in any tenant. Default is the single value all. client_application_tenant_ids: Optional[List[str]] = None - # Set to true to only match on client applications with a verified publisher. Set to false to match on any client app, even if it does not have a verified publisher. Default is false. + # Set to true to only match on client applications with a verified publisher. Set to false to match on any client app, even if it doesn't have a verified publisher. Default is false. client_applications_from_verified_publisher_only: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None - # The permission classification for the permission being granted, or all to match with any permission classification (including permissions which are not classified). Default is all. + # The permission classification for the permission being granted, or all to match with any permission classification (including permissions that aren't classified). Default is all. permission_classification: Optional[str] = None - # The permission type of the permission being granted. Possible values: application for application permissions (e.g. app roles), or delegated for delegated permissions. The value delegatedUserConsentable indicates delegated permissions which have not been configured by the API publisher to require admin consent—this value may be used in built-in permission grant policies, but cannot be used in custom permission grant policies. Required. + # The permission type of the permission being granted. Possible values: application for application permissions (for example app roles), or delegated for delegated permissions. The value delegatedUserConsentable indicates delegated permissions that haven't been configured by the API publisher to require admin consent—this value may be used in built-in permission grant policies, but can't be used in custom permission grant policies. Required. permission_type: Optional[PermissionType] = None # The list of id values for the specific permissions to match with, or a list with the single value all to match with any permission. The id of delegated permissions can be found in the oauth2PermissionScopes property of the API's servicePrincipal object. The id of application permissions can be found in the appRoles property of the API's servicePrincipal object. The id of resource-specific application permissions can be found in the resourceSpecificApplicationPermissions property of the API's servicePrincipal object. Default is the single value all. permissions: Optional[List[str]] = None - # The appId of the resource application (e.g. the API) for which a permission is being granted, or any to match with any resource application or API. Default is any. + # The appId of the resource application (for example the API) for which a permission is being granted, or any to match with any resource application or API. Default is any. resource_application: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/permission_scope.py b/msgraph/generated/models/permission_scope.py index 02ee9e18079..52847975340 100644 --- a/msgraph/generated/models/permission_scope.py +++ b/msgraph/generated/models/permission_scope.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "adminConsentDisplayName": lambda n : setattr(self, 'admin_consent_display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_uuid_value()), "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "origin": lambda n : setattr(self, 'origin', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), "userConsentDescription": lambda n : setattr(self, 'user_consent_description', n.get_str_value()), @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("adminConsentDisplayName", self.admin_consent_display_name) writer.write_uuid_value("id", self.id) writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("origin", self.origin) writer.write_str_value("type", self.type) writer.write_str_value("userConsentDescription", self.user_consent_description) diff --git a/msgraph/generated/models/person_or_group_column.py b/msgraph/generated/models/person_or_group_column.py index 93961cdc88f..928eef8c99e 100644 --- a/msgraph/generated/models/person_or_group_column.py +++ b/msgraph/generated/models/person_or_group_column.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowMultipleSelection": lambda n : setattr(self, 'allow_multiple_selection', n.get_bool_value()), "chooseFromType": lambda n : setattr(self, 'choose_from_type', n.get_str_value()), "displayAs": lambda n : setattr(self, 'display_as', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowMultipleSelection", self.allow_multiple_selection) writer.write_str_value("chooseFromType", self.choose_from_type) writer.write_str_value("displayAs", self.display_as) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/person_type.py b/msgraph/generated/models/person_type.py index d0cbe6ef598..a2980c760c2 100644 --- a/msgraph/generated/models/person_type.py +++ b/msgraph/generated/models/person_type.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "class": lambda n : setattr(self, 'class_', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "subclass": lambda n : setattr(self, 'subclass', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("class", self.class_) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("subclass", self.subclass) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/phone.py b/msgraph/generated/models/phone.py index 7bb5e706c18..aedbd0005a2 100644 --- a/msgraph/generated/models/phone.py +++ b/msgraph/generated/models/phone.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "language": lambda n : setattr(self, 'language', n.get_str_value()), "number": lambda n : setattr(self, 'number', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "region": lambda n : setattr(self, 'region', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(PhoneType)), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("language", self.language) writer.write_str_value("number", self.number) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("region", self.region) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/photo.py b/msgraph/generated/models/photo.py index 1934872a7d1..30f5ad606ae 100644 --- a/msgraph/generated/models/photo.py +++ b/msgraph/generated/models/photo.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "fNumber": lambda n : setattr(self, 'f_number', n.get_float_value()), "focalLength": lambda n : setattr(self, 'focal_length', n.get_float_value()), "iso": lambda n : setattr(self, 'iso', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "orientation": lambda n : setattr(self, 'orientation', n.get_int_value()), "takenDateTime": lambda n : setattr(self, 'taken_date_time', n.get_datetime_value()), } @@ -78,7 +78,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_float_value("fNumber", self.f_number) writer.write_float_value("focalLength", self.focal_length) writer.write_int_value("iso", self.iso) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("orientation", self.orientation) writer.write_datetime_value("takenDateTime", self.taken_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/physical_address.py b/msgraph/generated/models/physical_address.py index 2cda043de49..8040f30b7f3 100644 --- a/msgraph/generated/models/physical_address.py +++ b/msgraph/generated/models/physical_address.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "city": lambda n : setattr(self, 'city', n.get_str_value()), "countryOrRegion": lambda n : setattr(self, 'country_or_region', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "postalCode": lambda n : setattr(self, 'postal_code', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), "street": lambda n : setattr(self, 'street', n.get_str_value()), @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("city", self.city) writer.write_str_value("countryOrRegion", self.country_or_region) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("postalCode", self.postal_code) writer.write_str_value("state", self.state) writer.write_str_value("street", self.street) diff --git a/msgraph/generated/models/physical_office_address.py b/msgraph/generated/models/physical_office_address.py index 18d59b69fce..bf3dae9cd66 100644 --- a/msgraph/generated/models/physical_office_address.py +++ b/msgraph/generated/models/physical_office_address.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "city": lambda n : setattr(self, 'city', n.get_str_value()), "countryOrRegion": lambda n : setattr(self, 'country_or_region', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "officeLocation": lambda n : setattr(self, 'office_location', n.get_str_value()), "postalCode": lambda n : setattr(self, 'postal_code', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("city", self.city) writer.write_str_value("countryOrRegion", self.country_or_region) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("officeLocation", self.office_location) writer.write_str_value("postalCode", self.postal_code) writer.write_str_value("state", self.state) diff --git a/msgraph/generated/models/pkcs12_certificate_information.py b/msgraph/generated/models/pkcs12_certificate_information.py index e40b7a097cb..16a60817602 100644 --- a/msgraph/generated/models/pkcs12_certificate_information.py +++ b/msgraph/generated/models/pkcs12_certificate_information.py @@ -11,7 +11,7 @@ class Pkcs12CertificateInformation(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) - # Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate which is not yet expired but whose notBefore time is in the past. + # Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate that isn't yet expired but whose notBefore time is in the past. is_active: Optional[bool] = None # The certificate's expiry. This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) not_after: Optional[int] = None @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isActive": lambda n : setattr(self, 'is_active', n.get_bool_value()), "notAfter": lambda n : setattr(self, 'not_after', n.get_int_value()), "notBefore": lambda n : setattr(self, 'not_before', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "thumbprint": lambda n : setattr(self, 'thumbprint', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isActive", self.is_active) writer.write_int_value("notAfter", self.not_after) writer.write_int_value("notBefore", self.not_before) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("thumbprint", self.thumbprint) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_applied_categories.py b/msgraph/generated/models/planner_applied_categories.py index f345df4f9fd..ba3ab38387e 100644 --- a/msgraph/generated/models/planner_applied_categories.py +++ b/msgraph/generated/models/planner_applied_categories.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_assignments.py b/msgraph/generated/models/planner_assignments.py index 0b7f0b53213..fa608e223d2 100644 --- a/msgraph/generated/models/planner_assignments.py +++ b/msgraph/generated/models/planner_assignments.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_category_descriptions.py b/msgraph/generated/models/planner_category_descriptions.py index e820f0283e8..78d456f1cd8 100644 --- a/msgraph/generated/models/planner_category_descriptions.py +++ b/msgraph/generated/models/planner_category_descriptions.py @@ -106,7 +106,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "category7": lambda n : setattr(self, 'category7', n.get_str_value()), "category8": lambda n : setattr(self, 'category8', n.get_str_value()), "category9": lambda n : setattr(self, 'category9', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -143,7 +143,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("category7", self.category7) writer.write_str_value("category8", self.category8) writer.write_str_value("category9", self.category9) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_checklist_items.py b/msgraph/generated/models/planner_checklist_items.py index 5d3796d83a5..0458ab123d9 100644 --- a/msgraph/generated/models/planner_checklist_items.py +++ b/msgraph/generated/models/planner_checklist_items.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_external_references.py b/msgraph/generated/models/planner_external_references.py index f617f8af67e..daa006f77b3 100644 --- a/msgraph/generated/models/planner_external_references.py +++ b/msgraph/generated/models/planner_external_references.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_order_hints_by_assignee.py b/msgraph/generated/models/planner_order_hints_by_assignee.py index 2eb606bcbab..39e341be1f3 100644 --- a/msgraph/generated/models/planner_order_hints_by_assignee.py +++ b/msgraph/generated/models/planner_order_hints_by_assignee.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_plan.py b/msgraph/generated/models/planner_plan.py index d3b4d5a03e4..34ac7101d68 100644 --- a/msgraph/generated/models/planner_plan.py +++ b/msgraph/generated/models/planner_plan.py @@ -18,13 +18,13 @@ class PlannerPlan(Entity): # Read-only. Nullable. Collection of buckets in the plan. buckets: Optional[List[PlannerBucket]] = None - # Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it is set, this property can’t be updated. Required. + # Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it's set, this property can’t be updated. Required. container: Optional[PlannerPlanContainer] = None # Read-only. The user who created the plan. created_by: Optional[IdentitySet] = None # Read-only. Date and time at which the plan is created. 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 created_date_time: Optional[datetime.datetime] = None - # Read-only. Nullable. Additional details about the plan. + # Read-only. Nullable. Extra details about the plan. details: Optional[PlannerPlanDetails] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/planner_plan_container.py b/msgraph/generated/models/planner_plan_container.py index 1c4cd9f8f6c..6e0ee9627c8 100644 --- a/msgraph/generated/models/planner_plan_container.py +++ b/msgraph/generated/models/planner_plan_container.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "containerId": lambda n : setattr(self, 'container_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(PlannerContainerType)), "url": lambda n : setattr(self, 'url', n.get_str_value()), } @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("containerId", self.container_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_str_value("url", self.url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/planner_task.py b/msgraph/generated/models/planner_task.py index b2858b0711a..d7fa0d4abc5 100644 --- a/msgraph/generated/models/planner_task.py +++ b/msgraph/generated/models/planner_task.py @@ -29,7 +29,7 @@ class PlannerTask(Entity): assignee_priority: Optional[str] = None # The set of assignees the task is assigned to. assignments: Optional[PlannerAssignments] = None - # Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It is 28 characters long and case-sensitive. Format validation is done on the service. + # Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It's 28 characters long and case-sensitive. Format validation is done on the service. bucket_id: Optional[str] = None # Read-only. Nullable. Used to render the task correctly in the task board view when grouped by bucket. bucket_task_board_format: Optional[PlannerBucketTaskBoardTaskFormat] = None @@ -45,11 +45,11 @@ class PlannerTask(Entity): created_by: Optional[IdentitySet] = None # Read-only. Date and time at which the task is created. 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 created_date_time: Optional[datetime.datetime] = None - # Read-only. Nullable. Additional details about the task. + # Read-only. Nullable. More details about the task. details: Optional[PlannerTaskDetails] = None # Date and time at which the task is due. 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 due_date_time: Optional[datetime.datetime] = None - # Read-only. Value is true if the details object of the task has a non-empty description and false otherwise. + # Read-only. Value is true if the details object of the task has a nonempty description and false otherwise. has_description: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/planner_user_ids.py b/msgraph/generated/models/planner_user_ids.py index 097adaaec9f..6c98e65f553 100644 --- a/msgraph/generated/models/planner_user_ids.py +++ b/msgraph/generated/models/planner_user_ids.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/policy_root.py b/msgraph/generated/models/policy_root.py index 373c803120b..53dfeeb062c 100644 --- a/msgraph/generated/models/policy_root.py +++ b/msgraph/generated/models/policy_root.py @@ -37,23 +37,23 @@ class PolicyRoot(Entity): app_management_policies: Optional[List[AppManagementPolicy]] = None # The policy configuration of the self-service sign-up experience of external users. authentication_flows_policy: Optional[AuthenticationFlowsPolicy] = None - # The authentication methods and the users that are allowed to use them to sign in and perform multifactor authentication (MFA) in Azure Active Directory (Azure AD). + # The authentication methods and the users that are allowed to use them to sign in and perform multifactor authentication (MFA) in Microsoft Entra ID. authentication_methods_policy: Optional[AuthenticationMethodsPolicy] = None - # The authentication method combinations that are to be used in scenarios defined by Azure AD Conditional Access. + # The authentication method combinations that are to be used in scenarios defined by Microsoft Entra Conditional Access. authentication_strength_policies: Optional[List[AuthenticationStrengthPolicy]] = None - # The policy that controls Azure AD authorization settings. + # The policy that controls Microsoft Entra authorization settings. authorization_policy: Optional[AuthorizationPolicy] = None # The claim-mapping policies for WS-Fed, SAML, OAuth 2.0, and OpenID Connect protocols, for tokens issued to a specific application. claims_mapping_policies: Optional[List[ClaimsMappingPolicy]] = None # The custom rules that define an access scenario. conditional_access_policies: Optional[List[ConditionalAccessPolicy]] = None - # The custom rules that define an access scenario when interacting with external Azure AD tenants. + # The custom rules that define an access scenario when interacting with external Microsoft Entra tenants. cross_tenant_access_policy: Optional[CrossTenantAccessPolicy] = None # The tenant-wide policy that enforces app management restrictions for all applications and service principals. default_app_management_policy: Optional[TenantAppManagementPolicy] = None # The feature rollout policy associated with a directory object. feature_rollout_policies: Optional[List[FeatureRolloutPolicy]] = None - # The policy to control Azure AD authentication behavior for federated users. + # The policy to control Microsoft Entra authentication behavior for federated users. home_realm_discovery_policies: Optional[List[HomeRealmDiscoveryPolicy]] = None # The policy that represents the security defaults that protect against common attacks. identity_security_defaults_enforcement_policy: Optional[IdentitySecurityDefaultsEnforcementPolicy] = None @@ -65,9 +65,9 @@ class PolicyRoot(Entity): role_management_policies: Optional[List[UnifiedRoleManagementPolicy]] = None # The assignment of a role management policy to a role definition object. role_management_policy_assignments: Optional[List[UnifiedRoleManagementPolicyAssignment]] = None - # The policy that specifies the characteristics of SAML tokens issued by Azure AD. + # The policy that specifies the characteristics of SAML tokens issued by Microsoft Entra ID. token_issuance_policies: Optional[List[TokenIssuancePolicy]] = None - # The policy that controls the lifetime of a JWT access token, an ID token, or a SAML 1.1/2.0 token issued by Azure AD. + # The policy that controls the lifetime of a JWT access token, an ID token, or a SAML 1.1/2.0 token issued by Microsoft Entra ID. token_lifetime_policies: Optional[List[TokenLifetimePolicy]] = None @staticmethod diff --git a/msgraph/generated/models/positive_reinforcement_notification.py b/msgraph/generated/models/positive_reinforcement_notification.py new file mode 100644 index 00000000000..a90b3035a89 --- /dev/null +++ b/msgraph/generated/models/positive_reinforcement_notification.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_end_user_notification import BaseEndUserNotification + from .notification_delivery_preference import NotificationDeliveryPreference + +from .base_end_user_notification import BaseEndUserNotification + +@dataclass +class PositiveReinforcementNotification(BaseEndUserNotification): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.positiveReinforcementNotification" + # The deliveryPreference property + delivery_preference: Optional[NotificationDeliveryPreference] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PositiveReinforcementNotification: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PositiveReinforcementNotification + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PositiveReinforcementNotification() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_end_user_notification import BaseEndUserNotification + from .notification_delivery_preference import NotificationDeliveryPreference + + from .base_end_user_notification import BaseEndUserNotification + from .notification_delivery_preference import NotificationDeliveryPreference + + fields: Dict[str, Callable[[Any], None]] = { + "deliveryPreference": lambda n : setattr(self, 'delivery_preference', n.get_enum_value(NotificationDeliveryPreference)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("deliveryPreference", self.delivery_preference) + + diff --git a/msgraph/generated/models/pre_authorized_application.py b/msgraph/generated/models/pre_authorized_application.py index 2895dbf54e1..5ba6625d9d0 100644 --- a/msgraph/generated/models/pre_authorized_application.py +++ b/msgraph/generated/models/pre_authorized_application.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "appId": lambda n : setattr(self, 'app_id', n.get_str_value()), "delegatedPermissionIds": lambda n : setattr(self, 'delegated_permission_ids', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("appId", self.app_id) writer.write_collection_of_primitive_values("delegatedPermissionIds", self.delegated_permission_ids) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/presence.py b/msgraph/generated/models/presence.py index 1d27c7ffd5e..c275983e90c 100644 --- a/msgraph/generated/models/presence.py +++ b/msgraph/generated/models/presence.py @@ -17,7 +17,7 @@ class Presence(Entity): availability: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The statusMessage property + # The presence status message of a user. status_message: Optional[PresenceStatusMessage] = None @staticmethod diff --git a/msgraph/generated/models/presence_status_message.py b/msgraph/generated/models/presence_status_message.py index 27507905c6d..3814b4c0f95 100644 --- a/msgraph/generated/models/presence_status_message.py +++ b/msgraph/generated/models/presence_status_message.py @@ -16,13 +16,13 @@ class PresenceStatusMessage(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 expiryDateTime property + # Time in which the status message expires.If not provided, the status message doesn't expire.expiryDateTime.dateTime shouldn't include time zone.expiryDateTime isn't available when you request the presence of another user. expiry_date_time: Optional[DateTimeTimeZone] = None - # The message property + # Status message item. The only supported format currently is message.contentType = 'text'. message: Optional[ItemBody] = None # The OdataType property odata_type: Optional[str] = None - # The publishedDateTime property + # Time in which the status message was published.Read-only.publishedDateTime isn't available when you request the presence of another user. published_date_time: Optional[datetime.datetime] = None @staticmethod @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "expiryDateTime": lambda n : setattr(self, 'expiry_date_time', n.get_object_value(DateTimeTimeZone)), "message": lambda n : setattr(self, 'message', n.get_object_value(ItemBody)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "publishedDateTime": lambda n : setattr(self, 'published_date_time', n.get_datetime_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("expiryDateTime", self.expiry_date_time) writer.write_object_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("publishedDateTime", self.published_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print.py b/msgraph/generated/models/print.py index 6371b7f6c84..9ef42e876f1 100644 --- a/msgraph/generated/models/print.py +++ b/msgraph/generated/models/print.py @@ -5,9 +5,9 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .print_connector import PrintConnector from .printer import Printer from .printer_share import PrinterShare + from .print_connector import PrintConnector from .print_operation import PrintOperation from .print_service import PrintService from .print_settings import PrintSettings @@ -53,17 +53,17 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .print_connector import PrintConnector from .printer import Printer from .printer_share import PrinterShare + from .print_connector import PrintConnector from .print_operation import PrintOperation from .print_service import PrintService from .print_settings import PrintSettings from .print_task_definition import PrintTaskDefinition - from .print_connector import PrintConnector from .printer import Printer from .printer_share import PrinterShare + from .print_connector import PrintConnector from .print_operation import PrintOperation from .print_service import PrintService from .print_settings import PrintSettings @@ -71,7 +71,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "connectors": lambda n : setattr(self, 'connectors', n.get_collection_of_object_values(PrintConnector)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operations": lambda n : setattr(self, 'operations', n.get_collection_of_object_values(PrintOperation)), "printers": lambda n : setattr(self, 'printers', n.get_collection_of_object_values(Printer)), "services": lambda n : setattr(self, 'services', n.get_collection_of_object_values(PrintService)), @@ -90,7 +90,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("connectors", self.connectors) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("operations", self.operations) writer.write_collection_of_object_values("printers", self.printers) writer.write_collection_of_object_values("services", self.services) diff --git a/msgraph/generated/models/print_certificate_signing_request.py b/msgraph/generated/models/print_certificate_signing_request.py index 87a7ebffe3d..470457076d9 100644 --- a/msgraph/generated/models/print_certificate_signing_request.py +++ b/msgraph/generated/models/print_certificate_signing_request.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "transportKey": lambda n : setattr(self, 'transport_key', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("content", self.content) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("transportKey", self.transport_key) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print_document_upload_properties.py b/msgraph/generated/models/print_document_upload_properties.py index c3fdea89aea..efbe838f2aa 100644 --- a/msgraph/generated/models/print_document_upload_properties.py +++ b/msgraph/generated/models/print_document_upload_properties.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "contentType": lambda n : setattr(self, 'content_type', n.get_str_value()), "documentName": lambda n : setattr(self, 'document_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "size": lambda n : setattr(self, 'size', n.get_int_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("contentType", self.content_type) writer.write_str_value("documentName", self.document_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("size", self.size) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print_job_configuration.py b/msgraph/generated/models/print_job_configuration.py index 5f682b4c2c0..9104ce8f6bc 100644 --- a/msgraph/generated/models/print_job_configuration.py +++ b/msgraph/generated/models/print_job_configuration.py @@ -6,9 +6,9 @@ if TYPE_CHECKING: from .integer_range import IntegerRange + from .printer_feed_orientation import PrinterFeedOrientation from .print_color_mode import PrintColorMode from .print_duplex_mode import PrintDuplexMode - from .printer_feed_orientation import PrinterFeedOrientation from .print_finishing import PrintFinishing from .print_margin import PrintMargin from .print_multipage_layout import PrintMultipageLayout @@ -81,9 +81,9 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .integer_range import IntegerRange + from .printer_feed_orientation import PrinterFeedOrientation from .print_color_mode import PrintColorMode from .print_duplex_mode import PrintDuplexMode - from .printer_feed_orientation import PrinterFeedOrientation from .print_finishing import PrintFinishing from .print_margin import PrintMargin from .print_multipage_layout import PrintMultipageLayout @@ -92,9 +92,9 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .print_scaling import PrintScaling from .integer_range import IntegerRange + from .printer_feed_orientation import PrinterFeedOrientation from .print_color_mode import PrintColorMode from .print_duplex_mode import PrintDuplexMode - from .printer_feed_orientation import PrinterFeedOrientation from .print_finishing import PrintFinishing from .print_margin import PrintMargin from .print_multipage_layout import PrintMultipageLayout @@ -116,7 +116,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "mediaSize": lambda n : setattr(self, 'media_size', n.get_str_value()), "mediaType": lambda n : setattr(self, 'media_type', n.get_str_value()), "multipageLayout": lambda n : setattr(self, 'multipage_layout', n.get_enum_value(PrintMultipageLayout)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "orientation": lambda n : setattr(self, 'orientation', n.get_enum_value(PrintOrientation)), "outputBin": lambda n : setattr(self, 'output_bin', n.get_str_value()), "pageRanges": lambda n : setattr(self, 'page_ranges', n.get_collection_of_object_values(IntegerRange)), @@ -147,7 +147,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("mediaSize", self.media_size) writer.write_str_value("mediaType", self.media_type) writer.write_enum_value("multipageLayout", self.multipage_layout) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("orientation", self.orientation) writer.write_str_value("outputBin", self.output_bin) writer.write_collection_of_object_values("pageRanges", self.page_ranges) diff --git a/msgraph/generated/models/print_job_status.py b/msgraph/generated/models/print_job_status.py index ce59478310b..673f5c7e8b2 100644 --- a/msgraph/generated/models/print_job_status.py +++ b/msgraph/generated/models/print_job_status.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "description": lambda n : setattr(self, 'description', n.get_str_value()), "details": lambda n : setattr(self, 'details', n.get_collection_of_enum_values(PrintJobStateDetail)), "isAcquiredByPrinter": lambda n : setattr(self, 'is_acquired_by_printer', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(PrintJobProcessingState)), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("description", self.description) writer.write_collection_of_enum_values("details", self.details) writer.write_bool_value("isAcquiredByPrinter", self.is_acquired_by_printer) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print_margin.py b/msgraph/generated/models/print_margin.py index 5474bae4b7e..786026b33b0 100644 --- a/msgraph/generated/models/print_margin.py +++ b/msgraph/generated/models/print_margin.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "bottom": lambda n : setattr(self, 'bottom', n.get_int_value()), "left": lambda n : setattr(self, 'left', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "right": lambda n : setattr(self, 'right', n.get_int_value()), "top": lambda n : setattr(self, 'top', n.get_int_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("bottom", self.bottom) writer.write_int_value("left", self.left) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("right", self.right) writer.write_int_value("top", self.top) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print_operation_status.py b/msgraph/generated/models/print_operation_status.py index 535eed40e44..dffd12761dc 100644 --- a/msgraph/generated/models/print_operation_status.py +++ b/msgraph/generated/models/print_operation_status.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(PrintOperationProcessingState)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print_settings.py b/msgraph/generated/models/print_settings.py index 86e676bc020..d45bf563026 100644 --- a/msgraph/generated/models/print_settings.py +++ b/msgraph/generated/models/print_settings.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "documentConversionEnabled": lambda n : setattr(self, 'document_conversion_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("documentConversionEnabled", self.document_conversion_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/print_task_status.py b/msgraph/generated/models/print_task_status.py index 44e41c1c8ce..9c5824b350a 100644 --- a/msgraph/generated/models/print_task_status.py +++ b/msgraph/generated/models/print_task_status.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(PrintTaskProcessingState)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/printer.py b/msgraph/generated/models/printer.py index fd3ad5ff5a6..0fe865537c9 100644 --- a/msgraph/generated/models/printer.py +++ b/msgraph/generated/models/printer.py @@ -5,9 +5,9 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .print_connector import PrintConnector from .printer_base import PrinterBase from .printer_share import PrinterShare + from .print_connector import PrintConnector from .print_task_trigger import PrintTaskTrigger from .printer_base import PrinterBase @@ -47,14 +47,14 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .print_connector import PrintConnector from .printer_base import PrinterBase from .printer_share import PrinterShare + from .print_connector import PrintConnector from .print_task_trigger import PrintTaskTrigger - from .print_connector import PrintConnector from .printer_base import PrinterBase from .printer_share import PrinterShare + from .print_connector import PrintConnector from .print_task_trigger import PrintTaskTrigger fields: Dict[str, Callable[[Any], None]] = { diff --git a/msgraph/generated/models/printer_base.py b/msgraph/generated/models/printer_base.py index 0ab9e41ae38..e0790e69703 100644 --- a/msgraph/generated/models/printer_base.py +++ b/msgraph/generated/models/printer_base.py @@ -23,7 +23,7 @@ class PrinterBase(Entity): defaults: Optional[PrinterDefaults] = None # The name of the printer/printerShare. display_name: Optional[str] = None - # Whether the printer/printerShare is currently accepting new print jobs. + # Specifies whether the printer/printerShare is currently accepting new print jobs. is_accepting_jobs: Optional[bool] = None # The list of jobs that are queued for printing by the printer/printerShare. jobs: Optional[List[PrintJob]] = None diff --git a/msgraph/generated/models/printer_capabilities.py b/msgraph/generated/models/printer_capabilities.py index eab04dd9d86..8d111f0909f 100644 --- a/msgraph/generated/models/printer_capabilities.py +++ b/msgraph/generated/models/printer_capabilities.py @@ -6,9 +6,9 @@ if TYPE_CHECKING: from .integer_range import IntegerRange + from .printer_feed_orientation import PrinterFeedOrientation from .print_color_mode import PrintColorMode from .print_duplex_mode import PrintDuplexMode - from .printer_feed_orientation import PrinterFeedOrientation from .print_finishing import PrintFinishing from .print_multipage_layout import PrintMultipageLayout from .print_orientation import PrintOrientation @@ -92,9 +92,9 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .integer_range import IntegerRange + from .printer_feed_orientation import PrinterFeedOrientation from .print_color_mode import PrintColorMode from .print_duplex_mode import PrintDuplexMode - from .printer_feed_orientation import PrinterFeedOrientation from .print_finishing import PrintFinishing from .print_multipage_layout import PrintMultipageLayout from .print_orientation import PrintOrientation @@ -102,9 +102,9 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .print_scaling import PrintScaling from .integer_range import IntegerRange + from .printer_feed_orientation import PrinterFeedOrientation from .print_color_mode import PrintColorMode from .print_duplex_mode import PrintDuplexMode - from .printer_feed_orientation import PrinterFeedOrientation from .print_finishing import PrintFinishing from .print_multipage_layout import PrintMultipageLayout from .print_orientation import PrintOrientation @@ -129,7 +129,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "mediaSizes": lambda n : setattr(self, 'media_sizes', n.get_collection_of_primitive_values(str)), "mediaTypes": lambda n : setattr(self, 'media_types', n.get_collection_of_primitive_values(str)), "multipageLayouts": lambda n : setattr(self, 'multipage_layouts', n.get_collection_of_enum_values(PrintMultipageLayout)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "orientations": lambda n : setattr(self, 'orientations', n.get_collection_of_enum_values(PrintOrientation)), "outputBins": lambda n : setattr(self, 'output_bins', n.get_collection_of_primitive_values(str)), "pagesPerSheet": lambda n : setattr(self, 'pages_per_sheet', n.get_collection_of_primitive_values(int)), @@ -166,7 +166,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("mediaSizes", self.media_sizes) writer.write_collection_of_primitive_values("mediaTypes", self.media_types) writer.write_collection_of_enum_values("multipageLayouts", self.multipage_layouts) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_enum_values("orientations", self.orientations) writer.write_collection_of_primitive_values("outputBins", self.output_bins) writer.write_collection_of_primitive_values("pagesPerSheet", self.pages_per_sheet) diff --git a/msgraph/generated/models/printer_defaults.py b/msgraph/generated/models/printer_defaults.py index 4db3a2bac59..87a71ea01ef 100644 --- a/msgraph/generated/models/printer_defaults.py +++ b/msgraph/generated/models/printer_defaults.py @@ -102,7 +102,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "mediaSize": lambda n : setattr(self, 'media_size', n.get_str_value()), "mediaType": lambda n : setattr(self, 'media_type', n.get_str_value()), "multipageLayout": lambda n : setattr(self, 'multipage_layout', n.get_enum_value(PrintMultipageLayout)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "orientation": lambda n : setattr(self, 'orientation', n.get_enum_value(PrintOrientation)), "outputBin": lambda n : setattr(self, 'output_bin', n.get_str_value()), "pagesPerSheet": lambda n : setattr(self, 'pages_per_sheet', n.get_int_value()), @@ -131,7 +131,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("mediaSize", self.media_size) writer.write_str_value("mediaType", self.media_type) writer.write_enum_value("multipageLayout", self.multipage_layout) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("orientation", self.orientation) writer.write_str_value("outputBin", self.output_bin) writer.write_int_value("pagesPerSheet", self.pages_per_sheet) diff --git a/msgraph/generated/models/printer_location.py b/msgraph/generated/models/printer_location.py index 4516fc7560f..f57ec6c6a86 100644 --- a/msgraph/generated/models/printer_location.py +++ b/msgraph/generated/models/printer_location.py @@ -73,7 +73,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "floorDescription": lambda n : setattr(self, 'floor_description', n.get_str_value()), "latitude": lambda n : setattr(self, 'latitude', n.get_float_value()), "longitude": lambda n : setattr(self, 'longitude', n.get_float_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "organization": lambda n : setattr(self, 'organization', n.get_collection_of_primitive_values(str)), "postalCode": lambda n : setattr(self, 'postal_code', n.get_str_value()), "roomDescription": lambda n : setattr(self, 'room_description', n.get_str_value()), @@ -102,7 +102,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("floorDescription", self.floor_description) writer.write_float_value("latitude", self.latitude) writer.write_float_value("longitude", self.longitude) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("organization", self.organization) writer.write_str_value("postalCode", self.postal_code) writer.write_str_value("roomDescription", self.room_description) diff --git a/msgraph/generated/models/printer_share_viewpoint.py b/msgraph/generated/models/printer_share_viewpoint.py index dcab0802394..1e31f37a28a 100644 --- a/msgraph/generated/models/printer_share_viewpoint.py +++ b/msgraph/generated/models/printer_share_viewpoint.py @@ -35,7 +35,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "lastUsedDateTime": lambda n : setattr(self, 'last_used_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -48,7 +48,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("lastUsedDateTime", self.last_used_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/printer_status.py b/msgraph/generated/models/printer_status.py index ecfeb4d0716..441dc5659b0 100644 --- a/msgraph/generated/models/printer_status.py +++ b/msgraph/generated/models/printer_status.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), "details": lambda n : setattr(self, 'details', n.get_collection_of_enum_values(PrinterProcessingStateDetail)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(PrinterProcessingState)), } return fields @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) writer.write_collection_of_enum_values("details", self.details) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/privacy.py b/msgraph/generated/models/privacy.py index a339d3ecdd2..599d601b6ec 100644 --- a/msgraph/generated/models/privacy.py +++ b/msgraph/generated/models/privacy.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .subject_rights_request import SubjectRightsRequest fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "subjectRightsRequests": lambda n : setattr(self, 'subject_rights_requests', n.get_collection_of_object_values(SubjectRightsRequest)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("subjectRightsRequests", self.subject_rights_requests) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/privacy_profile.py b/msgraph/generated/models/privacy_profile.py index 53acba1a253..fedbdd59dc0 100644 --- a/msgraph/generated/models/privacy_profile.py +++ b/msgraph/generated/models/privacy_profile.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "contactEmail": lambda n : setattr(self, 'contact_email', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "statementUrl": lambda n : setattr(self, 'statement_url', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("contactEmail", self.contact_email) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("statementUrl", self.statement_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/privileged_access_group.py b/msgraph/generated/models/privileged_access_group.py new file mode 100644 index 00000000000..d6617eb2bae --- /dev/null +++ b/msgraph/generated/models/privileged_access_group.py @@ -0,0 +1,101 @@ +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 .approval import Approval + from .entity import Entity + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + +from .entity import Entity + +@dataclass +class PrivilegedAccessGroup(Entity): + # The assignmentApprovals property + assignment_approvals: Optional[List[Approval]] = None + # The instances of assignment schedules to activate a just-in-time access. + assignment_schedule_instances: Optional[List[PrivilegedAccessGroupAssignmentScheduleInstance]] = None + # The schedule requests for operations to create, update, delete, extend, and renew an assignment. + assignment_schedule_requests: Optional[List[PrivilegedAccessGroupAssignmentScheduleRequest]] = None + # The assignment schedules to activate a just-in-time access. + assignment_schedules: Optional[List[PrivilegedAccessGroupAssignmentSchedule]] = None + # The instances of eligibility schedules to activate a just-in-time access. + eligibility_schedule_instances: Optional[List[PrivilegedAccessGroupEligibilityScheduleInstance]] = None + # The schedule requests for operations to create, update, delete, extend, and renew an eligibility. + eligibility_schedule_requests: Optional[List[PrivilegedAccessGroupEligibilityScheduleRequest]] = None + # The eligibility schedules to activate a just-in-time access. + eligibility_schedules: Optional[List[PrivilegedAccessGroupEligibilitySchedule]] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroup: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroup + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroup() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .approval import Approval + from .entity import Entity + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + from .approval import Approval + from .entity import Entity + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + fields: Dict[str, Callable[[Any], None]] = { + "assignmentApprovals": lambda n : setattr(self, 'assignment_approvals', n.get_collection_of_object_values(Approval)), + "assignmentScheduleInstances": lambda n : setattr(self, 'assignment_schedule_instances', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentScheduleInstance)), + "assignmentScheduleRequests": lambda n : setattr(self, 'assignment_schedule_requests', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentScheduleRequest)), + "assignmentSchedules": lambda n : setattr(self, 'assignment_schedules', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentSchedule)), + "eligibilityScheduleInstances": lambda n : setattr(self, 'eligibility_schedule_instances', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilityScheduleInstance)), + "eligibilityScheduleRequests": lambda n : setattr(self, 'eligibility_schedule_requests', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilityScheduleRequest)), + "eligibilitySchedules": lambda n : setattr(self, 'eligibility_schedules', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilitySchedule)), + } + 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("assignmentApprovals", self.assignment_approvals) + writer.write_collection_of_object_values("assignmentScheduleInstances", self.assignment_schedule_instances) + writer.write_collection_of_object_values("assignmentScheduleRequests", self.assignment_schedule_requests) + writer.write_collection_of_object_values("assignmentSchedules", self.assignment_schedules) + writer.write_collection_of_object_values("eligibilityScheduleInstances", self.eligibility_schedule_instances) + writer.write_collection_of_object_values("eligibilityScheduleRequests", self.eligibility_schedule_requests) + writer.write_collection_of_object_values("eligibilitySchedules", self.eligibility_schedules) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_schedule.py b/msgraph/generated/models/privileged_access_group_assignment_schedule.py new file mode 100644 index 00000000000..2ff4bb312b8 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_schedule.py @@ -0,0 +1,102 @@ +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 .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_assignment_type import PrivilegedAccessGroupAssignmentType + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule import PrivilegedAccessSchedule + +from .privileged_access_schedule import PrivilegedAccessSchedule + +@dataclass +class PrivilegedAccessGroupAssignmentSchedule(PrivilegedAccessSchedule): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.privilegedAccessGroupAssignmentSchedule" + # The identifier of the membership or ownership assignment to the group that is governed by PIM. Required. The possible values are: owner, member, unknownFutureValue. Supports $filter (eq). + access_id: Optional[PrivilegedAccessGroupRelationships] = None + # When the request activates an ownership or membership assignment in PIM for groups, this object represents the eligibility relationship. Otherwise, it is null. Supports $expand. + activated_using: Optional[PrivilegedAccessGroupEligibilitySchedule] = None + # Indicates whether the membership or ownership assignment for the principal is granted through activation or direct assignment. Required. The possible values are: assigned, activated, unknownFutureValue. Supports $filter (eq). + assignment_type: Optional[PrivilegedAccessGroupAssignmentType] = None + # References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + group: Optional[Group] = None + # The identifier of the group representing the scope of the membership or ownership assignment through PIM for groups. Required. Supports $filter (eq). + group_id: Optional[str] = None + # Indicates whether the assignment is derived from a direct group assignment or through a transitive assignment. The possible values are: direct, group, unknownFutureValue. Supports $filter (eq). + member_type: Optional[PrivilegedAccessGroupMemberType] = None + # References the principal that's in the scope of this membership or ownership assignment request to the group that's governed by PIM. Supports $expand. + principal: Optional[DirectoryObject] = None + # The identifier of the principal whose membership or ownership assignment is granted through PIM for groups. Required. Supports $filter (eq). + principal_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupAssignmentSchedule: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupAssignmentSchedule + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupAssignmentSchedule() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_assignment_type import PrivilegedAccessGroupAssignmentType + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule import PrivilegedAccessSchedule + + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_assignment_type import PrivilegedAccessGroupAssignmentType + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule import PrivilegedAccessSchedule + + fields: Dict[str, Callable[[Any], None]] = { + "accessId": lambda n : setattr(self, 'access_id', n.get_enum_value(PrivilegedAccessGroupRelationships)), + "activatedUsing": lambda n : setattr(self, 'activated_using', n.get_object_value(PrivilegedAccessGroupEligibilitySchedule)), + "assignmentType": lambda n : setattr(self, 'assignment_type', n.get_enum_value(PrivilegedAccessGroupAssignmentType)), + "group": lambda n : setattr(self, 'group', n.get_object_value(Group)), + "groupId": lambda n : setattr(self, 'group_id', n.get_str_value()), + "memberType": lambda n : setattr(self, 'member_type', n.get_enum_value(PrivilegedAccessGroupMemberType)), + "principal": lambda n : setattr(self, 'principal', n.get_object_value(DirectoryObject)), + "principalId": lambda n : setattr(self, 'principal_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("accessId", self.access_id) + writer.write_object_value("activatedUsing", self.activated_using) + writer.write_enum_value("assignmentType", self.assignment_type) + writer.write_object_value("group", self.group) + writer.write_str_value("groupId", self.group_id) + writer.write_enum_value("memberType", self.member_type) + writer.write_object_value("principal", self.principal) + writer.write_str_value("principalId", self.principal_id) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_schedule_collection_response.py b/msgraph/generated/models/privileged_access_group_assignment_schedule_collection_response.py new file mode 100644 index 00000000000..b5b0f24f5f3 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_schedule_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class PrivilegedAccessGroupAssignmentScheduleCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupAssignmentSchedule]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupAssignmentScheduleCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupAssignmentScheduleCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentSchedule)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_schedule_instance.py b/msgraph/generated/models/privileged_access_group_assignment_schedule_instance.py new file mode 100644 index 00000000000..3f5c9b19855 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_schedule_instance.py @@ -0,0 +1,106 @@ +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 .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_assignment_type import PrivilegedAccessGroupAssignmentType + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + +from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + +@dataclass +class PrivilegedAccessGroupAssignmentScheduleInstance(PrivilegedAccessScheduleInstance): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance" + # The identifier of the membership or ownership assignment relationship to the group. Required. The possible values are: owner, member, unknownFutureValue. Supports $filter (eq). + access_id: Optional[PrivilegedAccessGroupRelationships] = None + # When the request activates a membership or ownership in PIM for groups, this object represents the eligibility request for the group. Otherwise, it is null. + activated_using: Optional[PrivilegedAccessGroupEligibilityScheduleInstance] = None + # The identifier of the privilegedAccessGroupAssignmentSchedule from which this instance was created. Required. Supports $filter (eq, ne). + assignment_schedule_id: Optional[str] = None + # Indicates whether the membership or ownership assignment is granted through activation of an eligibility or through direct assignment. Required. The possible values are: assigned, activated, unknownFutureValue. Supports $filter (eq). + assignment_type: Optional[PrivilegedAccessGroupAssignmentType] = None + # References the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. + group: Optional[Group] = None + # The identifier of the group representing the scope of the membership or ownership assignment through PIM for groups. Optional. Supports $filter (eq). + group_id: Optional[str] = None + # Indicates whether the assignment is derived from a group assignment. It can further imply whether the caller can manage the assignment schedule. Required. The possible values are: direct, group, unknownFutureValue. Supports $filter (eq). + member_type: Optional[PrivilegedAccessGroupMemberType] = None + # References the principal that's in the scope of the membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + principal: Optional[DirectoryObject] = None + # The identifier of the principal whose membership or ownership assignment to the group is managed through PIM for groups. Required. Supports $filter (eq). + principal_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupAssignmentScheduleInstance: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupAssignmentScheduleInstance + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleInstance() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_assignment_type import PrivilegedAccessGroupAssignmentType + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_assignment_type import PrivilegedAccessGroupAssignmentType + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "accessId": lambda n : setattr(self, 'access_id', n.get_enum_value(PrivilegedAccessGroupRelationships)), + "activatedUsing": lambda n : setattr(self, 'activated_using', n.get_object_value(PrivilegedAccessGroupEligibilityScheduleInstance)), + "assignmentScheduleId": lambda n : setattr(self, 'assignment_schedule_id', n.get_str_value()), + "assignmentType": lambda n : setattr(self, 'assignment_type', n.get_enum_value(PrivilegedAccessGroupAssignmentType)), + "group": lambda n : setattr(self, 'group', n.get_object_value(Group)), + "groupId": lambda n : setattr(self, 'group_id', n.get_str_value()), + "memberType": lambda n : setattr(self, 'member_type', n.get_enum_value(PrivilegedAccessGroupMemberType)), + "principal": lambda n : setattr(self, 'principal', n.get_object_value(DirectoryObject)), + "principalId": lambda n : setattr(self, 'principal_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("accessId", self.access_id) + writer.write_object_value("activatedUsing", self.activated_using) + writer.write_str_value("assignmentScheduleId", self.assignment_schedule_id) + writer.write_enum_value("assignmentType", self.assignment_type) + writer.write_object_value("group", self.group) + writer.write_str_value("groupId", self.group_id) + writer.write_enum_value("memberType", self.member_type) + writer.write_object_value("principal", self.principal) + writer.write_str_value("principalId", self.principal_id) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_schedule_instance_collection_response.py b/msgraph/generated/models/privileged_access_group_assignment_schedule_instance_collection_response.py new file mode 100644 index 00000000000..e6dc26d90e0 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_schedule_instance_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupAssignmentScheduleInstance]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentScheduleInstance)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_schedule_request.py b/msgraph/generated/models/privileged_access_group_assignment_schedule_request.py new file mode 100644 index 00000000000..ba8e0c5c284 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_schedule_request.py @@ -0,0 +1,96 @@ +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 .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + +from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + +@dataclass +class PrivilegedAccessGroupAssignmentScheduleRequest(PrivilegedAccessScheduleRequest): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest" + # The identifier of a membership or ownership assignment relationship to the group. Required. The possible values are: owner, member, unknownFutureValue. + access_id: Optional[PrivilegedAccessGroupRelationships] = None + # When the request activates a membership or ownership assignment in PIM for groups, this object represents the eligibility policy for the group. Otherwise, it is null. Supports $expand. + activated_using: Optional[PrivilegedAccessGroupEligibilitySchedule] = None + # References the group that is the scope of the membership or ownership assignment request through PIM for groups. Supports $expand. + group: Optional[Group] = None + # The identifier of the group representing the scope of the membership or ownership assignment through PIM for groups. Required. + group_id: Optional[str] = None + # References the principal that's in the scope of this membership or ownership assignment request through the group that's governed by PIM. Supports $expand. + principal: Optional[DirectoryObject] = None + # The identifier of the principal whose membership or ownership assignment to the group is managed through PIM for groups. Supports $filter (eq, ne). + principal_id: Optional[str] = None + # Schedule created by this request. Supports $expand. + target_schedule: Optional[PrivilegedAccessGroupEligibilitySchedule] = None + # The identifier of the schedule that's created from the membership or ownership assignment request. Supports $filter (eq, ne). + target_schedule_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupAssignmentScheduleRequest: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupAssignmentScheduleRequest + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleRequest() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + + fields: Dict[str, Callable[[Any], None]] = { + "accessId": lambda n : setattr(self, 'access_id', n.get_enum_value(PrivilegedAccessGroupRelationships)), + "activatedUsing": lambda n : setattr(self, 'activated_using', n.get_object_value(PrivilegedAccessGroupEligibilitySchedule)), + "group": lambda n : setattr(self, 'group', n.get_object_value(Group)), + "groupId": lambda n : setattr(self, 'group_id', n.get_str_value()), + "principal": lambda n : setattr(self, 'principal', n.get_object_value(DirectoryObject)), + "principalId": lambda n : setattr(self, 'principal_id', n.get_str_value()), + "targetSchedule": lambda n : setattr(self, 'target_schedule', n.get_object_value(PrivilegedAccessGroupEligibilitySchedule)), + "targetScheduleId": lambda n : setattr(self, 'target_schedule_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("accessId", self.access_id) + writer.write_object_value("activatedUsing", self.activated_using) + writer.write_object_value("group", self.group) + writer.write_str_value("groupId", self.group_id) + writer.write_object_value("principal", self.principal) + writer.write_str_value("principalId", self.principal_id) + writer.write_object_value("targetSchedule", self.target_schedule) + writer.write_str_value("targetScheduleId", self.target_schedule_id) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_schedule_request_collection_response.py b/msgraph/generated/models/privileged_access_group_assignment_schedule_request_collection_response.py new file mode 100644 index 00000000000..6c8ec28e252 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_schedule_request_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupAssignmentScheduleRequest]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupAssignmentScheduleRequest)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/privileged_access_group_assignment_type.py b/msgraph/generated/models/privileged_access_group_assignment_type.py new file mode 100644 index 00000000000..a25e4b84d06 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_assignment_type.py @@ -0,0 +1,7 @@ +from enum import Enum + +class PrivilegedAccessGroupAssignmentType(str, Enum): + Assigned = "assigned", + Activated = "activated", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/privileged_access_group_eligibility_schedule.py b/msgraph/generated/models/privileged_access_group_eligibility_schedule.py new file mode 100644 index 00000000000..c75ad582e19 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_eligibility_schedule.py @@ -0,0 +1,88 @@ +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 .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule import PrivilegedAccessSchedule + +from .privileged_access_schedule import PrivilegedAccessSchedule + +@dataclass +class PrivilegedAccessGroupEligibilitySchedule(PrivilegedAccessSchedule): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.privilegedAccessGroupEligibilitySchedule" + # The identifier of the membership or ownership eligibility to the group that is governed by PIM. Required. The possible values are: owner, member. Supports $filter (eq). + access_id: Optional[PrivilegedAccessGroupRelationships] = None + # References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + group: Optional[Group] = None + # The identifier of the group representing the scope of the membership or ownership eligibility through PIM for groups. Required. Supports $filter (eq). + group_id: Optional[str] = None + # Indicates whether the assignment is derived from a group assignment. It can further imply whether the caller can manage the schedule. Required. The possible values are: direct, group, unknownFutureValue. Supports $filter (eq). + member_type: Optional[PrivilegedAccessGroupMemberType] = None + # References the principal that's in the scope of this membership or ownership eligibility request to the group that's governed by PIM. Supports $expand. + principal: Optional[DirectoryObject] = None + # The identifier of the principal whose membership or ownership eligibility is granted through PIM for groups. Required. Supports $filter (eq). + principal_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupEligibilitySchedule: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupEligibilitySchedule + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupEligibilitySchedule() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule import PrivilegedAccessSchedule + + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule import PrivilegedAccessSchedule + + fields: Dict[str, Callable[[Any], None]] = { + "accessId": lambda n : setattr(self, 'access_id', n.get_enum_value(PrivilegedAccessGroupRelationships)), + "group": lambda n : setattr(self, 'group', n.get_object_value(Group)), + "groupId": lambda n : setattr(self, 'group_id', n.get_str_value()), + "memberType": lambda n : setattr(self, 'member_type', n.get_enum_value(PrivilegedAccessGroupMemberType)), + "principal": lambda n : setattr(self, 'principal', n.get_object_value(DirectoryObject)), + "principalId": lambda n : setattr(self, 'principal_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("accessId", self.access_id) + writer.write_object_value("group", self.group) + writer.write_str_value("groupId", self.group_id) + writer.write_enum_value("memberType", self.member_type) + writer.write_object_value("principal", self.principal) + writer.write_str_value("principalId", self.principal_id) + + diff --git a/msgraph/generated/models/privileged_access_group_eligibility_schedule_collection_response.py b/msgraph/generated/models/privileged_access_group_eligibility_schedule_collection_response.py new file mode 100644 index 00000000000..f8e9adfe11e --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_eligibility_schedule_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class PrivilegedAccessGroupEligibilityScheduleCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupEligibilitySchedule]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupEligibilityScheduleCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupEligibilityScheduleCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilitySchedule)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/privileged_access_group_eligibility_schedule_instance.py b/msgraph/generated/models/privileged_access_group_eligibility_schedule_instance.py new file mode 100644 index 00000000000..96fbb9956f7 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_eligibility_schedule_instance.py @@ -0,0 +1,92 @@ +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 .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + +from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + +@dataclass +class PrivilegedAccessGroupEligibilityScheduleInstance(PrivilegedAccessScheduleInstance): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance" + # The identifier of the membership or ownership eligibility relationship to the group. Required. The possible values are: owner, member. Supports $filter (eq). + access_id: Optional[PrivilegedAccessGroupRelationships] = None + # The identifier of the privilegedAccessGroupEligibilitySchedule from which this instance was created. Required. Supports $filter (eq, ne). + eligibility_schedule_id: Optional[str] = None + # References the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. + group: Optional[Group] = None + # The identifier of the group representing the scope of the membership or ownership eligibility through PIM for groups. Required. Supports $filter (eq). + group_id: Optional[str] = None + # Indicates whether the assignment is derived from a group assignment. It can further imply whether the calling principal can manage the assignment schedule. Required. The possible values are: direct, group, unknownFutureValue. Supports $filter (eq). + member_type: Optional[PrivilegedAccessGroupMemberType] = None + # References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + principal: Optional[DirectoryObject] = None + # The identifier of the principal whose membership or ownership eligibility to the group is managed through PIM for groups. Required. Supports $filter (eq). + principal_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupEligibilityScheduleInstance: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupEligibilityScheduleInstance + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleInstance() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_member_type import PrivilegedAccessGroupMemberType + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_instance import PrivilegedAccessScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "accessId": lambda n : setattr(self, 'access_id', n.get_enum_value(PrivilegedAccessGroupRelationships)), + "eligibilityScheduleId": lambda n : setattr(self, 'eligibility_schedule_id', n.get_str_value()), + "group": lambda n : setattr(self, 'group', n.get_object_value(Group)), + "groupId": lambda n : setattr(self, 'group_id', n.get_str_value()), + "memberType": lambda n : setattr(self, 'member_type', n.get_enum_value(PrivilegedAccessGroupMemberType)), + "principal": lambda n : setattr(self, 'principal', n.get_object_value(DirectoryObject)), + "principalId": lambda n : setattr(self, 'principal_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("accessId", self.access_id) + writer.write_str_value("eligibilityScheduleId", self.eligibility_schedule_id) + writer.write_object_value("group", self.group) + writer.write_str_value("groupId", self.group_id) + writer.write_enum_value("memberType", self.member_type) + writer.write_object_value("principal", self.principal) + writer.write_str_value("principalId", self.principal_id) + + diff --git a/msgraph/generated/models/privileged_access_group_eligibility_schedule_instance_collection_response.py b/msgraph/generated/models/privileged_access_group_eligibility_schedule_instance_collection_response.py new file mode 100644 index 00000000000..d1d39f9245e --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_eligibility_schedule_instance_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupEligibilityScheduleInstance]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilityScheduleInstance)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/privileged_access_group_eligibility_schedule_request.py b/msgraph/generated/models/privileged_access_group_eligibility_schedule_request.py new file mode 100644 index 00000000000..a725a62d4fa --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_eligibility_schedule_request.py @@ -0,0 +1,92 @@ +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 .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + +from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + +@dataclass +class PrivilegedAccessGroupEligibilityScheduleRequest(PrivilegedAccessScheduleRequest): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest" + # The identifier of membership or ownership eligibility relationship to the group. Required. The possible values are: owner, member, unknownFutureValue. + access_id: Optional[PrivilegedAccessGroupRelationships] = None + # References the group that is the scope of the membership or ownership eligibility request through PIM for groups. Supports $expand. + group: Optional[Group] = None + # The identifier of the group representing the scope of the membership and ownership eligibility through PIM for groups. Required. + group_id: Optional[str] = None + # References the principal that's in the scope of the membership or ownership eligibility request through the group that's governed by PIM. Supports $expand. + principal: Optional[DirectoryObject] = None + # The identifier of the principal whose membership or ownership eligibility to the group is managed through PIM for groups. Required. + principal_id: Optional[str] = None + # Schedule created by this request. + target_schedule: Optional[PrivilegedAccessGroupEligibilitySchedule] = None + # The identifier of the schedule that's created from the eligibility request. Optional. + target_schedule_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupEligibilityScheduleRequest: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupEligibilityScheduleRequest + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleRequest() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + + from .directory_object import DirectoryObject + from .group import Group + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .privileged_access_group_relationships import PrivilegedAccessGroupRelationships + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + + fields: Dict[str, Callable[[Any], None]] = { + "accessId": lambda n : setattr(self, 'access_id', n.get_enum_value(PrivilegedAccessGroupRelationships)), + "group": lambda n : setattr(self, 'group', n.get_object_value(Group)), + "groupId": lambda n : setattr(self, 'group_id', n.get_str_value()), + "principal": lambda n : setattr(self, 'principal', n.get_object_value(DirectoryObject)), + "principalId": lambda n : setattr(self, 'principal_id', n.get_str_value()), + "targetSchedule": lambda n : setattr(self, 'target_schedule', n.get_object_value(PrivilegedAccessGroupEligibilitySchedule)), + "targetScheduleId": lambda n : setattr(self, 'target_schedule_id', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("accessId", self.access_id) + writer.write_object_value("group", self.group) + writer.write_str_value("groupId", self.group_id) + writer.write_object_value("principal", self.principal) + writer.write_str_value("principalId", self.principal_id) + writer.write_object_value("targetSchedule", self.target_schedule) + writer.write_str_value("targetScheduleId", self.target_schedule_id) + + diff --git a/msgraph/generated/models/privileged_access_group_eligibility_schedule_request_collection_response.py b/msgraph/generated/models/privileged_access_group_eligibility_schedule_request_collection_response.py new file mode 100644 index 00000000000..4007bbf6a15 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_eligibility_schedule_request_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[PrivilegedAccessGroupEligibilityScheduleRequest]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(PrivilegedAccessGroupEligibilityScheduleRequest)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/privileged_access_group_member_type.py b/msgraph/generated/models/privileged_access_group_member_type.py new file mode 100644 index 00000000000..f93dc872418 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_member_type.py @@ -0,0 +1,7 @@ +from enum import Enum + +class PrivilegedAccessGroupMemberType(str, Enum): + Direct = "direct", + Group = "group", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/privileged_access_group_relationships.py b/msgraph/generated/models/privileged_access_group_relationships.py new file mode 100644 index 00000000000..4d382facd17 --- /dev/null +++ b/msgraph/generated/models/privileged_access_group_relationships.py @@ -0,0 +1,7 @@ +from enum import Enum + +class PrivilegedAccessGroupRelationships(str, Enum): + Owner = "owner", + Member = "member", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/privileged_access_root.py b/msgraph/generated/models/privileged_access_root.py new file mode 100644 index 00000000000..7537af0f44b --- /dev/null +++ b/msgraph/generated/models/privileged_access_root.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .privileged_access_group import PrivilegedAccessGroup + +from .entity import Entity + +@dataclass +class PrivilegedAccessRoot(Entity): + # A group that's governed through Privileged Identity Management (PIM). + group: Optional[PrivilegedAccessGroup] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessRoot: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessRoot + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PrivilegedAccessRoot() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .privileged_access_group import PrivilegedAccessGroup + + from .entity import Entity + from .privileged_access_group import PrivilegedAccessGroup + + fields: Dict[str, Callable[[Any], None]] = { + "group": lambda n : setattr(self, 'group', n.get_object_value(PrivilegedAccessGroup)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("group", self.group) + + diff --git a/msgraph/generated/models/privileged_access_schedule.py b/msgraph/generated/models/privileged_access_schedule.py new file mode 100644 index 00000000000..a625120e09e --- /dev/null +++ b/msgraph/generated/models/privileged_access_schedule.py @@ -0,0 +1,94 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .request_schedule import RequestSchedule + +from .entity import Entity + +@dataclass +class PrivilegedAccessSchedule(Entity): + # When the schedule was created. Optional. + created_date_time: Optional[datetime.datetime] = None + # The identifier of the access assignment or eligibility request that created this schedule. Optional. + created_using: Optional[str] = None + # When the schedule was last modified. Optional. + modified_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None + # Represents the period of the access assignment or eligibility. The scheduleInfo can represent a single occurrence or multiple recurring instances. Required. + schedule_info: Optional[RequestSchedule] = None + # The status of the access assignment or eligibility request. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable. Optional. + status: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessSchedule: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessSchedule + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentSchedule".casefold(): + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + + return PrivilegedAccessGroupAssignmentSchedule() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilitySchedule".casefold(): + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + + return PrivilegedAccessGroupEligibilitySchedule() + return PrivilegedAccessSchedule() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .request_schedule import RequestSchedule + + from .entity import Entity + from .privileged_access_group_assignment_schedule import PrivilegedAccessGroupAssignmentSchedule + from .privileged_access_group_eligibility_schedule import PrivilegedAccessGroupEligibilitySchedule + from .request_schedule import RequestSchedule + + fields: Dict[str, Callable[[Any], None]] = { + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "createdUsing": lambda n : setattr(self, 'created_using', n.get_str_value()), + "modifiedDateTime": lambda n : setattr(self, 'modified_date_time', n.get_datetime_value()), + "scheduleInfo": lambda n : setattr(self, 'schedule_info', n.get_object_value(RequestSchedule)), + "status": lambda n : setattr(self, 'status', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("createdUsing", self.created_using) + writer.write_datetime_value("modifiedDateTime", self.modified_date_time) + writer.write_object_value("scheduleInfo", self.schedule_info) + writer.write_str_value("status", self.status) + + diff --git a/msgraph/generated/models/privileged_access_schedule_instance.py b/msgraph/generated/models/privileged_access_schedule_instance.py new file mode 100644 index 00000000000..73aa6c9b433 --- /dev/null +++ b/msgraph/generated/models/privileged_access_schedule_instance.py @@ -0,0 +1,79 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + +from .entity import Entity + +@dataclass +class PrivilegedAccessScheduleInstance(Entity): + # When the schedule instance ends. Required. + end_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None + # When this instance starts. Required. + start_date_time: Optional[datetime.datetime] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessScheduleInstance: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessScheduleInstance + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance".casefold(): + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + + return PrivilegedAccessGroupAssignmentScheduleInstance() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance".casefold(): + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + return PrivilegedAccessGroupEligibilityScheduleInstance() + return PrivilegedAccessScheduleInstance() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + from .entity import Entity + from .privileged_access_group_assignment_schedule_instance import PrivilegedAccessGroupAssignmentScheduleInstance + from .privileged_access_group_eligibility_schedule_instance import PrivilegedAccessGroupEligibilityScheduleInstance + + fields: Dict[str, Callable[[Any], None]] = { + "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), + "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_datetime_value("endDateTime", self.end_date_time) + writer.write_datetime_value("startDateTime", self.start_date_time) + + diff --git a/msgraph/generated/models/privileged_access_schedule_request.py b/msgraph/generated/models/privileged_access_schedule_request.py new file mode 100644 index 00000000000..f190f4818f0 --- /dev/null +++ b/msgraph/generated/models/privileged_access_schedule_request.py @@ -0,0 +1,99 @@ +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 .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .request import Request + from .request_schedule import RequestSchedule + from .schedule_request_actions import ScheduleRequestActions + from .ticket_info import TicketInfo + +from .request import Request + +@dataclass +class PrivilegedAccessScheduleRequest(Request): + # Represents the type of operation on the group membership or ownership assignment request. The possible values are: adminAssign, adminUpdate, adminRemove, selfActivate, selfDeactivate, adminExtend, adminRenew. adminAssign: For administrators to assign group membership or ownership to principals.adminRemove: For administrators to remove principals from group membership or ownership. adminUpdate: For administrators to change existing group membership or ownership assignments.adminExtend: For administrators to extend expiring assignments.adminRenew: For administrators to renew expired assignments.selfActivate: For principals to activate their assignments.selfDeactivate: For principals to deactivate their active assignments. + action: Optional[ScheduleRequestActions] = None + # Determines whether the call is a validation or an actual call. Only set this property if you want to check whether an activation is subject to additional rules like MFA before actually submitting the request. + is_validation_only: Optional[bool] = None + # A message provided by users and administrators when create they create the privilegedAccessGroupAssignmentScheduleRequest object. + justification: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The period of the group membership or ownership assignment. Recurring schedules are currently unsupported. + schedule_info: Optional[RequestSchedule] = None + # Ticket details linked to the group membership or ownership assignment request including details of the ticket number and ticket system. + ticket_info: Optional[TicketInfo] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PrivilegedAccessScheduleRequest: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PrivilegedAccessScheduleRequest + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest".casefold(): + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + return PrivilegedAccessGroupAssignmentScheduleRequest() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest".casefold(): + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + return PrivilegedAccessGroupEligibilityScheduleRequest() + return PrivilegedAccessScheduleRequest() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .request import Request + from .request_schedule import RequestSchedule + from .schedule_request_actions import ScheduleRequestActions + from .ticket_info import TicketInfo + + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .request import Request + from .request_schedule import RequestSchedule + from .schedule_request_actions import ScheduleRequestActions + from .ticket_info import TicketInfo + + fields: Dict[str, Callable[[Any], None]] = { + "action": lambda n : setattr(self, 'action', n.get_enum_value(ScheduleRequestActions)), + "isValidationOnly": lambda n : setattr(self, 'is_validation_only', n.get_bool_value()), + "justification": lambda n : setattr(self, 'justification', n.get_str_value()), + "scheduleInfo": lambda n : setattr(self, 'schedule_info', n.get_object_value(RequestSchedule)), + "ticketInfo": lambda n : setattr(self, 'ticket_info', n.get_object_value(TicketInfo)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("action", self.action) + writer.write_bool_value("isValidationOnly", self.is_validation_only) + writer.write_str_value("justification", self.justification) + writer.write_object_value("scheduleInfo", self.schedule_info) + writer.write_object_value("ticketInfo", self.ticket_info) + + diff --git a/msgraph/generated/models/process.py b/msgraph/generated/models/process.py index 59e0f94f89e..f95cb54dd8a 100644 --- a/msgraph/generated/models/process.py +++ b/msgraph/generated/models/process.py @@ -73,7 +73,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "integrityLevel": lambda n : setattr(self, 'integrity_level', n.get_enum_value(ProcessIntegrityLevel)), "isElevated": lambda n : setattr(self, 'is_elevated', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "parentProcessCreatedDateTime": lambda n : setattr(self, 'parent_process_created_date_time', n.get_datetime_value()), "parentProcessId": lambda n : setattr(self, 'parent_process_id', n.get_int_value()), "parentProcessName": lambda n : setattr(self, 'parent_process_name', n.get_str_value()), @@ -97,7 +97,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("integrityLevel", self.integrity_level) writer.write_bool_value("isElevated", self.is_elevated) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("parentProcessCreatedDateTime", self.parent_process_created_date_time) writer.write_int_value("parentProcessId", self.parent_process_id) writer.write_str_value("parentProcessName", self.parent_process_name) diff --git a/msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/models/profile_card_annotation.py similarity index 68% rename from msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py rename to msgraph/generated/models/profile_card_annotation.py index 6df44acfcae..d35b0b27831 100644 --- a/msgraph/generated/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py +++ b/msgraph/generated/models/profile_card_annotation.py @@ -3,10 +3,12 @@ from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID + +if TYPE_CHECKING: + from .display_name_localization import DisplayNameLocalization @dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): +class ProfileCardAnnotation(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -14,34 +16,35 @@ class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsa additional_data: Dict[str, Any] = field(default_factory=dict) # The displayName property display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None + # The localizations property + localizations: Optional[List[DisplayNameLocalization]] = None + # The OdataType property + odata_type: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ProfileCardAnnotation: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody + Returns: ProfileCardAnnotation """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() + return ProfileCardAnnotation() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .display_name_localization import DisplayNameLocalization + + from .display_name_localization import DisplayNameLocalization + fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_value()), + "localizations": lambda n : setattr(self, 'localizations', n.get_collection_of_object_values(DisplayNameLocalization)), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,9 +57,8 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) + writer.write_collection_of_object_values("localizations", self.localizations) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/profile_card_property.py b/msgraph/generated/models/profile_card_property.py new file mode 100644 index 00000000000..e7b0885766a --- /dev/null +++ b/msgraph/generated/models/profile_card_property.py @@ -0,0 +1,63 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .profile_card_annotation import ProfileCardAnnotation + +from .entity import Entity + +@dataclass +class ProfileCardProperty(Entity): + # The annotations property + annotations: Optional[List[ProfileCardAnnotation]] = None + # The directoryPropertyName property + directory_property_name: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ProfileCardProperty: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ProfileCardProperty + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ProfileCardProperty() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .profile_card_annotation import ProfileCardAnnotation + + from .entity import Entity + from .profile_card_annotation import ProfileCardAnnotation + + fields: Dict[str, Callable[[Any], None]] = { + "annotations": lambda n : setattr(self, 'annotations', n.get_collection_of_object_values(ProfileCardAnnotation)), + "directoryPropertyName": lambda n : setattr(self, 'directory_property_name', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("annotations", self.annotations) + writer.write_str_value("directoryPropertyName", self.directory_property_name) + + diff --git a/msgraph/generated/models/profile_card_property_collection_response.py b/msgraph/generated/models/profile_card_property_collection_response.py new file mode 100644 index 00000000000..16a1f2661ab --- /dev/null +++ b/msgraph/generated/models/profile_card_property_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .profile_card_property import ProfileCardProperty + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class ProfileCardPropertyCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ProfileCardProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ProfileCardPropertyCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ProfileCardPropertyCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ProfileCardPropertyCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .profile_card_property import ProfileCardProperty + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .profile_card_property import ProfileCardProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ProfileCardProperty)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/prompt.py b/msgraph/generated/models/prompt.py index 4c440188d92..1c25721a088 100644 --- a/msgraph/generated/models/prompt.py +++ b/msgraph/generated/models/prompt.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .media_prompt import MediaPrompt fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/provision_channel_email_result.py b/msgraph/generated/models/provision_channel_email_result.py index 8ad9a4de066..b5ae55c2fa2 100644 --- a/msgraph/generated/models/provision_channel_email_result.py +++ b/msgraph/generated/models/provision_channel_email_result.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "email": lambda n : setattr(self, 'email', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("email", self.email) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/provisioned_plan.py b/msgraph/generated/models/provisioned_plan.py index 0ade1a06303..a463ba21c9d 100644 --- a/msgraph/generated/models/provisioned_plan.py +++ b/msgraph/generated/models/provisioned_plan.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "capabilityStatus": lambda n : setattr(self, 'capability_status', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "provisioningStatus": lambda n : setattr(self, 'provisioning_status', n.get_str_value()), "service": lambda n : setattr(self, 'service', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("capabilityStatus", self.capability_status) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("provisioningStatus", self.provisioning_status) writer.write_str_value("service", self.service) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/provisioning_error_info.py b/msgraph/generated/models/provisioning_error_info.py index 087483a8592..28bcac58859 100644 --- a/msgraph/generated/models/provisioning_error_info.py +++ b/msgraph/generated/models/provisioning_error_info.py @@ -14,7 +14,7 @@ class ProvisioningErrorInfo(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) - # Additional details in case of error. + # Additional details if there's error. additional_details: Optional[str] = None # Categorizes the error code. Possible values are failure, nonServiceFailure, success, unknownFutureValue error_category: Optional[ProvisioningStatusErrorCategory] = None @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "additionalDetails": lambda n : setattr(self, 'additional_details', n.get_str_value()), "errorCategory": lambda n : setattr(self, 'error_category', n.get_enum_value(ProvisioningStatusErrorCategory)), "errorCode": lambda n : setattr(self, 'error_code', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reason": lambda n : setattr(self, 'reason', n.get_str_value()), "recommendedAction": lambda n : setattr(self, 'recommended_action', n.get_str_value()), } @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("additionalDetails", self.additional_details) writer.write_enum_value("errorCategory", self.error_category) writer.write_str_value("errorCode", self.error_code) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("reason", self.reason) writer.write_str_value("recommendedAction", self.recommended_action) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/provisioning_object_summary.py b/msgraph/generated/models/provisioning_object_summary.py index 7f0b89d52ca..0c5ff5effff 100644 --- a/msgraph/generated/models/provisioning_object_summary.py +++ b/msgraph/generated/models/provisioning_object_summary.py @@ -35,7 +35,7 @@ class ProvisioningObjectSummary(Entity): modified_properties: Optional[List[ModifiedProperty]] = None # The OdataType property odata_type: Optional[str] = None - # Indicates the activity name or the operation name. Possible values are: create, update, delete, stageddelete, disable, other and unknownFutureValue. For a list of activities logged, refer to Azure AD activity list. Supports $filter (eq, contains). + # Indicates the activity name or the operation name. Possible values are: create, update, delete, stageddelete, disable, other and unknownFutureValue. For a list of activities logged, refer to Microsoft Entra activity list. Supports $filter (eq, contains). provisioning_action: Optional[ProvisioningAction] = None # Details of provisioning status. provisioning_status_info: Optional[ProvisioningStatusInfo] = None @@ -51,7 +51,7 @@ class ProvisioningObjectSummary(Entity): target_identity: Optional[ProvisionedIdentity] = None # Details of target system of the object being provisioned. Supports $filter (eq, contains) for displayName. target_system: Optional[ProvisioningSystem] = None - # Unique Azure AD tenant ID. Supports $filter (eq, contains). + # Unique Microsoft Entra tenant ID. Supports $filter (eq, contains). tenant_id: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/provisioning_status_info.py b/msgraph/generated/models/provisioning_status_info.py index 4c1b9af1cfa..b62f7b9c93b 100644 --- a/msgraph/generated/models/provisioning_status_info.py +++ b/msgraph/generated/models/provisioning_status_info.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "errorInformation": lambda n : setattr(self, 'error_information', n.get_object_value(ProvisioningErrorInfo)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_enum_value(ProvisioningResult)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("errorInformation", self.error_information) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/provisioning_step.py b/msgraph/generated/models/provisioning_step.py index 42b0a37941e..c19184569e1 100644 --- a/msgraph/generated/models/provisioning_step.py +++ b/msgraph/generated/models/provisioning_step.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "description": lambda n : setattr(self, 'description', n.get_str_value()), "details": lambda n : setattr(self, 'details', n.get_object_value(DetailsInfo)), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "provisioningStepType": lambda n : setattr(self, 'provisioning_step_type', n.get_enum_value(ProvisioningStepType)), "status": lambda n : setattr(self, 'status', n.get_enum_value(ProvisioningResult)), } @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("description", self.description) writer.write_object_value("details", self.details) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("provisioningStepType", self.provisioning_step_type) writer.write_enum_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/proxied_domain.py b/msgraph/generated/models/proxied_domain.py index 2b4c03cc954..66d2539fa8a 100644 --- a/msgraph/generated/models/proxied_domain.py +++ b/msgraph/generated/models/proxied_domain.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "ipAddressOrFQDN": lambda n : setattr(self, 'ip_address_or_f_q_d_n', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "proxy": lambda n : setattr(self, 'proxy', n.get_str_value()), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("ipAddressOrFQDN", self.ip_address_or_f_q_d_n) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("proxy", self.proxy) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/public_client_application.py b/msgraph/generated/models/public_client_application.py index a34d9fafcf8..fc413b4fb76 100644 --- a/msgraph/generated/models/public_client_application.py +++ b/msgraph/generated/models/public_client_application.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "redirectUris": lambda n : setattr(self, 'redirect_uris', n.get_collection_of_primitive_values(str)), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("redirectUris", self.redirect_uris) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/public_error.py b/msgraph/generated/models/public_error.py index f4f5955553a..edd5e3a7167 100644 --- a/msgraph/generated/models/public_error.py +++ b/msgraph/generated/models/public_error.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "details": lambda n : setattr(self, 'details', n.get_collection_of_object_values(PublicErrorDetail)), "innerError": lambda n : setattr(self, 'inner_error', n.get_object_value(PublicInnerError)), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("details", self.details) writer.write_object_value("innerError", self.inner_error) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("target", self.target) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/public_error_detail.py b/msgraph/generated/models/public_error_detail.py index ccd044e1a95..ddbf00f0c41 100644 --- a/msgraph/generated/models/public_error_detail.py +++ b/msgraph/generated/models/public_error_detail.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("target", self.target) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/public_inner_error.py b/msgraph/generated/models/public_inner_error.py index dca5f240719..7e933e7f4e0 100644 --- a/msgraph/generated/models/public_inner_error.py +++ b/msgraph/generated/models/public_inner_error.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "code": lambda n : setattr(self, 'code', n.get_str_value()), "details": lambda n : setattr(self, 'details', n.get_collection_of_object_values(PublicErrorDetail)), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("code", self.code) writer.write_collection_of_object_values("details", self.details) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("target", self.target) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/publication_facet.py b/msgraph/generated/models/publication_facet.py index f64e36c473f..ae07567648b 100644 --- a/msgraph/generated/models/publication_facet.py +++ b/msgraph/generated/models/publication_facet.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "checkedOutBy": lambda n : setattr(self, 'checked_out_by', n.get_object_value(IdentitySet)), "level": lambda n : setattr(self, 'level', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "versionId": lambda n : setattr(self, 'version_id', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("checkedOutBy", self.checked_out_by) writer.write_str_value("level", self.level) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("versionId", self.version_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/quota.py b/msgraph/generated/models/quota.py index e80199f8340..54738cd9297 100644 --- a/msgraph/generated/models/quota.py +++ b/msgraph/generated/models/quota.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "deleted": lambda n : setattr(self, 'deleted', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "remaining": lambda n : setattr(self, 'remaining', n.get_int_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), "storagePlanInformation": lambda n : setattr(self, 'storage_plan_information', n.get_object_value(StoragePlanInformation)), @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("deleted", self.deleted) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("remaining", self.remaining) writer.write_str_value("state", self.state) writer.write_object_value("storagePlanInformation", self.storage_plan_information) diff --git a/msgraph/generated/models/recent_notebook.py b/msgraph/generated/models/recent_notebook.py index 36b05373169..7249cc8a299 100644 --- a/msgraph/generated/models/recent_notebook.py +++ b/msgraph/generated/models/recent_notebook.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "lastAccessedTime": lambda n : setattr(self, 'last_accessed_time', n.get_datetime_value()), "links": lambda n : setattr(self, 'links', n.get_object_value(RecentNotebookLinks)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sourceService": lambda n : setattr(self, 'source_service', n.get_enum_value(OnenoteSourceService)), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_datetime_value("lastAccessedTime", self.last_accessed_time) writer.write_object_value("links", self.links) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("sourceService", self.source_service) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/recent_notebook_links.py b/msgraph/generated/models/recent_notebook_links.py index f1279939f8c..bc0b252bd1b 100644 --- a/msgraph/generated/models/recent_notebook_links.py +++ b/msgraph/generated/models/recent_notebook_links.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_link import ExternalLink fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oneNoteClientUrl": lambda n : setattr(self, 'one_note_client_url', n.get_object_value(ExternalLink)), "oneNoteWebUrl": lambda n : setattr(self, 'one_note_web_url', n.get_object_value(ExternalLink)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("oneNoteClientUrl", self.one_note_client_url) writer.write_object_value("oneNoteWebUrl", self.one_note_web_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/recipient.py b/msgraph/generated/models/recipient.py index e7409f5e02e..75a1684872a 100644 --- a/msgraph/generated/models/recipient.py +++ b/msgraph/generated/models/recipient.py @@ -59,7 +59,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "emailAddress": lambda n : setattr(self, 'email_address', n.get_object_value(EmailAddress)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("emailAddress", self.email_address) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/recommended_action.py b/msgraph/generated/models/recommended_action.py index 3c8235210e2..07c4b8ed671 100644 --- a/msgraph/generated/models/recommended_action.py +++ b/msgraph/generated/models/recommended_action.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "actionWebUrl": lambda n : setattr(self, 'action_web_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "potentialScoreImpact": lambda n : setattr(self, 'potential_score_impact', n.get_float_value()), "title": lambda n : setattr(self, 'title', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("actionWebUrl", self.action_web_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_float_value("potentialScoreImpact", self.potential_score_impact) writer.write_str_value("title", self.title) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/recording_info.py b/msgraph/generated/models/recording_info.py index b1ddb4a98eb..3188b9e23a5 100644 --- a/msgraph/generated/models/recording_info.py +++ b/msgraph/generated/models/recording_info.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "initiator": lambda n : setattr(self, 'initiator', n.get_object_value(IdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recordingStatus": lambda n : setattr(self, 'recording_status', n.get_enum_value(RecordingStatus)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("initiator", self.initiator) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("recordingStatus", self.recording_status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/recurrence_pattern.py b/msgraph/generated/models/recurrence_pattern.py index 58cbfe8bd6d..82e558ec344 100644 --- a/msgraph/generated/models/recurrence_pattern.py +++ b/msgraph/generated/models/recurrence_pattern.py @@ -64,7 +64,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "index": lambda n : setattr(self, 'index', n.get_enum_value(WeekIndex)), "interval": lambda n : setattr(self, 'interval', n.get_int_value()), "month": lambda n : setattr(self, 'month', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(RecurrencePatternType)), } return fields @@ -83,7 +83,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("index", self.index) writer.write_int_value("interval", self.interval) writer.write_int_value("month", self.month) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/recurrence_range.py b/msgraph/generated/models/recurrence_range.py index 8315dd592b2..d2567d622e5 100644 --- a/msgraph/generated/models/recurrence_range.py +++ b/msgraph/generated/models/recurrence_range.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "endDate": lambda n : setattr(self, 'end_date', n.get_date_value()), "numberOfOccurrences": lambda n : setattr(self, 'number_of_occurrences', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recurrenceTimeZone": lambda n : setattr(self, 'recurrence_time_zone', n.get_str_value()), "startDate": lambda n : setattr(self, 'start_date', n.get_date_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(RecurrenceRangeType)), @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_date_value("endDate", self.end_date) writer.write_int_value("numberOfOccurrences", self.number_of_occurrences) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("recurrenceTimeZone", self.recurrence_time_zone) writer.write_date_value("startDate", self.start_date) writer.write_enum_value("type", self.type) diff --git a/msgraph/generated/models/redirect_uri_settings.py b/msgraph/generated/models/redirect_uri_settings.py index c528e42ae9d..0560395d299 100644 --- a/msgraph/generated/models/redirect_uri_settings.py +++ b/msgraph/generated/models/redirect_uri_settings.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "index": lambda n : setattr(self, 'index', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "uri": lambda n : setattr(self, 'uri', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("index", self.index) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("uri", self.uri) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/reference_create.py b/msgraph/generated/models/reference_create.py index 24f6855c2eb..36523915970 100644 --- a/msgraph/generated/models/reference_create.py +++ b/msgraph/generated/models/reference_create.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.id": lambda n : setattr(self, 'odata_id', n.get_str_value()), + "OdataId": lambda n : setattr(self, 'odata_id', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.id", self.odata_id) + writer.write_str_value("OdataId", self.odata_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/reference_update.py b/msgraph/generated/models/reference_update.py index 10cb5558fca..1a736b33701 100644 --- a/msgraph/generated/models/reference_update.py +++ b/msgraph/generated/models/reference_update.py @@ -33,8 +33,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.id": lambda n : setattr(self, 'odata_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataId": lambda n : setattr(self, 'odata_id', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -46,8 +46,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.id", self.odata_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataId", self.odata_id) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/referenced_object.py b/msgraph/generated/models/referenced_object.py index fe4000e0c6f..19a2628a3d6 100644 --- a/msgraph/generated/models/referenced_object.py +++ b/msgraph/generated/models/referenced_object.py @@ -35,7 +35,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "referencedObjectName": lambda n : setattr(self, 'referenced_object_name', n.get_str_value()), "referencedProperty": lambda n : setattr(self, 'referenced_property', n.get_str_value()), } @@ -49,7 +49,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("referencedObjectName", self.referenced_object_name) writer.write_str_value("referencedProperty", self.referenced_property) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/registration_enforcement.py b/msgraph/generated/models/registration_enforcement.py index b82d8449137..0b975708df9 100644 --- a/msgraph/generated/models/registration_enforcement.py +++ b/msgraph/generated/models/registration_enforcement.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "authenticationMethodsRegistrationCampaign": lambda n : setattr(self, 'authentication_methods_registration_campaign', n.get_object_value(AuthenticationMethodsRegistrationCampaign)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("authenticationMethodsRegistrationCampaign", self.authentication_methods_registration_campaign) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/registry_key_state.py b/msgraph/generated/models/registry_key_state.py index bc20d03d925..f295e702778 100644 --- a/msgraph/generated/models/registry_key_state.py +++ b/msgraph/generated/models/registry_key_state.py @@ -66,7 +66,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hive": lambda n : setattr(self, 'hive', n.get_enum_value(RegistryHive)), "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oldKey": lambda n : setattr(self, 'old_key', n.get_str_value()), "oldValueData": lambda n : setattr(self, 'old_value_data', n.get_str_value()), "oldValueName": lambda n : setattr(self, 'old_value_name', n.get_str_value()), @@ -88,7 +88,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_enum_value("hive", self.hive) writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("oldKey", self.old_key) writer.write_str_value("oldValueData", self.old_value_data) writer.write_str_value("oldValueName", self.old_value_name) diff --git a/msgraph/generated/models/related_contact.py b/msgraph/generated/models/related_contact.py index fb4ab95f2c6..ff984e8faf7 100644 --- a/msgraph/generated/models/related_contact.py +++ b/msgraph/generated/models/related_contact.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "emailAddress": lambda n : setattr(self, 'email_address', n.get_str_value()), "mobilePhone": lambda n : setattr(self, 'mobile_phone', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "relationship": lambda n : setattr(self, 'relationship', n.get_enum_value(ContactRelationship)), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_str_value("emailAddress", self.email_address) writer.write_str_value("mobilePhone", self.mobile_phone) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("relationship", self.relationship) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/reminder.py b/msgraph/generated/models/reminder.py index 553490f8f77..127c72b9e0c 100644 --- a/msgraph/generated/models/reminder.py +++ b/msgraph/generated/models/reminder.py @@ -64,7 +64,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "eventStartTime": lambda n : setattr(self, 'event_start_time', n.get_object_value(DateTimeTimeZone)), "eventSubject": lambda n : setattr(self, 'event_subject', n.get_str_value()), "eventWebLink": lambda n : setattr(self, 'event_web_link', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reminderFireTime": lambda n : setattr(self, 'reminder_fire_time', n.get_object_value(DateTimeTimeZone)), } return fields @@ -84,7 +84,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("eventStartTime", self.event_start_time) writer.write_str_value("eventSubject", self.event_subject) writer.write_str_value("eventWebLink", self.event_web_link) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("reminderFireTime", self.reminder_fire_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/remote_item.py b/msgraph/generated/models/remote_item.py index 9eb64e00747..431743912f3 100644 --- a/msgraph/generated/models/remote_item.py +++ b/msgraph/generated/models/remote_item.py @@ -117,7 +117,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(IdentitySet)), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "package": lambda n : setattr(self, 'package', n.get_object_value(Package)), "parentReference": lambda n : setattr(self, 'parent_reference', n.get_object_value(ItemReference)), "shared": lambda n : setattr(self, 'shared', n.get_object_value(Shared)), @@ -148,7 +148,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("lastModifiedBy", self.last_modified_by) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("package", self.package) writer.write_object_value("parentReference", self.parent_reference) writer.write_object_value("shared", self.shared) diff --git a/msgraph/generated/models/report.py b/msgraph/generated/models/report.py index 98a60bead3c..2c11e36416c 100644 --- a/msgraph/generated/models/report.py +++ b/msgraph/generated/models/report.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_bytes_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bytes_value("content", self.content) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/report_root.py b/msgraph/generated/models/report_root.py index 7d70844668d..6be79510fdb 100644 --- a/msgraph/generated/models/report_root.py +++ b/msgraph/generated/models/report_root.py @@ -17,7 +17,7 @@ class ReportRoot(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) - # Container for navigation properties for Azure AD authentication methods resources. + # Container for navigation properties for Microsoft Entra authentication methods resources. authentication_methods: Optional[AuthenticationMethodsRoot] = None # Retrieve a list of daily print usage summaries, grouped by printer. daily_print_usage_by_printer: Optional[List[PrintUsageByPrinter]] = None @@ -64,7 +64,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dailyPrintUsageByUser": lambda n : setattr(self, 'daily_print_usage_by_user', n.get_collection_of_object_values(PrintUsageByUser)), "monthlyPrintUsageByPrinter": lambda n : setattr(self, 'monthly_print_usage_by_printer', n.get_collection_of_object_values(PrintUsageByPrinter)), "monthlyPrintUsageByUser": lambda n : setattr(self, 'monthly_print_usage_by_user', n.get_collection_of_object_values(PrintUsageByUser)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "security": lambda n : setattr(self, 'security', n.get_object_value(SecurityReportsRoot)), } return fields @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("dailyPrintUsageByUser", self.daily_print_usage_by_user) writer.write_collection_of_object_values("monthlyPrintUsageByPrinter", self.monthly_print_usage_by_printer) writer.write_collection_of_object_values("monthlyPrintUsageByUser", self.monthly_print_usage_by_user) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("security", self.security) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/request.py b/msgraph/generated/models/request.py index 121a7d1a5c2..f53fb5ad113 100644 --- a/msgraph/generated/models/request.py +++ b/msgraph/generated/models/request.py @@ -7,6 +7,9 @@ if TYPE_CHECKING: from .entity import Entity from .identity_set import IdentitySet + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest from .unified_role_assignment_schedule_request import UnifiedRoleAssignmentScheduleRequest from .unified_role_eligibility_schedule_request import UnifiedRoleEligibilityScheduleRequest from .user_consent_request import UserConsentRequest @@ -43,6 +46,18 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> R mapping_value = parse_node.get_child_node("@odata.type").get_str_value() except AttributeError: mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest".casefold(): + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + + return PrivilegedAccessGroupAssignmentScheduleRequest() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest".casefold(): + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + + return PrivilegedAccessGroupEligibilityScheduleRequest() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.privilegedAccessScheduleRequest".casefold(): + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest + + return PrivilegedAccessScheduleRequest() if mapping_value and mapping_value.casefold() == "#microsoft.graph.unifiedRoleAssignmentScheduleRequest".casefold(): from .unified_role_assignment_schedule_request import UnifiedRoleAssignmentScheduleRequest @@ -64,12 +79,18 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ from .entity import Entity from .identity_set import IdentitySet + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest from .unified_role_assignment_schedule_request import UnifiedRoleAssignmentScheduleRequest from .unified_role_eligibility_schedule_request import UnifiedRoleEligibilityScheduleRequest from .user_consent_request import UserConsentRequest from .entity import Entity from .identity_set import IdentitySet + from .privileged_access_group_assignment_schedule_request import PrivilegedAccessGroupAssignmentScheduleRequest + from .privileged_access_group_eligibility_schedule_request import PrivilegedAccessGroupEligibilityScheduleRequest + from .privileged_access_schedule_request import PrivilegedAccessScheduleRequest from .unified_role_assignment_schedule_request import UnifiedRoleAssignmentScheduleRequest from .unified_role_eligibility_schedule_request import UnifiedRoleEligibilityScheduleRequest from .user_consent_request import UserConsentRequest diff --git a/msgraph/generated/models/request_schedule.py b/msgraph/generated/models/request_schedule.py index 9a6f5800e0a..2e039c08b01 100644 --- a/msgraph/generated/models/request_schedule.py +++ b/msgraph/generated/models/request_schedule.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "expiration": lambda n : setattr(self, 'expiration', n.get_object_value(ExpirationPattern)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recurrence": lambda n : setattr(self, 'recurrence', n.get_object_value(PatternedRecurrence)), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("expiration", self.expiration) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("recurrence", self.recurrence) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/request_signature_verification.py b/msgraph/generated/models/request_signature_verification.py index a4d31b7bf3b..a2d166ce69b 100644 --- a/msgraph/generated/models/request_signature_verification.py +++ b/msgraph/generated/models/request_signature_verification.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowedWeakAlgorithms": lambda n : setattr(self, 'allowed_weak_algorithms', n.get_collection_of_enum_values(WeakAlgorithms)), "isSignedRequestRequired": lambda n : setattr(self, 'is_signed_request_required', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_enum_value("allowedWeakAlgorithms", self.allowed_weak_algorithms) writer.write_bool_value("isSignedRequestRequired", self.is_signed_request_required) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/required_resource_access.py b/msgraph/generated/models/required_resource_access.py index 2d19d4a7ae6..afa456be809 100644 --- a/msgraph/generated/models/required_resource_access.py +++ b/msgraph/generated/models/required_resource_access.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .resource_access import ResourceAccess fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceAccess": lambda n : setattr(self, 'resource_access', n.get_collection_of_object_values(ResourceAccess)), "resourceAppId": lambda n : setattr(self, 'resource_app_id', n.get_str_value()), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("resourceAccess", self.resource_access) writer.write_str_value("resourceAppId", self.resource_app_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/reseller_delegated_admin_relationship.py b/msgraph/generated/models/reseller_delegated_admin_relationship.py new file mode 100644 index 00000000000..a7ff0b3025f --- /dev/null +++ b/msgraph/generated/models/reseller_delegated_admin_relationship.py @@ -0,0 +1,60 @@ +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 .delegated_admin_relationship import DelegatedAdminRelationship + +from .delegated_admin_relationship import DelegatedAdminRelationship + +@dataclass +class ResellerDelegatedAdminRelationship(DelegatedAdminRelationship): + # The tenant ID of the indirect provider partner who created the relationship for the indirect reseller partner. + indirect_provider_tenant_id: Optional[str] = None + # Indicates the indirect reseller partner consent status. true indicates that the partner has yet to review the relationship; false indicates that the partner has already provided consent by approving or rejecting the relationship. + is_partner_consent_pending: Optional[bool] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ResellerDelegatedAdminRelationship: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ResellerDelegatedAdminRelationship + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ResellerDelegatedAdminRelationship() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .delegated_admin_relationship import DelegatedAdminRelationship + + from .delegated_admin_relationship import DelegatedAdminRelationship + + fields: Dict[str, Callable[[Any], None]] = { + "indirectProviderTenantId": lambda n : setattr(self, 'indirect_provider_tenant_id', n.get_str_value()), + "isPartnerConsentPending": lambda n : setattr(self, 'is_partner_consent_pending', n.get_bool_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("indirectProviderTenantId", self.indirect_provider_tenant_id) + writer.write_bool_value("isPartnerConsentPending", self.is_partner_consent_pending) + + diff --git a/msgraph/generated/models/resource_access.py b/msgraph/generated/models/resource_access.py index 6496c6b0f03..3b3416f1976 100644 --- a/msgraph/generated/models/resource_access.py +++ b/msgraph/generated/models/resource_access.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_uuid_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_uuid_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/resource_action.py b/msgraph/generated/models/resource_action.py index 374f16452ed..7758000064b 100644 --- a/msgraph/generated/models/resource_action.py +++ b/msgraph/generated/models/resource_action.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowedResourceActions": lambda n : setattr(self, 'allowed_resource_actions', n.get_collection_of_primitive_values(str)), "notAllowedResourceActions": lambda n : setattr(self, 'not_allowed_resource_actions', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_primitive_values("allowedResourceActions", self.allowed_resource_actions) writer.write_collection_of_primitive_values("notAllowedResourceActions", self.not_allowed_resource_actions) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/resource_reference.py b/msgraph/generated/models/resource_reference.py index 09d4a9cbc36..d3e12cf6930 100644 --- a/msgraph/generated/models/resource_reference.py +++ b/msgraph/generated/models/resource_reference.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), "webUrl": lambda n : setattr(self, 'web_url', n.get_str_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_str_value("webUrl", self.web_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/resource_specific_permission.py b/msgraph/generated/models/resource_specific_permission.py index b9e380ac7f9..b5e82a8531b 100644 --- a/msgraph/generated/models/resource_specific_permission.py +++ b/msgraph/generated/models/resource_specific_permission.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_uuid_value()), "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_uuid_value("id", self.id) writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/resource_specific_permission_grant.py b/msgraph/generated/models/resource_specific_permission_grant.py index 7afc9f1f1ba..2e6a3ebb6b4 100644 --- a/msgraph/generated/models/resource_specific_permission_grant.py +++ b/msgraph/generated/models/resource_specific_permission_grant.py @@ -12,15 +12,15 @@ class ResourceSpecificPermissionGrant(DirectoryObject): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.resourceSpecificPermissionGrant" - # ID of the service principal of the Azure AD app that has been granted access. Read-only. + # ID of the service principal of the Microsoft Entra app that has been granted access. Read-only. client_app_id: Optional[str] = None - # ID of the Azure AD app that has been granted access. Read-only. + # ID of the Microsoft Entra app that has been granted access. Read-only. client_id: Optional[str] = None # The name of the resource-specific permission. Read-only. permission: Optional[str] = None # The type of permission. Possible values are: Application, Delegated. Read-only. permission_type: Optional[str] = None - # ID of the Azure AD app that is hosting the resource. Read-only. + # ID of the Microsoft Entra app that is hosting the resource. Read-only. resource_app_id: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/resource_visualization.py b/msgraph/generated/models/resource_visualization.py index 16b4d87368d..39341bd8e38 100644 --- a/msgraph/generated/models/resource_visualization.py +++ b/msgraph/generated/models/resource_visualization.py @@ -17,7 +17,7 @@ class ResourceVisualization(AdditionalDataHolder, BackedModel, Parsable): container_type: Optional[str] = None # A path leading to the folder in which the item is stored. container_web_url: Optional[str] = None - # The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported. + # The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Not all Media Mime Types are supported. media_type: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -27,7 +27,7 @@ class ResourceVisualization(AdditionalDataHolder, BackedModel, Parsable): preview_text: Optional[str] = None # The item's title text. title: Optional[str] = None - # The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types. + # The item's media type. Can be used for filtering for a specific file based on a specific type. See the section Type property values for supported types. type: Optional[str] = None @staticmethod @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "containerType": lambda n : setattr(self, 'container_type', n.get_str_value()), "containerWebUrl": lambda n : setattr(self, 'container_web_url', n.get_str_value()), "mediaType": lambda n : setattr(self, 'media_type', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "previewImageUrl": lambda n : setattr(self, 'preview_image_url', n.get_str_value()), "previewText": lambda n : setattr(self, 'preview_text', n.get_str_value()), "title": lambda n : setattr(self, 'title', n.get_str_value()), @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("containerType", self.container_type) writer.write_str_value("containerWebUrl", self.container_web_url) writer.write_str_value("mediaType", self.media_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("previewImageUrl", self.preview_image_url) writer.write_str_value("previewText", self.preview_text) writer.write_str_value("title", self.title) diff --git a/msgraph/generated/models/response_status.py b/msgraph/generated/models/response_status.py index 722efc89712..5c66f04ee1c 100644 --- a/msgraph/generated/models/response_status.py +++ b/msgraph/generated/models/response_status.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .response_type import ResponseType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "response": lambda n : setattr(self, 'response', n.get_enum_value(ResponseType)), "time": lambda n : setattr(self, 'time', n.get_datetime_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("response", self.response) writer.write_datetime_value("time", self.time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/result_info.py b/msgraph/generated/models/result_info.py index ea3447d7239..5c1ef065eaf 100644 --- a/msgraph/generated/models/result_info.py +++ b/msgraph/generated/models/result_info.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_int_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "subcode": lambda n : setattr(self, 'subcode', n.get_int_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("subcode", self.subcode) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/result_template_option.py b/msgraph/generated/models/result_template_option.py index bad5b0ed896..3dcefc75644 100644 --- a/msgraph/generated/models/result_template_option.py +++ b/msgraph/generated/models/result_template_option.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "enableResultTemplate": lambda n : setattr(self, 'enable_result_template', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("enableResultTemplate", self.enable_result_template) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/rgb_color.py b/msgraph/generated/models/rgb_color.py index 8c4fd9a3dc6..27b04cc24d7 100644 --- a/msgraph/generated/models/rgb_color.py +++ b/msgraph/generated/models/rgb_color.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "b": lambda n : setattr(self, 'b', n.get_int_value()), "g": lambda n : setattr(self, 'g', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "r": lambda n : setattr(self, 'r', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("b", self.b) writer.write_int_value("g", self.g) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("r", self.r) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/risk_service_principal_activity.py b/msgraph/generated/models/risk_service_principal_activity.py index b06b92917af..e8bda3da4ba 100644 --- a/msgraph/generated/models/risk_service_principal_activity.py +++ b/msgraph/generated/models/risk_service_principal_activity.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "detail": lambda n : setattr(self, 'detail', n.get_enum_value(RiskDetail)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "riskEventTypes": lambda n : setattr(self, 'risk_event_types', n.get_collection_of_primitive_values(str)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("detail", self.detail) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("riskEventTypes", self.risk_event_types) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/risk_user_activity.py b/msgraph/generated/models/risk_user_activity.py index f089f9c0c1a..50740fb9127 100644 --- a/msgraph/generated/models/risk_user_activity.py +++ b/msgraph/generated/models/risk_user_activity.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "detail": lambda n : setattr(self, 'detail', n.get_enum_value(RiskDetail)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "riskEventTypes": lambda n : setattr(self, 'risk_event_types', n.get_collection_of_primitive_values(str)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("detail", self.detail) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("riskEventTypes", self.risk_event_types) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/risky_service_principal.py b/msgraph/generated/models/risky_service_principal.py index c6d051fbd30..660190fd044 100644 --- a/msgraph/generated/models/risky_service_principal.py +++ b/msgraph/generated/models/risky_service_principal.py @@ -6,10 +6,10 @@ if TYPE_CHECKING: from .entity import Entity + from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .risk_detail import RiskDetail from .risk_level import RiskLevel from .risk_state import RiskState - from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .entity import Entity @@ -19,11 +19,11 @@ class RiskyServicePrincipal(Entity): app_id: Optional[str] = None # The display name for the service principal. display_name: Optional[str] = None - # Represents the risk history of Azure AD service principals. + # Represents the risk history of Microsoft Entra service principals. history: Optional[List[RiskyServicePrincipalHistoryItem]] = None # true if the service principal account is enabled; otherwise, false. is_enabled: Optional[bool] = None - # Indicates whether Azure AD is currently processing the service principal's risky state. + # Indicates whether Microsoft Entra ID is currently processing the service principal's risky state. is_processing: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None @@ -35,7 +35,7 @@ class RiskyServicePrincipal(Entity): risk_level: Optional[RiskLevel] = None # State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. risk_state: Optional[RiskState] = None - # Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Azure AD internally and is inherited from servicePrincipal. + # Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Microsoft Entra ID internally and is inherited from servicePrincipal. service_principal_type: Optional[str] = None @staticmethod @@ -63,16 +63,16 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .entity import Entity + from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .risk_detail import RiskDetail from .risk_level import RiskLevel from .risk_state import RiskState - from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .entity import Entity + from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem from .risk_detail import RiskDetail from .risk_level import RiskLevel from .risk_state import RiskState - from .risky_service_principal_history_item import RiskyServicePrincipalHistoryItem fields: Dict[str, Callable[[Any], None]] = { "appId": lambda n : setattr(self, 'app_id', n.get_str_value()), diff --git a/msgraph/generated/models/risky_service_principal_history_item.py b/msgraph/generated/models/risky_service_principal_history_item.py index 34615a09d58..54fb6104125 100644 --- a/msgraph/generated/models/risky_service_principal_history_item.py +++ b/msgraph/generated/models/risky_service_principal_history_item.py @@ -4,8 +4,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .risk_service_principal_activity import RiskServicePrincipalActivity from .risky_service_principal import RiskyServicePrincipal + from .risk_service_principal_activity import RiskServicePrincipalActivity from .risky_service_principal import RiskyServicePrincipal @@ -34,11 +34,11 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .risk_service_principal_activity import RiskServicePrincipalActivity from .risky_service_principal import RiskyServicePrincipal - from .risk_service_principal_activity import RiskServicePrincipalActivity + from .risky_service_principal import RiskyServicePrincipal + from .risk_service_principal_activity import RiskServicePrincipalActivity fields: Dict[str, Callable[[Any], None]] = { "activity": lambda n : setattr(self, 'activity', n.get_object_value(RiskServicePrincipalActivity)), diff --git a/msgraph/generated/models/risky_user.py b/msgraph/generated/models/risky_user.py index c58c14ce258..328c500d569 100644 --- a/msgraph/generated/models/risky_user.py +++ b/msgraph/generated/models/risky_user.py @@ -6,10 +6,10 @@ if TYPE_CHECKING: from .entity import Entity + from .risky_user_history_item import RiskyUserHistoryItem from .risk_detail import RiskDetail from .risk_level import RiskLevel from .risk_state import RiskState - from .risky_user_history_item import RiskyUserHistoryItem from .entity import Entity @@ -61,16 +61,16 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .entity import Entity + from .risky_user_history_item import RiskyUserHistoryItem from .risk_detail import RiskDetail from .risk_level import RiskLevel from .risk_state import RiskState - from .risky_user_history_item import RiskyUserHistoryItem from .entity import Entity + from .risky_user_history_item import RiskyUserHistoryItem from .risk_detail import RiskDetail from .risk_level import RiskLevel from .risk_state import RiskState - from .risky_user_history_item import RiskyUserHistoryItem fields: Dict[str, Callable[[Any], None]] = { "history": lambda n : setattr(self, 'history', n.get_collection_of_object_values(RiskyUserHistoryItem)), diff --git a/msgraph/generated/models/risky_user_history_item.py b/msgraph/generated/models/risky_user_history_item.py index e08ae873b73..8eb9919a4a7 100644 --- a/msgraph/generated/models/risky_user_history_item.py +++ b/msgraph/generated/models/risky_user_history_item.py @@ -4,8 +4,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .risk_user_activity import RiskUserActivity from .risky_user import RiskyUser + from .risk_user_activity import RiskUserActivity from .risky_user import RiskyUser @@ -36,11 +36,11 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .risk_user_activity import RiskUserActivity from .risky_user import RiskyUser - from .risk_user_activity import RiskUserActivity + from .risky_user import RiskyUser + from .risk_user_activity import RiskUserActivity fields: Dict[str, Callable[[Any], None]] = { "activity": lambda n : setattr(self, 'activity', n.get_object_value(RiskUserActivity)), diff --git a/msgraph/generated/models/role_management.py b/msgraph/generated/models/role_management.py index 00ea31b4dc5..77ffc3176dd 100644 --- a/msgraph/generated/models/role_management.py +++ b/msgraph/generated/models/role_management.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "directory": lambda n : setattr(self, 'directory', n.get_object_value(RbacApplication)), "entitlementManagement": lambda n : setattr(self, 'entitlement_management', n.get_object_value(RbacApplication)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("directory", self.directory) writer.write_object_value("entitlementManagement", self.entitlement_management) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/role_permission.py b/msgraph/generated/models/role_permission.py index 4b45a4c2363..43a10a7ced8 100644 --- a/msgraph/generated/models/role_permission.py +++ b/msgraph/generated/models/role_permission.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .resource_action import ResourceAction fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceActions": lambda n : setattr(self, 'resource_actions', n.get_collection_of_object_values(ResourceAction)), } return fields @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("resourceActions", self.resource_actions) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/root.py b/msgraph/generated/models/root.py index 2d2e1e5e76e..10cc6d214af 100644 --- a/msgraph/generated/models/root.py +++ b/msgraph/generated/models/root.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/rubric_criterion.py b/msgraph/generated/models/rubric_criterion.py index 6c2bd2a3ba7..b2f622605c0 100644 --- a/msgraph/generated/models/rubric_criterion.py +++ b/msgraph/generated/models/rubric_criterion.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_object_value(EducationItemBody)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("description", self.description) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/rubric_level.py b/msgraph/generated/models/rubric_level.py index b8dc9f13e14..bb06fc5a362 100644 --- a/msgraph/generated/models/rubric_level.py +++ b/msgraph/generated/models/rubric_level.py @@ -19,7 +19,7 @@ class RubricLevel(AdditionalDataHolder, BackedModel, Parsable): description: Optional[EducationItemBody] = None # The name of this rubric level. display_name: Optional[str] = None - # Null if this is a no-points rubric; educationAssignmentPointsGradeType if it is a points rubric. + # Null if this is a no-points rubric; educationAssignmentPointsGradeType if it's a points rubric. grading: Optional[EducationAssignmentGradeType] = None # The ID of this resource. level_id: Optional[str] = None @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "grading": lambda n : setattr(self, 'grading', n.get_object_value(EducationAssignmentGradeType)), "levelId": lambda n : setattr(self, 'level_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_object_value("grading", self.grading) writer.write_str_value("levelId", self.level_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/rubric_quality.py b/msgraph/generated/models/rubric_quality.py index 31536b41ece..a637477afa4 100644 --- a/msgraph/generated/models/rubric_quality.py +++ b/msgraph/generated/models/rubric_quality.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "criteria": lambda n : setattr(self, 'criteria', n.get_collection_of_object_values(RubricCriterion)), "description": lambda n : setattr(self, 'description', n.get_object_value(EducationItemBody)), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "qualityId": lambda n : setattr(self, 'quality_id', n.get_str_value()), "weight": lambda n : setattr(self, 'weight', n.get_float_value()), } @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("criteria", self.criteria) writer.write_object_value("description", self.description) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("qualityId", self.quality_id) writer.write_float_value("weight", self.weight) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/rubric_quality_feedback_model.py b/msgraph/generated/models/rubric_quality_feedback_model.py index ef6e11821cf..aa586fdc6fd 100644 --- a/msgraph/generated/models/rubric_quality_feedback_model.py +++ b/msgraph/generated/models/rubric_quality_feedback_model.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "feedback": lambda n : setattr(self, 'feedback', n.get_object_value(EducationItemBody)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "qualityId": lambda n : setattr(self, 'quality_id', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("feedback", self.feedback) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("qualityId", self.quality_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/rubric_quality_selected_column_model.py b/msgraph/generated/models/rubric_quality_selected_column_model.py index bc8b53935fc..67289dd5a2b 100644 --- a/msgraph/generated/models/rubric_quality_selected_column_model.py +++ b/msgraph/generated/models/rubric_quality_selected_column_model.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "columnId": lambda n : setattr(self, 'column_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "qualityId": lambda n : setattr(self, 'quality_id', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("columnId", self.column_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("qualityId", self.quality_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/saml_or_ws_fed_provider.py b/msgraph/generated/models/saml_or_ws_fed_provider.py index 64cc82aad01..4c64f564cef 100644 --- a/msgraph/generated/models/saml_or_ws_fed_provider.py +++ b/msgraph/generated/models/saml_or_ws_fed_provider.py @@ -19,11 +19,11 @@ class SamlOrWsFedProvider(IdentityProviderBase): issuer_uri: Optional[str] = None # URI of the metadata exchange endpoint used for authentication from rich client applications. metadata_exchange_uri: Optional[str] = None - # URI that web-based clients are directed to when signing in to Azure Active Directory (Azure AD) services. + # URI that web-based clients are directed to when signing in to Microsoft Entra services. passive_sign_in_uri: Optional[str] = None # Preferred authentication protocol. The possible values are: wsFed, saml, unknownFutureValue. preferred_authentication_protocol: Optional[AuthenticationProtocol] = None - # Current certificate used to sign tokens passed to the Microsoft identity platform. The certificate is formatted as a Base64 encoded string of the public portion of the federated IdP's token signing certificate and must be compatible with the X509Certificate2 class. This property is used in the following scenarios: if a rollover is required outside of the autorollover update a new federation service is being set up if the new token signing certificate isn't present in the federation properties after the federation service certificate has been updated. Azure AD updates certificates via an autorollover process in which it attempts to retrieve a new certificate from the federation service metadata, 30 days before expiry of the current certificate. If a new certificate isn't available, Azure AD monitors the metadata daily and will update the federation settings for the domain when a new certificate is available. + # Current certificate used to sign tokens passed to the Microsoft identity platform. The certificate is formatted as a Base64 encoded string of the public portion of the federated IdP's token signing certificate and must be compatible with the X509Certificate2 class. This property is used in the following scenarios: if a rollover is required outside of the autorollover update a new federation service is being set up if the new token signing certificate isn't present in the federation properties after the federation service certificate has been updated. Microsoft Entra ID updates certificates via an autorollover process in which it attempts to retrieve a new certificate from the federation service metadata, 30 days before expiry of the current certificate. If a new certificate isn't available, Microsoft Entra ID monitors the metadata daily and will update the federation settings for the domain when a new certificate is available. signing_certificate: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/saml_single_sign_on_settings.py b/msgraph/generated/models/saml_single_sign_on_settings.py index 854f362b414..ce3cbeded48 100644 --- a/msgraph/generated/models/saml_single_sign_on_settings.py +++ b/msgraph/generated/models/saml_single_sign_on_settings.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "relayState": lambda n : setattr(self, 'relay_state', n.get_str_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("relayState", self.relay_state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/schedule_entity.py b/msgraph/generated/models/schedule_entity.py index 2ba5b5da155..71d10dbc72f 100644 --- a/msgraph/generated/models/schedule_entity.py +++ b/msgraph/generated/models/schedule_entity.py @@ -71,7 +71,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "theme": lambda n : setattr(self, 'theme', n.get_enum_value(ScheduleEntityTheme)), } @@ -86,7 +86,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_datetime_value("endDateTime", self.end_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_enum_value("theme", self.theme) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/schedule_information.py b/msgraph/generated/models/schedule_information.py index 124ce361871..fff781697b6 100644 --- a/msgraph/generated/models/schedule_information.py +++ b/msgraph/generated/models/schedule_information.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "availabilityView": lambda n : setattr(self, 'availability_view', n.get_str_value()), "error": lambda n : setattr(self, 'error', n.get_object_value(FreeBusyError)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "scheduleId": lambda n : setattr(self, 'schedule_id', n.get_str_value()), "scheduleItems": lambda n : setattr(self, 'schedule_items', n.get_collection_of_object_values(ScheduleItem)), "workingHours": lambda n : setattr(self, 'working_hours', n.get_object_value(WorkingHours)), @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("availabilityView", self.availability_view) writer.write_object_value("error", self.error) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("scheduleId", self.schedule_id) writer.write_collection_of_object_values("scheduleItems", self.schedule_items) writer.write_object_value("workingHours", self.working_hours) diff --git a/msgraph/generated/models/schedule_item.py b/msgraph/generated/models/schedule_item.py index 9d6dd72517f..487e426b1c4 100644 --- a/msgraph/generated/models/schedule_item.py +++ b/msgraph/generated/models/schedule_item.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "end": lambda n : setattr(self, 'end', n.get_object_value(DateTimeTimeZone)), "isPrivate": lambda n : setattr(self, 'is_private', n.get_bool_value()), "location": lambda n : setattr(self, 'location', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "start": lambda n : setattr(self, 'start', n.get_object_value(DateTimeTimeZone)), "status": lambda n : setattr(self, 'status', n.get_enum_value(FreeBusyStatus)), "subject": lambda n : setattr(self, 'subject', n.get_str_value()), @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("end", self.end) writer.write_bool_value("isPrivate", self.is_private) writer.write_str_value("location", self.location) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("start", self.start) writer.write_enum_value("status", self.status) writer.write_str_value("subject", self.subject) diff --git a/msgraph/generated/models/schedule_request_actions.py b/msgraph/generated/models/schedule_request_actions.py new file mode 100644 index 00000000000..6d49426530d --- /dev/null +++ b/msgraph/generated/models/schedule_request_actions.py @@ -0,0 +1,14 @@ +from enum import Enum + +class ScheduleRequestActions(str, Enum): + AdminAssign = "adminAssign", + AdminUpdate = "adminUpdate", + AdminRemove = "adminRemove", + SelfActivate = "selfActivate", + SelfDeactivate = "selfDeactivate", + AdminExtend = "adminExtend", + AdminRenew = "adminRenew", + SelfExtend = "selfExtend", + SelfRenew = "selfRenew", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/schema_extension.py b/msgraph/generated/models/schema_extension.py index 2cdbb426560..59101496b8e 100644 --- a/msgraph/generated/models/schema_extension.py +++ b/msgraph/generated/models/schema_extension.py @@ -15,7 +15,7 @@ class SchemaExtension(Entity): description: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The appId of the application that is the owner of the schema extension. The owner of the schema definition must be explicitly specified during the Create and Update operations, or it will be implied and auto-assigned by Azure AD as follows: In delegated access: The signed-in user must be the owner of the app that calls Microsoft Graph to create the schema extension definition. If the signed-in user isn't the owner of the calling app, they must explicitly specify the owner property, and assign it the appId of an app that they own. In app-only access: The owner property isn't required in the request body. Instead, the calling app is assigned ownership of the schema extension. So, for example, if creating a new schema extension definition using Graph Explorer, you must supply the owner property. Once set, this property is read-only and cannot be changed. Supports $filter (eq). + # The appId of the application that is the owner of the schema extension. The owner of the schema definition must be explicitly specified during the Create and Update operations, or it will be implied and auto-assigned by Microsoft Entra ID as follows: In delegated access: The signed-in user must be the owner of the app that calls Microsoft Graph to create the schema extension definition. If the signed-in user isn't the owner of the calling app, they must explicitly specify the owner property, and assign it the appId of an app that they own. In app-only access: The owner property isn't required in the request body. Instead, the calling app is assigned ownership of the schema extension. So, for example, if creating a new schema extension definition using Graph Explorer, you must supply the owner property. Once set, this property is read-only and cannot be changed. Supports $filter (eq). owner: Optional[str] = None # The collection of property names and types that make up the schema extension definition. properties: Optional[List[ExtensionSchemaProperty]] = None diff --git a/msgraph/generated/models/scored_email_address.py b/msgraph/generated/models/scored_email_address.py index 2ae317523e9..bfd3a42f568 100644 --- a/msgraph/generated/models/scored_email_address.py +++ b/msgraph/generated/models/scored_email_address.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "address": lambda n : setattr(self, 'address', n.get_str_value()), "itemId": lambda n : setattr(self, 'item_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "relevanceScore": lambda n : setattr(self, 'relevance_score', n.get_float_value()), "selectionLikelihood": lambda n : setattr(self, 'selection_likelihood', n.get_enum_value(SelectionLikelihoodInfo)), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("address", self.address) writer.write_str_value("itemId", self.item_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_float_value("relevanceScore", self.relevance_score) writer.write_enum_value("selectionLikelihood", self.selection_likelihood) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_aggregation.py b/msgraph/generated/models/search_aggregation.py index c0901261cca..51a3893a278 100644 --- a/msgraph/generated/models/search_aggregation.py +++ b/msgraph/generated/models/search_aggregation.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "buckets": lambda n : setattr(self, 'buckets', n.get_collection_of_object_values(SearchBucket)), "field": lambda n : setattr(self, 'field', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("buckets", self.buckets) writer.write_str_value("field", self.field) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_alteration.py b/msgraph/generated/models/search_alteration.py index 9e3b3058cc7..bfe5b38b639 100644 --- a/msgraph/generated/models/search_alteration.py +++ b/msgraph/generated/models/search_alteration.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "alteredHighlightedQueryString": lambda n : setattr(self, 'altered_highlighted_query_string', n.get_str_value()), "alteredQueryString": lambda n : setattr(self, 'altered_query_string', n.get_str_value()), "alteredQueryTokens": lambda n : setattr(self, 'altered_query_tokens', n.get_collection_of_object_values(AlteredQueryToken)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("alteredHighlightedQueryString", self.altered_highlighted_query_string) writer.write_str_value("alteredQueryString", self.altered_query_string) writer.write_collection_of_object_values("alteredQueryTokens", self.altered_query_tokens) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_alteration_options.py b/msgraph/generated/models/search_alteration_options.py index ac07e0d249c..51a4444dbcc 100644 --- a/msgraph/generated/models/search_alteration_options.py +++ b/msgraph/generated/models/search_alteration_options.py @@ -11,9 +11,9 @@ class SearchAlterationOptions(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) - # Indicates whether spelling modifications are enabled. If enabled, the user will get the search results for the corrected query in case of no results for the original query with typos. The response will also include the spelling modification information in the queryAlterationResponse property. Optional. + # Indicates whether spelling modifications are enabled. If enabled, the user gets the search results for the corrected query if there were no results for the original query with typos. The response will also include the spelling modification information in the queryAlterationResponse property. Optional. enable_modification: Optional[bool] = None - # Indicates whether spelling suggestions are enabled. If enabled, the user will get the search results for the original search query and suggestions for spelling correction in the queryAlterationResponse property of the response for the typos in the query. Optional. + # Indicates whether spelling suggestions are enabled. If enabled, the user gets the search results for the original search query and suggestions for spelling correction in the queryAlterationResponse property of the response for the typos in the query. Optional. enable_suggestion: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "enableModification": lambda n : setattr(self, 'enable_modification', n.get_bool_value()), "enableSuggestion": lambda n : setattr(self, 'enable_suggestion', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("enableModification", self.enable_modification) writer.write_bool_value("enableSuggestion", self.enable_suggestion) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_bucket.py b/msgraph/generated/models/search_bucket.py index 26852e4bebb..375e38f0b6d 100644 --- a/msgraph/generated/models/search_bucket.py +++ b/msgraph/generated/models/search_bucket.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "aggregationFilterToken": lambda n : setattr(self, 'aggregation_filter_token', n.get_str_value()), "count": lambda n : setattr(self, 'count', n.get_int_value()), "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("aggregationFilterToken", self.aggregation_filter_token) writer.write_int_value("count", self.count) writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_hit.py b/msgraph/generated/models/search_hit.py index 2887502c07c..fe825d4d85e 100644 --- a/msgraph/generated/models/search_hit.py +++ b/msgraph/generated/models/search_hit.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "contentSource": lambda n : setattr(self, 'content_source', n.get_str_value()), "hitId": lambda n : setattr(self, 'hit_id', n.get_str_value()), "isCollapsed": lambda n : setattr(self, 'is_collapsed', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "rank": lambda n : setattr(self, 'rank', n.get_int_value()), "resource": lambda n : setattr(self, 'resource', n.get_object_value(Entity)), "resultTemplateId": lambda n : setattr(self, 'result_template_id', n.get_str_value()), @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("contentSource", self.content_source) writer.write_str_value("hitId", self.hit_id) writer.write_bool_value("isCollapsed", self.is_collapsed) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("rank", self.rank) writer.write_object_value("resource", self.resource) writer.write_str_value("resultTemplateId", self.result_template_id) diff --git a/msgraph/generated/models/search_hits_container.py b/msgraph/generated/models/search_hits_container.py index 073f991631b..11c2206c6c0 100644 --- a/msgraph/generated/models/search_hits_container.py +++ b/msgraph/generated/models/search_hits_container.py @@ -23,7 +23,7 @@ class SearchHitsContainer(AdditionalDataHolder, BackedModel, Parsable): more_results_available: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None - # The total number of results. Note this is not the number of results on the page, but the total number of results satisfying the query. + # The total number of results. Note this isn't the number of results on the page, but the total number of results satisfying the query. total: Optional[int] = None @staticmethod @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "aggregations": lambda n : setattr(self, 'aggregations', n.get_collection_of_object_values(SearchAggregation)), "hits": lambda n : setattr(self, 'hits', n.get_collection_of_object_values(SearchHit)), "moreResultsAvailable": lambda n : setattr(self, 'more_results_available', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "total": lambda n : setattr(self, 'total', n.get_int_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("aggregations", self.aggregations) writer.write_collection_of_object_values("hits", self.hits) writer.write_bool_value("moreResultsAvailable", self.more_results_available) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("total", self.total) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_query.py b/msgraph/generated/models/search_query.py index 3cc998c1c78..278c38f4206 100644 --- a/msgraph/generated/models/search_query.py +++ b/msgraph/generated/models/search_query.py @@ -35,7 +35,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "queryString": lambda n : setattr(self, 'query_string', n.get_str_value()), "queryTemplate": lambda n : setattr(self, 'query_template', n.get_str_value()), } @@ -49,7 +49,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("queryString", self.query_string) writer.write_str_value("queryTemplate", self.query_template) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/search_request.py b/msgraph/generated/models/search_request.py index d2bdf272842..498b84af48e 100644 --- a/msgraph/generated/models/search_request.py +++ b/msgraph/generated/models/search_request.py @@ -97,7 +97,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "entityTypes": lambda n : setattr(self, 'entity_types', n.get_collection_of_enum_values(EntityType)), "fields": lambda n : setattr(self, 'fields', n.get_collection_of_primitive_values(str)), "from": lambda n : setattr(self, 'from_', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "query": lambda n : setattr(self, 'query', n.get_object_value(SearchQuery)), "queryAlterationOptions": lambda n : setattr(self, 'query_alteration_options', n.get_object_value(SearchAlterationOptions)), "region": lambda n : setattr(self, 'region', n.get_str_value()), @@ -124,7 +124,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_enum_values("entityTypes", self.entity_types) writer.write_collection_of_primitive_values("fields", self.fields) writer.write_int_value("from", self.from_) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("query", self.query) writer.write_object_value("queryAlterationOptions", self.query_alteration_options) writer.write_str_value("region", self.region) diff --git a/msgraph/generated/models/search_response.py b/msgraph/generated/models/search_response.py index 76c95218548..4412389a4b2 100644 --- a/msgraph/generated/models/search_response.py +++ b/msgraph/generated/models/search_response.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "hitsContainers": lambda n : setattr(self, 'hits_containers', n.get_collection_of_object_values(SearchHitsContainer)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "queryAlterationResponse": lambda n : setattr(self, 'query_alteration_response', n.get_object_value(AlterationResponse)), "resultTemplates": lambda n : setattr(self, 'result_templates', n.get_object_value(ResultTemplateDictionary)), "searchTerms": lambda n : setattr(self, 'search_terms', n.get_collection_of_primitive_values(str)), @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("hitsContainers", self.hits_containers) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("queryAlterationResponse", self.query_alteration_response) writer.write_object_value("resultTemplates", self.result_templates) writer.write_collection_of_primitive_values("searchTerms", self.search_terms) diff --git a/msgraph/generated/models/search_result.py b/msgraph/generated/models/search_result.py index a86a3d2889b..1db8903efeb 100644 --- a/msgraph/generated/models/search_result.py +++ b/msgraph/generated/models/search_result.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "onClickTelemetryUrl": lambda n : setattr(self, 'on_click_telemetry_url', n.get_str_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("onClickTelemetryUrl", self.on_click_telemetry_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/section_links.py b/msgraph/generated/models/section_links.py index 709c7b30a8a..0e39f8018b7 100644 --- a/msgraph/generated/models/section_links.py +++ b/msgraph/generated/models/section_links.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_link import ExternalLink fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "oneNoteClientUrl": lambda n : setattr(self, 'one_note_client_url', n.get_object_value(ExternalLink)), "oneNoteWebUrl": lambda n : setattr(self, 'one_note_web_url', n.get_object_value(ExternalLink)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("oneNoteClientUrl", self.one_note_client_url) writer.write_object_value("oneNoteWebUrl", self.one_note_web_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/secure_score_control_profile.py b/msgraph/generated/models/secure_score_control_profile.py index 106b8402599..f165ec10538 100644 --- a/msgraph/generated/models/secure_score_control_profile.py +++ b/msgraph/generated/models/secure_score_control_profile.py @@ -42,7 +42,7 @@ class SecureScoreControlProfile(Entity): remediation: Optional[str] = None # Description of the impact on users of the remediation. remediation_impact: Optional[str] = None - # Service that owns the control (Exchange, Sharepoint, Azure AD). + # Service that owns the control (Exchange, Sharepoint, Microsoft Entra ID). service: Optional[str] = None # List of threats the control mitigates (accountBreach, dataDeletion, dataExfiltration, dataSpillage, threats: Optional[List[str]] = None diff --git a/msgraph/generated/models/secure_score_control_state_update.py b/msgraph/generated/models/secure_score_control_state_update.py index a47de4fd9b3..45babd3285d 100644 --- a/msgraph/generated/models/secure_score_control_state_update.py +++ b/msgraph/generated/models/secure_score_control_state_update.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "assignedTo": lambda n : setattr(self, 'assigned_to', n.get_str_value()), "comment": lambda n : setattr(self, 'comment', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), "updatedBy": lambda n : setattr(self, 'updated_by', n.get_str_value()), "updatedDateTime": lambda n : setattr(self, 'updated_date_time', n.get_datetime_value()), @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("assignedTo", self.assigned_to) writer.write_str_value("comment", self.comment) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("state", self.state) writer.write_str_value("updatedBy", self.updated_by) writer.write_datetime_value("updatedDateTime", self.updated_date_time) diff --git a/msgraph/generated/models/security/alert.py b/msgraph/generated/models/security/alert.py index 8219d91cc57..2a7f2a4d60b 100644 --- a/msgraph/generated/models/security/alert.py +++ b/msgraph/generated/models/security/alert.py @@ -39,7 +39,7 @@ class Alert(Entity): created_date_time: Optional[datetime.datetime] = None # String value describing each alert. description: Optional[str] = None - # Detection technology or sensor that identified the notable component or activity. Possible values are: unknown, microsoftDefenderForEndpoint, antivirus, smartScreen, customTi, microsoftDefenderForOffice365, automatedInvestigation, microsoftThreatExperts, customDetection, microsoftDefenderForIdentity, cloudAppSecurity, microsoft365Defender, azureAdIdentityProtection, manual, microsoftDataLossPrevention, appGovernancePolicy, appGovernanceDetection, unknownFutureValue, microsoftDefenderForCloud. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: microsoftDefenderForCloud. + # Detection technology or sensor that identified the notable component or activity. Possible values are: unknown, microsoftDefenderForEndpoint, antivirus, smartScreen, customTi, microsoftDefenderForOffice365, automatedInvestigation, microsoftThreatExperts, customDetection, microsoftDefenderForIdentity, cloudAppSecurity, microsoft365Defender, azureAdIdentityProtection, manual, microsoftDataLossPrevention, appGovernancePolicy, appGovernanceDetection, unknownFutureValue, microsoftDefenderForCloud. You must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: microsoftDefenderForCloud. detection_source: Optional[DetectionSource] = None # The ID of the detector that triggered the alert. detector_id: Optional[str] = None @@ -73,7 +73,7 @@ class Alert(Entity): severity: Optional[AlertSeverity] = None # The status property status: Optional[AlertStatus] = None - # The Azure Active Directory tenant the alert was created in. + # The Microsoft Entra tenant the alert was created in. tenant_id: Optional[str] = None # The threat associated with this alert. threat_display_name: Optional[str] = None diff --git a/msgraph/generated/models/security/alert_comment.py b/msgraph/generated/models/security/alert_comment.py index 1b78d93ef71..07d8a5e2429 100644 --- a/msgraph/generated/models/security/alert_comment.py +++ b/msgraph/generated/models/security/alert_comment.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "comment": lambda n : setattr(self, 'comment', n.get_str_value()), "createdByDisplayName": lambda n : setattr(self, 'created_by_display_name', n.get_str_value()), "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("comment", self.comment) writer.write_str_value("createdByDisplayName", self.created_by_display_name) writer.write_datetime_value("createdDateTime", self.created_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/alert_evidence.py b/msgraph/generated/models/security/alert_evidence.py index ce3ea42b859..212e2d8a634 100644 --- a/msgraph/generated/models/security/alert_evidence.py +++ b/msgraph/generated/models/security/alert_evidence.py @@ -56,7 +56,7 @@ class AlertEvidence(AdditionalDataHolder, BackedModel, Parsable): remediation_status: Optional[EvidenceRemediationStatus] = None # Details about the remediation status. remediation_status_details: Optional[str] = None - # The role/s that an evidence entity represents in an alert, e.g., an IP address that is associated with an attacker will have the evidence role Attacker. + # The role/s that an evidence entity represents in an alert, for example, an IP address that is associated with an attacker has the evidence role Attacker. roles: Optional[List[EvidenceRole]] = None # Array of custom tags associated with an evidence instance, for example, to denote a group of devices, high-value assets, etc. tags: Optional[List[str]] = None @@ -268,7 +268,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "detailedRoles": lambda n : setattr(self, 'detailed_roles', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "remediationStatus": lambda n : setattr(self, 'remediation_status', n.get_enum_value(EvidenceRemediationStatus)), "remediationStatusDetails": lambda n : setattr(self, 'remediation_status_details', n.get_str_value()), "roles": lambda n : setattr(self, 'roles', n.get_collection_of_enum_values(EvidenceRole)), @@ -287,7 +287,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_collection_of_primitive_values("detailedRoles", self.detailed_roles) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("remediationStatus", self.remediation_status) writer.write_str_value("remediationStatusDetails", self.remediation_status_details) writer.write_collection_of_enum_values("roles", self.roles) diff --git a/msgraph/generated/models/security/artifact.py b/msgraph/generated/models/security/artifact.py index a183c6e46b0..709ddbc128d 100644 --- a/msgraph/generated/models/security/artifact.py +++ b/msgraph/generated/models/security/artifact.py @@ -6,12 +6,14 @@ if TYPE_CHECKING: from ..entity import Entity from .host import Host + from .hostname import Hostname from .host_component import HostComponent from .host_cookie import HostCookie - from .hostname import Hostname + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .ip_address import IpAddress from .passive_dns_record import PassiveDnsRecord + from .ssl_certificate import SslCertificate from .unclassified_artifact import UnclassifiedArtifact from ..entity import Entity @@ -50,6 +52,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> A from .hostname import Hostname return Hostname() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.hostSslCertificate".casefold(): + from .host_ssl_certificate import HostSslCertificate + + return HostSslCertificate() if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.hostTracker".casefold(): from .host_tracker import HostTracker @@ -62,6 +68,10 @@ def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> A from .passive_dns_record import PassiveDnsRecord return PassiveDnsRecord() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.sslCertificate".casefold(): + from .ssl_certificate import SslCertificate + + return SslCertificate() if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.unclassifiedArtifact".casefold(): from .unclassified_artifact import UnclassifiedArtifact @@ -75,22 +85,26 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ from ..entity import Entity from .host import Host + from .hostname import Hostname from .host_component import HostComponent from .host_cookie import HostCookie - from .hostname import Hostname + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .ip_address import IpAddress from .passive_dns_record import PassiveDnsRecord + from .ssl_certificate import SslCertificate from .unclassified_artifact import UnclassifiedArtifact from ..entity import Entity from .host import Host + from .hostname import Hostname from .host_component import HostComponent from .host_cookie import HostCookie - from .hostname import Hostname + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .ip_address import IpAddress from .passive_dns_record import PassiveDnsRecord + from .ssl_certificate import SslCertificate from .unclassified_artifact import UnclassifiedArtifact fields: Dict[str, Callable[[Any], None]] = { diff --git a/msgraph/generated/models/security/autonomous_system.py b/msgraph/generated/models/security/autonomous_system.py index 4dbf8fd92e9..c916e37efd2 100644 --- a/msgraph/generated/models/security/autonomous_system.py +++ b/msgraph/generated/models/security/autonomous_system.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), "number": lambda n : setattr(self, 'number', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "organization": lambda n : setattr(self, 'organization', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) writer.write_int_value("number", self.number) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("organization", self.organization) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/cvss_summary.py b/msgraph/generated/models/security/cvss_summary.py index fd6140fb6ee..09c959ebfa8 100644 --- a/msgraph/generated/models/security/cvss_summary.py +++ b/msgraph/generated/models/security/cvss_summary.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .vulnerability_severity import VulnerabilitySeverity fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "score": lambda n : setattr(self, 'score', n.get_float_value()), "severity": lambda n : setattr(self, 'severity', n.get_enum_value(VulnerabilitySeverity)), "vectorString": lambda n : setattr(self, 'vector_string', n.get_str_value()), @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_float_value("score", self.score) writer.write_enum_value("severity", self.severity) writer.write_str_value("vectorString", self.vector_string) diff --git a/msgraph/generated/models/security/device_evidence.py b/msgraph/generated/models/security/device_evidence.py index 7393147a707..08b30e050ec 100644 --- a/msgraph/generated/models/security/device_evidence.py +++ b/msgraph/generated/models/security/device_evidence.py @@ -19,7 +19,7 @@ class DeviceEvidence(AlertEvidence): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.security.deviceEvidence" - # A unique identifier assigned to a device by Azure Active Directory (Azure AD) when device is Azure AD-joined. + # A unique identifier assigned to a device by Microsoft Entra ID when device is Microsoft Entra joined. azure_ad_device_id: Optional[str] = None # State of the Defender AntiMalware engine. The possible values are: notReporting, disabled, notUpdated, updated, unknown, notSupported, unknownFutureValue. defender_av_status: Optional[DefenderAvStatus] = None diff --git a/msgraph/generated/models/security/dictionary.py b/msgraph/generated/models/security/dictionary.py index 1f950124524..aa9615760d4 100644 --- a/msgraph/generated/models/security/dictionary.py +++ b/msgraph/generated/models/security/dictionary.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/ediscovery_export_operation.py b/msgraph/generated/models/security/ediscovery_export_operation.py index 9964e47d593..e4e7fbcde81 100644 --- a/msgraph/generated/models/security/ediscovery_export_operation.py +++ b/msgraph/generated/models/security/ediscovery_export_operation.py @@ -19,9 +19,9 @@ class EdiscoveryExportOperation(CaseOperation): description: Optional[str] = None # The exportFileMetadata property export_file_metadata: Optional[List[ExportFileMetadata]] = None - # The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, tags. + # The options provided for the export. For more information, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, tags. export_options: Optional[ExportOptions] = None - # The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. + # The options that specify the structure of the export. For more information, see reviewSet: export. Possible values are: none, directory, pst. export_structure: Optional[ExportFileStructure] = None # The OdataType property odata_type: Optional[str] = None @@ -29,7 +29,7 @@ class EdiscoveryExportOperation(CaseOperation): output_name: Optional[str] = None # Review set from where documents are exported. review_set: Optional[EdiscoveryReviewSet] = None - # The review set query which is used to filter the documents for export. + # The review set query that is used to filter the documents for export. review_set_query: Optional[EdiscoveryReviewSetQuery] = None @staticmethod diff --git a/msgraph/generated/models/security/email_sender.py b/msgraph/generated/models/security/email_sender.py index 04809ab8214..986e475c819 100644 --- a/msgraph/generated/models/security/email_sender.py +++ b/msgraph/generated/models/security/email_sender.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "domainName": lambda n : setattr(self, 'domain_name', n.get_str_value()), "emailAddress": lambda n : setattr(self, 'email_address', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_str_value("domainName", self.domain_name) writer.write_str_value("emailAddress", self.email_address) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/event_propagation_result.py b/msgraph/generated/models/security/event_propagation_result.py index 7e727e5da44..e0fc7adfa3f 100644 --- a/msgraph/generated/models/security/event_propagation_result.py +++ b/msgraph/generated/models/security/event_propagation_result.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "location": lambda n : setattr(self, 'location', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "serviceName": lambda n : setattr(self, 'service_name', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_enum_value(EventPropagationStatus)), "statusInformation": lambda n : setattr(self, 'status_information', n.get_str_value()), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("location", self.location) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("serviceName", self.service_name) writer.write_enum_value("status", self.status) writer.write_str_value("statusInformation", self.status_information) diff --git a/msgraph/generated/models/security/event_query.py b/msgraph/generated/models/security/event_query.py index 79cc704e7fb..4c31ff5d4d0 100644 --- a/msgraph/generated/models/security/event_query.py +++ b/msgraph/generated/models/security/event_query.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .query_type import QueryType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "query": lambda n : setattr(self, 'query', n.get_str_value()), "queryType": lambda n : setattr(self, 'query_type', n.get_enum_value(QueryType)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("query", self.query) writer.write_enum_value("queryType", self.query_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/export_file_metadata.py b/msgraph/generated/models/security/export_file_metadata.py index 89051a01c36..7de2b3dfa83 100644 --- a/msgraph/generated/models/security/export_file_metadata.py +++ b/msgraph/generated/models/security/export_file_metadata.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "downloadUrl": lambda n : setattr(self, 'download_url', n.get_str_value()), "fileName": lambda n : setattr(self, 'file_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "size": lambda n : setattr(self, 'size', n.get_int_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("downloadUrl", self.download_url) writer.write_str_value("fileName", self.file_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("size", self.size) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/file_details.py b/msgraph/generated/models/security/file_details.py index d5509183eda..2b7df2b305a 100644 --- a/msgraph/generated/models/security/file_details.py +++ b/msgraph/generated/models/security/file_details.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "filePublisher": lambda n : setattr(self, 'file_publisher', n.get_str_value()), "fileSize": lambda n : setattr(self, 'file_size', n.get_int_value()), "issuer": lambda n : setattr(self, 'issuer', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sha1": lambda n : setattr(self, 'sha1', n.get_str_value()), "sha256": lambda n : setattr(self, 'sha256', n.get_str_value()), "signer": lambda n : setattr(self, 'signer', n.get_str_value()), @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("filePublisher", self.file_publisher) writer.write_int_value("fileSize", self.file_size) writer.write_str_value("issuer", self.issuer) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sha1", self.sha1) writer.write_str_value("sha256", self.sha256) writer.write_str_value("signer", self.signer) diff --git a/msgraph/generated/models/security/file_hash.py b/msgraph/generated/models/security/file_hash.py index 9889e04e75d..f48127f2222 100644 --- a/msgraph/generated/models/security/file_hash.py +++ b/msgraph/generated/models/security/file_hash.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "algorithm": lambda n : setattr(self, 'algorithm', n.get_enum_value(FileHashAlgorithm)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("algorithm", self.algorithm) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/formatted_content.py b/msgraph/generated/models/security/formatted_content.py index 76b2c4e7ba4..60aee1762ea 100644 --- a/msgraph/generated/models/security/formatted_content.py +++ b/msgraph/generated/models/security/formatted_content.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_str_value()), "format": lambda n : setattr(self, 'format', n.get_enum_value(ContentFormat)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("content", self.content) writer.write_enum_value("format", self.format) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/host.py b/msgraph/generated/models/security/host.py index 77657d53899..1d9d152a6a8 100644 --- a/msgraph/generated/models/security/host.py +++ b/msgraph/generated/models/security/host.py @@ -6,13 +6,17 @@ if TYPE_CHECKING: from .artifact import Artifact + from .hostname import Hostname from .host_component import HostComponent from .host_cookie import HostCookie - from .hostname import Hostname + from .host_pair import HostPair from .host_reputation import HostReputation + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .ip_address import IpAddress from .passive_dns_record import PassiveDnsRecord + from .subdomain import Subdomain + from .whois_record import WhoisRecord from .artifact import Artifact @@ -20,22 +24,34 @@ class Host(Artifact): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.security.host" + # The hostPairs that are resources associated with a host, where that host is the parentHost and has an outgoing pairing to a cihldHost. + child_host_pairs: Optional[List[HostPair]] = None # The hostComponents that are associated with this host. components: Optional[List[HostComponent]] = None # The hostCookies that are associated with this host. cookies: Optional[List[HostCookie]] = None - # The first date and time this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + # The first date and time when this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. first_seen_date_time: Optional[datetime.datetime] = None - # The most recent date and time when this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + # The hostPairs that are associated with this host, where this host is either the parentHost or childHost. + host_pairs: Optional[List[HostPair]] = None + # The most recent date and time when this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. last_seen_date_time: Optional[datetime.datetime] = None + # The hostPairs that are associated with a host, where that host is the childHost and has an incoming pairing with a parentHost. + parent_host_pairs: Optional[List[HostPair]] = None # Passive DNS retrieval about this host. passive_dns: Optional[List[PassiveDnsRecord]] = None # Reverse passive DNS retrieval about this host. passive_dns_reverse: Optional[List[PassiveDnsRecord]] = None # Represents a calculated reputation of this host. reputation: Optional[HostReputation] = None + # The hostSslCertificates that are associated with this host. + ssl_certificates: Optional[List[HostSslCertificate]] = None + # The subdomains that are associated with this host. + subdomains: Optional[List[Subdomain]] = None # The hostTrackers that are associated with this host. trackers: Optional[List[HostTracker]] = None + # The most recent whoisRecord for this host. + whois: Optional[WhoisRecord] = None @staticmethod def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> Host: @@ -66,32 +82,46 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .artifact import Artifact + from .hostname import Hostname from .host_component import HostComponent from .host_cookie import HostCookie - from .hostname import Hostname + from .host_pair import HostPair from .host_reputation import HostReputation + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .ip_address import IpAddress from .passive_dns_record import PassiveDnsRecord + from .subdomain import Subdomain + from .whois_record import WhoisRecord from .artifact import Artifact + from .hostname import Hostname from .host_component import HostComponent from .host_cookie import HostCookie - from .hostname import Hostname + from .host_pair import HostPair from .host_reputation import HostReputation + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .ip_address import IpAddress from .passive_dns_record import PassiveDnsRecord + from .subdomain import Subdomain + from .whois_record import WhoisRecord fields: Dict[str, Callable[[Any], None]] = { + "childHostPairs": lambda n : setattr(self, 'child_host_pairs', n.get_collection_of_object_values(HostPair)), "components": lambda n : setattr(self, 'components', n.get_collection_of_object_values(HostComponent)), "cookies": lambda n : setattr(self, 'cookies', n.get_collection_of_object_values(HostCookie)), "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "hostPairs": lambda n : setattr(self, 'host_pairs', n.get_collection_of_object_values(HostPair)), "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "parentHostPairs": lambda n : setattr(self, 'parent_host_pairs', n.get_collection_of_object_values(HostPair)), "passiveDns": lambda n : setattr(self, 'passive_dns', n.get_collection_of_object_values(PassiveDnsRecord)), "passiveDnsReverse": lambda n : setattr(self, 'passive_dns_reverse', n.get_collection_of_object_values(PassiveDnsRecord)), "reputation": lambda n : setattr(self, 'reputation', n.get_object_value(HostReputation)), + "sslCertificates": lambda n : setattr(self, 'ssl_certificates', n.get_collection_of_object_values(HostSslCertificate)), + "subdomains": lambda n : setattr(self, 'subdomains', n.get_collection_of_object_values(Subdomain)), "trackers": lambda n : setattr(self, 'trackers', n.get_collection_of_object_values(HostTracker)), + "whois": lambda n : setattr(self, 'whois', n.get_object_value(WhoisRecord)), } super_fields = super().get_field_deserializers() fields.update(super_fields) @@ -106,13 +136,19 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") super().serialize(writer) + writer.write_collection_of_object_values("childHostPairs", self.child_host_pairs) writer.write_collection_of_object_values("components", self.components) writer.write_collection_of_object_values("cookies", self.cookies) writer.write_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_collection_of_object_values("hostPairs", self.host_pairs) writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_collection_of_object_values("parentHostPairs", self.parent_host_pairs) writer.write_collection_of_object_values("passiveDns", self.passive_dns) writer.write_collection_of_object_values("passiveDnsReverse", self.passive_dns_reverse) writer.write_object_value("reputation", self.reputation) + writer.write_collection_of_object_values("sslCertificates", self.ssl_certificates) + writer.write_collection_of_object_values("subdomains", self.subdomains) writer.write_collection_of_object_values("trackers", self.trackers) + writer.write_object_value("whois", self.whois) diff --git a/msgraph/generated/models/security/host_component.py b/msgraph/generated/models/security/host_component.py index c54c84bafef..1bca7aacd27 100644 --- a/msgraph/generated/models/security/host_component.py +++ b/msgraph/generated/models/security/host_component.py @@ -24,7 +24,7 @@ class HostComponent(Artifact): last_seen_date_time: Optional[datetime.datetime] = None # A name running on the artifact, for example, Microsoft IIS. name: Optional[str] = None - # The component version running on the artifact, for example, v8.5. This should not be assumed to be strictly numerical. + # The component version running on the artifact, for example, v8.5. This shouldn't be assumed to be strictly numerical. version: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/security/host_pair.py b/msgraph/generated/models/security/host_pair.py new file mode 100644 index 00000000000..bc30c0bf66f --- /dev/null +++ b/msgraph/generated/models/security/host_pair.py @@ -0,0 +1,76 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..entity import Entity + from .host import Host + +from ..entity import Entity + +@dataclass +class HostPair(Entity): + # The childHost property + child_host: Optional[Host] = None + # The date and time when Microsoft Defender Threat Intelligence first observed the hostPair. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The date and time when Microsoft Defender Threat Intelligence last observed the hostPair. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_seen_date_time: Optional[datetime.datetime] = None + # The reason that two hosts are identified as hostPair. + link_kind: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The parentHost property + parent_host: Optional[Host] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> HostPair: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HostPair + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HostPair() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..entity import Entity + from .host import Host + + from ..entity import Entity + from .host import Host + + fields: Dict[str, Callable[[Any], None]] = { + "childHost": lambda n : setattr(self, 'child_host', n.get_object_value(Host)), + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "linkKind": lambda n : setattr(self, 'link_kind', n.get_str_value()), + "parentHost": lambda n : setattr(self, 'parent_host', n.get_object_value(Host)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("childHost", self.child_host) + writer.write_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_str_value("linkKind", self.link_kind) + writer.write_object_value("parentHost", self.parent_host) + + diff --git a/msgraph/generated/models/security/host_pair_collection_response.py b/msgraph/generated/models/security/host_pair_collection_response.py new file mode 100644 index 00000000000..2d618a752bc --- /dev/null +++ b/msgraph/generated/models/security/host_pair_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .host_pair import HostPair + +from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class HostPairCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[HostPair]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> HostPairCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HostPairCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HostPairCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .host_pair import HostPair + + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .host_pair import HostPair + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(HostPair)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/security/host_reputation_rule.py b/msgraph/generated/models/security/host_reputation_rule.py index c47daedef77..548fb71479e 100644 --- a/msgraph/generated/models/security/host_reputation_rule.py +++ b/msgraph/generated/models/security/host_reputation_rule.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "relatedDetailsUrl": lambda n : setattr(self, 'related_details_url', n.get_str_value()), "severity": lambda n : setattr(self, 'severity', n.get_enum_value(HostReputationRuleSeverity)), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("relatedDetailsUrl", self.related_details_url) writer.write_enum_value("severity", self.severity) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/host_ssl_certificate.py b/msgraph/generated/models/security/host_ssl_certificate.py new file mode 100644 index 00000000000..da14afee99a --- /dev/null +++ b/msgraph/generated/models/security/host_ssl_certificate.py @@ -0,0 +1,82 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .artifact import Artifact + from .host import Host + from .host_ssl_certificate_port import HostSslCertificatePort + from .ssl_certificate import SslCertificate + +from .artifact import Artifact + +@dataclass +class HostSslCertificate(Artifact): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.security.hostSslCertificate" + # The first date and time when this hostSslCertificate was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The host for this hostSslCertificate. + host: Optional[Host] = None + # The most recent date and time when this hostSslCertificate was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_seen_date_time: Optional[datetime.datetime] = None + # The ports related with this hostSslCertificate. + ports: Optional[List[HostSslCertificatePort]] = None + # The sslCertificate for this hostSslCertificate. + ssl_certificate: Optional[SslCertificate] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> HostSslCertificate: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HostSslCertificate + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HostSslCertificate() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .artifact import Artifact + from .host import Host + from .host_ssl_certificate_port import HostSslCertificatePort + from .ssl_certificate import SslCertificate + + from .artifact import Artifact + from .host import Host + from .host_ssl_certificate_port import HostSslCertificatePort + from .ssl_certificate import SslCertificate + + fields: Dict[str, Callable[[Any], None]] = { + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "host": lambda n : setattr(self, 'host', n.get_object_value(Host)), + "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "ports": lambda n : setattr(self, 'ports', n.get_collection_of_object_values(HostSslCertificatePort)), + "sslCertificate": lambda n : setattr(self, 'ssl_certificate', n.get_object_value(SslCertificate)), + } + 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_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_object_value("host", self.host) + writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_collection_of_object_values("ports", self.ports) + writer.write_object_value("sslCertificate", self.ssl_certificate) + + diff --git a/msgraph/generated/models/security/host_ssl_certificate_collection_response.py b/msgraph/generated/models/security/host_ssl_certificate_collection_response.py new file mode 100644 index 00000000000..c5a57e925e3 --- /dev/null +++ b/msgraph/generated/models/security/host_ssl_certificate_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .host_ssl_certificate import HostSslCertificate + +from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class HostSslCertificateCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[HostSslCertificate]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> HostSslCertificateCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HostSslCertificateCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HostSslCertificateCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .host_ssl_certificate import HostSslCertificate + + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .host_ssl_certificate import HostSslCertificate + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(HostSslCertificate)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/security/host_ssl_certificate_port.py b/msgraph/generated/models/security/host_ssl_certificate_port.py new file mode 100644 index 00000000000..ff5e07f1ef9 --- /dev/null +++ b/msgraph/generated/models/security/host_ssl_certificate_port.py @@ -0,0 +1,62 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class HostSslCertificatePort(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The first date and time when this port was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The most recent date and time when this port was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_seen_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None + # The port number. + port: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> HostSslCertificatePort: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HostSslCertificatePort + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HostSslCertificatePort() + + 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]] = { + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "port": lambda n : setattr(self, 'port', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_str_value("OdataType", self.odata_type) + writer.write_int_value("port", self.port) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/security/hunting_query_results.py b/msgraph/generated/models/security/hunting_query_results.py index ea7ae623b2f..a194f0c9975 100644 --- a/msgraph/generated/models/security/hunting_query_results.py +++ b/msgraph/generated/models/security/hunting_query_results.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .single_property_schema import SinglePropertySchema fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "results": lambda n : setattr(self, 'results', n.get_collection_of_object_values(HuntingRowResult)), "schema": lambda n : setattr(self, 'schema', n.get_collection_of_object_values(SinglePropertySchema)), } @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("results", self.results) writer.write_collection_of_object_values("schema", self.schema) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/hunting_row_result.py b/msgraph/generated/models/security/hunting_row_result.py index 78b85e0a937..003526bd107 100644 --- a/msgraph/generated/models/security/hunting_row_result.py +++ b/msgraph/generated/models/security/hunting_row_result.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/hyperlink.py b/msgraph/generated/models/security/hyperlink.py index 88373fe18f9..11e60805822 100644 --- a/msgraph/generated/models/security/hyperlink.py +++ b/msgraph/generated/models/security/hyperlink.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "url": lambda n : setattr(self, 'url', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("url", self.url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/incident.py b/msgraph/generated/models/security/incident.py index 06e53586f16..44e43c04cf9 100644 --- a/msgraph/generated/models/security/incident.py +++ b/msgraph/generated/models/security/incident.py @@ -29,6 +29,8 @@ class Incident(Entity): created_date_time: Optional[datetime.datetime] = None # Array of custom tags associated with an incident. custom_tags: Optional[List[str]] = None + # The description property + description: Optional[str] = None # Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. determination: Optional[AlertDetermination] = None # The incident name. @@ -47,7 +49,9 @@ class Incident(Entity): severity: Optional[AlertSeverity] = None # The status property status: Optional[IncidentStatus] = None - # The Azure Active Directory tenant in which the alert was created. + # The systemTags property + system_tags: Optional[List[str]] = None + # The Microsoft Entra tenant in which the alert was created. tenant_id: Optional[str] = None @staticmethod @@ -89,6 +93,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "comments": lambda n : setattr(self, 'comments', n.get_collection_of_object_values(AlertComment)), "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "customTags": lambda n : setattr(self, 'custom_tags', n.get_collection_of_primitive_values(str)), + "description": lambda n : setattr(self, 'description', n.get_str_value()), "determination": lambda n : setattr(self, 'determination', n.get_enum_value(AlertDetermination)), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "incidentWebUrl": lambda n : setattr(self, 'incident_web_url', n.get_str_value()), @@ -97,6 +102,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "redirectIncidentId": lambda n : setattr(self, 'redirect_incident_id', n.get_str_value()), "severity": lambda n : setattr(self, 'severity', n.get_enum_value(AlertSeverity)), "status": lambda n : setattr(self, 'status', n.get_enum_value(IncidentStatus)), + "systemTags": lambda n : setattr(self, 'system_tags', n.get_collection_of_primitive_values(str)), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), } super_fields = super().get_field_deserializers() @@ -118,6 +124,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("comments", self.comments) writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_collection_of_primitive_values("customTags", self.custom_tags) + writer.write_str_value("description", self.description) writer.write_enum_value("determination", self.determination) writer.write_str_value("displayName", self.display_name) writer.write_str_value("incidentWebUrl", self.incident_web_url) @@ -126,6 +133,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("redirectIncidentId", self.redirect_incident_id) writer.write_enum_value("severity", self.severity) writer.write_enum_value("status", self.status) + writer.write_collection_of_primitive_values("systemTags", self.system_tags) writer.write_str_value("tenantId", self.tenant_id) diff --git a/msgraph/generated/models/security/intelligence_profile_country_or_region_of_origin.py b/msgraph/generated/models/security/intelligence_profile_country_or_region_of_origin.py index 9a0e28f8eb7..40ab3b9b7f6 100644 --- a/msgraph/generated/models/security/intelligence_profile_country_or_region_of_origin.py +++ b/msgraph/generated/models/security/intelligence_profile_country_or_region_of_origin.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "label": lambda n : setattr(self, 'label', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("label", self.label) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/ip_address.py b/msgraph/generated/models/security/ip_address.py index 860991abb21..889f011c3ff 100644 --- a/msgraph/generated/models/security/ip_address.py +++ b/msgraph/generated/models/security/ip_address.py @@ -15,7 +15,7 @@ class IpAddress(Host): odata_type: Optional[str] = "#microsoft.graph.security.ipAddress" # The details about the autonomous system to which this IP address belongs. autonomous_system: Optional[AutonomousSystem] = None - # The country or region for this IP address. + # The country/region for this IP address. country_or_region: Optional[str] = None # The hosting company listed for this host. hosting_provider: Optional[str] = None diff --git a/msgraph/generated/models/security/ip_evidence.py b/msgraph/generated/models/security/ip_evidence.py index 8b4d5ad96d5..c7d6e407009 100644 --- a/msgraph/generated/models/security/ip_evidence.py +++ b/msgraph/generated/models/security/ip_evidence.py @@ -12,7 +12,7 @@ class IpEvidence(AlertEvidence): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.security.ipEvidence" - # The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc..). + # The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc. country_letter_code: Optional[str] = None # The value of the IP Address, can be either in V4 address or V6 address format. ip_address: Optional[str] = None diff --git a/msgraph/generated/models/security/kubernetes_service_port.py b/msgraph/generated/models/security/kubernetes_service_port.py index d365b683b62..0cacc3c2d2d 100644 --- a/msgraph/generated/models/security/kubernetes_service_port.py +++ b/msgraph/generated/models/security/kubernetes_service_port.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "appProtocol": lambda n : setattr(self, 'app_protocol', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), "nodePort": lambda n : setattr(self, 'node_port', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "port": lambda n : setattr(self, 'port', n.get_int_value()), "protocol": lambda n : setattr(self, 'protocol', n.get_enum_value(ContainerPortProtocol)), "targetPort": lambda n : setattr(self, 'target_port', n.get_str_value()), @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("appProtocol", self.app_protocol) writer.write_str_value("name", self.name) writer.write_int_value("nodePort", self.node_port) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("port", self.port) writer.write_enum_value("protocol", self.protocol) writer.write_str_value("targetPort", self.target_port) diff --git a/msgraph/generated/models/security/logged_on_user.py b/msgraph/generated/models/security/logged_on_user.py index 4d6708a433e..6c6f0a6726a 100644 --- a/msgraph/generated/models/security/logged_on_user.py +++ b/msgraph/generated/models/security/logged_on_user.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "accountName": lambda n : setattr(self, 'account_name', n.get_str_value()), "domainName": lambda n : setattr(self, 'domain_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("accountName", self.account_name) writer.write_str_value("domainName", self.domain_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/ocr_settings.py b/msgraph/generated/models/security/ocr_settings.py index e08be7dba35..0cb58efe10e 100644 --- a/msgraph/generated/models/security/ocr_settings.py +++ b/msgraph/generated/models/security/ocr_settings.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), "maxImageSize": lambda n : setattr(self, 'max_image_size', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeout": lambda n : setattr(self, 'timeout', n.get_timedelta_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isEnabled", self.is_enabled) writer.write_int_value("maxImageSize", self.max_image_size) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_timedelta_value("timeout", self.timeout) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/redundancy_detection_settings.py b/msgraph/generated/models/security/redundancy_detection_settings.py index 630572f7c3e..08108aa23e2 100644 --- a/msgraph/generated/models/security/redundancy_detection_settings.py +++ b/msgraph/generated/models/security/redundancy_detection_settings.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), "maxWords": lambda n : setattr(self, 'max_words', n.get_int_value()), "minWords": lambda n : setattr(self, 'min_words', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "similarityThreshold": lambda n : setattr(self, 'similarity_threshold', n.get_int_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isEnabled", self.is_enabled) writer.write_int_value("maxWords", self.max_words) writer.write_int_value("minWords", self.min_words) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("similarityThreshold", self.similarity_threshold) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/retention_event_status.py b/msgraph/generated/models/security/retention_event_status.py index cf80789f6bc..5cb30040971 100644 --- a/msgraph/generated/models/security/retention_event_status.py +++ b/msgraph/generated/models/security/retention_event_status.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "error": lambda n : setattr(self, 'error', n.get_object_value(PublicError)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "status": lambda n : setattr(self, 'status', n.get_enum_value(EventStatusType)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("error", self.error) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/single_property_schema.py b/msgraph/generated/models/security/single_property_schema.py index 4656d179a01..0e561a78156 100644 --- a/msgraph/generated/models/security/single_property_schema.py +++ b/msgraph/generated/models/security/single_property_schema.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/ssl_certificate.py b/msgraph/generated/models/security/ssl_certificate.py new file mode 100644 index 00000000000..40486d454b2 --- /dev/null +++ b/msgraph/generated/models/security/ssl_certificate.py @@ -0,0 +1,99 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .artifact import Artifact + from .host import Host + from .ssl_certificate_entity import SslCertificateEntity + +from .artifact import Artifact + +@dataclass +class SslCertificate(Artifact): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.security.sslCertificate" + # The date and time when a certificate expires. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + expiration_date_time: Optional[datetime.datetime] = None + # A hash of the certificate calculated on the data and signature. + fingerprint: Optional[str] = None + # The first date and time when this sslCertificate was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The date and time when a certificate was issued. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + issue_date_time: Optional[datetime.datetime] = None + # The entity that grants this certificate. + issuer: Optional[SslCertificateEntity] = None + # The most recent date and time when this sslCertificate was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_seen_date_time: Optional[datetime.datetime] = None + # The hosts related with this sslCertificate. + related_hosts: Optional[List[Host]] = None + # The serial number associated with an SSL certificate. + serial_number: Optional[str] = None + # A SHA-1 hash of the certificate. Note: This is not the signature. + sha1: Optional[str] = None + # The person, site, machine, and so on, this certificate is for. + subject: Optional[SslCertificateEntity] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SslCertificate: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SslCertificate + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SslCertificate() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .artifact import Artifact + from .host import Host + from .ssl_certificate_entity import SslCertificateEntity + + from .artifact import Artifact + from .host import Host + from .ssl_certificate_entity import SslCertificateEntity + + fields: Dict[str, Callable[[Any], None]] = { + "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_datetime_value()), + "fingerprint": lambda n : setattr(self, 'fingerprint', n.get_str_value()), + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "issueDateTime": lambda n : setattr(self, 'issue_date_time', n.get_datetime_value()), + "issuer": lambda n : setattr(self, 'issuer', n.get_object_value(SslCertificateEntity)), + "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "relatedHosts": lambda n : setattr(self, 'related_hosts', n.get_collection_of_object_values(Host)), + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_str_value()), + "sha1": lambda n : setattr(self, 'sha1', n.get_str_value()), + "subject": lambda n : setattr(self, 'subject', n.get_object_value(SslCertificateEntity)), + } + 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_datetime_value("expirationDateTime", self.expiration_date_time) + writer.write_str_value("fingerprint", self.fingerprint) + writer.write_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_datetime_value("issueDateTime", self.issue_date_time) + writer.write_object_value("issuer", self.issuer) + writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_collection_of_object_values("relatedHosts", self.related_hosts) + writer.write_str_value("serialNumber", self.serial_number) + writer.write_str_value("sha1", self.sha1) + writer.write_object_value("subject", self.subject) + + diff --git a/msgraph/generated/models/security/ssl_certificate_collection_response.py b/msgraph/generated/models/security/ssl_certificate_collection_response.py new file mode 100644 index 00000000000..f1009978460 --- /dev/null +++ b/msgraph/generated/models/security/ssl_certificate_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .ssl_certificate import SslCertificate + +from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class SslCertificateCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[SslCertificate]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SslCertificateCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SslCertificateCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SslCertificateCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .ssl_certificate import SslCertificate + + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .ssl_certificate import SslCertificate + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(SslCertificate)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/security/ssl_certificate_entity.py b/msgraph/generated/models/security/ssl_certificate_entity.py new file mode 100644 index 00000000000..a91ee0c4d1a --- /dev/null +++ b/msgraph/generated/models/security/ssl_certificate_entity.py @@ -0,0 +1,92 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..physical_address import PhysicalAddress + +@dataclass +class SslCertificateEntity(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # A physical address of the entity. + address: Optional[PhysicalAddress] = None + # Alternate names for this entity that are part of the certificate. + alternate_names: Optional[List[str]] = None + # A common name for this entity. + common_name: Optional[str] = None + # An email for this entity. + email: Optional[str] = None + # If the entity is a person, this is the person's given name (first name). + given_name: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # If the entity is an organization, this is the name of the organization. + organization_name: Optional[str] = None + # If the entity is an organization, this communicates if a unit in the organization is named on the entity. + organization_unit_name: Optional[str] = None + # A serial number assigned to the entity; usually only available if the entity is the issuer. + serial_number: Optional[str] = None + # If the entity is a person, this is the person's surname (last name). + surname: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SslCertificateEntity: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SslCertificateEntity + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SslCertificateEntity() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..physical_address import PhysicalAddress + + from ..physical_address import PhysicalAddress + + fields: Dict[str, Callable[[Any], None]] = { + "address": lambda n : setattr(self, 'address', n.get_object_value(PhysicalAddress)), + "alternateNames": lambda n : setattr(self, 'alternate_names', n.get_collection_of_primitive_values(str)), + "commonName": lambda n : setattr(self, 'common_name', n.get_str_value()), + "email": lambda n : setattr(self, 'email', n.get_str_value()), + "givenName": lambda n : setattr(self, 'given_name', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "organizationName": lambda n : setattr(self, 'organization_name', n.get_str_value()), + "organizationUnitName": lambda n : setattr(self, 'organization_unit_name', n.get_str_value()), + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_str_value()), + "surname": lambda n : setattr(self, 'surname', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("address", self.address) + writer.write_collection_of_primitive_values("alternateNames", self.alternate_names) + writer.write_str_value("commonName", self.common_name) + writer.write_str_value("email", self.email) + writer.write_str_value("givenName", self.given_name) + writer.write_str_value("OdataType", self.odata_type) + writer.write_str_value("organizationName", self.organization_name) + writer.write_str_value("organizationUnitName", self.organization_unit_name) + writer.write_str_value("serialNumber", self.serial_number) + writer.write_str_value("surname", self.surname) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/security/subdomain.py b/msgraph/generated/models/security/subdomain.py new file mode 100644 index 00000000000..470c8fa7a5e --- /dev/null +++ b/msgraph/generated/models/security/subdomain.py @@ -0,0 +1,64 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..entity import Entity + from .host import Host + +from ..entity import Entity + +@dataclass +class Subdomain(Entity): + # The date and time when Microsoft Defender Threat Intelligence first observed the subdomain. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The host property + host: Optional[Host] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> Subdomain: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Subdomain + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Subdomain() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..entity import Entity + from .host import Host + + from ..entity import Entity + from .host import Host + + fields: Dict[str, Callable[[Any], None]] = { + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "host": lambda n : setattr(self, 'host', n.get_object_value(Host)), + } + 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_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_object_value("host", self.host) + + diff --git a/msgraph/generated/models/security/subdomain_collection_response.py b/msgraph/generated/models/security/subdomain_collection_response.py new file mode 100644 index 00000000000..7642f0dbe09 --- /dev/null +++ b/msgraph/generated/models/security/subdomain_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .subdomain import Subdomain + +from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class SubdomainCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[Subdomain]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SubdomainCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SubdomainCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SubdomainCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .subdomain import Subdomain + + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .subdomain import Subdomain + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Subdomain)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/security/threat_intelligence.py b/msgraph/generated/models/security/threat_intelligence.py index 2e3b761cf12..8435bdeff5f 100644 --- a/msgraph/generated/models/security/threat_intelligence.py +++ b/msgraph/generated/models/security/threat_intelligence.py @@ -10,27 +10,37 @@ from .host import Host from .host_component import HostComponent from .host_cookie import HostCookie + from .host_pair import HostPair + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .intelligence_profile import IntelligenceProfile from .intelligence_profile_indicator import IntelligenceProfileIndicator from .passive_dns_record import PassiveDnsRecord + from .ssl_certificate import SslCertificate + from .subdomain import Subdomain from .vulnerability import Vulnerability + from .whois_history_record import WhoisHistoryRecord + from .whois_record import WhoisRecord from ..entity import Entity @dataclass class ThreatIntelligence(Entity): - # Refers to indicators of threat or compromise highlighted in an microsoft.graph.security.article.Note: List retrieval is not yet supported. + # Refers to indicators of threat or compromise highlighted in an article.Note: List retrieval is not yet supported. article_indicators: Optional[List[ArticleIndicator]] = None # A list of article objects. articles: Optional[List[Article]] = None - # Retrieve details about microsoft.graph.security.hostComponent objects.Note: List retrieval is not yet supported. + # Retrieve details about hostComponent objects.Note: List retrieval is not yet supported. host_components: Optional[List[HostComponent]] = None - # Retrieve details about microsoft.graph.security.hostCookie objects.Note: List retrieval is not yet supported. + # Retrieve details about hostCookie objects.Note: List retrieval is not yet supported. host_cookies: Optional[List[HostCookie]] = None - # Retrieve details about microsoft.graph.security.hostTracker objects.Note: List retrieval is not yet supported. + # Retrieve details about hostTracker objects.Note: List retrieval is not yet supported. + host_pairs: Optional[List[HostPair]] = None + # Retrieve details about hostSslCertificate objects.Note: List retrieval is not yet supported. + host_ssl_certificates: Optional[List[HostSslCertificate]] = None + # Retrieve details about hostTracker objects.Note: List retrieval is not yet supported. host_trackers: Optional[List[HostTracker]] = None - # Refers to microsoft.graph.security.host objects that Microsoft Threat Intelligence has observed.Note: List retrieval is not yet supported. + # Refers to host objects that Microsoft Threat Intelligence has observed.Note: List retrieval is not yet supported. hosts: Optional[List[Host]] = None # A list of intelligenceProfile objects. intel_profiles: Optional[List[IntelligenceProfile]] = None @@ -38,10 +48,18 @@ class ThreatIntelligence(Entity): intelligence_profile_indicators: Optional[List[IntelligenceProfileIndicator]] = None # The OdataType property odata_type: Optional[str] = None - # Retrieve details about microsoft.graph.security.passiveDnsRecord objects.Note: List retrieval is not yet supported. + # Retrieve details about passiveDnsRecord objects.Note: List retrieval is not yet supported. passive_dns_records: Optional[List[PassiveDnsRecord]] = None - # Retrieve details about microsoft.graph.security.vulnerabilities.Note: List retrieval is not yet supported. + # Retrieve details about sslCertificate objects.Note: List retrieval is not yet supported. + ssl_certificates: Optional[List[SslCertificate]] = None + # Retrieve details about the subdomain.Note: List retrieval is not yet supported. + subdomains: Optional[List[Subdomain]] = None + # Retrieve details about vulnerabilities.Note: List retrieval is not yet supported. vulnerabilities: Optional[List[Vulnerability]] = None + # Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + whois_history_records: Optional[List[WhoisHistoryRecord]] = None + # A list of whoisRecord objects. + whois_records: Optional[List[WhoisRecord]] = None @staticmethod def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ThreatIntelligence: @@ -65,11 +83,17 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .host import Host from .host_component import HostComponent from .host_cookie import HostCookie + from .host_pair import HostPair + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .intelligence_profile import IntelligenceProfile from .intelligence_profile_indicator import IntelligenceProfileIndicator from .passive_dns_record import PassiveDnsRecord + from .ssl_certificate import SslCertificate + from .subdomain import Subdomain from .vulnerability import Vulnerability + from .whois_history_record import WhoisHistoryRecord + from .whois_record import WhoisRecord from ..entity import Entity from .article import Article @@ -77,23 +101,35 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .host import Host from .host_component import HostComponent from .host_cookie import HostCookie + from .host_pair import HostPair + from .host_ssl_certificate import HostSslCertificate from .host_tracker import HostTracker from .intelligence_profile import IntelligenceProfile from .intelligence_profile_indicator import IntelligenceProfileIndicator from .passive_dns_record import PassiveDnsRecord + from .ssl_certificate import SslCertificate + from .subdomain import Subdomain from .vulnerability import Vulnerability + from .whois_history_record import WhoisHistoryRecord + from .whois_record import WhoisRecord fields: Dict[str, Callable[[Any], None]] = { "articleIndicators": lambda n : setattr(self, 'article_indicators', n.get_collection_of_object_values(ArticleIndicator)), "articles": lambda n : setattr(self, 'articles', n.get_collection_of_object_values(Article)), "hostComponents": lambda n : setattr(self, 'host_components', n.get_collection_of_object_values(HostComponent)), "hostCookies": lambda n : setattr(self, 'host_cookies', n.get_collection_of_object_values(HostCookie)), + "hostPairs": lambda n : setattr(self, 'host_pairs', n.get_collection_of_object_values(HostPair)), + "hostSslCertificates": lambda n : setattr(self, 'host_ssl_certificates', n.get_collection_of_object_values(HostSslCertificate)), "hostTrackers": lambda n : setattr(self, 'host_trackers', n.get_collection_of_object_values(HostTracker)), "hosts": lambda n : setattr(self, 'hosts', n.get_collection_of_object_values(Host)), "intelProfiles": lambda n : setattr(self, 'intel_profiles', n.get_collection_of_object_values(IntelligenceProfile)), "intelligenceProfileIndicators": lambda n : setattr(self, 'intelligence_profile_indicators', n.get_collection_of_object_values(IntelligenceProfileIndicator)), "passiveDnsRecords": lambda n : setattr(self, 'passive_dns_records', n.get_collection_of_object_values(PassiveDnsRecord)), + "sslCertificates": lambda n : setattr(self, 'ssl_certificates', n.get_collection_of_object_values(SslCertificate)), + "subdomains": lambda n : setattr(self, 'subdomains', n.get_collection_of_object_values(Subdomain)), "vulnerabilities": lambda n : setattr(self, 'vulnerabilities', n.get_collection_of_object_values(Vulnerability)), + "whoisHistoryRecords": lambda n : setattr(self, 'whois_history_records', n.get_collection_of_object_values(WhoisHistoryRecord)), + "whoisRecords": lambda n : setattr(self, 'whois_records', n.get_collection_of_object_values(WhoisRecord)), } super_fields = super().get_field_deserializers() fields.update(super_fields) @@ -112,11 +148,17 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("articles", self.articles) writer.write_collection_of_object_values("hostComponents", self.host_components) writer.write_collection_of_object_values("hostCookies", self.host_cookies) + writer.write_collection_of_object_values("hostPairs", self.host_pairs) + writer.write_collection_of_object_values("hostSslCertificates", self.host_ssl_certificates) writer.write_collection_of_object_values("hostTrackers", self.host_trackers) writer.write_collection_of_object_values("hosts", self.hosts) writer.write_collection_of_object_values("intelProfiles", self.intel_profiles) writer.write_collection_of_object_values("intelligenceProfileIndicators", self.intelligence_profile_indicators) writer.write_collection_of_object_values("passiveDnsRecords", self.passive_dns_records) + writer.write_collection_of_object_values("sslCertificates", self.ssl_certificates) + writer.write_collection_of_object_values("subdomains", self.subdomains) writer.write_collection_of_object_values("vulnerabilities", self.vulnerabilities) + writer.write_collection_of_object_values("whoisHistoryRecords", self.whois_history_records) + writer.write_collection_of_object_values("whoisRecords", self.whois_records) diff --git a/msgraph/generated/models/security/topic_modeling_settings.py b/msgraph/generated/models/security/topic_modeling_settings.py index 6d746491e5b..a884811c446 100644 --- a/msgraph/generated/models/security/topic_modeling_settings.py +++ b/msgraph/generated/models/security/topic_modeling_settings.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dynamicallyAdjustTopicCount": lambda n : setattr(self, 'dynamically_adjust_topic_count', n.get_bool_value()), "ignoreNumbers": lambda n : setattr(self, 'ignore_numbers', n.get_bool_value()), "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "topicCount": lambda n : setattr(self, 'topic_count', n.get_int_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("dynamicallyAdjustTopicCount", self.dynamically_adjust_topic_count) writer.write_bool_value("ignoreNumbers", self.ignore_numbers) writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("topicCount", self.topic_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/user_account.py b/msgraph/generated/models/security/user_account.py index a5a100f7fed..072d94150d0 100644 --- a/msgraph/generated/models/security/user_account.py +++ b/msgraph/generated/models/security/user_account.py @@ -13,15 +13,15 @@ class UserAccount(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The displayed name of the user account. account_name: Optional[str] = None - # The user object identifier in Azure Active Directory (Azure AD). + # The user object identifier in Microsoft Entra ID. azure_ad_user_id: Optional[str] = None - # The user display name in Azure AD. + # The user display name in Microsoft Entra ID. display_name: Optional[str] = None # The name of the Active Directory domain of which the user is a member. domain_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The user principal name of the account in Azure AD. + # The user principal name of the account in Microsoft Entra ID. user_principal_name: Optional[str] = None # The local security identifier of the user account. user_sid: Optional[str] = None @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "azureAdUserId": lambda n : setattr(self, 'azure_ad_user_id', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "domainName": lambda n : setattr(self, 'domain_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "userPrincipalName": lambda n : setattr(self, 'user_principal_name', n.get_str_value()), "userSid": lambda n : setattr(self, 'user_sid', n.get_str_value()), } @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("azureAdUserId", self.azure_ad_user_id) writer.write_str_value("displayName", self.display_name) writer.write_str_value("domainName", self.domain_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("userPrincipalName", self.user_principal_name) writer.write_str_value("userSid", self.user_sid) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/vm_metadata.py b/msgraph/generated/models/security/vm_metadata.py index 38aa07a2e7c..b53f3b7c4c6 100644 --- a/msgraph/generated/models/security/vm_metadata.py +++ b/msgraph/generated/models/security/vm_metadata.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "cloudProvider": lambda n : setattr(self, 'cloud_provider', n.get_enum_value(VmCloudProvider)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceId": lambda n : setattr(self, 'resource_id', n.get_str_value()), "subscriptionId": lambda n : setattr(self, 'subscription_id', n.get_str_value()), "vmId": lambda n : setattr(self, 'vm_id', n.get_str_value()), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("cloudProvider", self.cloud_provider) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("resourceId", self.resource_id) writer.write_str_value("subscriptionId", self.subscription_id) writer.write_str_value("vmId", self.vm_id) diff --git a/msgraph/generated/models/security/whois_base_record.py b/msgraph/generated/models/security/whois_base_record.py new file mode 100644 index 00000000000..fa353f625f6 --- /dev/null +++ b/msgraph/generated/models/security/whois_base_record.py @@ -0,0 +1,152 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..entity import Entity + from .host import Host + from .whois_contact import WhoisContact + from .whois_history_record import WhoisHistoryRecord + from .whois_nameserver import WhoisNameserver + from .whois_record import WhoisRecord + +from ..entity import Entity + +@dataclass +class WhoisBaseRecord(Entity): + # The contact information for the abuse contact. + abuse: Optional[WhoisContact] = None + # The contact information for the admin contact. + admin: Optional[WhoisContact] = None + # The contact information for the billing contact. + billing: Optional[WhoisContact] = None + # The domain status for this WHOIS object. + domain_status: Optional[str] = None + # The date and time when this WHOIS record expires with the registrar. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + expiration_date_time: Optional[datetime.datetime] = None + # The first seen date and time of this WHOIS record. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The host property + host: Optional[Host] = None + # The last seen date and time of this WHOIS record. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_seen_date_time: Optional[datetime.datetime] = None + # The date and time when this WHOIS record was last modified. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_update_date_time: Optional[datetime.datetime] = None + # The nameservers for this WHOIS object. + nameservers: Optional[List[WhoisNameserver]] = None + # The contact information for the noc contact. + noc: Optional[WhoisContact] = None + # The OdataType property + odata_type: Optional[str] = None + # The raw WHOIS details for this WHOIS object. + raw_whois_text: Optional[str] = None + # The contact information for the registrant contact. + registrant: Optional[WhoisContact] = None + # The contact information for the registrar contact. + registrar: Optional[WhoisContact] = None + # The date and time when this WHOIS record was registered with a registrar. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + registration_date_time: Optional[datetime.datetime] = None + # The contact information for the technical contact. + technical: Optional[WhoisContact] = None + # The WHOIS server that provides the details. + whois_server: Optional[str] = None + # The contact information for the zone contact. + zone: Optional[WhoisContact] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisBaseRecord: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WhoisBaseRecord + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.whoisHistoryRecord".casefold(): + from .whois_history_record import WhoisHistoryRecord + + return WhoisHistoryRecord() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.security.whoisRecord".casefold(): + from .whois_record import WhoisRecord + + return WhoisRecord() + return WhoisBaseRecord() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..entity import Entity + from .host import Host + from .whois_contact import WhoisContact + from .whois_history_record import WhoisHistoryRecord + from .whois_nameserver import WhoisNameserver + from .whois_record import WhoisRecord + + from ..entity import Entity + from .host import Host + from .whois_contact import WhoisContact + from .whois_history_record import WhoisHistoryRecord + from .whois_nameserver import WhoisNameserver + from .whois_record import WhoisRecord + + fields: Dict[str, Callable[[Any], None]] = { + "abuse": lambda n : setattr(self, 'abuse', n.get_object_value(WhoisContact)), + "admin": lambda n : setattr(self, 'admin', n.get_object_value(WhoisContact)), + "billing": lambda n : setattr(self, 'billing', n.get_object_value(WhoisContact)), + "domainStatus": lambda n : setattr(self, 'domain_status', n.get_str_value()), + "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_datetime_value()), + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "host": lambda n : setattr(self, 'host', n.get_object_value(Host)), + "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), + "nameservers": lambda n : setattr(self, 'nameservers', n.get_collection_of_object_values(WhoisNameserver)), + "noc": lambda n : setattr(self, 'noc', n.get_object_value(WhoisContact)), + "rawWhoisText": lambda n : setattr(self, 'raw_whois_text', n.get_str_value()), + "registrant": lambda n : setattr(self, 'registrant', n.get_object_value(WhoisContact)), + "registrar": lambda n : setattr(self, 'registrar', n.get_object_value(WhoisContact)), + "registrationDateTime": lambda n : setattr(self, 'registration_date_time', n.get_datetime_value()), + "technical": lambda n : setattr(self, 'technical', n.get_object_value(WhoisContact)), + "whoisServer": lambda n : setattr(self, 'whois_server', n.get_str_value()), + "zone": lambda n : setattr(self, 'zone', n.get_object_value(WhoisContact)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("abuse", self.abuse) + writer.write_object_value("admin", self.admin) + writer.write_object_value("billing", self.billing) + writer.write_str_value("domainStatus", self.domain_status) + writer.write_datetime_value("expirationDateTime", self.expiration_date_time) + writer.write_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_object_value("host", self.host) + writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) + writer.write_collection_of_object_values("nameservers", self.nameservers) + writer.write_object_value("noc", self.noc) + writer.write_str_value("rawWhoisText", self.raw_whois_text) + writer.write_object_value("registrant", self.registrant) + writer.write_object_value("registrar", self.registrar) + writer.write_datetime_value("registrationDateTime", self.registration_date_time) + writer.write_object_value("technical", self.technical) + writer.write_str_value("whoisServer", self.whois_server) + writer.write_object_value("zone", self.zone) + + diff --git a/msgraph/generated/models/security/whois_contact.py b/msgraph/generated/models/security/whois_contact.py new file mode 100644 index 00000000000..53c7037bd37 --- /dev/null +++ b/msgraph/generated/models/security/whois_contact.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..physical_address import PhysicalAddress + +@dataclass +class WhoisContact(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The physical address of the entity. + address: Optional[PhysicalAddress] = None + # The email of this WHOIS contact. + email: Optional[str] = None + # The fax of this WHOIS contact. No format is guaranteed. + fax: Optional[str] = None + # The name of this WHOIS contact. + name: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The organization of this WHOIS contact. + organization: Optional[str] = None + # The telephone of this WHOIS contact. No format is guaranteed. + telephone: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisContact: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WhoisContact + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WhoisContact() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..physical_address import PhysicalAddress + + from ..physical_address import PhysicalAddress + + fields: Dict[str, Callable[[Any], None]] = { + "address": lambda n : setattr(self, 'address', n.get_object_value(PhysicalAddress)), + "email": lambda n : setattr(self, 'email', n.get_str_value()), + "fax": lambda n : setattr(self, 'fax', n.get_str_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "organization": lambda n : setattr(self, 'organization', n.get_str_value()), + "telephone": lambda n : setattr(self, 'telephone', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("address", self.address) + writer.write_str_value("email", self.email) + writer.write_str_value("fax", self.fax) + writer.write_str_value("name", self.name) + writer.write_str_value("OdataType", self.odata_type) + writer.write_str_value("organization", self.organization) + writer.write_str_value("telephone", self.telephone) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/security/whois_history_record.py b/msgraph/generated/models/security/whois_history_record.py new file mode 100644 index 00000000000..20dcad8730e --- /dev/null +++ b/msgraph/generated/models/security/whois_history_record.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .whois_base_record import WhoisBaseRecord + +from .whois_base_record import WhoisBaseRecord + +@dataclass +class WhoisHistoryRecord(WhoisBaseRecord): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.security.whoisHistoryRecord" + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisHistoryRecord: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WhoisHistoryRecord + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WhoisHistoryRecord() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .whois_base_record import WhoisBaseRecord + + from .whois_base_record import WhoisBaseRecord + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/security/whois_history_record_collection_response.py b/msgraph/generated/models/security/whois_history_record_collection_response.py new file mode 100644 index 00000000000..e95c1f51c8e --- /dev/null +++ b/msgraph/generated/models/security/whois_history_record_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .whois_history_record import WhoisHistoryRecord + +from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class WhoisHistoryRecordCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[WhoisHistoryRecord]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisHistoryRecordCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WhoisHistoryRecordCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WhoisHistoryRecordCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .whois_history_record import WhoisHistoryRecord + + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .whois_history_record import WhoisHistoryRecord + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(WhoisHistoryRecord)), + } + 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/domains/item/promote/promote_response.py b/msgraph/generated/models/security/whois_nameserver.py similarity index 53% rename from msgraph/generated/domains/item/promote/promote_response.py rename to msgraph/generated/models/security/whois_nameserver.py index 7afb1653f73..8f34aa04961 100644 --- a/msgraph/generated/domains/item/promote/promote_response.py +++ b/msgraph/generated/models/security/whois_nameserver.py @@ -1,37 +1,54 @@ from __future__ import annotations +import datetime from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +if TYPE_CHECKING: + from .host import Host + @dataclass -class PromoteResponse(AdditionalDataHolder, BackedModel, Parsable): +class WhoisNameserver(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None + # The first seen date and time of this WHOIS contact. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + first_seen_date_time: Optional[datetime.datetime] = None + # The host property + host: Optional[Host] = None + # The last seen date and time of this WHOIS contact. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_seen_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> PromoteResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisNameserver: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: PromoteResponse + Returns: WhoisNameserver """ if not parse_node: raise TypeError("parse_node cannot be null.") - return PromoteResponse() + return WhoisNameserver() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .host import Host + + from .host import Host + fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), + "firstSeenDateTime": lambda n : setattr(self, 'first_seen_date_time', n.get_datetime_value()), + "host": lambda n : setattr(self, 'host', n.get_object_value(Host)), + "lastSeenDateTime": lambda n : setattr(self, 'last_seen_date_time', n.get_datetime_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +60,10 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) + writer.write_datetime_value("firstSeenDateTime", self.first_seen_date_time) + writer.write_object_value("host", self.host) + writer.write_datetime_value("lastSeenDateTime", self.last_seen_date_time) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security/whois_record.py b/msgraph/generated/models/security/whois_record.py new file mode 100644 index 00000000000..755a3028609 --- /dev/null +++ b/msgraph/generated/models/security/whois_record.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .whois_base_record import WhoisBaseRecord + from .whois_history_record import WhoisHistoryRecord + +from .whois_base_record import WhoisBaseRecord + +@dataclass +class WhoisRecord(WhoisBaseRecord): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.security.whoisRecord" + # The collection of historical records associated to this WHOIS object. + history: Optional[List[WhoisHistoryRecord]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisRecord: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WhoisRecord + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WhoisRecord() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .whois_base_record import WhoisBaseRecord + from .whois_history_record import WhoisHistoryRecord + + from .whois_base_record import WhoisBaseRecord + from .whois_history_record import WhoisHistoryRecord + + fields: Dict[str, Callable[[Any], None]] = { + "history": lambda n : setattr(self, 'history', n.get_collection_of_object_values(WhoisHistoryRecord)), + } + 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("history", self.history) + + diff --git a/msgraph/generated/models/security/whois_record_collection_response.py b/msgraph/generated/models/security/whois_record_collection_response.py new file mode 100644 index 00000000000..acbc400709b --- /dev/null +++ b/msgraph/generated/models/security/whois_record_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .whois_record import WhoisRecord + +from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class WhoisRecordCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[WhoisRecord]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> WhoisRecordCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WhoisRecordCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WhoisRecordCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .whois_record import WhoisRecord + + from ..base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .whois_record import WhoisRecord + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(WhoisRecord)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/security_resource.py b/msgraph/generated/models/security_resource.py index fa25459179a..818964e4036 100644 --- a/msgraph/generated/models/security_resource.py +++ b/msgraph/generated/models/security_resource.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .security_resource_type import SecurityResourceType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resource": lambda n : setattr(self, 'resource', n.get_str_value()), "resourceType": lambda n : setattr(self, 'resource_type', n.get_enum_value(SecurityResourceType)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("resource", self.resource) writer.write_enum_value("resourceType", self.resource_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/security_vendor_information.py b/msgraph/generated/models/security_vendor_information.py index a9982613f03..1117dea5d5b 100644 --- a/msgraph/generated/models/security_vendor_information.py +++ b/msgraph/generated/models/security_vendor_information.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "provider": lambda n : setattr(self, 'provider', n.get_str_value()), "providerVersion": lambda n : setattr(self, 'provider_version', n.get_str_value()), "subProvider": lambda n : setattr(self, 'sub_provider', n.get_str_value()), @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("provider", self.provider) writer.write_str_value("providerVersion", self.provider_version) writer.write_str_value("subProvider", self.sub_provider) diff --git a/msgraph/generated/models/self_service_sign_up_authentication_flow_configuration.py b/msgraph/generated/models/self_service_sign_up_authentication_flow_configuration.py index d4622ad3cd3..5f84b240008 100644 --- a/msgraph/generated/models/self_service_sign_up_authentication_flow_configuration.py +++ b/msgraph/generated/models/self_service_sign_up_authentication_flow_configuration.py @@ -11,7 +11,7 @@ class SelfServiceSignUpAuthenticationFlowConfiguration(AdditionalDataHolder, Bac # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # Indicates whether self-service sign-up flow is enabled or disabled. The default value is false. This property is not a key. Required. + # Indicates whether self-service sign-up flow is enabled or disabled. The default value is false. This property isn't a key. Required. is_enabled: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/self_signed_certificate.py b/msgraph/generated/models/self_signed_certificate.py index 6548aa66484..52ab43af476 100644 --- a/msgraph/generated/models/self_signed_certificate.py +++ b/msgraph/generated/models/self_signed_certificate.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), "key": lambda n : setattr(self, 'key', n.get_bytes_value()), "keyId": lambda n : setattr(self, 'key_id', n.get_uuid_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "thumbprint": lambda n : setattr(self, 'thumbprint', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), @@ -77,7 +77,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("endDateTime", self.end_date_time) writer.write_bytes_value("key", self.key) writer.write_uuid_value("keyId", self.key_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_str_value("thumbprint", self.thumbprint) writer.write_str_value("type", self.type) diff --git a/msgraph/generated/models/sensitivity_label_assignment.py b/msgraph/generated/models/sensitivity_label_assignment.py index 6717811c6e9..af9314e1efc 100644 --- a/msgraph/generated/models/sensitivity_label_assignment.py +++ b/msgraph/generated/models/sensitivity_label_assignment.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "assignmentMethod": lambda n : setattr(self, 'assignment_method', n.get_enum_value(SensitivityLabelAssignmentMethod)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sensitivityLabelId": lambda n : setattr(self, 'sensitivity_label_id', n.get_str_value()), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), } @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("assignmentMethod", self.assignment_method) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sensitivityLabelId", self.sensitivity_label_id) writer.write_str_value("tenantId", self.tenant_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/service_health_issue_post.py b/msgraph/generated/models/service_health_issue_post.py index c3758faf509..a53fbb83c54 100644 --- a/msgraph/generated/models/service_health_issue_post.py +++ b/msgraph/generated/models/service_health_issue_post.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "description": lambda n : setattr(self, 'description', n.get_object_value(ItemBody)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "postType": lambda n : setattr(self, 'post_type', n.get_enum_value(PostType)), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_object_value("description", self.description) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("postType", self.post_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/service_plan_info.py b/msgraph/generated/models/service_plan_info.py index da10f387062..67f377f937b 100644 --- a/msgraph/generated/models/service_plan_info.py +++ b/msgraph/generated/models/service_plan_info.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "appliesTo": lambda n : setattr(self, 'applies_to', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "provisioningStatus": lambda n : setattr(self, 'provisioning_status', n.get_str_value()), "servicePlanId": lambda n : setattr(self, 'service_plan_id', n.get_uuid_value()), "servicePlanName": lambda n : setattr(self, 'service_plan_name', n.get_str_value()), @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("appliesTo", self.applies_to) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("provisioningStatus", self.provisioning_status) writer.write_uuid_value("servicePlanId", self.service_plan_id) writer.write_str_value("servicePlanName", self.service_plan_name) diff --git a/msgraph/generated/models/service_principal.py b/msgraph/generated/models/service_principal.py index caf9dbf7e96..a885f83b871 100644 --- a/msgraph/generated/models/service_principal.py +++ b/msgraph/generated/models/service_principal.py @@ -44,7 +44,7 @@ class ServicePrincipal(DirectoryObject): app_description: Optional[str] = None # The display name exposed by the associated application. app_display_name: Optional[str] = None - # The unique identifier for the associated application (its appId property). Supports $filter (eq, ne, not, in, startsWith). + # The unique identifier for the associated application (its appId property). Alternate key. Supports $filter (eq, ne, not, in, startsWith). app_id: Optional[str] = None # The appManagementPolicy applied to this application. app_management_policies: Optional[List[AppManagementPolicy]] = None @@ -82,11 +82,11 @@ class ServicePrincipal(DirectoryObject): home_realm_discovery_policies: Optional[List[HomeRealmDiscoveryPolicy]] = None # Home page or landing page of the application. homepage: Optional[str] = None - # Basic profile information of the acquired application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). + # Basic profile information of the acquired application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Microsoft Entra apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). info: Optional[InformationalUrl] = None # The collection of key credentials associated with the service principal. Not nullable. Supports $filter (eq, not, ge, le). key_credentials: Optional[List[KeyCredential]] = None - # Specifies the URL where the service provider redirects the user to Azure AD to authenticate. Azure AD uses the URL to launch the application from Microsoft 365 or the Azure AD My Apps. When blank, Azure AD performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Azure AD My Apps, or the Azure AD SSO URL. + # Specifies the URL where the service provider redirects the user to Microsoft Entra ID to authenticate. Microsoft Entra ID uses the URL to launch the application from Microsoft 365 or the Microsoft Entra My Apps. When blank, Microsoft Entra ID performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Microsoft Entra My Apps, or the Microsoft Entra SSO URL. login_url: Optional[str] = None # Specifies the URL that will be used by Microsoft's authorization service to logout an user using OpenId Connect front-channel, back-channel or SAML logout protocols. logout_url: Optional[str] = None @@ -94,7 +94,7 @@ class ServicePrincipal(DirectoryObject): member_of: Optional[List[DirectoryObject]] = None # Free text field to capture information about the service principal, typically used for operational purposes. Maximum allowed size is 1024 characters. notes: Optional[str] = None - # Specifies the list of email addresses where Azure AD sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Azure AD Gallery applications. + # Specifies the list of email addresses where Microsoft Entra ID sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Microsoft Entra Gallery applications. notification_email_addresses: Optional[List[str]] = None # Delegated permission grants authorizing this service principal to access an API on behalf of a signed-in user. Read-only. Nullable. oauth2_permission_grants: Optional[List[OAuth2PermissionGrant]] = None @@ -106,7 +106,7 @@ class ServicePrincipal(DirectoryObject): owners: Optional[List[DirectoryObject]] = None # The collection of password credentials associated with the application. Not nullable. password_credentials: Optional[List[PasswordCredential]] = None - # Specifies the single sign-on mode configured for this application. Azure AD uses the preferred single sign-on mode to launch the application from Microsoft 365 or the Azure AD My Apps. The supported values are password, saml, notSupported, and oidc. + # Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. preferred_single_sign_on_mode: Optional[str] = None # This property can be used on SAML applications (apps that have preferredSingleSignOnMode set to saml) to control which certificate is used to sign the SAML responses. For applications that are not SAML, do not write or otherwise rely on this property. preferred_token_signing_key_thumbprint: Optional[str] = None @@ -116,17 +116,17 @@ class ServicePrincipal(DirectoryObject): resource_specific_application_permissions: Optional[List[ResourceSpecificPermission]] = None # The collection for settings related to saml single sign-on. saml_single_sign_on_settings: Optional[SamlSingleSignOnSettings] = None - # Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Azure AD. For example,Client apps can specify a resource URI which is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). + # Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Microsoft Entra ID. For example,Client apps can specify a resource URI which is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). service_principal_names: Optional[List[str]] = None - # Identifies whether the service principal represents an application, a managed identity, or a legacy application. This is set by Azure AD internally. The servicePrincipalType property can be set to three different values: Application - A service principal that represents an application or service. The appId property identifies the associated app registration, and matches the appId of an application, possibly from a different tenant. If the associated app registration is missing, tokens are not issued for the service principal.ManagedIdentity - A service principal that represents a managed identity. Service principals representing managed identities can be granted access and permissions, but cannot be updated or modified directly.Legacy - A service principal that represents an app created before app registrations, or through legacy experiences. Legacy service principal can have credentials, service principal names, reply URLs, and other properties which are editable by an authorized user, but does not have an associated app registration. The appId value does not associate the service principal with an app registration. The service principal can only be used in the tenant where it was created.SocialIdp - For internal use. + # Identifies whether the service principal represents an application, a managed identity, or a legacy application. This is set by Microsoft Entra ID internally. The servicePrincipalType property can be set to three different values: Application - A service principal that represents an application or service. The appId property identifies the associated app registration, and matches the appId of an application, possibly from a different tenant. If the associated app registration is missing, tokens are not issued for the service principal.ManagedIdentity - A service principal that represents a managed identity. Service principals representing managed identities can be granted access and permissions, but cannot be updated or modified directly.Legacy - A service principal that represents an app created before app registrations, or through legacy experiences. Legacy service principal can have credentials, service principal names, reply URLs, and other properties which are editable by an authorized user, but does not have an associated app registration. The appId value does not associate the service principal with an app registration. The service principal can only be used in the tenant where it was created.SocialIdp - For internal use. service_principal_type: Optional[str] = None - # Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization's Azure AD tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization's Azure AD tenant (multi-tenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization's Azure AD tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. + # Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization's Microsoft Entra tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization's Microsoft Entra tenant (multi-tenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization's Microsoft Entra tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. sign_in_audience: Optional[str] = None - # Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + # Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. synchronization: Optional[Synchronization] = None # Custom strings that can be used to categorize and identify the service principal. Not nullable. The value is the union of strings set here and on the associated application entity's tags property.Supports $filter (eq, not, ge, le, startsWith). tags: Optional[List[str]] = None - # Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + # Specifies the keyId of a public key from the keyCredentials collection. When configured, Microsoft Entra ID issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. token_encryption_key_id: Optional[UUID] = None # The tokenIssuancePolicies assigned to this service principal. token_issuance_policies: Optional[List[TokenIssuancePolicy]] = None diff --git a/msgraph/generated/models/service_principal_lock_configuration.py b/msgraph/generated/models/service_principal_lock_configuration.py index e84fb01cbdc..4dbf8d60caf 100644 --- a/msgraph/generated/models/service_principal_lock_configuration.py +++ b/msgraph/generated/models/service_principal_lock_configuration.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "credentialsWithUsageSign": lambda n : setattr(self, 'credentials_with_usage_sign', n.get_bool_value()), "credentialsWithUsageVerify": lambda n : setattr(self, 'credentials_with_usage_verify', n.get_bool_value()), "isEnabled": lambda n : setattr(self, 'is_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tokenEncryptionKeyId": lambda n : setattr(self, 'token_encryption_key_id', n.get_bool_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("credentialsWithUsageSign", self.credentials_with_usage_sign) writer.write_bool_value("credentialsWithUsageVerify", self.credentials_with_usage_verify) writer.write_bool_value("isEnabled", self.is_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("tokenEncryptionKeyId", self.token_encryption_key_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/service_provisioning_error.py b/msgraph/generated/models/service_provisioning_error.py index 4b8fa8d303f..b0bba89d9a2 100644 --- a/msgraph/generated/models/service_provisioning_error.py +++ b/msgraph/generated/models/service_provisioning_error.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "isResolved": lambda n : setattr(self, 'is_resolved', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "serviceInstance": lambda n : setattr(self, 'service_instance', n.get_str_value()), } return fields @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_bool_value("isResolved", self.is_resolved) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("serviceInstance", self.service_instance) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/service_provisioning_error_collection_response.py b/msgraph/generated/models/service_provisioning_error_collection_response.py new file mode 100644 index 00000000000..3afde4ac02d --- /dev/null +++ b/msgraph/generated/models/service_provisioning_error_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .service_provisioning_error import ServiceProvisioningError + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class ServiceProvisioningErrorCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ServiceProvisioningError]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ServiceProvisioningErrorCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ServiceProvisioningErrorCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ServiceProvisioningErrorCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .service_provisioning_error import ServiceProvisioningError + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .service_provisioning_error import ServiceProvisioningError + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ServiceProvisioningError)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/service_update_message_viewpoint.py b/msgraph/generated/models/service_update_message_viewpoint.py index bb21f076ec3..53212a1df0f 100644 --- a/msgraph/generated/models/service_update_message_viewpoint.py +++ b/msgraph/generated/models/service_update_message_viewpoint.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isArchived": lambda n : setattr(self, 'is_archived', n.get_bool_value()), "isFavorited": lambda n : setattr(self, 'is_favorited', n.get_bool_value()), "isRead": lambda n : setattr(self, 'is_read', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isArchived", self.is_archived) writer.write_bool_value("isFavorited", self.is_favorited) writer.write_bool_value("isRead", self.is_read) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/setting_source.py b/msgraph/generated/models/setting_source.py index 0b845289a82..625c15f251c 100644 --- a/msgraph/generated/models/setting_source.py +++ b/msgraph/generated/models/setting_source.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sourceType": lambda n : setattr(self, 'source_type', n.get_enum_value(SettingSourceType)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("sourceType", self.source_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/setting_template_value.py b/msgraph/generated/models/setting_template_value.py index fa9f4684141..26c64abc5c3 100644 --- a/msgraph/generated/models/setting_template_value.py +++ b/msgraph/generated/models/setting_template_value.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "defaultValue": lambda n : setattr(self, 'default_value', n.get_str_value()), "description": lambda n : setattr(self, 'description', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("defaultValue", self.default_value) writer.write_str_value("description", self.description) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/setting_value.py b/msgraph/generated/models/setting_value.py index 197e8cc43c0..1ecd2572375 100644 --- a/msgraph/generated/models/setting_value.py +++ b/msgraph/generated/models/setting_value.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/share_point_one_drive_options.py b/msgraph/generated/models/share_point_one_drive_options.py index 44be659c43d..cc65b38f384 100644 --- a/msgraph/generated/models/share_point_one_drive_options.py +++ b/msgraph/generated/models/share_point_one_drive_options.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "includeContent": lambda n : setattr(self, 'include_content', n.get_collection_of_enum_values(SearchContent)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("includeContent", self.include_content) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/shared.py b/msgraph/generated/models/shared.py index 5233835e191..b10de1c2d06 100644 --- a/msgraph/generated/models/shared.py +++ b/msgraph/generated/models/shared.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .identity_set import IdentitySet fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "owner": lambda n : setattr(self, 'owner', n.get_object_value(IdentitySet)), "scope": lambda n : setattr(self, 'scope', n.get_str_value()), "sharedBy": lambda n : setattr(self, 'shared_by', n.get_object_value(IdentitySet)), @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("owner", self.owner) writer.write_str_value("scope", self.scope) writer.write_object_value("sharedBy", self.shared_by) diff --git a/msgraph/generated/models/shared_drive_item.py b/msgraph/generated/models/shared_drive_item.py index a291293bda3..cb261c46a2d 100644 --- a/msgraph/generated/models/shared_drive_item.py +++ b/msgraph/generated/models/shared_drive_item.py @@ -7,8 +7,8 @@ from .base_item import BaseItem from .drive_item import DriveItem from .identity_set import IdentitySet - from .list_item import ListItem from .list_ import List_ + from .list_item import ListItem from .permission import Permission from .site import Site @@ -54,16 +54,16 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .base_item import BaseItem from .drive_item import DriveItem from .identity_set import IdentitySet - from .list_item import ListItem from .list_ import List_ + from .list_item import ListItem from .permission import Permission from .site import Site from .base_item import BaseItem from .drive_item import DriveItem from .identity_set import IdentitySet - from .list_item import ListItem from .list_ import List_ + from .list_item import ListItem from .permission import Permission from .site import Site diff --git a/msgraph/generated/models/shared_p_c_account_manager_policy.py b/msgraph/generated/models/shared_p_c_account_manager_policy.py index 3512f70ccea..3218abff6b4 100644 --- a/msgraph/generated/models/shared_p_c_account_manager_policy.py +++ b/msgraph/generated/models/shared_p_c_account_manager_policy.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "accountDeletionPolicy": lambda n : setattr(self, 'account_deletion_policy', n.get_enum_value(SharedPCAccountDeletionPolicyType)), "cacheAccountsAboveDiskFreePercentage": lambda n : setattr(self, 'cache_accounts_above_disk_free_percentage', n.get_int_value()), "inactiveThresholdDays": lambda n : setattr(self, 'inactive_threshold_days', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "removeAccountsBelowDiskFreePercentage": lambda n : setattr(self, 'remove_accounts_below_disk_free_percentage', n.get_int_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("accountDeletionPolicy", self.account_deletion_policy) writer.write_int_value("cacheAccountsAboveDiskFreePercentage", self.cache_accounts_above_disk_free_percentage) writer.write_int_value("inactiveThresholdDays", self.inactive_threshold_days) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("removeAccountsBelowDiskFreePercentage", self.remove_accounts_below_disk_free_percentage) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/sharepoint_ids.py b/msgraph/generated/models/sharepoint_ids.py index 3247597b2e6..3ed53713600 100644 --- a/msgraph/generated/models/sharepoint_ids.py +++ b/msgraph/generated/models/sharepoint_ids.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "listId": lambda n : setattr(self, 'list_id', n.get_str_value()), "listItemId": lambda n : setattr(self, 'list_item_id', n.get_str_value()), "listItemUniqueId": lambda n : setattr(self, 'list_item_unique_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "siteId": lambda n : setattr(self, 'site_id', n.get_str_value()), "siteUrl": lambda n : setattr(self, 'site_url', n.get_str_value()), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("listId", self.list_id) writer.write_str_value("listItemId", self.list_item_id) writer.write_str_value("listItemUniqueId", self.list_item_unique_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("siteId", self.site_id) writer.write_str_value("siteUrl", self.site_url) writer.write_str_value("tenantId", self.tenant_id) diff --git a/msgraph/generated/models/sharing_detail.py b/msgraph/generated/models/sharing_detail.py index 030692e13d4..ffc8ede35b1 100644 --- a/msgraph/generated/models/sharing_detail.py +++ b/msgraph/generated/models/sharing_detail.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .resource_reference import ResourceReference fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sharedBy": lambda n : setattr(self, 'shared_by', n.get_object_value(InsightIdentity)), "sharedDateTime": lambda n : setattr(self, 'shared_date_time', n.get_datetime_value()), "sharingReference": lambda n : setattr(self, 'sharing_reference', n.get_object_value(ResourceReference)), @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("sharedBy", self.shared_by) writer.write_datetime_value("sharedDateTime", self.shared_date_time) writer.write_str_value("sharingSubject", self.sharing_subject) diff --git a/msgraph/generated/models/sharing_invitation.py b/msgraph/generated/models/sharing_invitation.py index e5f08d8324c..54c160fca56 100644 --- a/msgraph/generated/models/sharing_invitation.py +++ b/msgraph/generated/models/sharing_invitation.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "email": lambda n : setattr(self, 'email', n.get_str_value()), "invitedBy": lambda n : setattr(self, 'invited_by', n.get_object_value(IdentitySet)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "redeemedBy": lambda n : setattr(self, 'redeemed_by', n.get_str_value()), "signInRequired": lambda n : setattr(self, 'sign_in_required', n.get_bool_value()), } @@ -64,7 +64,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("email", self.email) writer.write_object_value("invitedBy", self.invited_by) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("redeemedBy", self.redeemed_by) writer.write_bool_value("signInRequired", self.sign_in_required) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/sharing_link.py b/msgraph/generated/models/sharing_link.py index 4dc8be39005..b5939dc8ff8 100644 --- a/msgraph/generated/models/sharing_link.py +++ b/msgraph/generated/models/sharing_link.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "application": lambda n : setattr(self, 'application', n.get_object_value(Identity)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "preventsDownload": lambda n : setattr(self, 'prevents_download', n.get_bool_value()), "scope": lambda n : setattr(self, 'scope', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("application", self.application) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("preventsDownload", self.prevents_download) writer.write_str_value("scope", self.scope) writer.write_str_value("type", self.type) diff --git a/msgraph/generated/models/shift_activity.py b/msgraph/generated/models/shift_activity.py index f708e94700d..b6d7e55ef88 100644 --- a/msgraph/generated/models/shift_activity.py +++ b/msgraph/generated/models/shift_activity.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "endDateTime": lambda n : setattr(self, 'end_date_time', n.get_datetime_value()), "isPaid": lambda n : setattr(self, 'is_paid', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), "theme": lambda n : setattr(self, 'theme', n.get_enum_value(ScheduleEntityTheme)), } @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("displayName", self.display_name) writer.write_datetime_value("endDateTime", self.end_date_time) writer.write_bool_value("isPaid", self.is_paid) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_enum_value("theme", self.theme) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/shift_availability.py b/msgraph/generated/models/shift_availability.py index 92f7f3bd727..03f57f90be4 100644 --- a/msgraph/generated/models/shift_availability.py +++ b/msgraph/generated/models/shift_availability.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .time_range import TimeRange fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recurrence": lambda n : setattr(self, 'recurrence', n.get_object_value(PatternedRecurrence)), "timeSlots": lambda n : setattr(self, 'time_slots', n.get_collection_of_object_values(TimeRange)), "timeZone": lambda n : setattr(self, 'time_zone', n.get_str_value()), @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("recurrence", self.recurrence) writer.write_collection_of_object_values("timeSlots", self.time_slots) writer.write_str_value("timeZone", self.time_zone) diff --git a/msgraph/generated/models/sign_in.py b/msgraph/generated/models/sign_in.py index 1bff09069d8..58cc4894b07 100644 --- a/msgraph/generated/models/sign_in.py +++ b/msgraph/generated/models/sign_in.py @@ -20,9 +20,9 @@ @dataclass class SignIn(Entity): - # App name displayed in the Azure portal. Supports $filter (eq, startsWith). + # App name displayed in the Microsoft Entra admin center. Supports $filter (eq, startsWith). app_display_name: Optional[str] = None - # Unique GUID representing the app ID in the Azure Active Directory. Supports $filter (eq). + # Unique GUID representing the app ID in the Microsoft Entra ID. Supports $filter (eq). app_id: Optional[str] = None # Provides a list of conditional access policies that are triggered by the corresponding sign-in activity. applied_conditional_access_policies: Optional[List[AppliedConditionalAccessPolicy]] = None @@ -48,15 +48,15 @@ class SignIn(Entity): resource_display_name: Optional[str] = None # ID of the resource that the user signed into. Supports $filter (eq). resource_id: Optional[str] = None - # Provides the 'reason' behind a specific state of a risky user, sign-in or a risk event. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, unknownFutureValue. The value none means that no action has been performed on the user or sign-in so far. Supports $filter (eq).Note: Details for this property require an Azure AD Premium P2 license. Other licenses return the value hidden. + # Provides the 'reason' behind a specific state of a risky user, sign-in or a risk event. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, unknownFutureValue. The value none means that no action has been performed on the user or sign-in so far. Supports $filter (eq).Note: Details for this property require a Microsoft Entra ID P2 license. Other licenses return the value hidden. risk_detail: Optional[RiskDetail] = None # Risk event types associated with the sign-in. The possible values are: unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic, and unknownFutureValue. Supports $filter (eq). risk_event_types: Optional[List[RiskEventType]] = None # The list of risk event types associated with the sign-in. Possible values: unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic, or unknownFutureValue. Supports $filter (eq, startsWith). risk_event_types_v2: Optional[List[str]] = None - # Aggregated risk level. The possible values are: none, low, medium, high, hidden, and unknownFutureValue. The value hidden means the user or sign-in wasn't enabled for Azure AD Identity Protection. Supports $filter (eq). Note: Details for this property are only available for Azure AD Premium P2 customers. All other customers are returned hidden. + # Aggregated risk level. The possible values are: none, low, medium, high, hidden, and unknownFutureValue. The value hidden means the user or sign-in wasn't enabled for Microsoft Entra ID Protection. Supports $filter (eq). Note: Details for this property are only available for Microsoft Entra ID P2 customers. All other customers are returned hidden. risk_level_aggregated: Optional[RiskLevel] = None - # Risk level during sign-in. The possible values are: none, low, medium, high, hidden, and unknownFutureValue. The value hidden means the user or sign-in wasn't enabled for Azure AD Identity Protection. Supports $filter (eq). Note: Details for this property are only available for Azure AD Premium P2 customers. All other customers are returned hidden. + # Risk level during sign-in. The possible values are: none, low, medium, high, hidden, and unknownFutureValue. The value hidden means the user or sign-in wasn't enabled for Microsoft Entra ID Protection. Supports $filter (eq). Note: Details for this property are only available for Microsoft Entra ID P2 customers. All other customers are returned hidden. risk_level_during_sign_in: Optional[RiskLevel] = None # Reports status of the risky user, sign-in, or a risk event. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. Supports $filter (eq). risk_state: Optional[RiskState] = None diff --git a/msgraph/generated/models/sign_in_activity.py b/msgraph/generated/models/sign_in_activity.py index e57c1c4a0ea..bf395297bbb 100644 --- a/msgraph/generated/models/sign_in_activity.py +++ b/msgraph/generated/models/sign_in_activity.py @@ -12,11 +12,11 @@ class SignInActivity(AdditionalDataHolder, BackedModel, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted to sign into the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. + # The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted to sign into the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Microsoft Entra ID maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. last_non_interactive_sign_in_date_time: Optional[datetime.datetime] = None # Request identifier of the last non-interactive sign-in performed by this user. last_non_interactive_sign_in_request_id: Optional[str] = None - # The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted to sign into the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. + # The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted to sign into the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Microsoft Entra ID maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. last_sign_in_date_time: Optional[datetime.datetime] = None # Request identifier of the last interactive sign-in performed by this user. last_sign_in_request_id: Optional[str] = None @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastNonInteractiveSignInRequestId": lambda n : setattr(self, 'last_non_interactive_sign_in_request_id', n.get_str_value()), "lastSignInDateTime": lambda n : setattr(self, 'last_sign_in_date_time', n.get_datetime_value()), "lastSignInRequestId": lambda n : setattr(self, 'last_sign_in_request_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("lastNonInteractiveSignInRequestId", self.last_non_interactive_sign_in_request_id) writer.write_datetime_value("lastSignInDateTime", self.last_sign_in_date_time) writer.write_str_value("lastSignInRequestId", self.last_sign_in_request_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/sign_in_frequency_session_control.py b/msgraph/generated/models/sign_in_frequency_session_control.py index cf838c41571..e1fa6daa11f 100644 --- a/msgraph/generated/models/sign_in_frequency_session_control.py +++ b/msgraph/generated/models/sign_in_frequency_session_control.py @@ -5,9 +5,9 @@ if TYPE_CHECKING: from .conditional_access_session_control import ConditionalAccessSessionControl + from .signin_frequency_type import SigninFrequencyType from .sign_in_frequency_authentication_type import SignInFrequencyAuthenticationType from .sign_in_frequency_interval import SignInFrequencyInterval - from .signin_frequency_type import SigninFrequencyType from .conditional_access_session_control import ConditionalAccessSessionControl @@ -41,14 +41,14 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .conditional_access_session_control import ConditionalAccessSessionControl + from .signin_frequency_type import SigninFrequencyType from .sign_in_frequency_authentication_type import SignInFrequencyAuthenticationType from .sign_in_frequency_interval import SignInFrequencyInterval - from .signin_frequency_type import SigninFrequencyType from .conditional_access_session_control import ConditionalAccessSessionControl + from .signin_frequency_type import SigninFrequencyType from .sign_in_frequency_authentication_type import SignInFrequencyAuthenticationType from .sign_in_frequency_interval import SignInFrequencyInterval - from .signin_frequency_type import SigninFrequencyType fields: Dict[str, Callable[[Any], None]] = { "authenticationType": lambda n : setattr(self, 'authentication_type', n.get_enum_value(SignInFrequencyAuthenticationType)), diff --git a/msgraph/generated/models/sign_in_location.py b/msgraph/generated/models/sign_in_location.py index 0d0483b6b2c..4b261479e81 100644 --- a/msgraph/generated/models/sign_in_location.py +++ b/msgraph/generated/models/sign_in_location.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "city": lambda n : setattr(self, 'city', n.get_str_value()), "countryOrRegion": lambda n : setattr(self, 'country_or_region', n.get_str_value()), "geoCoordinates": lambda n : setattr(self, 'geo_coordinates', n.get_object_value(GeoCoordinates)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("city", self.city) writer.write_str_value("countryOrRegion", self.country_or_region) writer.write_object_value("geoCoordinates", self.geo_coordinates) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/sign_in_status.py b/msgraph/generated/models/sign_in_status.py index 0943f2b29b7..3c4f7994ac6 100644 --- a/msgraph/generated/models/sign_in_status.py +++ b/msgraph/generated/models/sign_in_status.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "additionalDetails": lambda n : setattr(self, 'additional_details', n.get_str_value()), "errorCode": lambda n : setattr(self, 'error_code', n.get_int_value()), "failureReason": lambda n : setattr(self, 'failure_reason', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("additionalDetails", self.additional_details) writer.write_int_value("errorCode", self.error_code) writer.write_str_value("failureReason", self.failure_reason) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/signing_certificate_update_status.py b/msgraph/generated/models/signing_certificate_update_status.py index 3046a2e5191..b1a101558e9 100644 --- a/msgraph/generated/models/signing_certificate_update_status.py +++ b/msgraph/generated/models/signing_certificate_update_status.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "certificateUpdateResult": lambda n : setattr(self, 'certificate_update_result', n.get_str_value()), "lastRunDateTime": lambda n : setattr(self, 'last_run_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("certificateUpdateResult", self.certificate_update_result) writer.write_datetime_value("lastRunDateTime", self.last_run_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/simulation.py b/msgraph/generated/models/simulation.py index eab4e2ef401..d787688ae11 100644 --- a/msgraph/generated/models/simulation.py +++ b/msgraph/generated/models/simulation.py @@ -5,13 +5,20 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: + from .account_target_content import AccountTargetContent from .email_identity import EmailIdentity + from .end_user_notification_setting import EndUserNotificationSetting from .entity import Entity + from .landing_page import LandingPage + from .login_page import LoginPage + from .o_auth_consent_app_detail import OAuthConsentAppDetail + from .payload import Payload from .payload_delivery_platform import PayloadDeliveryPlatform from .simulation_attack_technique import SimulationAttackTechnique from .simulation_attack_type import SimulationAttackType from .simulation_report import SimulationReport from .simulation_status import SimulationStatus + from .training_setting import TrainingSetting from .entity import Entity @@ -33,22 +40,40 @@ class Simulation(Entity): description: Optional[str] = None # Display name of the attack simulation and training campaign. Supports $filter and $orderby. display_name: Optional[str] = None + # The durationInDays property + duration_in_days: Optional[int] = None + # The endUserNotificationSetting property + end_user_notification_setting: Optional[EndUserNotificationSetting] = None + # The excludedAccountTarget property + excluded_account_target: Optional[AccountTargetContent] = None + # The includedAccountTarget property + included_account_target: Optional[AccountTargetContent] = None # Flag that represents if the attack simulation and training campaign was created from a simulation automation flow. Supports $filter and $orderby. is_automated: Optional[bool] = None + # The landingPage property + landing_page: Optional[LandingPage] = None # Identity of the user who most recently modified the attack simulation and training campaign. last_modified_by: Optional[EmailIdentity] = None # Date and time of the most recent modification of the attack simulation and training campaign. last_modified_date_time: Optional[datetime.datetime] = None # Date and time of the launch/start of the attack simulation and training campaign. Supports $filter and $orderby. launch_date_time: Optional[datetime.datetime] = None + # The loginPage property + login_page: Optional[LoginPage] = None + # The oAuthConsentAppDetail property + o_auth_consent_app_detail: Optional[OAuthConsentAppDetail] = None # The OdataType property odata_type: Optional[str] = None + # The payload property + payload: Optional[Payload] = None # Method of delivery of the phishing payload used in the attack simulation and training campaign. Possible values are: unknown, sms, email, teams, unknownFutureValue. payload_delivery_platform: Optional[PayloadDeliveryPlatform] = None # Report of the attack simulation and training campaign. report: Optional[SimulationReport] = None # Status of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, draft, running, scheduled, succeeded, failed, cancelled, excluded, unknownFutureValue. status: Optional[SimulationStatus] = None + # The trainingSetting property + training_setting: Optional[TrainingSetting] = None @staticmethod def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> Simulation: @@ -66,21 +91,35 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .account_target_content import AccountTargetContent from .email_identity import EmailIdentity + from .end_user_notification_setting import EndUserNotificationSetting from .entity import Entity + from .landing_page import LandingPage + from .login_page import LoginPage + from .o_auth_consent_app_detail import OAuthConsentAppDetail + from .payload import Payload from .payload_delivery_platform import PayloadDeliveryPlatform from .simulation_attack_technique import SimulationAttackTechnique from .simulation_attack_type import SimulationAttackType from .simulation_report import SimulationReport from .simulation_status import SimulationStatus + from .training_setting import TrainingSetting + from .account_target_content import AccountTargetContent from .email_identity import EmailIdentity + from .end_user_notification_setting import EndUserNotificationSetting from .entity import Entity + from .landing_page import LandingPage + from .login_page import LoginPage + from .o_auth_consent_app_detail import OAuthConsentAppDetail + from .payload import Payload from .payload_delivery_platform import PayloadDeliveryPlatform from .simulation_attack_technique import SimulationAttackTechnique from .simulation_attack_type import SimulationAttackType from .simulation_report import SimulationReport from .simulation_status import SimulationStatus + from .training_setting import TrainingSetting fields: Dict[str, Callable[[Any], None]] = { "attackTechnique": lambda n : setattr(self, 'attack_technique', n.get_enum_value(SimulationAttackTechnique)), @@ -91,13 +130,22 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), "description": lambda n : setattr(self, 'description', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "durationInDays": lambda n : setattr(self, 'duration_in_days', n.get_int_value()), + "endUserNotificationSetting": lambda n : setattr(self, 'end_user_notification_setting', n.get_object_value(EndUserNotificationSetting)), + "excludedAccountTarget": lambda n : setattr(self, 'excluded_account_target', n.get_object_value(AccountTargetContent)), + "includedAccountTarget": lambda n : setattr(self, 'included_account_target', n.get_object_value(AccountTargetContent)), "isAutomated": lambda n : setattr(self, 'is_automated', n.get_bool_value()), + "landingPage": lambda n : setattr(self, 'landing_page', n.get_object_value(LandingPage)), "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), "launchDateTime": lambda n : setattr(self, 'launch_date_time', n.get_datetime_value()), + "loginPage": lambda n : setattr(self, 'login_page', n.get_object_value(LoginPage)), + "oAuthConsentAppDetail": lambda n : setattr(self, 'o_auth_consent_app_detail', n.get_object_value(OAuthConsentAppDetail)), + "payload": lambda n : setattr(self, 'payload', n.get_object_value(Payload)), "payloadDeliveryPlatform": lambda n : setattr(self, 'payload_delivery_platform', n.get_enum_value(PayloadDeliveryPlatform)), "report": lambda n : setattr(self, 'report', n.get_object_value(SimulationReport)), "status": lambda n : setattr(self, 'status', n.get_enum_value(SimulationStatus)), + "trainingSetting": lambda n : setattr(self, 'training_setting', n.get_object_value(TrainingSetting)), } super_fields = super().get_field_deserializers() fields.update(super_fields) @@ -120,12 +168,21 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("createdDateTime", self.created_date_time) writer.write_str_value("description", self.description) writer.write_str_value("displayName", self.display_name) + writer.write_int_value("durationInDays", self.duration_in_days) + writer.write_object_value("endUserNotificationSetting", self.end_user_notification_setting) + writer.write_object_value("excludedAccountTarget", self.excluded_account_target) + writer.write_object_value("includedAccountTarget", self.included_account_target) writer.write_bool_value("isAutomated", self.is_automated) + writer.write_object_value("landingPage", self.landing_page) writer.write_object_value("lastModifiedBy", self.last_modified_by) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) writer.write_datetime_value("launchDateTime", self.launch_date_time) + writer.write_object_value("loginPage", self.login_page) + writer.write_object_value("oAuthConsentAppDetail", self.o_auth_consent_app_detail) + writer.write_object_value("payload", self.payload) writer.write_enum_value("payloadDeliveryPlatform", self.payload_delivery_platform) writer.write_object_value("report", self.report) writer.write_enum_value("status", self.status) + writer.write_object_value("trainingSetting", self.training_setting) diff --git a/msgraph/generated/models/simulation_content_source.py b/msgraph/generated/models/simulation_content_source.py new file mode 100644 index 00000000000..6b914a57ca5 --- /dev/null +++ b/msgraph/generated/models/simulation_content_source.py @@ -0,0 +1,8 @@ +from enum import Enum + +class SimulationContentSource(str, Enum): + Unknown = "unknown", + Global_ = "global", + Tenant = "tenant", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/simulation_content_status.py b/msgraph/generated/models/simulation_content_status.py new file mode 100644 index 00000000000..09e1c2e0134 --- /dev/null +++ b/msgraph/generated/models/simulation_content_status.py @@ -0,0 +1,10 @@ +from enum import Enum + +class SimulationContentStatus(str, Enum): + Unknown = "unknown", + Draft = "draft", + Ready = "ready", + Archive = "archive", + Delete = "delete", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/simulation_event.py b/msgraph/generated/models/simulation_event.py index 66c06dc6dd9..e94ed622271 100644 --- a/msgraph/generated/models/simulation_event.py +++ b/msgraph/generated/models/simulation_event.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "count": lambda n : setattr(self, 'count', n.get_int_value()), "eventName": lambda n : setattr(self, 'event_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("count", self.count) writer.write_str_value("eventName", self.event_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/simulation_events_content.py b/msgraph/generated/models/simulation_events_content.py index 287b139ca7e..9d58f1ff4b3 100644 --- a/msgraph/generated/models/simulation_events_content.py +++ b/msgraph/generated/models/simulation_events_content.py @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "compromisedRate": lambda n : setattr(self, 'compromised_rate', n.get_float_value()), "events": lambda n : setattr(self, 'events', n.get_collection_of_object_values(SimulationEvent)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_float_value("compromisedRate", self.compromised_rate) writer.write_collection_of_object_values("events", self.events) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/simulation_notification.py b/msgraph/generated/models/simulation_notification.py new file mode 100644 index 00000000000..d84fc578085 --- /dev/null +++ b/msgraph/generated/models/simulation_notification.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_end_user_notification import BaseEndUserNotification + from .targetted_user_type import TargettedUserType + +from .base_end_user_notification import BaseEndUserNotification + +@dataclass +class SimulationNotification(BaseEndUserNotification): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.simulationNotification" + # The targettedUserType property + targetted_user_type: Optional[TargettedUserType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SimulationNotification: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SimulationNotification + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SimulationNotification() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_end_user_notification import BaseEndUserNotification + from .targetted_user_type import TargettedUserType + + from .base_end_user_notification import BaseEndUserNotification + from .targetted_user_type import TargettedUserType + + fields: Dict[str, Callable[[Any], None]] = { + "targettedUserType": lambda n : setattr(self, 'targetted_user_type', n.get_enum_value(TargettedUserType)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("targettedUserType", self.targetted_user_type) + + diff --git a/msgraph/generated/models/simulation_report.py b/msgraph/generated/models/simulation_report.py index eaccc5bb320..203764ed0be 100644 --- a/msgraph/generated/models/simulation_report.py +++ b/msgraph/generated/models/simulation_report.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .user_simulation_details import UserSimulationDetails fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "overview": lambda n : setattr(self, 'overview', n.get_object_value(SimulationReportOverview)), "simulationUsers": lambda n : setattr(self, 'simulation_users', n.get_collection_of_object_values(UserSimulationDetails)), } @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("overview", self.overview) writer.write_collection_of_object_values("simulationUsers", self.simulation_users) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/simulation_report_overview.py b/msgraph/generated/models/simulation_report_overview.py index 3026daf2572..4b6bad024a8 100644 --- a/msgraph/generated/models/simulation_report_overview.py +++ b/msgraph/generated/models/simulation_report_overview.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .training_events_content import TrainingEventsContent fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recommendedActions": lambda n : setattr(self, 'recommended_actions', n.get_collection_of_object_values(RecommendedAction)), "resolvedTargetsCount": lambda n : setattr(self, 'resolved_targets_count', n.get_int_value()), "simulationEventsContent": lambda n : setattr(self, 'simulation_events_content', n.get_object_value(SimulationEventsContent)), @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("recommendedActions", self.recommended_actions) writer.write_int_value("resolvedTargetsCount", self.resolved_targets_count) writer.write_object_value("simulationEventsContent", self.simulation_events_content) diff --git a/msgraph/generated/models/single_user.py b/msgraph/generated/models/single_user.py index 97fa1ce40ab..0d14646ca69 100644 --- a/msgraph/generated/models/single_user.py +++ b/msgraph/generated/models/single_user.py @@ -12,9 +12,9 @@ class SingleUser(SubjectSet): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.singleUser" - # The name of the user in Azure AD. Read only. + # The name of the user in Microsoft Entra ID. Read only. description: Optional[str] = None - # The ID of the user in Azure AD. + # The ID of the user in Microsoft Entra ID. user_id: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/site_collection.py b/msgraph/generated/models/site_collection.py index 8da67893a27..1a9715c611d 100644 --- a/msgraph/generated/models/site_collection.py +++ b/msgraph/generated/models/site_collection.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "dataLocationCode": lambda n : setattr(self, 'data_location_code', n.get_str_value()), "hostname": lambda n : setattr(self, 'hostname', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "root": lambda n : setattr(self, 'root', n.get_object_value(Root)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("dataLocationCode", self.data_location_code) writer.write_str_value("hostname", self.hostname) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("root", self.root) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/size_range.py b/msgraph/generated/models/size_range.py index b701cb67985..3beed7cc8bf 100644 --- a/msgraph/generated/models/size_range.py +++ b/msgraph/generated/models/size_range.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "maximumSize": lambda n : setattr(self, 'maximum_size', n.get_int_value()), "minimumSize": lambda n : setattr(self, 'minimum_size', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("maximumSize", self.maximum_size) writer.write_int_value("minimumSize", self.minimum_size) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/skype_for_business_user_conversation_member.py b/msgraph/generated/models/skype_for_business_user_conversation_member.py index 141d72c6280..f5664d90934 100644 --- a/msgraph/generated/models/skype_for_business_user_conversation_member.py +++ b/msgraph/generated/models/skype_for_business_user_conversation_member.py @@ -14,7 +14,7 @@ class SkypeForBusinessUserConversationMember(ConversationMember): odata_type: Optional[str] = "#microsoft.graph.skypeForBusinessUserConversationMember" # ID of the tenant that the user belongs to. tenant_id: Optional[str] = None - # Azure Active Directory ID of the user. + # Microsoft Entra ID of the user. user_id: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/sms_authentication_method_target.py b/msgraph/generated/models/sms_authentication_method_target.py index 4771df0db46..0420b77cdb8 100644 --- a/msgraph/generated/models/sms_authentication_method_target.py +++ b/msgraph/generated/models/sms_authentication_method_target.py @@ -10,7 +10,7 @@ @dataclass class SmsAuthenticationMethodTarget(AuthenticationMethodTarget): - # Determines if users can use this authentication method to sign in to Azure AD. true if users can use this method for primary authentication, otherwise false. + # Determines if users can use this authentication method to sign in to Microsoft Entra ID. true if users can use this method for primary authentication, otherwise false. is_usable_for_sign_in: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/solutions_root.py b/msgraph/generated/models/solutions_root.py index 4a5828135cd..77e8a12e210 100644 --- a/msgraph/generated/models/solutions_root.py +++ b/msgraph/generated/models/solutions_root.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "bookingBusinesses": lambda n : setattr(self, 'booking_businesses', n.get_collection_of_object_values(BookingBusiness)), "bookingCurrencies": lambda n : setattr(self, 'booking_currencies', n.get_collection_of_object_values(BookingCurrency)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("bookingBusinesses", self.booking_businesses) writer.write_collection_of_object_values("bookingCurrencies", self.booking_currencies) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/sort_property.py b/msgraph/generated/models/sort_property.py index 6ad8a65f4e8..5015c28597e 100644 --- a/msgraph/generated/models/sort_property.py +++ b/msgraph/generated/models/sort_property.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isDescending": lambda n : setattr(self, 'is_descending', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isDescending", self.is_descending) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/spa_application.py b/msgraph/generated/models/spa_application.py index 2fb2faf1c02..e0ff4eb7ee6 100644 --- a/msgraph/generated/models/spa_application.py +++ b/msgraph/generated/models/spa_application.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "redirectUris": lambda n : setattr(self, 'redirect_uris', n.get_collection_of_primitive_values(str)), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("redirectUris", self.redirect_uris) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/special_folder.py b/msgraph/generated/models/special_folder.py index e21a3cec486..67befff97de 100644 --- a/msgraph/generated/models/special_folder.py +++ b/msgraph/generated/models/special_folder.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/staff_availability_item.py b/msgraph/generated/models/staff_availability_item.py index deb48d93bde..a776125e5bd 100644 --- a/msgraph/generated/models/staff_availability_item.py +++ b/msgraph/generated/models/staff_availability_item.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "availabilityItems": lambda n : setattr(self, 'availability_items', n.get_collection_of_object_values(AvailabilityItem)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "staffId": lambda n : setattr(self, 'staff_id', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("availabilityItems", self.availability_items) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("staffId", self.staff_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/standard_time_zone_offset.py b/msgraph/generated/models/standard_time_zone_offset.py index 87522927cb5..3f3deffa240 100644 --- a/msgraph/generated/models/standard_time_zone_offset.py +++ b/msgraph/generated/models/standard_time_zone_offset.py @@ -63,7 +63,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dayOccurrence": lambda n : setattr(self, 'day_occurrence', n.get_int_value()), "dayOfWeek": lambda n : setattr(self, 'day_of_week', n.get_enum_value(DayOfWeek)), "month": lambda n : setattr(self, 'month', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "time": lambda n : setattr(self, 'time', n.get_time_value()), "year": lambda n : setattr(self, 'year', n.get_int_value()), } @@ -80,7 +80,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("dayOccurrence", self.day_occurrence) writer.write_enum_value("dayOfWeek", self.day_of_week) writer.write_int_value("month", self.month) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_time_value("time", self.time) writer.write_int_value("year", self.year) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/storage_plan_information.py b/msgraph/generated/models/storage_plan_information.py index f19b32e24e8..db8a3b8dfac 100644 --- a/msgraph/generated/models/storage_plan_information.py +++ b/msgraph/generated/models/storage_plan_information.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "upgradeAvailable": lambda n : setattr(self, 'upgrade_available', n.get_bool_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("upgradeAvailable", self.upgrade_available) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/string_key_attribute_mapping_source_value_pair.py b/msgraph/generated/models/string_key_attribute_mapping_source_value_pair.py index 666173f38e3..85e25379724 100644 --- a/msgraph/generated/models/string_key_attribute_mapping_source_value_pair.py +++ b/msgraph/generated/models/string_key_attribute_mapping_source_value_pair.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_object_value(AttributeMappingSource)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/string_key_long_value_pair.py b/msgraph/generated/models/string_key_long_value_pair.py index e07f1e2f435..2e0fd422875 100644 --- a/msgraph/generated/models/string_key_long_value_pair.py +++ b/msgraph/generated/models/string_key_long_value_pair.py @@ -11,7 +11,7 @@ class StringKeyLongValuePair(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 mapping of the user type from the source system to the target system. For example:User to User - For Azure AD to Azure AD synchronization worker to user - For Workday to Azure AD synchronization. + # The mapping of the user type from the source system to the target system. For example:User to User - For Microsoft Entra ID to Microsoft Entra ID synchronization worker to user - For Workday to Microsoft Entra synchronization. key: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_int_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/string_key_object_value_pair.py b/msgraph/generated/models/string_key_object_value_pair.py index a3d628d7f35..531a4373e73 100644 --- a/msgraph/generated/models/string_key_object_value_pair.py +++ b/msgraph/generated/models/string_key_object_value_pair.py @@ -34,7 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -47,7 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/string_key_string_value_pair.py b/msgraph/generated/models/string_key_string_value_pair.py index 063d06ee010..1f00e726e00 100644 --- a/msgraph/generated/models/string_key_string_value_pair.py +++ b/msgraph/generated/models/string_key_string_value_pair.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/subject_rights_request.py b/msgraph/generated/models/subject_rights_request.py index 097675ea24a..edb8ed3d180 100644 --- a/msgraph/generated/models/subject_rights_request.py +++ b/msgraph/generated/models/subject_rights_request.py @@ -25,19 +25,19 @@ @dataclass class SubjectRightsRequest(Entity): - # The approvers property + # Collection of users who can approve the request. Currently only supported for requests of type delete. approvers: Optional[List[User]] = None # Identity that the request is assigned to. assigned_to: Optional[Identity] = None - # The date and time when the request was closed. 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. + # The date and time when the request was closed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. closed_date_time: Optional[datetime.datetime] = None - # The collaborators property + # Collection of users who can collaborate on the request. collaborators: Optional[List[User]] = None - # The contentQuery property + # KQL based content query that should be used for search. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. content_query: Optional[str] = None # Identity information for the entity that created the request. created_by: Optional[IdentitySet] = None - # The date and time when the request was created. 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. + # The date and time when the request was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. created_date_time: Optional[datetime.datetime] = None # Information about the data subject. data_subject: Optional[DataSubject] = None @@ -47,41 +47,41 @@ class SubjectRightsRequest(Entity): description: Optional[str] = None # The name of the request. display_name: Optional[str] = None - # The externalId property + # The external ID for the request that is immutable after creation and is used for tracking the request for the external system. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. external_id: Optional[str] = None # Collection of history change events. history: Optional[List[SubjectRightsRequestHistory]] = None - # The includeAllVersions property + # Include all versions of the documents. By default, the current copies of the documents are returned. If SharePoint sites have versioning enabled, including all versions includes the historical copies of the documents. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. include_all_versions: Optional[bool] = None - # The includeAuthoredContent property + # Include content authored by the data subject. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. include_authored_content: Optional[bool] = None # Insight about the request. insight: Optional[SubjectRightsRequestDetail] = None - # The date and time when the request is internally due. 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. + # The date and time when the request is internally due. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. internal_due_date_time: Optional[datetime.datetime] = None # Identity information for the entity that last modified the request. last_modified_by: Optional[IdentitySet] = None - # The date and time when the request was last modified. 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. + # The date and time when the request was last modified. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. last_modified_date_time: Optional[datetime.datetime] = None - # The mailboxlocations property - mailboxlocations: Optional[SubjectRightsRequestMailboxLocation] = None + # The mailbox locations that should be searched. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. + mailbox_locations: Optional[SubjectRightsRequestMailboxLocation] = None # List of notes associated with the request. notes: Optional[List[AuthoredNote]] = None # The OdataType property odata_type: Optional[str] = None - # The pauseAfterEstimate property + # Pause the request after estimate has finished. By default, the data estimate runs and then pauses, allowing you to preview results and then select the option to retrieve data in the UI. You can set this property to false if you want it to perform the estimate and then automatically begin with the retrieval of the content. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. pause_after_estimate: Optional[bool] = None - # List of regulations that this request fulfills. + # List of regulations that this request fulfill. regulations: Optional[List[str]] = None - # The sitelocations property - sitelocations: Optional[SubjectRightsRequestSiteLocation] = None + # The SharePoint and OneDrive site locations that should be searched. This property is defined only for APIs accessed using the /security query path and not the /privacy query path. + site_locations: Optional[SubjectRightsRequestSiteLocation] = None # Information about the different stages for the request. stages: Optional[List[SubjectRightsRequestStageDetail]] = None # The status of the request. Possible values are: active, closed, unknownFutureValue. status: Optional[SubjectRightsRequestStatus] = None # Information about the Microsoft Teams team that was created for the request. team: Optional[Team] = None - # The type of the request. Possible values are: export, delete, access, tagForAction, unknownFutureValue. + # The type of the request. Possible values are: export, delete, access, tagForAction, unknownFutureValue. type: Optional[SubjectRightsRequestType] = None @staticmethod @@ -152,11 +152,11 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "internalDueDateTime": lambda n : setattr(self, 'internal_due_date_time', n.get_datetime_value()), "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(IdentitySet)), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), - "mailboxlocations": lambda n : setattr(self, 'mailboxlocations', n.get_object_value(SubjectRightsRequestMailboxLocation)), + "mailboxLocations": lambda n : setattr(self, 'mailbox_locations', n.get_object_value(SubjectRightsRequestMailboxLocation)), "notes": lambda n : setattr(self, 'notes', n.get_collection_of_object_values(AuthoredNote)), "pauseAfterEstimate": lambda n : setattr(self, 'pause_after_estimate', n.get_bool_value()), "regulations": lambda n : setattr(self, 'regulations', n.get_collection_of_primitive_values(str)), - "sitelocations": lambda n : setattr(self, 'sitelocations', n.get_object_value(SubjectRightsRequestSiteLocation)), + "siteLocations": lambda n : setattr(self, 'site_locations', n.get_object_value(SubjectRightsRequestSiteLocation)), "stages": lambda n : setattr(self, 'stages', n.get_collection_of_object_values(SubjectRightsRequestStageDetail)), "status": lambda n : setattr(self, 'status', n.get_enum_value(SubjectRightsRequestStatus)), "team": lambda n : setattr(self, 'team', n.get_object_value(Team)), @@ -194,11 +194,11 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("internalDueDateTime", self.internal_due_date_time) writer.write_object_value("lastModifiedBy", self.last_modified_by) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) - writer.write_object_value("mailboxlocations", self.mailboxlocations) + writer.write_object_value("mailboxLocations", self.mailbox_locations) writer.write_collection_of_object_values("notes", self.notes) writer.write_bool_value("pauseAfterEstimate", self.pause_after_estimate) writer.write_collection_of_primitive_values("regulations", self.regulations) - writer.write_object_value("sitelocations", self.sitelocations) + writer.write_object_value("siteLocations", self.site_locations) writer.write_collection_of_object_values("stages", self.stages) writer.write_enum_value("status", self.status) writer.write_object_value("team", self.team) diff --git a/msgraph/generated/models/subject_rights_request_detail.py b/msgraph/generated/models/subject_rights_request_detail.py index 1f02ac5cfee..f6fd0b00f53 100644 --- a/msgraph/generated/models/subject_rights_request_detail.py +++ b/msgraph/generated/models/subject_rights_request_detail.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "insightCounts": lambda n : setattr(self, 'insight_counts', n.get_collection_of_object_values(KeyValuePair)), "itemCount": lambda n : setattr(self, 'item_count', n.get_int_value()), "itemNeedReview": lambda n : setattr(self, 'item_need_review', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "productItemCounts": lambda n : setattr(self, 'product_item_counts', n.get_collection_of_object_values(KeyValuePair)), "signedOffItemCount": lambda n : setattr(self, 'signed_off_item_count', n.get_int_value()), "totalItemSize": lambda n : setattr(self, 'total_item_size', n.get_int_value()), @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("insightCounts", self.insight_counts) writer.write_int_value("itemCount", self.item_count) writer.write_int_value("itemNeedReview", self.item_need_review) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("productItemCounts", self.product_item_counts) writer.write_int_value("signedOffItemCount", self.signed_off_item_count) writer.write_int_value("totalItemSize", self.total_item_size) diff --git a/msgraph/generated/models/subject_rights_request_enumerated_mailbox_location.py b/msgraph/generated/models/subject_rights_request_enumerated_mailbox_location.py index dc5e22bc480..bf975816148 100644 --- a/msgraph/generated/models/subject_rights_request_enumerated_mailbox_location.py +++ b/msgraph/generated/models/subject_rights_request_enumerated_mailbox_location.py @@ -12,7 +12,7 @@ class SubjectRightsRequestEnumeratedMailboxLocation(SubjectRightsRequestMailboxLocation): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.subjectRightsRequestEnumeratedMailboxLocation" - # The userPrincipalNames property + # Collection of mailboxes that should be included in the search. Includes the user principal name (UPN) of each mailbox, for example, Monica.Thompson@contoso.com. user_principal_names: Optional[List[str]] = None @staticmethod diff --git a/msgraph/generated/models/subject_rights_request_enumerated_site_location.py b/msgraph/generated/models/subject_rights_request_enumerated_site_location.py index 2272d9f0c8e..910f6ac2fd8 100644 --- a/msgraph/generated/models/subject_rights_request_enumerated_site_location.py +++ b/msgraph/generated/models/subject_rights_request_enumerated_site_location.py @@ -12,7 +12,7 @@ class SubjectRightsRequestEnumeratedSiteLocation(SubjectRightsRequestSiteLocation): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.subjectRightsRequestEnumeratedSiteLocation" - # The urls property + # Collection of site URLs that should be included. Includes the URL of each site, for example, https://www.contoso.com/site1. urls: Optional[List[str]] = None @staticmethod diff --git a/msgraph/generated/models/subject_rights_request_history.py b/msgraph/generated/models/subject_rights_request_history.py index df99e5238a0..05fd88deb92 100644 --- a/msgraph/generated/models/subject_rights_request_history.py +++ b/msgraph/generated/models/subject_rights_request_history.py @@ -23,7 +23,7 @@ class SubjectRightsRequestHistory(AdditionalDataHolder, BackedModel, Parsable): event_date_time: Optional[datetime.datetime] = None # The OdataType property odata_type: Optional[str] = None - # The stage when the entity was changed. Possible values are: contentRetrieval, contentReview, generateReport, contentDeletion, caseResolved, unknownFutureValue. + # The stage when the entity was changed. Possible values are: contentRetrieval, contentReview, generateReport, contentDeletion, caseResolved, unknownFutureValue, approval. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: approval. stage: Optional[SubjectRightsRequestStage] = None # The status of the stage when the entity was changed. Possible values are: notStarted, current, completed, failed, unknownFutureValue. stage_status: Optional[SubjectRightsRequestStageStatus] = None @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "changedBy": lambda n : setattr(self, 'changed_by', n.get_object_value(IdentitySet)), "eventDateTime": lambda n : setattr(self, 'event_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "stage": lambda n : setattr(self, 'stage', n.get_enum_value(SubjectRightsRequestStage)), "stageStatus": lambda n : setattr(self, 'stage_status', n.get_enum_value(SubjectRightsRequestStageStatus)), "type": lambda n : setattr(self, 'type', n.get_str_value()), @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("changedBy", self.changed_by) writer.write_datetime_value("eventDateTime", self.event_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("stage", self.stage) writer.write_enum_value("stageStatus", self.stage_status) writer.write_str_value("type", self.type) diff --git a/msgraph/generated/models/subject_rights_request_mailbox_location.py b/msgraph/generated/models/subject_rights_request_mailbox_location.py index 00cdf85b953..6cb036ebcfe 100644 --- a/msgraph/generated/models/subject_rights_request_mailbox_location.py +++ b/msgraph/generated/models/subject_rights_request_mailbox_location.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .subject_rights_request_enumerated_mailbox_location import SubjectRightsRequestEnumeratedMailboxLocation fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/subject_rights_request_site_location.py b/msgraph/generated/models/subject_rights_request_site_location.py index 64c2a64dddb..fb2b8e34fdd 100644 --- a/msgraph/generated/models/subject_rights_request_site_location.py +++ b/msgraph/generated/models/subject_rights_request_site_location.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .subject_rights_request_enumerated_site_location import SubjectRightsRequestEnumeratedSiteLocation fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/subject_rights_request_stage_detail.py b/msgraph/generated/models/subject_rights_request_stage_detail.py index 9dcfb6d1ba0..b75110b50a7 100644 --- a/msgraph/generated/models/subject_rights_request_stage_detail.py +++ b/msgraph/generated/models/subject_rights_request_stage_detail.py @@ -20,7 +20,7 @@ class SubjectRightsRequestStageDetail(AdditionalDataHolder, BackedModel, Parsabl error: Optional[PublicError] = None # The OdataType property odata_type: Optional[str] = None - # The stage of the subject rights request. Possible values are: contentRetrieval, contentReview, generateReport, contentDeletion, caseResolved, unknownFutureValue. + # The stage of the subject rights request. Possible values are: contentRetrieval, contentReview, generateReport, contentDeletion, caseResolved, unknownFutureValue, approval. You must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: approval. stage: Optional[SubjectRightsRequestStage] = None # Status of the current stage. Possible values are: notStarted, current, completed, failed, unknownFutureValue. status: Optional[SubjectRightsRequestStageStatus] = None @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "error": lambda n : setattr(self, 'error', n.get_object_value(PublicError)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "stage": lambda n : setattr(self, 'stage', n.get_enum_value(SubjectRightsRequestStage)), "status": lambda n : setattr(self, 'status', n.get_enum_value(SubjectRightsRequestStageStatus)), } @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("error", self.error) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("stage", self.stage) writer.write_enum_value("status", self.status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/subject_set.py b/msgraph/generated/models/subject_set.py index 908086fcd92..dcd00c2ecfe 100644 --- a/msgraph/generated/models/subject_set.py +++ b/msgraph/generated/models/subject_set.py @@ -116,7 +116,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .target_manager import TargetManager fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -128,7 +128,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/subscribed_sku.py b/msgraph/generated/models/subscribed_sku.py index ec79dd6305c..b32651078d3 100644 --- a/msgraph/generated/models/subscribed_sku.py +++ b/msgraph/generated/models/subscribed_sku.py @@ -19,7 +19,7 @@ class SubscribedSku(Entity): account_name: Optional[str] = None # The target class for this SKU. Only SKUs with target class User are assignable. Possible values are: 'User', 'Company'. applies_to: Optional[str] = None - # Enabled indicates that the prepaidUnits property has at least one unit that is enabled. LockedOut indicates that the customer cancelled their subscription. Possible values are: Enabled, Warning, Suspended, Deleted, LockedOut. + # Enabled indicates that the prepaidUnits property has at least one unit that is enabled. LockedOut indicates that the customer canceled their subscription. Possible values are: Enabled, Warning, Suspended, Deleted, LockedOut. capability_status: Optional[str] = None # The number of licenses that have been assigned. consumed_units: Optional[int] = None diff --git a/msgraph/generated/models/subscription.py b/msgraph/generated/models/subscription.py index 2498a80a7f7..899858016ae 100644 --- a/msgraph/generated/models/subscription.py +++ b/msgraph/generated/models/subscription.py @@ -15,7 +15,7 @@ class Subscription(Entity): application_id: Optional[str] = None # Required. Indicates the type of change in the subscribed resource that will raise a change notification. The supported values are: created, updated, deleted. Multiple values can be combined using a comma-separated list. Note: Drive root item and list change notifications support only the updated changeType. User and group change notifications support updated and deleted changeType. Use updated to receive notifications when user or group is created, updated or soft deleted. Use deleted to receive notifications when user or group is permanently deleted. change_type: Optional[str] = None - # Required. Specifies the value of the clientState property sent by the service in each change notification. The maximum length is 128 characters. The client can check that the change notification came from the service by comparing the value of the clientState property sent with the subscription with the value of the clientState property received with each change notification. + # Optional. Specifies the value of the clientState property sent by the service in each change notification. The maximum length is 128 characters. The client can check that the change notification came from the service by comparing the value of the clientState property sent with the subscription with the value of the clientState property received with each change notification. client_state: Optional[str] = None # Optional. Identifier of the user or service principal that created the subscription. If the app used delegated permissions to create the subscription, this field contains the id of the signed-in user the app called on behalf of. If the app used application permissions, this field contains the id of the service principal corresponding to the app. Read-only. creator_id: Optional[str] = None diff --git a/msgraph/generated/models/synchronization.py b/msgraph/generated/models/synchronization.py index 61eac510906..4f99653a8ca 100644 --- a/msgraph/generated/models/synchronization.py +++ b/msgraph/generated/models/synchronization.py @@ -19,7 +19,7 @@ class Synchronization(Entity): odata_type: Optional[str] = None # Represents a collection of credentials to access provisioned cloud applications. secrets: Optional[List[SynchronizationSecretKeyStringValuePair]] = None - # Pre-configured synchronization settings for a particular application. + # Preconfigured synchronization settings for a particular application. templates: Optional[List[SynchronizationTemplate]] = None @staticmethod diff --git a/msgraph/generated/models/synchronization_error.py b/msgraph/generated/models/synchronization_error.py index 61625e4743a..c5a074c35ea 100644 --- a/msgraph/generated/models/synchronization_error.py +++ b/msgraph/generated/models/synchronization_error.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantActionable": lambda n : setattr(self, 'tenant_actionable', n.get_bool_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("code", self.code) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("tenantActionable", self.tenant_actionable) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_job_application_parameters.py b/msgraph/generated/models/synchronization_job_application_parameters.py index 2dd86a35584..ad34e05202e 100644 --- a/msgraph/generated/models/synchronization_job_application_parameters.py +++ b/msgraph/generated/models/synchronization_job_application_parameters.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .synchronization_job_subject import SynchronizationJobSubject fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "ruleId": lambda n : setattr(self, 'rule_id', n.get_str_value()), "subjects": lambda n : setattr(self, 'subjects', n.get_collection_of_object_values(SynchronizationJobSubject)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("ruleId", self.rule_id) writer.write_collection_of_object_values("subjects", self.subjects) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_job_restart_criteria.py b/msgraph/generated/models/synchronization_job_restart_criteria.py index 5e162777dae..35137fc4f3a 100644 --- a/msgraph/generated/models/synchronization_job_restart_criteria.py +++ b/msgraph/generated/models/synchronization_job_restart_criteria.py @@ -16,7 +16,7 @@ class SynchronizationJobRestartCriteria(AdditionalDataHolder, BackedModel, Parsa additional_data: Dict[str, Any] = field(default_factory=dict) # The OdataType property odata_type: Optional[str] = None - # Comma-separated combination of the following values: None, ConnectorDataStore, Escrows, Watermark, QuarantineState, Full, ForceDeletes. The property can also be empty. None: Starts a paused or quarantined provisioning job. DO NOT USE. Use the Start synchronizationJob API instead.ConnectorDataStore - Clears the underlying cache for all users. DO NOT USE. Contact Microsoft Support for guidance.Escrows - Provisioning failures are marked as escrows and retried. Clearing escrows will stop the service from retrying failures.Watermark - Removing the watermark causes the service to re-evaluate all the users again, rather than just processing changes.QuarantineState - Temporarily lifts the quarantine.Use Full if you want all of the options.ForceDeletes - Forces the system to delete the pending deleted users when using the accidental deletions prevention feature and the deletion threshold is exceeded. Leaving this property empty emulates the Restart provisioning option in the Azure portal. It is similar to setting the resetScope to include QuarantineState, Watermark, and Escrows. This option meets most customer needs. + # Comma-separated combination of the following values: None, ConnectorDataStore, Escrows, Watermark, QuarantineState, Full, ForceDeletes. The property can also be empty. None: Starts a paused or quarantined provisioning job. DO NOT USE. Use the Start synchronizationJob API instead.ConnectorDataStore - Clears the underlying cache for all users. DO NOT USE. Contact Microsoft Support for guidance.Escrows - Provisioning failures are marked as escrows and retried. Clearing escrows will stop the service from retrying failures.Watermark - Removing the watermark causes the service to reevaluate all the users again, rather than just processing changes.QuarantineState - Temporarily lifts the quarantine.Use Full if you want all of the options.ForceDeletes - Forces the system to delete the pending deleted users when using the accidental deletions prevention feature and the deletion threshold is exceeded. Leaving this property empty emulates the Restart provisioning option in the Microsoft Entra admin center. It is similar to setting the resetScope to include QuarantineState, Watermark, and Escrows. This option meets most customer needs. reset_scope: Optional[SynchronizationJobRestartScope] = None @staticmethod @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .synchronization_job_restart_scope import SynchronizationJobRestartScope fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resetScope": lambda n : setattr(self, 'reset_scope', n.get_collection_of_enum_values(SynchronizationJobRestartScope)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("resetScope", self.reset_scope) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_job_subject.py b/msgraph/generated/models/synchronization_job_subject.py index d4b9de84a6c..7b5f56e7a7e 100644 --- a/msgraph/generated/models/synchronization_job_subject.py +++ b/msgraph/generated/models/synchronization_job_subject.py @@ -16,9 +16,9 @@ class SynchronizationJobSubject(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # Principals that you would like to provision. links: Optional[SynchronizationLinkedObjects] = None - # The identifier of an object to which a synchronizationJob is to be applied. Can be one of the following: An onPremisesDistinguishedName for synchronization from Active Directory to Azure AD.The user ID for synchronization from Azure AD to a third-party.The Worker ID of the Workday worker for synchronization from Workday to either Active Directory or Azure AD. + # The identifier of an object to which a synchronizationJob is to be applied. Can be one of the following: An onPremisesDistinguishedName for synchronization from Active Directory to Azure AD.The user ID for synchronization from Microsoft Entra ID to a third-party.The Worker ID of the Workday worker for synchronization from Workday to either Active Directory or Microsoft Entra ID. object_id: Optional[str] = None - # The type of the object to which a synchronizationJob is to be applied. Can be one of the following: user for synchronizing between Active Directory and Azure AD.User for synchronizing a user between Azure AD and a third-party application. Worker for synchronization a user between Workday and either Active Directory or Azure AD.Group for synchronizing a group between Azure AD and a third-party application. + # The type of the object to which a synchronizationJob is to be applied. Can be one of the following: user for synchronizing between Active Directory and Azure AD.User for synchronizing a user between Microsoft Entra ID and a third-party application. Worker for synchronization a user between Workday and either Active Directory or Microsoft Entra ID.Group for synchronizing a group between Microsoft Entra ID and a third-party application. object_type_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "links": lambda n : setattr(self, 'links', n.get_object_value(SynchronizationLinkedObjects)), "objectId": lambda n : setattr(self, 'object_id', n.get_str_value()), "objectTypeName": lambda n : setattr(self, 'object_type_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("links", self.links) writer.write_str_value("objectId", self.object_id) writer.write_str_value("objectTypeName", self.object_type_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_linked_objects.py b/msgraph/generated/models/synchronization_linked_objects.py index f36a18bdd50..fac8b756a93 100644 --- a/msgraph/generated/models/synchronization_linked_objects.py +++ b/msgraph/generated/models/synchronization_linked_objects.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "manager": lambda n : setattr(self, 'manager', n.get_object_value(SynchronizationJobSubject)), "members": lambda n : setattr(self, 'members', n.get_collection_of_object_values(SynchronizationJobSubject)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "owners": lambda n : setattr(self, 'owners', n.get_collection_of_object_values(SynchronizationJobSubject)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_object_value("manager", self.manager) writer.write_collection_of_object_values("members", self.members) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("owners", self.owners) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_metadata_entry.py b/msgraph/generated/models/synchronization_metadata_entry.py index a785583f8ed..75856358ce3 100644 --- a/msgraph/generated/models/synchronization_metadata_entry.py +++ b/msgraph/generated/models/synchronization_metadata_entry.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_enum_value(SynchronizationMetadata)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_progress.py b/msgraph/generated/models/synchronization_progress.py index 31bc9df1470..1dddd560948 100644 --- a/msgraph/generated/models/synchronization_progress.py +++ b/msgraph/generated/models/synchronization_progress.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "completedUnits": lambda n : setattr(self, 'completed_units', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "progressObservationDateTime": lambda n : setattr(self, 'progress_observation_date_time', n.get_datetime_value()), "totalUnits": lambda n : setattr(self, 'total_units', n.get_int_value()), "units": lambda n : setattr(self, 'units', n.get_str_value()), @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("completedUnits", self.completed_units) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("progressObservationDateTime", self.progress_observation_date_time) writer.write_int_value("totalUnits", self.total_units) writer.write_str_value("units", self.units) diff --git a/msgraph/generated/models/synchronization_quarantine.py b/msgraph/generated/models/synchronization_quarantine.py index 5ee55fee7a0..6f0a8878658 100644 --- a/msgraph/generated/models/synchronization_quarantine.py +++ b/msgraph/generated/models/synchronization_quarantine.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "currentBegan": lambda n : setattr(self, 'current_began', n.get_datetime_value()), "error": lambda n : setattr(self, 'error', n.get_object_value(SynchronizationError)), "nextAttempt": lambda n : setattr(self, 'next_attempt', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reason": lambda n : setattr(self, 'reason', n.get_enum_value(QuarantineReason)), "seriesBegan": lambda n : setattr(self, 'series_began', n.get_datetime_value()), "seriesCount": lambda n : setattr(self, 'series_count', n.get_int_value()), @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("currentBegan", self.current_began) writer.write_object_value("error", self.error) writer.write_datetime_value("nextAttempt", self.next_attempt) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("reason", self.reason) writer.write_datetime_value("seriesBegan", self.series_began) writer.write_int_value("seriesCount", self.series_count) diff --git a/msgraph/generated/models/synchronization_rule.py b/msgraph/generated/models/synchronization_rule.py index 4c7defe7059..788638840da 100644 --- a/msgraph/generated/models/synchronization_rule.py +++ b/msgraph/generated/models/synchronization_rule.py @@ -19,13 +19,13 @@ class SynchronizationRule(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The containerFilter property container_filter: Optional[ContainerFilter] = None - # true if the synchronization rule can be customized; false if this rule is read-only and should not be changed. + # true if the synchronization rule can be customized; false if this rule is read-only and shouldn't be changed. editable: Optional[bool] = None # The groupFilter property group_filter: Optional[GroupFilter] = None # Synchronization rule identifier. Must be one of the identifiers recognized by the synchronization engine. Supported rule identifiers can be found in the synchronization template returned by the API. id: Optional[str] = None - # Additional extension properties. Unless instructed explicitly by the support team, metadata values should not be changed. + # Additional extension properties. Unless instructed explicitly by the support team, metadata values shouldn't be changed. metadata: Optional[List[StringKeyStringValuePair]] = None # Human-readable name of the synchronization rule. Not nullable. name: Optional[str] = None @@ -74,7 +74,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "metadata": lambda n : setattr(self, 'metadata', n.get_collection_of_object_values(StringKeyStringValuePair)), "name": lambda n : setattr(self, 'name', n.get_str_value()), "objectMappings": lambda n : setattr(self, 'object_mappings', n.get_collection_of_object_values(ObjectMapping)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "priority": lambda n : setattr(self, 'priority', n.get_int_value()), "sourceDirectoryName": lambda n : setattr(self, 'source_directory_name', n.get_str_value()), "targetDirectoryName": lambda n : setattr(self, 'target_directory_name', n.get_str_value()), @@ -96,7 +96,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("metadata", self.metadata) writer.write_str_value("name", self.name) writer.write_collection_of_object_values("objectMappings", self.object_mappings) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("priority", self.priority) writer.write_str_value("sourceDirectoryName", self.source_directory_name) writer.write_str_value("targetDirectoryName", self.target_directory_name) diff --git a/msgraph/generated/models/synchronization_schedule.py b/msgraph/generated/models/synchronization_schedule.py index e6a9b34f835..de38e95e83a 100644 --- a/msgraph/generated/models/synchronization_schedule.py +++ b/msgraph/generated/models/synchronization_schedule.py @@ -15,9 +15,9 @@ class SynchronizationSchedule(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) - # Date and time when this job will expire. 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. + # Date and time when this job expires. 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. expiration: Optional[datetime.datetime] = None - # The interval between synchronization iterations. The value is represented in ISO 8601 format for durations. For example, PT1M represents a period of 1 month. + # The interval between synchronization iterations. The value is represented in ISO 8601 format for durations. For example, PT1M represents a period of one month. interval: Optional[datetime.timedelta] = None # The OdataType property odata_type: Optional[str] = None @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "expiration": lambda n : setattr(self, 'expiration', n.get_datetime_value()), "interval": lambda n : setattr(self, 'interval', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(SynchronizationScheduleState)), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("expiration", self.expiration) writer.write_timedelta_value("interval", self.interval) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_secret_key_string_value_pair.py b/msgraph/generated/models/synchronization_secret_key_string_value_pair.py index f88916117c9..f4e0a5ffc15 100644 --- a/msgraph/generated/models/synchronization_secret_key_string_value_pair.py +++ b/msgraph/generated/models/synchronization_secret_key_string_value_pair.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "key": lambda n : setattr(self, 'key', n.get_enum_value(SynchronizationSecret)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/synchronization_status.py b/msgraph/generated/models/synchronization_status.py index be11845cc38..b32668d7fa0 100644 --- a/msgraph/generated/models/synchronization_status.py +++ b/msgraph/generated/models/synchronization_status.py @@ -81,7 +81,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastExecution": lambda n : setattr(self, 'last_execution', n.get_object_value(SynchronizationTaskExecution)), "lastSuccessfulExecution": lambda n : setattr(self, 'last_successful_execution', n.get_object_value(SynchronizationTaskExecution)), "lastSuccessfulExecutionWithExports": lambda n : setattr(self, 'last_successful_execution_with_exports', n.get_object_value(SynchronizationTaskExecution)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "progress": lambda n : setattr(self, 'progress', n.get_collection_of_object_values(SynchronizationProgress)), "quarantine": lambda n : setattr(self, 'quarantine', n.get_object_value(SynchronizationQuarantine)), "steadyStateFirstAchievedTime": lambda n : setattr(self, 'steady_state_first_achieved_time', n.get_datetime_value()), @@ -105,7 +105,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("lastExecution", self.last_execution) writer.write_object_value("lastSuccessfulExecution", self.last_successful_execution) writer.write_object_value("lastSuccessfulExecutionWithExports", self.last_successful_execution_with_exports) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("progress", self.progress) writer.write_object_value("quarantine", self.quarantine) writer.write_datetime_value("steadyStateFirstAchievedTime", self.steady_state_first_achieved_time) diff --git a/msgraph/generated/models/synchronization_task_execution.py b/msgraph/generated/models/synchronization_task_execution.py index 421d93e4079..4561d09c000 100644 --- a/msgraph/generated/models/synchronization_task_execution.py +++ b/msgraph/generated/models/synchronization_task_execution.py @@ -81,7 +81,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "countImportedDeltas": lambda n : setattr(self, 'count_imported_deltas', n.get_int_value()), "countImportedReferenceDeltas": lambda n : setattr(self, 'count_imported_reference_deltas', n.get_int_value()), "error": lambda n : setattr(self, 'error', n.get_object_value(SynchronizationError)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(SynchronizationTaskExecutionResult)), "timeBegan": lambda n : setattr(self, 'time_began', n.get_datetime_value()), "timeEnded": lambda n : setattr(self, 'time_ended', n.get_datetime_value()), @@ -107,7 +107,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("countImportedDeltas", self.count_imported_deltas) writer.write_int_value("countImportedReferenceDeltas", self.count_imported_reference_deltas) writer.write_object_value("error", self.error) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_datetime_value("timeBegan", self.time_began) writer.write_datetime_value("timeEnded", self.time_ended) diff --git a/msgraph/generated/models/system_facet.py b/msgraph/generated/models/system_facet.py index 370c4039eb2..5ea0db76c9c 100644 --- a/msgraph/generated/models/system_facet.py +++ b/msgraph/generated/models/system_facet.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/target_resource.py b/msgraph/generated/models/target_resource.py index e3f92b9c0b8..5f832b1afd5 100644 --- a/msgraph/generated/models/target_resource.py +++ b/msgraph/generated/models/target_resource.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "groupType": lambda n : setattr(self, 'group_type', n.get_enum_value(GroupType)), "id": lambda n : setattr(self, 'id', n.get_str_value()), "modifiedProperties": lambda n : setattr(self, 'modified_properties', n.get_collection_of_object_values(ModifiedProperty)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), "userPrincipalName": lambda n : setattr(self, 'user_principal_name', n.get_str_value()), } @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_enum_value("groupType", self.group_type) writer.write_str_value("id", self.id) writer.write_collection_of_object_values("modifiedProperties", self.modified_properties) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_str_value("userPrincipalName", self.user_principal_name) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/targetted_user_type.py b/msgraph/generated/models/targetted_user_type.py new file mode 100644 index 00000000000..07121e5713b --- /dev/null +++ b/msgraph/generated/models/targetted_user_type.py @@ -0,0 +1,9 @@ +from enum import Enum + +class TargettedUserType(str, Enum): + Unknown = "unknown", + Clicked = "clicked", + Compromised = "compromised", + AllUsers = "allUsers", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/team.py b/msgraph/generated/models/team.py index b11c0fe08af..0831e3089b2 100644 --- a/msgraph/generated/models/team.py +++ b/msgraph/generated/models/team.py @@ -12,17 +12,17 @@ from .profile_photo import ProfilePhoto from .resource_specific_permission_grant import ResourceSpecificPermissionGrant from .schedule import Schedule + from .teams_app_installation import TeamsAppInstallation + from .teams_async_operation import TeamsAsyncOperation + from .teams_template import TeamsTemplate + from .teamwork_tag import TeamworkTag from .team_fun_settings import TeamFunSettings from .team_guest_settings import TeamGuestSettings from .team_member_settings import TeamMemberSettings from .team_messaging_settings import TeamMessagingSettings - from .teams_app_installation import TeamsAppInstallation - from .teams_async_operation import TeamsAsyncOperation from .team_specialization import TeamSpecialization - from .teams_template import TeamsTemplate from .team_summary import TeamSummary from .team_visibility_type import TeamVisibilityType - from .teamwork_tag import TeamworkTag from .entity import Entity @@ -80,7 +80,7 @@ class Team(Entity): tags: Optional[List[TeamworkTag]] = None # The template this team was created from. See available templates. template: Optional[TeamsTemplate] = None - # The ID of the Azure Active Directory tenant. + # The ID of the Microsoft Entra tenant. tenant_id: Optional[str] = None # The visibility of the group and team. Defaults to Public. visibility: Optional[TeamVisibilityType] = None @@ -110,17 +110,17 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .profile_photo import ProfilePhoto from .resource_specific_permission_grant import ResourceSpecificPermissionGrant from .schedule import Schedule + from .teams_app_installation import TeamsAppInstallation + from .teams_async_operation import TeamsAsyncOperation + from .teams_template import TeamsTemplate + from .teamwork_tag import TeamworkTag from .team_fun_settings import TeamFunSettings from .team_guest_settings import TeamGuestSettings from .team_member_settings import TeamMemberSettings from .team_messaging_settings import TeamMessagingSettings - from .teams_app_installation import TeamsAppInstallation - from .teams_async_operation import TeamsAsyncOperation from .team_specialization import TeamSpecialization - from .teams_template import TeamsTemplate from .team_summary import TeamSummary from .team_visibility_type import TeamVisibilityType - from .teamwork_tag import TeamworkTag from .channel import Channel from .conversation_member import ConversationMember @@ -129,17 +129,17 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .profile_photo import ProfilePhoto from .resource_specific_permission_grant import ResourceSpecificPermissionGrant from .schedule import Schedule + from .teams_app_installation import TeamsAppInstallation + from .teams_async_operation import TeamsAsyncOperation + from .teams_template import TeamsTemplate + from .teamwork_tag import TeamworkTag from .team_fun_settings import TeamFunSettings from .team_guest_settings import TeamGuestSettings from .team_member_settings import TeamMemberSettings from .team_messaging_settings import TeamMessagingSettings - from .teams_app_installation import TeamsAppInstallation - from .teams_async_operation import TeamsAsyncOperation from .team_specialization import TeamSpecialization - from .teams_template import TeamsTemplate from .team_summary import TeamSummary from .team_visibility_type import TeamVisibilityType - from .teamwork_tag import TeamworkTag fields: Dict[str, Callable[[Any], None]] = { "allChannels": lambda n : setattr(self, 'all_channels', n.get_collection_of_object_values(Channel)), diff --git a/msgraph/generated/models/team_fun_settings.py b/msgraph/generated/models/team_fun_settings.py index 0393ecd2ce8..ff236a48640 100644 --- a/msgraph/generated/models/team_fun_settings.py +++ b/msgraph/generated/models/team_fun_settings.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowGiphy": lambda n : setattr(self, 'allow_giphy', n.get_bool_value()), "allowStickersAndMemes": lambda n : setattr(self, 'allow_stickers_and_memes', n.get_bool_value()), "giphyContentRating": lambda n : setattr(self, 'giphy_content_rating', n.get_enum_value(GiphyRatingType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowGiphy", self.allow_giphy) writer.write_bool_value("allowStickersAndMemes", self.allow_stickers_and_memes) writer.write_enum_value("giphyContentRating", self.giphy_content_rating) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/team_guest_settings.py b/msgraph/generated/models/team_guest_settings.py index 66944c2c710..c691804f795 100644 --- a/msgraph/generated/models/team_guest_settings.py +++ b/msgraph/generated/models/team_guest_settings.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowCreateUpdateChannels": lambda n : setattr(self, 'allow_create_update_channels', n.get_bool_value()), "allowDeleteChannels": lambda n : setattr(self, 'allow_delete_channels', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("allowCreateUpdateChannels", self.allow_create_update_channels) writer.write_bool_value("allowDeleteChannels", self.allow_delete_channels) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/team_info.py b/msgraph/generated/models/team_info.py index 69dd52ddaca..5467485b424 100644 --- a/msgraph/generated/models/team_info.py +++ b/msgraph/generated/models/team_info.py @@ -19,7 +19,7 @@ class TeamInfo(Entity): odata_type: Optional[str] = None # The team property team: Optional[Team] = None - # The ID of the Azure Active Directory tenant. + # The ID of the Microsoft Entra tenant. tenant_id: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/team_member_settings.py b/msgraph/generated/models/team_member_settings.py index ea9fb57b359..a1e7e768431 100644 --- a/msgraph/generated/models/team_member_settings.py +++ b/msgraph/generated/models/team_member_settings.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowCreateUpdateRemoveConnectors": lambda n : setattr(self, 'allow_create_update_remove_connectors', n.get_bool_value()), "allowCreateUpdateRemoveTabs": lambda n : setattr(self, 'allow_create_update_remove_tabs', n.get_bool_value()), "allowDeleteChannels": lambda n : setattr(self, 'allow_delete_channels', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -67,7 +67,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowCreateUpdateRemoveConnectors", self.allow_create_update_remove_connectors) writer.write_bool_value("allowCreateUpdateRemoveTabs", self.allow_create_update_remove_tabs) writer.write_bool_value("allowDeleteChannels", self.allow_delete_channels) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/team_messaging_settings.py b/msgraph/generated/models/team_messaging_settings.py index 85eea943ab2..d2c9dbf79c0 100644 --- a/msgraph/generated/models/team_messaging_settings.py +++ b/msgraph/generated/models/team_messaging_settings.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowTeamMentions": lambda n : setattr(self, 'allow_team_mentions', n.get_bool_value()), "allowUserDeleteMessages": lambda n : setattr(self, 'allow_user_delete_messages', n.get_bool_value()), "allowUserEditMessages": lambda n : setattr(self, 'allow_user_edit_messages', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowTeamMentions", self.allow_team_mentions) writer.write_bool_value("allowUserDeleteMessages", self.allow_user_delete_messages) writer.write_bool_value("allowUserEditMessages", self.allow_user_edit_messages) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/team_summary.py b/msgraph/generated/models/team_summary.py index bb472a92516..c8510c88f22 100644 --- a/msgraph/generated/models/team_summary.py +++ b/msgraph/generated/models/team_summary.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "guestsCount": lambda n : setattr(self, 'guests_count', n.get_int_value()), "membersCount": lambda n : setattr(self, 'members_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "ownersCount": lambda n : setattr(self, 'owners_count', n.get_int_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("guestsCount", self.guests_count) writer.write_int_value("membersCount", self.members_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("ownersCount", self.owners_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teams_app_authorization.py b/msgraph/generated/models/teams_app_authorization.py index a7d7ac824d0..e6509e5e65c 100644 --- a/msgraph/generated/models/teams_app_authorization.py +++ b/msgraph/generated/models/teams_app_authorization.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teams_app_permission_set import TeamsAppPermissionSet fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "requiredPermissionSet": lambda n : setattr(self, 'required_permission_set', n.get_object_value(TeamsAppPermissionSet)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("requiredPermissionSet", self.required_permission_set) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teams_app_permission_set.py b/msgraph/generated/models/teams_app_permission_set.py index 3e7e521cf56..16c7d43afcf 100644 --- a/msgraph/generated/models/teams_app_permission_set.py +++ b/msgraph/generated/models/teams_app_permission_set.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teams_app_resource_specific_permission import TeamsAppResourceSpecificPermission fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resourceSpecificPermissions": lambda n : setattr(self, 'resource_specific_permissions', n.get_collection_of_object_values(TeamsAppResourceSpecificPermission)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("resourceSpecificPermissions", self.resource_specific_permissions) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teams_app_resource_specific_permission.py b/msgraph/generated/models/teams_app_resource_specific_permission.py index 6796f337058..3f1ab6ab78b 100644 --- a/msgraph/generated/models/teams_app_resource_specific_permission.py +++ b/msgraph/generated/models/teams_app_resource_specific_permission.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teams_app_resource_specific_permission_type import TeamsAppResourceSpecificPermissionType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "permissionType": lambda n : setattr(self, 'permission_type', n.get_enum_value(TeamsAppResourceSpecificPermissionType)), "permissionValue": lambda n : setattr(self, 'permission_value', n.get_str_value()), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("permissionType", self.permission_type) writer.write_str_value("permissionValue", self.permission_value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teams_app_settings.py b/msgraph/generated/models/teams_app_settings.py index a606d900855..6630161fde9 100644 --- a/msgraph/generated/models/teams_app_settings.py +++ b/msgraph/generated/models/teams_app_settings.py @@ -10,7 +10,7 @@ @dataclass class TeamsAppSettings(Entity): - # The allowUserRequestsForAppAccess property + # Indicates whether users are allowed to request access to the unavailable Teams apps. allow_user_requests_for_app_access: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/teams_tab.py b/msgraph/generated/models/teams_tab.py index c10c7f5d477..23331459489 100644 --- a/msgraph/generated/models/teams_tab.py +++ b/msgraph/generated/models/teams_tab.py @@ -18,7 +18,7 @@ class TeamsTab(Entity): display_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The application that is linked to the tab. This cannot be changed after tab creation. + # The application that is linked to the tab. This can't be changed after tab creation. teams_app: Optional[TeamsApp] = None # Deep link URL of the tab instance. Read only. web_url: Optional[str] = None diff --git a/msgraph/generated/models/teams_tab_configuration.py b/msgraph/generated/models/teams_tab_configuration.py index 617c3e0c202..bfa71ca5fb2 100644 --- a/msgraph/generated/models/teams_tab_configuration.py +++ b/msgraph/generated/models/teams_tab_configuration.py @@ -41,7 +41,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "contentUrl": lambda n : setattr(self, 'content_url', n.get_str_value()), "entityId": lambda n : setattr(self, 'entity_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "removeUrl": lambda n : setattr(self, 'remove_url', n.get_str_value()), "websiteUrl": lambda n : setattr(self, 'website_url', n.get_str_value()), } @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("contentUrl", self.content_url) writer.write_str_value("entityId", self.entity_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("removeUrl", self.remove_url) writer.write_str_value("websiteUrl", self.website_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teamwork.py b/msgraph/generated/models/teamwork.py index eb63edb82bf..c5a01df5b2b 100644 --- a/msgraph/generated/models/teamwork.py +++ b/msgraph/generated/models/teamwork.py @@ -17,7 +17,7 @@ class Teamwork(Entity): deleted_teams: Optional[List[DeletedTeam]] = None # The OdataType property odata_type: Optional[str] = None - # The teamsAppSettings property + # Represents tenant-wide settings for all Teams apps in the tenant. teams_app_settings: Optional[TeamsAppSettings] = None # The workforceIntegrations property workforce_integrations: Optional[List[WorkforceIntegration]] = None diff --git a/msgraph/generated/models/teamwork_activity_topic.py b/msgraph/generated/models/teamwork_activity_topic.py index 924ae3cbafa..4923727ed9d 100644 --- a/msgraph/generated/models/teamwork_activity_topic.py +++ b/msgraph/generated/models/teamwork_activity_topic.py @@ -18,7 +18,7 @@ class TeamworkActivityTopic(AdditionalDataHolder, BackedModel, Parsable): odata_type: Optional[str] = None # Type of source. Possible values are: entityUrl, text. For supported Microsoft Graph URLs, use entityUrl. For custom text, use text. source: Optional[TeamworkActivityTopicSource] = None - # The topic value. If the value of the source property is entityUrl, this must be a Microsoft Graph URL. If the vaule is text, this must be a plain text value. + # The topic value. If the value of the source property is entityUrl, this must be a Microsoft Graph URL. If the value is text, this must be a plain text value. value: Optional[str] = None # The link the user clicks when they select the notification. Optional when source is entityUrl; required when source is text. web_url: Optional[str] = None @@ -44,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .teamwork_activity_topic_source import TeamworkActivityTopicSource fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "source": lambda n : setattr(self, 'source', n.get_enum_value(TeamworkActivityTopicSource)), "value": lambda n : setattr(self, 'value', n.get_str_value()), "webUrl": lambda n : setattr(self, 'web_url', n.get_str_value()), @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("source", self.source) writer.write_str_value("value", self.value) writer.write_str_value("webUrl", self.web_url) diff --git a/msgraph/generated/models/teamwork_notification_recipient.py b/msgraph/generated/models/teamwork_notification_recipient.py index 3b345398468..fb234ae3d45 100644 --- a/msgraph/generated/models/teamwork_notification_recipient.py +++ b/msgraph/generated/models/teamwork_notification_recipient.py @@ -67,7 +67,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .team_members_notification_recipient import TeamMembersNotificationRecipient fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -79,7 +79,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teamwork_online_meeting_info.py b/msgraph/generated/models/teamwork_online_meeting_info.py index cb29066fe30..b2db54ec3e5 100644 --- a/msgraph/generated/models/teamwork_online_meeting_info.py +++ b/msgraph/generated/models/teamwork_online_meeting_info.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "calendarEventId": lambda n : setattr(self, 'calendar_event_id', n.get_str_value()), "joinWebUrl": lambda n : setattr(self, 'join_web_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "organizer": lambda n : setattr(self, 'organizer', n.get_object_value(TeamworkUserIdentity)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("calendarEventId", self.calendar_event_id) writer.write_str_value("joinWebUrl", self.join_web_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("organizer", self.organizer) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/teamwork_tag.py b/msgraph/generated/models/teamwork_tag.py index 56c14820dd7..724adce156f 100644 --- a/msgraph/generated/models/teamwork_tag.py +++ b/msgraph/generated/models/teamwork_tag.py @@ -12,9 +12,9 @@ @dataclass class TeamworkTag(Entity): - # The description of the tag as it will appear to the user in Microsoft Teams. A teamworkTag can't have more than 200 teamworkTagMembers. + # The description of the tag as it appears to the user in Microsoft Teams. A teamworkTag can't have more than 200 teamworkTagMembers. description: Optional[str] = None - # The name of the tag as it will appear to the user in Microsoft Teams. + # The name of the tag as it appears to the user in Microsoft Teams. display_name: Optional[str] = None # The number of users assigned to the tag. member_count: Optional[int] = None diff --git a/msgraph/generated/models/teleconference_device_media_quality.py b/msgraph/generated/models/teleconference_device_media_quality.py index 8ed32525638..33733877db5 100644 --- a/msgraph/generated/models/teleconference_device_media_quality.py +++ b/msgraph/generated/models/teleconference_device_media_quality.py @@ -121,7 +121,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "maximumOutboundRoundTripDelay": lambda n : setattr(self, 'maximum_outbound_round_trip_delay', n.get_timedelta_value()), "mediaDuration": lambda n : setattr(self, 'media_duration', n.get_timedelta_value()), "networkLinkSpeedInBytes": lambda n : setattr(self, 'network_link_speed_in_bytes', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "outboundPackets": lambda n : setattr(self, 'outbound_packets', n.get_int_value()), "remoteIPAddress": lambda n : setattr(self, 'remote_i_p_address', n.get_str_value()), "remotePort": lambda n : setattr(self, 'remote_port', n.get_int_value()), @@ -154,7 +154,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_timedelta_value("maximumOutboundRoundTripDelay", self.maximum_outbound_round_trip_delay) writer.write_timedelta_value("mediaDuration", self.media_duration) writer.write_int_value("networkLinkSpeedInBytes", self.network_link_speed_in_bytes) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("outboundPackets", self.outbound_packets) writer.write_str_value("remoteIPAddress", self.remote_i_p_address) writer.write_int_value("remotePort", self.remote_port) diff --git a/msgraph/generated/models/teleconference_device_quality.py b/msgraph/generated/models/teleconference_device_quality.py index 957344cc403..62bfd334ec8 100644 --- a/msgraph/generated/models/teleconference_device_quality.py +++ b/msgraph/generated/models/teleconference_device_quality.py @@ -68,7 +68,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "deviceName": lambda n : setattr(self, 'device_name', n.get_str_value()), "mediaLegId": lambda n : setattr(self, 'media_leg_id', n.get_uuid_value()), "mediaQualityList": lambda n : setattr(self, 'media_quality_list', n.get_collection_of_object_values(TeleconferenceDeviceMediaQuality)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "participantId": lambda n : setattr(self, 'participant_id', n.get_uuid_value()), } return fields @@ -90,7 +90,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("deviceName", self.device_name) writer.write_uuid_value("mediaLegId", self.media_leg_id) writer.write_collection_of_object_values("mediaQualityList", self.media_quality_list) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_uuid_value("participantId", self.participant_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/tenant_information.py b/msgraph/generated/models/tenant_information.py index 9a25a15fc5c..518696bd1c4 100644 --- a/msgraph/generated/models/tenant_information.py +++ b/msgraph/generated/models/tenant_information.py @@ -11,15 +11,15 @@ class TenantInformation(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) - # Primary domain name of an Azure AD tenant. + # Primary domain name of a Microsoft Entra tenant. default_domain_name: Optional[str] = None - # Display name of an Azure AD tenant. + # Display name of a Microsoft Entra tenant. display_name: Optional[str] = None - # Name shown to users that sign in to an Azure AD tenant. + # Name shown to users that sign in to a Microsoft Entra tenant. federation_brand_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # Unique identifier of an Azure AD tenant. + # Unique identifier of a Microsoft Entra tenant. tenant_id: Optional[str] = None @staticmethod @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "defaultDomainName": lambda n : setattr(self, 'default_domain_name', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "federationBrandName": lambda n : setattr(self, 'federation_brand_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantId": lambda n : setattr(self, 'tenant_id', n.get_str_value()), } return fields @@ -58,7 +58,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("defaultDomainName", self.default_domain_name) writer.write_str_value("displayName", self.display_name) writer.write_str_value("federationBrandName", self.federation_brand_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("tenantId", self.tenant_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/tenant_relationship.py b/msgraph/generated/models/tenant_relationship.py index 953ee8989a2..3e88701cbd8 100644 --- a/msgraph/generated/models/tenant_relationship.py +++ b/msgraph/generated/models/tenant_relationship.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "delegatedAdminCustomers": lambda n : setattr(self, 'delegated_admin_customers', n.get_collection_of_object_values(DelegatedAdminCustomer)), "delegatedAdminRelationships": lambda n : setattr(self, 'delegated_admin_relationships', n.get_collection_of_object_values(DelegatedAdminRelationship)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("delegatedAdminCustomers", self.delegated_admin_customers) writer.write_collection_of_object_values("delegatedAdminRelationships", self.delegated_admin_relationships) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/term_column.py b/msgraph/generated/models/term_column.py index d2556ba5043..72d940fcb2e 100644 --- a/msgraph/generated/models/term_column.py +++ b/msgraph/generated/models/term_column.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "allowMultipleValues": lambda n : setattr(self, 'allow_multiple_values', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "parentTerm": lambda n : setattr(self, 'parent_term', n.get_object_value(Term)), "showFullyQualifiedName": lambda n : setattr(self, 'show_fully_qualified_name', n.get_bool_value()), "termSet": lambda n : setattr(self, 'term_set', n.get_object_value(Set)), @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("allowMultipleValues", self.allow_multiple_values) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("parentTerm", self.parent_term) writer.write_bool_value("showFullyQualifiedName", self.show_fully_qualified_name) writer.write_object_value("termSet", self.term_set) diff --git a/msgraph/generated/models/term_store/localized_description.py b/msgraph/generated/models/term_store/localized_description.py index 62b1720fbdd..5dbfdffdb9a 100644 --- a/msgraph/generated/models/term_store/localized_description.py +++ b/msgraph/generated/models/term_store/localized_description.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "description": lambda n : setattr(self, 'description', n.get_str_value()), "languageTag": lambda n : setattr(self, 'language_tag', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("description", self.description) writer.write_str_value("languageTag", self.language_tag) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/term_store/localized_label.py b/msgraph/generated/models/term_store/localized_label.py index 01bcff1bb72..0e9ee05928b 100644 --- a/msgraph/generated/models/term_store/localized_label.py +++ b/msgraph/generated/models/term_store/localized_label.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isDefault": lambda n : setattr(self, 'is_default', n.get_bool_value()), "languageTag": lambda n : setattr(self, 'language_tag', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isDefault", self.is_default) writer.write_str_value("languageTag", self.language_tag) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/term_store/localized_name.py b/msgraph/generated/models/term_store/localized_name.py index 2f4ed2af1f1..75e12588de6 100644 --- a/msgraph/generated/models/term_store/localized_name.py +++ b/msgraph/generated/models/term_store/localized_name.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "languageTag": lambda n : setattr(self, 'language_tag', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("languageTag", self.language_tag) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/terms_expiration.py b/msgraph/generated/models/terms_expiration.py index 986201cf438..7c75bc4d37f 100644 --- a/msgraph/generated/models/terms_expiration.py +++ b/msgraph/generated/models/terms_expiration.py @@ -12,7 +12,7 @@ class TermsExpiration(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) - # Represents the frequency at which the terms will expire, after its first expiration as set in startDateTime. The value is represented in ISO 8601 format for durations. For example, PT1M represents a time period of 1 month. + # Represents the frequency at which the terms will expire, after its first expiration as set in startDateTime. The value is represented in ISO 8601 format for durations. For example, PT1M represents a time period of one month. frequency: Optional[datetime.timedelta] = None # The OdataType property odata_type: Optional[str] = None @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "frequency": lambda n : setattr(self, 'frequency', n.get_timedelta_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startDateTime": lambda n : setattr(self, 'start_date_time', n.get_datetime_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_timedelta_value("frequency", self.frequency) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("startDateTime", self.start_date_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/terms_of_use_container.py b/msgraph/generated/models/terms_of_use_container.py index cb10740185f..31dff1aa0c9 100644 --- a/msgraph/generated/models/terms_of_use_container.py +++ b/msgraph/generated/models/terms_of_use_container.py @@ -14,7 +14,7 @@ class TermsOfUseContainer(Entity): # Represents the current status of a user's response to a company's customizable terms of use agreement. agreement_acceptances: Optional[List[AgreementAcceptance]] = None - # Represents a tenant's customizable terms of use agreement that's created and managed with Azure Active Directory (Azure AD). + # Represents a tenant's customizable terms of use agreement that's created and managed with Microsoft Entra ID Governance. agreements: Optional[List[Agreement]] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/text_column.py b/msgraph/generated/models/text_column.py index 32dee5febf9..fd7507dcccf 100644 --- a/msgraph/generated/models/text_column.py +++ b/msgraph/generated/models/text_column.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "appendChangesToExistingText": lambda n : setattr(self, 'append_changes_to_existing_text', n.get_bool_value()), "linesForEditing": lambda n : setattr(self, 'lines_for_editing', n.get_int_value()), "maxLength": lambda n : setattr(self, 'max_length', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "textType": lambda n : setattr(self, 'text_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("appendChangesToExistingText", self.append_changes_to_existing_text) writer.write_int_value("linesForEditing", self.lines_for_editing) writer.write_int_value("maxLength", self.max_length) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("textType", self.text_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/thumbnail.py b/msgraph/generated/models/thumbnail.py index 2a4771dc4ca..5b4da8c68b5 100644 --- a/msgraph/generated/models/thumbnail.py +++ b/msgraph/generated/models/thumbnail.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_bytes_value()), "height": lambda n : setattr(self, 'height', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sourceItemId": lambda n : setattr(self, 'source_item_id', n.get_str_value()), "url": lambda n : setattr(self, 'url', n.get_str_value()), "width": lambda n : setattr(self, 'width', n.get_int_value()), @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bytes_value("content", self.content) writer.write_int_value("height", self.height) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sourceItemId", self.source_item_id) writer.write_str_value("url", self.url) writer.write_int_value("width", self.width) diff --git a/msgraph/generated/models/thumbnail_column.py b/msgraph/generated/models/thumbnail_column.py index 55e3c8056e9..8df3d2559df 100644 --- a/msgraph/generated/models/thumbnail_column.py +++ b/msgraph/generated/models/thumbnail_column.py @@ -31,7 +31,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -43,7 +43,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/ticket_info.py b/msgraph/generated/models/ticket_info.py index 54405dcdfb5..c58e5fcc9e4 100644 --- a/msgraph/generated/models/ticket_info.py +++ b/msgraph/generated/models/ticket_info.py @@ -35,7 +35,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "ticketNumber": lambda n : setattr(self, 'ticket_number', n.get_str_value()), "ticketSystem": lambda n : setattr(self, 'ticket_system', n.get_str_value()), } @@ -49,7 +49,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("ticketNumber", self.ticket_number) writer.write_str_value("ticketSystem", self.ticket_system) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/time_constraint.py b/msgraph/generated/models/time_constraint.py index 2fbe42bba58..028a1c42137 100644 --- a/msgraph/generated/models/time_constraint.py +++ b/msgraph/generated/models/time_constraint.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "activityDomain": lambda n : setattr(self, 'activity_domain', n.get_enum_value(ActivityDomain)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "timeSlots": lambda n : setattr(self, 'time_slots', n.get_collection_of_object_values(TimeSlot)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("activityDomain", self.activity_domain) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("timeSlots", self.time_slots) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/time_range.py b/msgraph/generated/models/time_range.py index 4f193dae23a..164497d25d3 100644 --- a/msgraph/generated/models/time_range.py +++ b/msgraph/generated/models/time_range.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "endTime": lambda n : setattr(self, 'end_time', n.get_time_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startTime": lambda n : setattr(self, 'start_time', n.get_time_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_time_value("endTime", self.end_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_time_value("startTime", self.start_time) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/time_slot.py b/msgraph/generated/models/time_slot.py index d7575d208d0..a3302506703 100644 --- a/msgraph/generated/models/time_slot.py +++ b/msgraph/generated/models/time_slot.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "end": lambda n : setattr(self, 'end', n.get_object_value(DateTimeTimeZone)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "start": lambda n : setattr(self, 'start', n.get_object_value(DateTimeTimeZone)), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_object_value("end", self.end) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("start", self.start) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/time_zone_base.py b/msgraph/generated/models/time_zone_base.py index b3023606b99..1cd52f166d8 100644 --- a/msgraph/generated/models/time_zone_base.py +++ b/msgraph/generated/models/time_zone_base.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/time_zone_information.py b/msgraph/generated/models/time_zone_information.py index 78050170ab6..c664a89c2a5 100644 --- a/msgraph/generated/models/time_zone_information.py +++ b/msgraph/generated/models/time_zone_information.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "alias": lambda n : setattr(self, 'alias', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("alias", self.alias) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/tone_info.py b/msgraph/generated/models/tone_info.py index 454ba43c0dd..6ce3ba561f4 100644 --- a/msgraph/generated/models/tone_info.py +++ b/msgraph/generated/models/tone_info.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .tone import Tone fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sequenceId": lambda n : setattr(self, 'sequence_id', n.get_int_value()), "tone": lambda n : setattr(self, 'tone', n.get_enum_value(Tone)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("sequenceId", self.sequence_id) writer.write_enum_value("tone", self.tone) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/training.py b/msgraph/generated/models/training.py new file mode 100644 index 00000000000..5060cafeab8 --- /dev/null +++ b/msgraph/generated/models/training.py @@ -0,0 +1,124 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_identity import EmailIdentity + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .training_availability_status import TrainingAvailabilityStatus + from .training_language_detail import TrainingLanguageDetail + from .training_type import TrainingType + +from .entity import Entity + +@dataclass +class Training(Entity): + # The availabilityStatus property + availability_status: Optional[TrainingAvailabilityStatus] = None + # The createdBy property + created_by: Optional[EmailIdentity] = None + # The createdDateTime property + created_date_time: Optional[datetime.datetime] = None + # The description property + description: Optional[str] = None + # The displayName property + display_name: Optional[str] = None + # The durationInMinutes property + duration_in_minutes: Optional[int] = None + # The hasEvaluation property + has_evaluation: Optional[bool] = None + # The languageDetails property + language_details: Optional[List[TrainingLanguageDetail]] = None + # The lastModifiedBy property + last_modified_by: Optional[EmailIdentity] = None + # The lastModifiedDateTime property + last_modified_date_time: Optional[datetime.datetime] = None + # The OdataType property + odata_type: Optional[str] = None + # The source property + source: Optional[SimulationContentSource] = None + # The supportedLocales property + supported_locales: Optional[List[str]] = None + # The tags property + tags: Optional[List[str]] = None + # The type property + type: Optional[TrainingType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> Training: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Training + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Training() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .training_availability_status import TrainingAvailabilityStatus + from .training_language_detail import TrainingLanguageDetail + from .training_type import TrainingType + + from .email_identity import EmailIdentity + from .entity import Entity + from .simulation_content_source import SimulationContentSource + from .training_availability_status import TrainingAvailabilityStatus + from .training_language_detail import TrainingLanguageDetail + from .training_type import TrainingType + + fields: Dict[str, Callable[[Any], None]] = { + "availabilityStatus": lambda n : setattr(self, 'availability_status', n.get_enum_value(TrainingAvailabilityStatus)), + "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(EmailIdentity)), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "durationInMinutes": lambda n : setattr(self, 'duration_in_minutes', n.get_int_value()), + "hasEvaluation": lambda n : setattr(self, 'has_evaluation', n.get_bool_value()), + "languageDetails": lambda n : setattr(self, 'language_details', n.get_collection_of_object_values(TrainingLanguageDetail)), + "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), + "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), + "source": lambda n : setattr(self, 'source', n.get_enum_value(SimulationContentSource)), + "supportedLocales": lambda n : setattr(self, 'supported_locales', n.get_collection_of_primitive_values(str)), + "tags": lambda n : setattr(self, 'tags', n.get_collection_of_primitive_values(str)), + "type": lambda n : setattr(self, 'type', n.get_enum_value(TrainingType)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("availabilityStatus", self.availability_status) + writer.write_object_value("createdBy", self.created_by) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("description", self.description) + writer.write_str_value("displayName", self.display_name) + writer.write_int_value("durationInMinutes", self.duration_in_minutes) + writer.write_bool_value("hasEvaluation", self.has_evaluation) + writer.write_collection_of_object_values("languageDetails", self.language_details) + writer.write_object_value("lastModifiedBy", self.last_modified_by) + writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) + writer.write_enum_value("source", self.source) + writer.write_collection_of_primitive_values("supportedLocales", self.supported_locales) + writer.write_collection_of_primitive_values("tags", self.tags) + writer.write_enum_value("type", self.type) + + diff --git a/msgraph/generated/models/training_assigned_to.py b/msgraph/generated/models/training_assigned_to.py new file mode 100644 index 00000000000..632933ef031 --- /dev/null +++ b/msgraph/generated/models/training_assigned_to.py @@ -0,0 +1,12 @@ +from enum import Enum + +class TrainingAssignedTo(str, Enum): + None_ = "none", + AllUsers = "allUsers", + ClickedPayload = "clickedPayload", + Compromised = "compromised", + ReportedPhish = "reportedPhish", + ReadButNotClicked = "readButNotClicked", + DidNothing = "didNothing", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/training_availability_status.py b/msgraph/generated/models/training_availability_status.py new file mode 100644 index 00000000000..4a46348c7f1 --- /dev/null +++ b/msgraph/generated/models/training_availability_status.py @@ -0,0 +1,10 @@ +from enum import Enum + +class TrainingAvailabilityStatus(str, Enum): + Unknown = "unknown", + NotAvailable = "notAvailable", + Available = "available", + Archive = "archive", + Delete = "delete", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/training_collection_response.py b/msgraph/generated/models/training_collection_response.py new file mode 100644 index 00000000000..201df22c44a --- /dev/null +++ b/msgraph/generated/models/training_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .training import Training + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class TrainingCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[Training]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TrainingCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrainingCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TrainingCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .training import Training + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .training import Training + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Training)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/training_completion_duration.py b/msgraph/generated/models/training_completion_duration.py new file mode 100644 index 00000000000..d50d72f8066 --- /dev/null +++ b/msgraph/generated/models/training_completion_duration.py @@ -0,0 +1,8 @@ +from enum import Enum + +class TrainingCompletionDuration(str, Enum): + Week = "week", + Fortnite = "fortnite", + Month = "month", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/training_events_content.py b/msgraph/generated/models/training_events_content.py index 84722381d3c..8831f9ce774 100644 --- a/msgraph/generated/models/training_events_content.py +++ b/msgraph/generated/models/training_events_content.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "assignedTrainingsInfos": lambda n : setattr(self, 'assigned_trainings_infos', n.get_collection_of_object_values(AssignedTrainingInfo)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "trainingsAssignedUserCount": lambda n : setattr(self, 'trainings_assigned_user_count', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_collection_of_object_values("assignedTrainingsInfos", self.assigned_trainings_infos) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("trainingsAssignedUserCount", self.trainings_assigned_user_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/training_language_detail.py b/msgraph/generated/models/training_language_detail.py new file mode 100644 index 00000000000..404bd60128e --- /dev/null +++ b/msgraph/generated/models/training_language_detail.py @@ -0,0 +1,92 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .email_identity import EmailIdentity + from .entity import Entity + +from .entity import Entity + +@dataclass +class TrainingLanguageDetail(Entity): + # The content property + content: Optional[str] = None + # The createdBy property + created_by: Optional[EmailIdentity] = None + # The createdDateTime property + created_date_time: Optional[datetime.datetime] = None + # The description property + description: Optional[str] = None + # The displayName property + display_name: Optional[str] = None + # The isDefaultLangauge property + is_default_langauge: Optional[bool] = None + # The lastModifiedBy property + last_modified_by: Optional[EmailIdentity] = None + # The lastModifiedDateTime property + last_modified_date_time: Optional[datetime.datetime] = None + # The locale property + locale: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TrainingLanguageDetail: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrainingLanguageDetail + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TrainingLanguageDetail() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .email_identity import EmailIdentity + from .entity import Entity + + from .email_identity import EmailIdentity + from .entity import Entity + + fields: Dict[str, Callable[[Any], None]] = { + "content": lambda n : setattr(self, 'content', n.get_str_value()), + "createdBy": lambda n : setattr(self, 'created_by', n.get_object_value(EmailIdentity)), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "isDefaultLangauge": lambda n : setattr(self, 'is_default_langauge', n.get_bool_value()), + "lastModifiedBy": lambda n : setattr(self, 'last_modified_by', n.get_object_value(EmailIdentity)), + "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), + "locale": lambda n : setattr(self, 'locale', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_str_value("content", self.content) + writer.write_object_value("createdBy", self.created_by) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_str_value("description", self.description) + writer.write_str_value("displayName", self.display_name) + writer.write_bool_value("isDefaultLangauge", self.is_default_langauge) + writer.write_object_value("lastModifiedBy", self.last_modified_by) + writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) + writer.write_str_value("locale", self.locale) + + diff --git a/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/models/training_language_detail_collection_response.py similarity index 61% rename from msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_response.py rename to msgraph/generated/models/training_language_detail_collection_response.py index fc436e4387d..e5860d59b85 100644 --- a/msgraph/generated/chats/item/permission_grants/get_by_ids/get_by_ids_response.py +++ b/msgraph/generated/models/training_language_detail_collection_response.py @@ -4,40 +4,40 @@ 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.directory_object import DirectoryObject + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .training_language_detail import TrainingLanguageDetail -from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): +class TrainingLanguageDetailCollectionResponse(BaseCollectionPaginationCountResponse): # The value property - value: Optional[List[DirectoryObject]] = None + value: Optional[List[TrainingLanguageDetail]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TrainingLanguageDetailCollectionResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse + Returns: TrainingLanguageDetailCollectionResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() + return TrainingLanguageDetailCollectionResponse() def 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.directory_object import DirectoryObject + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .training_language_detail import TrainingLanguageDetail - from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .....models.directory_object import DirectoryObject + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .training_language_detail import TrainingLanguageDetail fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(TrainingLanguageDetail)), } super_fields = super().get_field_deserializers() fields.update(super_fields) diff --git a/msgraph/generated/models/training_notification_setting.py b/msgraph/generated/models/training_notification_setting.py new file mode 100644 index 00000000000..f7b24c28acf --- /dev/null +++ b/msgraph/generated/models/training_notification_setting.py @@ -0,0 +1,66 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_end_user_notification import BaseEndUserNotification + from .end_user_notification_setting import EndUserNotificationSetting + from .training_reminder_notification import TrainingReminderNotification + +from .end_user_notification_setting import EndUserNotificationSetting + +@dataclass +class TrainingNotificationSetting(EndUserNotificationSetting): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.trainingNotificationSetting" + # The trainingAssignment property + training_assignment: Optional[BaseEndUserNotification] = None + # The trainingReminder property + training_reminder: Optional[TrainingReminderNotification] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TrainingNotificationSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrainingNotificationSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TrainingNotificationSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_end_user_notification import BaseEndUserNotification + from .end_user_notification_setting import EndUserNotificationSetting + from .training_reminder_notification import TrainingReminderNotification + + from .base_end_user_notification import BaseEndUserNotification + from .end_user_notification_setting import EndUserNotificationSetting + from .training_reminder_notification import TrainingReminderNotification + + fields: Dict[str, Callable[[Any], None]] = { + "trainingAssignment": lambda n : setattr(self, 'training_assignment', n.get_object_value(BaseEndUserNotification)), + "trainingReminder": lambda n : setattr(self, 'training_reminder', n.get_object_value(TrainingReminderNotification)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("trainingAssignment", self.training_assignment) + writer.write_object_value("trainingReminder", self.training_reminder) + + diff --git a/msgraph/generated/models/training_reminder_notification.py b/msgraph/generated/models/training_reminder_notification.py new file mode 100644 index 00000000000..ffde277d0b7 --- /dev/null +++ b/msgraph/generated/models/training_reminder_notification.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_end_user_notification import BaseEndUserNotification + from .notification_delivery_frequency import NotificationDeliveryFrequency + +from .base_end_user_notification import BaseEndUserNotification + +@dataclass +class TrainingReminderNotification(BaseEndUserNotification): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.trainingReminderNotification" + # The deliveryFrequency property + delivery_frequency: Optional[NotificationDeliveryFrequency] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TrainingReminderNotification: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrainingReminderNotification + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TrainingReminderNotification() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_end_user_notification import BaseEndUserNotification + from .notification_delivery_frequency import NotificationDeliveryFrequency + + from .base_end_user_notification import BaseEndUserNotification + from .notification_delivery_frequency import NotificationDeliveryFrequency + + fields: Dict[str, Callable[[Any], None]] = { + "deliveryFrequency": lambda n : setattr(self, 'delivery_frequency', n.get_enum_value(NotificationDeliveryFrequency)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("deliveryFrequency", self.delivery_frequency) + + diff --git a/msgraph/generated/models/training_setting.py b/msgraph/generated/models/training_setting.py new file mode 100644 index 00000000000..d0b0d57ba69 --- /dev/null +++ b/msgraph/generated/models/training_setting.py @@ -0,0 +1,99 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .custom_training_setting import CustomTrainingSetting + from .microsoft_custom_training_setting import MicrosoftCustomTrainingSetting + from .microsoft_managed_training_setting import MicrosoftManagedTrainingSetting + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + from .no_training_setting import NoTrainingSetting + from .training_setting_type import TrainingSettingType + +@dataclass +class TrainingSetting(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + # The settingType property + setting_type: Optional[TrainingSettingType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TrainingSetting: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrainingSetting + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.customTrainingSetting".casefold(): + from .custom_training_setting import CustomTrainingSetting + + return CustomTrainingSetting() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.microsoftCustomTrainingSetting".casefold(): + from .microsoft_custom_training_setting import MicrosoftCustomTrainingSetting + + return MicrosoftCustomTrainingSetting() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.microsoftManagedTrainingSetting".casefold(): + from .microsoft_managed_training_setting import MicrosoftManagedTrainingSetting + + return MicrosoftManagedTrainingSetting() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.microsoftTrainingAssignmentMapping".casefold(): + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + + return MicrosoftTrainingAssignmentMapping() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.noTrainingSetting".casefold(): + from .no_training_setting import NoTrainingSetting + + return NoTrainingSetting() + return TrainingSetting() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .custom_training_setting import CustomTrainingSetting + from .microsoft_custom_training_setting import MicrosoftCustomTrainingSetting + from .microsoft_managed_training_setting import MicrosoftManagedTrainingSetting + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + from .no_training_setting import NoTrainingSetting + from .training_setting_type import TrainingSettingType + + from .custom_training_setting import CustomTrainingSetting + from .microsoft_custom_training_setting import MicrosoftCustomTrainingSetting + from .microsoft_managed_training_setting import MicrosoftManagedTrainingSetting + from .microsoft_training_assignment_mapping import MicrosoftTrainingAssignmentMapping + from .no_training_setting import NoTrainingSetting + from .training_setting_type import TrainingSettingType + + fields: Dict[str, Callable[[Any], None]] = { + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "settingType": lambda n : setattr(self, 'setting_type', n.get_enum_value(TrainingSettingType)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current 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("OdataType", self.odata_type) + writer.write_enum_value("settingType", self.setting_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/training_setting_type.py b/msgraph/generated/models/training_setting_type.py new file mode 100644 index 00000000000..3d1ae237ec6 --- /dev/null +++ b/msgraph/generated/models/training_setting_type.py @@ -0,0 +1,9 @@ +from enum import Enum + +class TrainingSettingType(str, Enum): + MicrosoftCustom = "microsoftCustom", + MicrosoftManaged = "microsoftManaged", + NoTraining = "noTraining", + Custom = "custom", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/training_type.py b/msgraph/generated/models/training_type.py new file mode 100644 index 00000000000..cbaee4bd396 --- /dev/null +++ b/msgraph/generated/models/training_type.py @@ -0,0 +1,7 @@ +from enum import Enum + +class TrainingType(str, Enum): + Unknown = "unknown", + Phishing = "phishing", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/unified_approval_stage.py b/msgraph/generated/models/unified_approval_stage.py index abdd7dce8a9..6f851513644 100644 --- a/msgraph/generated/models/unified_approval_stage.py +++ b/msgraph/generated/models/unified_approval_stage.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "escalationTimeInMinutes": lambda n : setattr(self, 'escalation_time_in_minutes', n.get_int_value()), "isApproverJustificationRequired": lambda n : setattr(self, 'is_approver_justification_required', n.get_bool_value()), "isEscalationEnabled": lambda n : setattr(self, 'is_escalation_enabled', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "primaryApprovers": lambda n : setattr(self, 'primary_approvers', n.get_collection_of_object_values(SubjectSet)), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("escalationTimeInMinutes", self.escalation_time_in_minutes) writer.write_bool_value("isApproverJustificationRequired", self.is_approver_justification_required) writer.write_bool_value("isEscalationEnabled", self.is_escalation_enabled) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("primaryApprovers", self.primary_approvers) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/unified_role.py b/msgraph/generated/models/unified_role.py index de8d43645e7..c6ecd133f91 100644 --- a/msgraph/generated/models/unified_role.py +++ b/msgraph/generated/models/unified_role.py @@ -33,7 +33,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "roleDefinitionId": lambda n : setattr(self, 'role_definition_id', n.get_str_value()), } return fields @@ -46,7 +46,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("roleDefinitionId", self.role_definition_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/unified_role_assignment_schedule_instance.py b/msgraph/generated/models/unified_role_assignment_schedule_instance.py index d21e7fffe9e..2fee063090d 100644 --- a/msgraph/generated/models/unified_role_assignment_schedule_instance.py +++ b/msgraph/generated/models/unified_role_assignment_schedule_instance.py @@ -22,7 +22,7 @@ class UnifiedRoleAssignmentScheduleInstance(UnifiedRoleScheduleInstanceBase): member_type: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The identifier of the role assignment in Azure AD. Supports $filter (eq, ne). + # The identifier of the role assignment in Microsoft Entra. Supports $filter (eq, ne). role_assignment_origin_id: Optional[str] = None # The identifier of the unifiedRoleAssignmentSchedule object from which this instance was created. Supports $filter (eq, ne). role_assignment_schedule_id: Optional[str] = None diff --git a/msgraph/generated/models/unified_role_definition.py b/msgraph/generated/models/unified_role_definition.py index 5971a35869a..4c2917e7060 100644 --- a/msgraph/generated/models/unified_role_definition.py +++ b/msgraph/generated/models/unified_role_definition.py @@ -15,9 +15,9 @@ class UnifiedRoleDefinition(Entity): description: Optional[str] = None # The display name for the unifiedRoleDefinition. Read-only when isBuiltIn is true. Required. Supports $filter (eq, in). display_name: Optional[str] = None - # Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + # Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. inherits_permissions_from: Optional[List[UnifiedRoleDefinition]] = None - # Flag indicating whether the role definition is part of the default set included in Azure Active Directory (Azure AD) or a custom definition. Read-only. Supports $filter (eq, in). + # Flag indicating whether the role definition is part of the default set included in Microsoft Entra or a custom definition. Read-only. Supports $filter (eq, in). is_built_in: Optional[bool] = None # Flag indicating whether the role is enabled for assignment. If false the role is not available for assignment. Read-only when isBuiltIn is true. is_enabled: Optional[bool] = None diff --git a/msgraph/generated/models/unified_role_management_policy.py b/msgraph/generated/models/unified_role_management_policy.py index 78ee051ebf8..7a25307938c 100644 --- a/msgraph/generated/models/unified_role_management_policy.py +++ b/msgraph/generated/models/unified_role_management_policy.py @@ -31,7 +31,7 @@ class UnifiedRoleManagementPolicy(Entity): rules: Optional[List[UnifiedRoleManagementPolicyRule]] = None # The identifier of the scope where the policy is created. Can be / for the tenant or a group ID. Required. scope_id: Optional[str] = None - # The type of the scope where the policy is created. One of Directory, DirectoryRole. Required. + # The type of the scope where the policy is created. One of Directory, DirectoryRole, Group. Required. scope_type: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/unified_role_management_policy_assignment.py b/msgraph/generated/models/unified_role_management_policy_assignment.py index 61ac5bedfca..646a20a2859 100644 --- a/msgraph/generated/models/unified_role_management_policy_assignment.py +++ b/msgraph/generated/models/unified_role_management_policy_assignment.py @@ -17,11 +17,11 @@ class UnifiedRoleManagementPolicyAssignment(Entity): policy: Optional[UnifiedRoleManagementPolicy] = None # The id of the policy. Inherited from entity. policy_id: Optional[str] = None - # The identifier of the role definition object where the policy applies. If not specified, the policy applies to all roles. Supports $filter (eq). + # For Microsoft Entra roles policy, it's the identifier of the role definition object where the policy applies. For PIM for groups membership and ownership, it's either member or owner. Supports $filter (eq). role_definition_id: Optional[str] = None # The identifier of the scope where the policy is assigned. Can be / for the tenant or a group ID. Required. scope_id: Optional[str] = None - # The type of the scope where the policy is assigned. One of Directory, DirectoryRole. Required. + # The type of the scope where the policy is assigned. One of Directory, DirectoryRole, Group. Required. scope_type: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/unified_role_management_policy_authentication_context_rule.py b/msgraph/generated/models/unified_role_management_policy_authentication_context_rule.py index 7618947494a..7f07031928b 100644 --- a/msgraph/generated/models/unified_role_management_policy_authentication_context_rule.py +++ b/msgraph/generated/models/unified_role_management_policy_authentication_context_rule.py @@ -14,7 +14,7 @@ class UnifiedRoleManagementPolicyAuthenticationContextRule(UnifiedRoleManagement odata_type: Optional[str] = "#microsoft.graph.unifiedRoleManagementPolicyAuthenticationContextRule" # The value of the authentication context claim. claim_value: Optional[str] = None - # Whether this rule is enabled. + # Determines whether this rule is enabled. is_enabled: Optional[bool] = None @staticmethod diff --git a/msgraph/generated/models/unified_role_management_policy_rule_target.py b/msgraph/generated/models/unified_role_management_policy_rule_target.py index 59a8fe7079d..a80328a27e4 100644 --- a/msgraph/generated/models/unified_role_management_policy_rule_target.py +++ b/msgraph/generated/models/unified_role_management_policy_rule_target.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "enforcedSettings": lambda n : setattr(self, 'enforced_settings', n.get_collection_of_primitive_values(str)), "inheritableSettings": lambda n : setattr(self, 'inheritable_settings', n.get_collection_of_primitive_values(str)), "level": lambda n : setattr(self, 'level', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operations": lambda n : setattr(self, 'operations', n.get_collection_of_enum_values(UnifiedRoleManagementPolicyRuleTargetOperations)), "targetObjects": lambda n : setattr(self, 'target_objects', n.get_collection_of_object_values(DirectoryObject)), } @@ -75,7 +75,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("enforcedSettings", self.enforced_settings) writer.write_collection_of_primitive_values("inheritableSettings", self.inheritable_settings) writer.write_str_value("level", self.level) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_enum_values("operations", self.operations) writer.write_collection_of_object_values("targetObjects", self.target_objects) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/unified_role_permission.py b/msgraph/generated/models/unified_role_permission.py index 45349373bc1..90247d1cf0e 100644 --- a/msgraph/generated/models/unified_role_permission.py +++ b/msgraph/generated/models/unified_role_permission.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowedResourceActions": lambda n : setattr(self, 'allowed_resource_actions', n.get_collection_of_primitive_values(str)), "condition": lambda n : setattr(self, 'condition', n.get_str_value()), "excludedResourceActions": lambda n : setattr(self, 'excluded_resource_actions', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_primitive_values("allowedResourceActions", self.allowed_resource_actions) writer.write_str_value("condition", self.condition) writer.write_collection_of_primitive_values("excludedResourceActions", self.excluded_resource_actions) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/update_allowed_combinations_result.py b/msgraph/generated/models/update_allowed_combinations_result.py index 161f3099379..aa0eb63980a 100644 --- a/msgraph/generated/models/update_allowed_combinations_result.py +++ b/msgraph/generated/models/update_allowed_combinations_result.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "additionalInformation": lambda n : setattr(self, 'additional_information', n.get_str_value()), "conditionalAccessReferences": lambda n : setattr(self, 'conditional_access_references', n.get_collection_of_primitive_values(str)), "currentCombinations": lambda n : setattr(self, 'current_combinations', n.get_collection_of_enum_values(AuthenticationMethodModes)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "previousCombinations": lambda n : setattr(self, 'previous_combinations', n.get_collection_of_enum_values(AuthenticationMethodModes)), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("additionalInformation", self.additional_information) writer.write_collection_of_primitive_values("conditionalAccessReferences", self.conditional_access_references) writer.write_collection_of_enum_values("currentCombinations", self.current_combinations) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_enum_values("previousCombinations", self.previous_combinations) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/update_windows_device_account_action_parameter.py b/msgraph/generated/models/update_windows_device_account_action_parameter.py index 96b7da27c81..ea3042afbbe 100644 --- a/msgraph/generated/models/update_windows_device_account_action_parameter.py +++ b/msgraph/generated/models/update_windows_device_account_action_parameter.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "deviceAccount": lambda n : setattr(self, 'device_account', n.get_object_value(WindowsDeviceAccount)), "deviceAccountEmail": lambda n : setattr(self, 'device_account_email', n.get_str_value()), "exchangeServer": lambda n : setattr(self, 'exchange_server', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "passwordRotationEnabled": lambda n : setattr(self, 'password_rotation_enabled', n.get_bool_value()), "sessionInitiationProtocalAddress": lambda n : setattr(self, 'session_initiation_protocal_address', n.get_str_value()), } @@ -72,7 +72,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("deviceAccount", self.device_account) writer.write_str_value("deviceAccountEmail", self.device_account_email) writer.write_str_value("exchangeServer", self.exchange_server) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("passwordRotationEnabled", self.password_rotation_enabled) writer.write_str_value("sessionInitiationProtocalAddress", self.session_initiation_protocal_address) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/upload_session.py b/msgraph/generated/models/upload_session.py index 429060614a4..dae1d3e6130 100644 --- a/msgraph/generated/models/upload_session.py +++ b/msgraph/generated/models/upload_session.py @@ -14,7 +14,7 @@ class UploadSession(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The date and time in UTC that the upload session will expire. The complete file must be uploaded before this expiration time is reached. expiration_date_time: Optional[datetime.datetime] = None - # A collection of byte ranges that the server is missing for the file. These ranges are zero indexed and of the format 'start-end' (e.g. '0-26' to indicate the first 27 bytes of the file). When uploading files as Outlook attachments, instead of a collection of ranges, this property always indicates a single value '{start}', the location in the file where the next upload should begin. + # A collection of byte ranges that the server is missing for the file. These ranges are zero indexed and of the format 'start-end' (for example '0-26' to indicate the first 27 bytes of the file). When uploading files as Outlook attachments, instead of a collection of ranges, this property always indicates a single value '{start}', the location in the file where the next upload should begin. next_expected_ranges: Optional[List[str]] = None # The OdataType property odata_type: Optional[str] = None @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_datetime_value()), "nextExpectedRanges": lambda n : setattr(self, 'next_expected_ranges', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "uploadUrl": lambda n : setattr(self, 'upload_url', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("expirationDateTime", self.expiration_date_time) writer.write_collection_of_primitive_values("nextExpectedRanges", self.next_expected_ranges) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("uploadUrl", self.upload_url) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/uri_click_security_state.py b/msgraph/generated/models/uri_click_security_state.py index 0c8f36bd150..9c1f597033c 100644 --- a/msgraph/generated/models/uri_click_security_state.py +++ b/msgraph/generated/models/uri_click_security_state.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "clickAction": lambda n : setattr(self, 'click_action', n.get_str_value()), "clickDateTime": lambda n : setattr(self, 'click_date_time', n.get_datetime_value()), "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sourceId": lambda n : setattr(self, 'source_id', n.get_str_value()), "uriDomain": lambda n : setattr(self, 'uri_domain', n.get_str_value()), "verdict": lambda n : setattr(self, 'verdict', n.get_str_value()), @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("clickAction", self.click_action) writer.write_datetime_value("clickDateTime", self.click_date_time) writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sourceId", self.source_id) writer.write_str_value("uriDomain", self.uri_domain) writer.write_str_value("verdict", self.verdict) diff --git a/msgraph/generated/models/usage_details.py b/msgraph/generated/models/usage_details.py index 06b93618907..c12293e207c 100644 --- a/msgraph/generated/models/usage_details.py +++ b/msgraph/generated/models/usage_details.py @@ -14,7 +14,7 @@ class UsageDetails(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The date and time the resource was last accessed by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. last_accessed_date_time: Optional[datetime.datetime] = None - # The date and time the resource was last modified by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time.For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + # The date and time the resource was last modified by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. last_modified_date_time: Optional[datetime.datetime] = None # The OdataType property odata_type: Optional[str] = None @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "lastAccessedDateTime": lambda n : setattr(self, 'last_accessed_date_time', n.get_datetime_value()), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("lastAccessedDateTime", self.last_accessed_date_time) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user.py b/msgraph/generated/models/user.py index 25cde5530cb..67dbdb0e8e5 100644 --- a/msgraph/generated/models/user.py +++ b/msgraph/generated/models/user.py @@ -32,7 +32,6 @@ from .managed_app_registration import ManagedAppRegistration from .managed_device import ManagedDevice from .message import Message - from .o_auth2_permission_grant import OAuth2PermissionGrant from .object_identity import ObjectIdentity from .office_graph_insights import OfficeGraphInsights from .onenote import Onenote @@ -40,6 +39,7 @@ from .on_premises_extension_attributes import OnPremisesExtensionAttributes from .on_premises_provisioning_error import OnPremisesProvisioningError from .outlook_user import OutlookUser + from .o_auth2_permission_grant import OAuth2PermissionGrant from .password_profile import PasswordProfile from .person import Person from .planner_user import PlannerUser @@ -109,7 +109,7 @@ class User(DirectoryObject): contacts: Optional[List[Contact]] = None # The country or region where the user is located; for example, US or UK. Maximum length is 128 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). country: Optional[str] = None - # The date and time the user was created, in ISO 8601 format and in UTC time. The value cannot be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Azure AD. Property is null for some users created before June 2018 and on-premises users that were synced to Azure AD before June 2018. Read-only. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). + # The date and time the user was created, in ISO 8601 format and in UTC time. The value cannot be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Microsoft Entra ID. Property is null for some users created before June 2018 and on-premises users that were synced to Microsoft Entra ID before June 2018. Read-only. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). created_date_time: Optional[datetime.datetime] = None # Directory objects that the user created. Read-only. Nullable. created_objects: Optional[List[DirectoryObject]] = None @@ -137,7 +137,7 @@ class User(DirectoryObject): employee_hire_date: Optional[datetime.datetime] = None # The employee identifier assigned to the user by the organization. The maximum length is 16 characters. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values). employee_id: Optional[str] = None - # The date and time when the user left or will leave the organization. To read this property, the calling app must be assigned the User-LifeCycleInfo.Read.All permission. To write this property, the calling app must be assigned the User.Read.All and User-LifeCycleInfo.ReadWrite.All permissions. To read this property in delegated scenarios, the admin needs one of the following Azure AD roles: Lifecycle Workflows Administrator, Global Reader, or Global Administrator. To write this property in delegated scenarios, the admin needs the Global Administrator role. Supports $filter (eq, ne, not , ge, le, in). For more information, see Configure the employeeLeaveDateTime property for a user. + # The date and time when the user left or will leave the organization. To read this property, the calling app must be assigned the User-LifeCycleInfo.Read.All permission. To write this property, the calling app must be assigned the User.Read.All and User-LifeCycleInfo.ReadWrite.All permissions. To read this property in delegated scenarios, the admin needs one of the following Microsoft Entra roles: Lifecycle Workflows Administrator, Global Reader, or Global Administrator. To write this property in delegated scenarios, the admin needs the Global Administrator role. Supports $filter (eq, ne, not , ge, le, in). For more information, see Configure the employeeLeaveDateTime property for a user. employee_leave_date_time: Optional[datetime.datetime] = None # Represents organization data (for example, division and costCenter) associated with a user. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). employee_org_data: Optional[EmployeeOrgData] = None @@ -175,7 +175,7 @@ class User(DirectoryObject): job_title: Optional[str] = None # The joinedTeams property joined_teams: Optional[List[Team]] = None - # The time when this Azure AD user last changed their password or when their password was created, whichever date the latest action was performed. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned only on $select. + # The time when this Microsoft Entra user last changed their password or when their password was created, whichever date the latest action was performed. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned only on $select. last_password_change_date_time: Optional[datetime.datetime] = None # Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, MinorWithOutParentalConsent, MinorWithParentalConsent, MinorNoParentalConsentRequired, NotAdult and Adult. Refer to the legal age group property definitions for further information. Returned only on $select. legal_age_group_classification: Optional[str] = None @@ -209,25 +209,25 @@ class User(DirectoryObject): oauth2_permission_grants: Optional[List[OAuth2PermissionGrant]] = None # The office location in the user's place of business. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). office_location: Optional[str] = None - # Contains the on-premises Active Directory distinguished name or DN. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. + # Contains the on-premises Active Directory distinguished name or DN. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. on_premises_distinguished_name: Optional[str] = None - # Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. + # Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. on_premises_domain_name: Optional[str] = None # Contains extensionAttributes1-15 for the user. These extension attributes are also known as Exchange custom attributes 1-15. For an onPremisesSyncEnabled user, the source of authority for this set of properties is the on-premises and is read-only. For a cloud-only user (where onPremisesSyncEnabled is false), these properties can be set during creation or update of a user object. For a cloud-only user previously synced from on-premises Active Directory, these properties are read-only in Microsoft Graph but can be fully managed through the Exchange Admin Center or the Exchange Online V2 module in PowerShell. Returned only on $select. Supports $filter (eq, ne, not, in). on_premises_extension_attributes: Optional[OnPremisesExtensionAttributes] = None - # This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters can't be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in).. + # This property is used to associate an on-premises Active Directory user account to their Microsoft Entra user object. This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters can't be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in).. on_premises_immutable_id: Optional[str] = None # Indicates the last time at which the object was synced with the on-premises directory; for example: 2013-02-16T03:04:54Z. 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. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in). on_premises_last_sync_date_time: Optional[datetime.datetime] = None # Errors when using Microsoft synchronization product during provisioning. Returned only on $select. Supports $filter (eq, not, ge, le). on_premises_provisioning_errors: Optional[List[OnPremisesProvisioningError]] = None - # Contains the on-premises samAccountName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). + # Contains the on-premises samAccountName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). on_premises_sam_account_name: Optional[str] = None # Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. Returned only on $select. Supports $filter (eq including on null values). on_premises_security_identifier: Optional[str] = None - # true if this user object is currently being synced from an on-premises Active Directory (AD); otherwise the user isn't being synced and can be managed in Azure Active Directory (Azure AD). Read-only. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). + # true if this user object is currently being synced from an on-premises Active Directory (AD); otherwise the user isn't being synced and can be managed in Microsoft Entra ID. Read-only. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). on_premises_sync_enabled: Optional[bool] = None - # Contains the on-premises userPrincipalName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). + # Contains the on-premises userPrincipalName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). on_premises_user_principal_name: Optional[str] = None # The onenote property onenote: Optional[Onenote] = None @@ -241,7 +241,7 @@ class User(DirectoryObject): owned_devices: Optional[List[DirectoryObject]] = None # Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). owned_objects: Optional[List[DirectoryObject]] = None - # Specifies password policies for the user. This value is an enumeration with one possible value being DisableStrongPassword, which allows weaker passwords than the default policy to be specified. DisablePasswordExpiration can also be specified. The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword. Returned only on $select. For more information on the default password policies, see Azure AD password policies. Supports $filter (ne, not, and eq on null values). + # Specifies password policies for the user. This value is an enumeration with one possible value being DisableStrongPassword, which allows weaker passwords than the default policy to be specified. DisablePasswordExpiration can also be specified. The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword. Returned only on $select. For more information on the default password policies, see Microsoft Entra password policies. Supports $filter (ne, not, and eq on null values). password_policies: Optional[str] = None # Specifies the password profile for the user. The profile contains the user's password. This property is required when a user is created. The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. By default, a strong password is required. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). password_profile: Optional[PasswordProfile] = None @@ -271,7 +271,7 @@ class User(DirectoryObject): provisioned_plans: Optional[List[ProvisionedPlan]] = None # For example: ['SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com']. Changes to the mail property will also update this collection to include the value as an SMTP address. For more information, see mail and proxyAddresses properties. The proxy address prefixed with SMTP (capitalized) is the primary proxy address while those prefixed with smtp are the secondary proxy addresses. For Azure AD B2C accounts, this property has a limit of 10 unique addresses. Read-only in Microsoft Graph; you can update this property only through the Microsoft 365 admin center. Not nullable. Returned only on $select. Supports $filter (eq, not, ge, le, startsWith, endsWith, /$count eq 0, /$count ne 0). proxy_addresses: Optional[List[str]] = None - # Devices that are registered for the user. Read-only. Nullable. Supports $expand. + # Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. registered_devices: Optional[List[DirectoryObject]] = None # A list for the user to enumerate their responsibilities. Returned only on $select. responsibilities: Optional[List[str]] = None @@ -287,7 +287,7 @@ class User(DirectoryObject): settings: Optional[UserSettings] = None # Do not use in Microsoft Graph. Manage this property through the Microsoft 365 admin center instead. Represents whether the user should be included in the Outlook global address list. See Known issue. show_in_address_list: Optional[bool] = None - # Get the last signed-in date and request ID of the sign-in for a given user. Read-only.Returned only on $select. Supports $filter (eq, ne, not, ge, le) but not with any other filterable properties. Note: Details for this property require an Azure AD Premium P1/P2 license and the AuditLog.Read.All permission.This property is not returned for a user who has never signed in or last signed in before April 2020. + # Get the last signed-in date and request ID of the sign-in for a given user. Read-only.Returned only on $select. Supports $filter (eq, ne, not, ge, le) but not with any other filterable properties. Note: Details for this property require a Microsoft Entra ID P1 or P2 license and the AuditLog.Read.All permission.This property is not returned for a user who has never signed in or last signed in before April 2020. sign_in_activity: Optional[SignInActivity] = None # Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application needs to acquire a new refresh token by making a request to the authorize endpoint. Read-only. Use revokeSignInSessions to reset. Returned only on $select. sign_in_sessions_valid_from_date_time: Optional[datetime.datetime] = None @@ -309,7 +309,7 @@ class User(DirectoryObject): usage_location: Optional[str] = None # The user principal name (UPN) of the user. The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of organization.NOTE: This property can't contain accent characters. Only the following characters are allowed A - Z, a - z, 0 - 9, ' . - _ ! # ^ ~. For the complete list of allowed characters, see username policies. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, endsWith) and $orderby. user_principal_name: Optional[str] = None - # A string value that can be used to classify user types in your directory, such as Member and Guest. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). NOTE: For more information about the permissions for member and guest users, see What are the default user permissions in Azure Active Directory? + # A string value that can be used to classify user types in your directory, such as Member and Guest. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). NOTE: For more information about the permissions for member and guest users, see What are the default user permissions in Microsoft Entra ID? user_type: Optional[str] = None @staticmethod @@ -355,7 +355,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .managed_app_registration import ManagedAppRegistration from .managed_device import ManagedDevice from .message import Message - from .o_auth2_permission_grant import OAuth2PermissionGrant from .object_identity import ObjectIdentity from .office_graph_insights import OfficeGraphInsights from .onenote import Onenote @@ -363,6 +362,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .on_premises_extension_attributes import OnPremisesExtensionAttributes from .on_premises_provisioning_error import OnPremisesProvisioningError from .outlook_user import OutlookUser + from .o_auth2_permission_grant import OAuth2PermissionGrant from .password_profile import PasswordProfile from .person import Person from .planner_user import PlannerUser @@ -407,7 +407,6 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .managed_app_registration import ManagedAppRegistration from .managed_device import ManagedDevice from .message import Message - from .o_auth2_permission_grant import OAuth2PermissionGrant from .object_identity import ObjectIdentity from .office_graph_insights import OfficeGraphInsights from .onenote import Onenote @@ -415,6 +414,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .on_premises_extension_attributes import OnPremisesExtensionAttributes from .on_premises_provisioning_error import OnPremisesProvisioningError from .outlook_user import OutlookUser + from .o_auth2_permission_grant import OAuth2PermissionGrant from .password_profile import PasswordProfile from .person import Person from .planner_user import PlannerUser diff --git a/msgraph/generated/models/user_attribute_values_item.py b/msgraph/generated/models/user_attribute_values_item.py index 7a1bb70d77f..3cce82798c2 100644 --- a/msgraph/generated/models/user_attribute_values_item.py +++ b/msgraph/generated/models/user_attribute_values_item.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isDefault": lambda n : setattr(self, 'is_default', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } return fields @@ -54,7 +54,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isDefault", self.is_default) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_autopilot_devices_summary.py b/msgraph/generated/models/user_experience_analytics_autopilot_devices_summary.py index be3539f4a66..25befd6c23e 100644 --- a/msgraph/generated/models/user_experience_analytics_autopilot_devices_summary.py +++ b/msgraph/generated/models/user_experience_analytics_autopilot_devices_summary.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "devicesNotAutopilotRegistered": lambda n : setattr(self, 'devices_not_autopilot_registered', n.get_int_value()), "devicesWithoutAutopilotProfileAssigned": lambda n : setattr(self, 'devices_without_autopilot_profile_assigned', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "totalWindows10DevicesWithoutTenantAttached": lambda n : setattr(self, 'total_windows10_devices_without_tenant_attached', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("devicesNotAutopilotRegistered", self.devices_not_autopilot_registered) writer.write_int_value("devicesWithoutAutopilotProfileAssigned", self.devices_without_autopilot_profile_assigned) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("totalWindows10DevicesWithoutTenantAttached", self.total_windows10_devices_without_tenant_attached) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_cloud_identity_devices_summary.py b/msgraph/generated/models/user_experience_analytics_cloud_identity_devices_summary.py index f060238f485..4bc1db45353 100644 --- a/msgraph/generated/models/user_experience_analytics_cloud_identity_devices_summary.py +++ b/msgraph/generated/models/user_experience_analytics_cloud_identity_devices_summary.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "deviceWithoutCloudIdentityCount": lambda n : setattr(self, 'device_without_cloud_identity_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("deviceWithoutCloudIdentityCount", self.device_without_cloud_identity_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_cloud_management_devices_summary.py b/msgraph/generated/models/user_experience_analytics_cloud_management_devices_summary.py index b54b993d06d..1a723c80d40 100644 --- a/msgraph/generated/models/user_experience_analytics_cloud_management_devices_summary.py +++ b/msgraph/generated/models/user_experience_analytics_cloud_management_devices_summary.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "coManagedDeviceCount": lambda n : setattr(self, 'co_managed_device_count', n.get_int_value()), "intuneDeviceCount": lambda n : setattr(self, 'intune_device_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantAttachDeviceCount": lambda n : setattr(self, 'tenant_attach_device_count', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("coManagedDeviceCount", self.co_managed_device_count) writer.write_int_value("intuneDeviceCount", self.intune_device_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("tenantAttachDeviceCount", self.tenant_attach_device_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_insight.py b/msgraph/generated/models/user_experience_analytics_insight.py index 20fcaae0917..04d66473174 100644 --- a/msgraph/generated/models/user_experience_analytics_insight.py +++ b/msgraph/generated/models/user_experience_analytics_insight.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "insightId": lambda n : setattr(self, 'insight_id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "severity": lambda n : setattr(self, 'severity', n.get_enum_value(UserExperienceAnalyticsInsightSeverity)), "userExperienceAnalyticsMetricId": lambda n : setattr(self, 'user_experience_analytics_metric_id', n.get_str_value()), "values": lambda n : setattr(self, 'values', n.get_collection_of_object_values(UserExperienceAnalyticsInsightValue)), @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("insightId", self.insight_id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("severity", self.severity) writer.write_str_value("userExperienceAnalyticsMetricId", self.user_experience_analytics_metric_id) writer.write_collection_of_object_values("values", self.values) diff --git a/msgraph/generated/models/user_experience_analytics_insight_value.py b/msgraph/generated/models/user_experience_analytics_insight_value.py index 2b6dee606a1..18dc43d1bc2 100644 --- a/msgraph/generated/models/user_experience_analytics_insight_value.py +++ b/msgraph/generated/models/user_experience_analytics_insight_value.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .insight_value_int import InsightValueInt fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_settings.py b/msgraph/generated/models/user_experience_analytics_settings.py index 83d7b81d5e1..cd8939e1d13 100644 --- a/msgraph/generated/models/user_experience_analytics_settings.py +++ b/msgraph/generated/models/user_experience_analytics_settings.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "configurationManagerDataConnectorConfigured": lambda n : setattr(self, 'configuration_manager_data_connector_configured', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_bool_value("configurationManagerDataConnectorConfigured", self.configuration_manager_data_connector_configured) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_windows10_devices_summary.py b/msgraph/generated/models/user_experience_analytics_windows10_devices_summary.py index 5835a93d9c5..149fe9998ce 100644 --- a/msgraph/generated/models/user_experience_analytics_windows10_devices_summary.py +++ b/msgraph/generated/models/user_experience_analytics_windows10_devices_summary.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "unsupportedOSversionDeviceCount": lambda n : setattr(self, 'unsupported_o_sversion_device_count', n.get_int_value()), } return fields @@ -49,7 +49,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("unsupportedOSversionDeviceCount", self.unsupported_o_sversion_device_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_experience_analytics_work_from_anywhere_devices_summary.py b/msgraph/generated/models/user_experience_analytics_work_from_anywhere_devices_summary.py index 08c0a895d75..634d453b46b 100644 --- a/msgraph/generated/models/user_experience_analytics_work_from_anywhere_devices_summary.py +++ b/msgraph/generated/models/user_experience_analytics_work_from_anywhere_devices_summary.py @@ -86,7 +86,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "devicesWithoutAutopilotProfileAssigned": lambda n : setattr(self, 'devices_without_autopilot_profile_assigned', n.get_int_value()), "devicesWithoutCloudIdentity": lambda n : setattr(self, 'devices_without_cloud_identity', n.get_int_value()), "intuneDevices": lambda n : setattr(self, 'intune_devices', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "tenantAttachDevices": lambda n : setattr(self, 'tenant_attach_devices', n.get_int_value()), "totalDevices": lambda n : setattr(self, 'total_devices', n.get_int_value()), "unsupportedOSversionDevices": lambda n : setattr(self, 'unsupported_o_sversion_devices', n.get_int_value()), @@ -112,7 +112,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("devicesWithoutAutopilotProfileAssigned", self.devices_without_autopilot_profile_assigned) writer.write_int_value("devicesWithoutCloudIdentity", self.devices_without_cloud_identity) writer.write_int_value("intuneDevices", self.intune_devices) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("tenantAttachDevices", self.tenant_attach_devices) writer.write_int_value("totalDevices", self.total_devices) writer.write_int_value("unsupportedOSversionDevices", self.unsupported_o_sversion_devices) diff --git a/msgraph/generated/models/user_flow_api_connector_configuration.py b/msgraph/generated/models/user_flow_api_connector_configuration.py index ee80d217f30..3ed0328adc7 100644 --- a/msgraph/generated/models/user_flow_api_connector_configuration.py +++ b/msgraph/generated/models/user_flow_api_connector_configuration.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .identity_api_connector import IdentityApiConnector fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "postAttributeCollection": lambda n : setattr(self, 'post_attribute_collection', n.get_object_value(IdentityApiConnector)), "postFederationSignup": lambda n : setattr(self, 'post_federation_signup', n.get_object_value(IdentityApiConnector)), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("postAttributeCollection", self.post_attribute_collection) writer.write_object_value("postFederationSignup", self.post_federation_signup) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_flow_language_configuration.py b/msgraph/generated/models/user_flow_language_configuration.py index c9573cec487..3b937854344 100644 --- a/msgraph/generated/models/user_flow_language_configuration.py +++ b/msgraph/generated/models/user_flow_language_configuration.py @@ -11,7 +11,7 @@ @dataclass class UserFlowLanguageConfiguration(Entity): - # Collection of pages with the default content to display in a user flow for a specified language. This collection does not allow any kind of modification. + # Collection of pages with the default content to display in a user flow for a specified language. This collection doesn't allow any kind of modification. default_pages: Optional[List[UserFlowLanguagePage]] = None # The language name to display. This property is read-only. display_name: Optional[str] = None @@ -19,7 +19,7 @@ class UserFlowLanguageConfiguration(Entity): is_enabled: Optional[bool] = None # The OdataType property odata_type: Optional[str] = None - # Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows to modify the content of the page, any other modification is not allowed (creation or deletion of pages). + # Collection of pages with the overrides messages to display in a user flow for a specified language. This collection only allows you to modify the content of the page, any other modification isn't allowed (creation or deletion of pages). overrides_pages: Optional[List[UserFlowLanguagePage]] = None @staticmethod diff --git a/msgraph/generated/models/user_last_sign_in_recommendation_insight_setting.py b/msgraph/generated/models/user_last_sign_in_recommendation_insight_setting.py index 5777d7073bb..ed746cc90f7 100644 --- a/msgraph/generated/models/user_last_sign_in_recommendation_insight_setting.py +++ b/msgraph/generated/models/user_last_sign_in_recommendation_insight_setting.py @@ -14,7 +14,7 @@ class UserLastSignInRecommendationInsightSetting(AccessReviewRecommendationInsightSetting): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.userLastSignInRecommendationInsightSetting" - # Optional. Indicates the time period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. + # Optional. Indicates the time period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Microsoft Entra roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. recommendation_look_back_duration: Optional[datetime.timedelta] = None # Indicates whether inactivity is calculated based on the user's inactivity in the tenant or in the application. The possible values are tenant, application, unknownFutureValue. application is only relevant when the access review is a review of an assignment to an application. sign_in_scope: Optional[UserSignInRecommendationScope] = None diff --git a/msgraph/generated/models/user_print.py b/msgraph/generated/models/user_print.py index c4d1e2addb7..10abf218a47 100644 --- a/msgraph/generated/models/user_print.py +++ b/msgraph/generated/models/user_print.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .printer_share import PrinterShare fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "recentPrinterShares": lambda n : setattr(self, 'recent_printer_shares', n.get_collection_of_object_values(PrinterShare)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("recentPrinterShares", self.recent_printer_shares) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_registration_details.py b/msgraph/generated/models/user_registration_details.py index b584dc9cda2..249428c4b79 100644 --- a/msgraph/generated/models/user_registration_details.py +++ b/msgraph/generated/models/user_registration_details.py @@ -15,9 +15,9 @@ class UserRegistrationDetails(Entity): # Indicates whether the user has an admin role in the tenant. This value can be used to check the authentication methods that privileged accounts are registered for and capable of. is_admin: Optional[bool] = None - # Indicates whether the user has registered a strong authentication method for multi-factor authentication. The method must be allowed by the authentication methods policy. Supports $filter (eq). + # Indicates whether the user has registered a strong authentication method for multifactor authentication. The method must be allowed by the authentication methods policy. Supports $filter (eq). is_mfa_capable: Optional[bool] = None - # Indicates whether the user has registered a strong authentication method for multi-factor authentication. The method may not necessarily be allowed by the authentication methods policy. Supports $filter (eq). + # Indicates whether the user has registered a strong authentication method for multifactor authentication. The method may not necessarily be allowed by the authentication methods policy. Supports $filter (eq). is_mfa_registered: Optional[bool] = None # Indicates whether the user has registered a passwordless strong authentication method (including FIDO2, Windows Hello for Business, and Microsoft Authenticator (Passwordless)) that is allowed by the authentication methods policy. Supports $filter (eq). is_passwordless_capable: Optional[bool] = None @@ -39,7 +39,7 @@ class UserRegistrationDetails(Entity): system_preferred_authentication_methods: Optional[List[str]] = None # The user display name, such as Adele Vance. Supports $filter (eq, startsWith) and $orderby. user_display_name: Optional[str] = None - # The method the user selected as the default second-factor for performing multi-factor authentication. Possible values are: push, oath, voiceMobile, voiceAlternateMobile, voiceOffice, sms, none, unknownFutureValue. This property is used as preferred MFA method when isSystemPreferredAuthenticationMethodEnabled is false. Supports $filter (any with eq). + # The method the user selected as the default second-factor for performing multifactor authentication. Possible values are: push, oath, voiceMobile, voiceAlternateMobile, voiceOffice, sms, none, unknownFutureValue. This property is used as preferred MFA method when isSystemPreferredAuthenticationMethodEnabled is false. Supports $filter (any with eq). user_preferred_method_for_secondary_authentication: Optional[UserDefaultAuthenticationMethod] = None # The user principal name, such as AdeleV@contoso.com. Supports $filter (eq, startsWith) and $orderby. user_principal_name: Optional[str] = None diff --git a/msgraph/generated/models/user_registration_feature_count.py b/msgraph/generated/models/user_registration_feature_count.py index 64883c3f6b5..f7b46b7cc95 100644 --- a/msgraph/generated/models/user_registration_feature_count.py +++ b/msgraph/generated/models/user_registration_feature_count.py @@ -43,7 +43,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "feature": lambda n : setattr(self, 'feature', n.get_enum_value(AuthenticationMethodFeature)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "userCount": lambda n : setattr(self, 'user_count', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("feature", self.feature) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("userCount", self.user_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_registration_feature_summary.py b/msgraph/generated/models/user_registration_feature_summary.py index 76833114b4d..d4ac411fcdc 100644 --- a/msgraph/generated/models/user_registration_feature_summary.py +++ b/msgraph/generated/models/user_registration_feature_summary.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .user_registration_feature_count import UserRegistrationFeatureCount fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "totalUserCount": lambda n : setattr(self, 'total_user_count', n.get_int_value()), "userRegistrationFeatureCounts": lambda n : setattr(self, 'user_registration_feature_counts', n.get_collection_of_object_values(UserRegistrationFeatureCount)), "userRoles": lambda n : setattr(self, 'user_roles', n.get_enum_value(IncludedUserRoles)), @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("totalUserCount", self.total_user_count) writer.write_collection_of_object_values("userRegistrationFeatureCounts", self.user_registration_feature_counts) writer.write_enum_value("userRoles", self.user_roles) diff --git a/msgraph/generated/models/user_registration_method_count.py b/msgraph/generated/models/user_registration_method_count.py index 990f56166ee..73833b68f5e 100644 --- a/msgraph/generated/models/user_registration_method_count.py +++ b/msgraph/generated/models/user_registration_method_count.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "authenticationMethod": lambda n : setattr(self, 'authentication_method', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "userCount": lambda n : setattr(self, 'user_count', n.get_int_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("authenticationMethod", self.authentication_method) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("userCount", self.user_count) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_registration_method_summary.py b/msgraph/generated/models/user_registration_method_summary.py index 0a6f09f16ec..8ee0d78093b 100644 --- a/msgraph/generated/models/user_registration_method_summary.py +++ b/msgraph/generated/models/user_registration_method_summary.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .user_registration_method_count import UserRegistrationMethodCount fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "totalUserCount": lambda n : setattr(self, 'total_user_count', n.get_int_value()), "userRegistrationMethodCounts": lambda n : setattr(self, 'user_registration_method_counts', n.get_collection_of_object_values(UserRegistrationMethodCount)), "userRoles": lambda n : setattr(self, 'user_roles', n.get_enum_value(IncludedUserRoles)), @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("totalUserCount", self.total_user_count) writer.write_collection_of_object_values("userRegistrationMethodCounts", self.user_registration_method_counts) writer.write_enum_value("userRoles", self.user_roles) diff --git a/msgraph/generated/models/user_security_state.py b/msgraph/generated/models/user_security_state.py index 375434afac3..63149a82059 100644 --- a/msgraph/generated/models/user_security_state.py +++ b/msgraph/generated/models/user_security_state.py @@ -83,7 +83,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "logonIp": lambda n : setattr(self, 'logon_ip', n.get_str_value()), "logonLocation": lambda n : setattr(self, 'logon_location', n.get_str_value()), "logonType": lambda n : setattr(self, 'logon_type', n.get_enum_value(LogonType)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "onPremisesSecurityIdentifier": lambda n : setattr(self, 'on_premises_security_identifier', n.get_str_value()), "riskScore": lambda n : setattr(self, 'risk_score', n.get_str_value()), "userAccountType": lambda n : setattr(self, 'user_account_type', n.get_enum_value(UserAccountSecurityType)), @@ -109,7 +109,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("logonIp", self.logon_ip) writer.write_str_value("logonLocation", self.logon_location) writer.write_enum_value("logonType", self.logon_type) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("onPremisesSecurityIdentifier", self.on_premises_security_identifier) writer.write_str_value("riskScore", self.risk_score) writer.write_enum_value("userAccountType", self.user_account_type) diff --git a/msgraph/generated/models/user_simulation_details.py b/msgraph/generated/models/user_simulation_details.py index 31bf65444c7..9db12c5f5fb 100644 --- a/msgraph/generated/models/user_simulation_details.py +++ b/msgraph/generated/models/user_simulation_details.py @@ -68,7 +68,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "compromisedDateTime": lambda n : setattr(self, 'compromised_date_time', n.get_datetime_value()), "inProgressTrainingsCount": lambda n : setattr(self, 'in_progress_trainings_count', n.get_int_value()), "isCompromised": lambda n : setattr(self, 'is_compromised', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "reportedPhishDateTime": lambda n : setattr(self, 'reported_phish_date_time', n.get_datetime_value()), "simulationEvents": lambda n : setattr(self, 'simulation_events', n.get_collection_of_object_values(UserSimulationEventInfo)), "simulationUser": lambda n : setattr(self, 'simulation_user', n.get_object_value(AttackSimulationUser)), @@ -89,7 +89,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("compromisedDateTime", self.compromised_date_time) writer.write_int_value("inProgressTrainingsCount", self.in_progress_trainings_count) writer.write_bool_value("isCompromised", self.is_compromised) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_datetime_value("reportedPhishDateTime", self.reported_phish_date_time) writer.write_collection_of_object_values("simulationEvents", self.simulation_events) writer.write_object_value("simulationUser", self.simulation_user) diff --git a/msgraph/generated/models/user_simulation_event_info.py b/msgraph/generated/models/user_simulation_event_info.py index a77eb55cf8d..c422f1d50c8 100644 --- a/msgraph/generated/models/user_simulation_event_info.py +++ b/msgraph/generated/models/user_simulation_event_info.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "eventDateTime": lambda n : setattr(self, 'event_date_time', n.get_datetime_value()), "eventName": lambda n : setattr(self, 'event_name', n.get_str_value()), "ipAddress": lambda n : setattr(self, 'ip_address', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "osPlatformDeviceDetails": lambda n : setattr(self, 'os_platform_device_details', n.get_str_value()), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("eventDateTime", self.event_date_time) writer.write_str_value("eventName", self.event_name) writer.write_str_value("ipAddress", self.ip_address) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("osPlatformDeviceDetails", self.os_platform_device_details) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_training_content_event_info.py b/msgraph/generated/models/user_training_content_event_info.py index e830d07b0ee..2c822ade792 100644 --- a/msgraph/generated/models/user_training_content_event_info.py +++ b/msgraph/generated/models/user_training_content_event_info.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "browser": lambda n : setattr(self, 'browser', n.get_str_value()), "contentDateTime": lambda n : setattr(self, 'content_date_time', n.get_datetime_value()), "ipAddress": lambda n : setattr(self, 'ip_address', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "osPlatformDeviceDetails": lambda n : setattr(self, 'os_platform_device_details', n.get_str_value()), "potentialScoreImpact": lambda n : setattr(self, 'potential_score_impact', n.get_float_value()), } @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("browser", self.browser) writer.write_datetime_value("contentDateTime", self.content_date_time) writer.write_str_value("ipAddress", self.ip_address) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("osPlatformDeviceDetails", self.os_platform_device_details) writer.write_float_value("potentialScoreImpact", self.potential_score_impact) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/user_training_event_info.py b/msgraph/generated/models/user_training_event_info.py index e43d4a954bc..f1e92557b79 100644 --- a/msgraph/generated/models/user_training_event_info.py +++ b/msgraph/generated/models/user_training_event_info.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), "latestTrainingStatus": lambda n : setattr(self, 'latest_training_status', n.get_enum_value(TrainingStatus)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "trainingAssignedProperties": lambda n : setattr(self, 'training_assigned_properties', n.get_object_value(UserTrainingContentEventInfo)), "trainingCompletedProperties": lambda n : setattr(self, 'training_completed_properties', n.get_object_value(UserTrainingContentEventInfo)), "trainingUpdatedProperties": lambda n : setattr(self, 'training_updated_properties', n.get_object_value(UserTrainingContentEventInfo)), @@ -70,7 +70,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) writer.write_enum_value("latestTrainingStatus", self.latest_training_status) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_object_value("trainingAssignedProperties", self.training_assigned_properties) writer.write_object_value("trainingCompletedProperties", self.training_completed_properties) writer.write_object_value("trainingUpdatedProperties", self.training_updated_properties) diff --git a/msgraph/generated/models/user_training_status_info.py b/msgraph/generated/models/user_training_status_info.py index 50cc0c846f5..a54a578ce4f 100644 --- a/msgraph/generated/models/user_training_status_info.py +++ b/msgraph/generated/models/user_training_status_info.py @@ -50,7 +50,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "assignedDateTime": lambda n : setattr(self, 'assigned_date_time', n.get_datetime_value()), "completionDateTime": lambda n : setattr(self, 'completion_date_time', n.get_datetime_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "trainingStatus": lambda n : setattr(self, 'training_status', n.get_enum_value(TrainingStatus)), } return fields @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("assignedDateTime", self.assigned_date_time) writer.write_datetime_value("completionDateTime", self.completion_date_time) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("trainingStatus", self.training_status) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/verified_domain.py b/msgraph/generated/models/verified_domain.py index 924713078dd..04945b1090c 100644 --- a/msgraph/generated/models/verified_domain.py +++ b/msgraph/generated/models/verified_domain.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "isDefault": lambda n : setattr(self, 'is_default', n.get_bool_value()), "isInitial": lambda n : setattr(self, 'is_initial', n.get_bool_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("isDefault", self.is_default) writer.write_bool_value("isInitial", self.is_initial) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/verified_publisher.py b/msgraph/generated/models/verified_publisher.py index 9ef83278bbd..114b72b8bf1 100644 --- a/msgraph/generated/models/verified_publisher.py +++ b/msgraph/generated/models/verified_publisher.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "addedDateTime": lambda n : setattr(self, 'added_date_time', n.get_datetime_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "verifiedPublisherId": lambda n : setattr(self, 'verified_publisher_id', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_datetime_value("addedDateTime", self.added_date_time) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("verifiedPublisherId", self.verified_publisher_id) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/video.py b/msgraph/generated/models/video.py index 502dc067ea8..8ec2feffc02 100644 --- a/msgraph/generated/models/video.py +++ b/msgraph/generated/models/video.py @@ -60,7 +60,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "fourCC": lambda n : setattr(self, 'four_c_c', n.get_str_value()), "frameRate": lambda n : setattr(self, 'frame_rate', n.get_float_value()), "height": lambda n : setattr(self, 'height', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "width": lambda n : setattr(self, 'width', n.get_int_value()), } return fields @@ -82,7 +82,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("fourCC", self.four_c_c) writer.write_float_value("frameRate", self.frame_rate) writer.write_int_value("height", self.height) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("width", self.width) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/visual_info.py b/msgraph/generated/models/visual_info.py index 9172fad76a4..31e29821b52 100644 --- a/msgraph/generated/models/visual_info.py +++ b/msgraph/generated/models/visual_info.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "content": lambda n : setattr(self, 'content', n.get_object_value(Json)), "description": lambda n : setattr(self, 'description', n.get_str_value()), "displayText": lambda n : setattr(self, 'display_text', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_object_value("content", self.content) writer.write_str_value("description", self.description) writer.write_str_value("displayText", self.display_text) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/vpp_licensing_type.py b/msgraph/generated/models/vpp_licensing_type.py index 85d71d79373..7bd9c18d6a1 100644 --- a/msgraph/generated/models/vpp_licensing_type.py +++ b/msgraph/generated/models/vpp_licensing_type.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "supportsDeviceLicensing": lambda n : setattr(self, 'supports_device_licensing', n.get_bool_value()), "supportsUserLicensing": lambda n : setattr(self, 'supports_user_licensing', n.get_bool_value()), } @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("supportsDeviceLicensing", self.supports_device_licensing) writer.write_bool_value("supportsUserLicensing", self.supports_user_licensing) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/vulnerability_state.py b/msgraph/generated/models/vulnerability_state.py index 9417b296c9a..39f67baa7cd 100644 --- a/msgraph/generated/models/vulnerability_state.py +++ b/msgraph/generated/models/vulnerability_state.py @@ -38,7 +38,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "cve": lambda n : setattr(self, 'cve', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "severity": lambda n : setattr(self, 'severity', n.get_str_value()), "wasRunning": lambda n : setattr(self, 'was_running', n.get_bool_value()), } @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("cve", self.cve) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("severity", self.severity) writer.write_bool_value("wasRunning", self.was_running) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/watermark_protection_values.py b/msgraph/generated/models/watermark_protection_values.py index 8c26032512b..0d4ebbe694c 100644 --- a/msgraph/generated/models/watermark_protection_values.py +++ b/msgraph/generated/models/watermark_protection_values.py @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "isEnabledForContentSharing": lambda n : setattr(self, 'is_enabled_for_content_sharing', n.get_bool_value()), "isEnabledForVideo": lambda n : setattr(self, 'is_enabled_for_video', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -51,7 +51,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_bool_value("isEnabledForContentSharing", self.is_enabled_for_content_sharing) writer.write_bool_value("isEnabledForVideo", self.is_enabled_for_video) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/web_application.py b/msgraph/generated/models/web_application.py index cb223b51a32..65ae4a116d1 100644 --- a/msgraph/generated/models/web_application.py +++ b/msgraph/generated/models/web_application.py @@ -54,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "homePageUrl": lambda n : setattr(self, 'home_page_url', n.get_str_value()), "implicitGrantSettings": lambda n : setattr(self, 'implicit_grant_settings', n.get_object_value(ImplicitGrantSettings)), "logoutUrl": lambda n : setattr(self, 'logout_url', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "redirectUriSettings": lambda n : setattr(self, 'redirect_uri_settings', n.get_collection_of_object_values(RedirectUriSettings)), "redirectUris": lambda n : setattr(self, 'redirect_uris', n.get_collection_of_primitive_values(str)), } @@ -71,7 +71,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("homePageUrl", self.home_page_url) writer.write_object_value("implicitGrantSettings", self.implicit_grant_settings) writer.write_str_value("logoutUrl", self.logout_url) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("redirectUriSettings", self.redirect_uri_settings) writer.write_collection_of_primitive_values("redirectUris", self.redirect_uris) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/website.py b/msgraph/generated/models/website.py index 1ba89765508..d3d80273f9d 100644 --- a/msgraph/generated/models/website.py +++ b/msgraph/generated/models/website.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "address": lambda n : setattr(self, 'address', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(WebsiteType)), } return fields @@ -61,7 +61,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("address", self.address) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/win32_lob_app_install_experience.py b/msgraph/generated/models/win32_lob_app_install_experience.py index dace53705f5..d3ceed4e833 100644 --- a/msgraph/generated/models/win32_lob_app_install_experience.py +++ b/msgraph/generated/models/win32_lob_app_install_experience.py @@ -49,7 +49,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "deviceRestartBehavior": lambda n : setattr(self, 'device_restart_behavior', n.get_enum_value(Win32LobAppRestartBehavior)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "runAsAccount": lambda n : setattr(self, 'run_as_account', n.get_enum_value(RunAsAccountType)), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_enum_value("deviceRestartBehavior", self.device_restart_behavior) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("runAsAccount", self.run_as_account) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/win32_lob_app_msi_information.py b/msgraph/generated/models/win32_lob_app_msi_information.py index 112d1988432..6900a951814 100644 --- a/msgraph/generated/models/win32_lob_app_msi_information.py +++ b/msgraph/generated/models/win32_lob_app_msi_information.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .win32_lob_app_msi_package_type import Win32LobAppMsiPackageType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "packageType": lambda n : setattr(self, 'package_type', n.get_enum_value(Win32LobAppMsiPackageType)), "productCode": lambda n : setattr(self, 'product_code', n.get_str_value()), "productName": lambda n : setattr(self, 'product_name', n.get_str_value()), @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("packageType", self.package_type) writer.write_str_value("productCode", self.product_code) writer.write_str_value("productName", self.product_name) diff --git a/msgraph/generated/models/win32_lob_app_restart_settings.py b/msgraph/generated/models/win32_lob_app_restart_settings.py index 3cec3a3b672..2cbf894f887 100644 --- a/msgraph/generated/models/win32_lob_app_restart_settings.py +++ b/msgraph/generated/models/win32_lob_app_restart_settings.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "countdownDisplayBeforeRestartInMinutes": lambda n : setattr(self, 'countdown_display_before_restart_in_minutes', n.get_int_value()), "gracePeriodInMinutes": lambda n : setattr(self, 'grace_period_in_minutes', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "restartNotificationSnoozeDurationInMinutes": lambda n : setattr(self, 'restart_notification_snooze_duration_in_minutes', n.get_int_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_int_value("countdownDisplayBeforeRestartInMinutes", self.countdown_display_before_restart_in_minutes) writer.write_int_value("gracePeriodInMinutes", self.grace_period_in_minutes) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("restartNotificationSnoozeDurationInMinutes", self.restart_notification_snooze_duration_in_minutes) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/win32_lob_app_return_code.py b/msgraph/generated/models/win32_lob_app_return_code.py index 86752073f7c..3e2fc86b5fb 100644 --- a/msgraph/generated/models/win32_lob_app_return_code.py +++ b/msgraph/generated/models/win32_lob_app_return_code.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .win32_lob_app_return_code_type import Win32LobAppReturnCodeType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "returnCode": lambda n : setattr(self, 'return_code', n.get_int_value()), "type": lambda n : setattr(self, 'type', n.get_enum_value(Win32LobAppReturnCodeType)), } @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("returnCode", self.return_code) writer.write_enum_value("type", self.type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/win32_lob_app_rule.py b/msgraph/generated/models/win32_lob_app_rule.py index f7651517504..40a1d2b11a4 100644 --- a/msgraph/generated/models/win32_lob_app_rule.py +++ b/msgraph/generated/models/win32_lob_app_rule.py @@ -75,7 +75,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .win32_lob_app_rule_type import Win32LobAppRuleType fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "ruleType": lambda n : setattr(self, 'rule_type', n.get_enum_value(Win32LobAppRuleType)), } return fields @@ -88,7 +88,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("ruleType", self.rule_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows10_network_proxy_server.py b/msgraph/generated/models/windows10_network_proxy_server.py index d9132643f9c..8631e8fddc3 100644 --- a/msgraph/generated/models/windows10_network_proxy_server.py +++ b/msgraph/generated/models/windows10_network_proxy_server.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "address": lambda n : setattr(self, 'address', n.get_str_value()), "exceptions": lambda n : setattr(self, 'exceptions', n.get_collection_of_primitive_values(str)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "useForLocalAddresses": lambda n : setattr(self, 'use_for_local_addresses', n.get_bool_value()), } return fields @@ -57,7 +57,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_str_value("address", self.address) writer.write_collection_of_primitive_values("exceptions", self.exceptions) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("useForLocalAddresses", self.use_for_local_addresses) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_device_account.py b/msgraph/generated/models/windows_device_account.py index a7463897a61..1f5a17a4183 100644 --- a/msgraph/generated/models/windows_device_account.py +++ b/msgraph/generated/models/windows_device_account.py @@ -5,8 +5,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from .windows_device_a_d_account import WindowsDeviceADAccount from .windows_device_azure_a_d_account import WindowsDeviceAzureADAccount + from .windows_device_a_d_account import WindowsDeviceADAccount @dataclass class WindowsDeviceAccount(AdditionalDataHolder, BackedModel, Parsable): @@ -48,14 +48,14 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ - from .windows_device_a_d_account import WindowsDeviceADAccount from .windows_device_azure_a_d_account import WindowsDeviceAzureADAccount - from .windows_device_a_d_account import WindowsDeviceADAccount + from .windows_device_azure_a_d_account import WindowsDeviceAzureADAccount + from .windows_device_a_d_account import WindowsDeviceADAccount fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "password": lambda n : setattr(self, 'password', n.get_str_value()), } return fields @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("password", self.password) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_firewall_network_profile.py b/msgraph/generated/models/windows_firewall_network_profile.py index e9c371e9649..a9f3c832a85 100644 --- a/msgraph/generated/models/windows_firewall_network_profile.py +++ b/msgraph/generated/models/windows_firewall_network_profile.py @@ -72,7 +72,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "inboundConnectionsBlocked": lambda n : setattr(self, 'inbound_connections_blocked', n.get_bool_value()), "inboundNotificationsBlocked": lambda n : setattr(self, 'inbound_notifications_blocked', n.get_bool_value()), "incomingTrafficBlocked": lambda n : setattr(self, 'incoming_traffic_blocked', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "outboundConnectionsBlocked": lambda n : setattr(self, 'outbound_connections_blocked', n.get_bool_value()), "policyRulesFromGroupPolicyMerged": lambda n : setattr(self, 'policy_rules_from_group_policy_merged', n.get_bool_value()), "securedPacketExemptionAllowed": lambda n : setattr(self, 'secured_packet_exemption_allowed', n.get_bool_value()), @@ -96,7 +96,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("inboundConnectionsBlocked", self.inbound_connections_blocked) writer.write_bool_value("inboundNotificationsBlocked", self.inbound_notifications_blocked) writer.write_bool_value("incomingTrafficBlocked", self.incoming_traffic_blocked) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("outboundConnectionsBlocked", self.outbound_connections_blocked) writer.write_bool_value("policyRulesFromGroupPolicyMerged", self.policy_rules_from_group_policy_merged) writer.write_bool_value("securedPacketExemptionAllowed", self.secured_packet_exemption_allowed) diff --git a/msgraph/generated/models/windows_information_protection_app.py b/msgraph/generated/models/windows_information_protection_app.py index be45c1d26f8..6154eeae8cc 100644 --- a/msgraph/generated/models/windows_information_protection_app.py +++ b/msgraph/generated/models/windows_information_protection_app.py @@ -69,7 +69,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "denied": lambda n : setattr(self, 'denied', n.get_bool_value()), "description": lambda n : setattr(self, 'description', n.get_str_value()), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "productName": lambda n : setattr(self, 'product_name', n.get_str_value()), "publisherName": lambda n : setattr(self, 'publisher_name', n.get_str_value()), } @@ -86,7 +86,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("denied", self.denied) writer.write_str_value("description", self.description) writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("productName", self.product_name) writer.write_str_value("publisherName", self.publisher_name) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_information_protection_data_recovery_certificate.py b/msgraph/generated/models/windows_information_protection_data_recovery_certificate.py index 023ec530a13..43d675ce88b 100644 --- a/msgraph/generated/models/windows_information_protection_data_recovery_certificate.py +++ b/msgraph/generated/models/windows_information_protection_data_recovery_certificate.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "certificate": lambda n : setattr(self, 'certificate', n.get_bytes_value()), "description": lambda n : setattr(self, 'description', n.get_str_value()), "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "subjectName": lambda n : setattr(self, 'subject_name', n.get_str_value()), } return fields @@ -62,7 +62,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bytes_value("certificate", self.certificate) writer.write_str_value("description", self.description) writer.write_datetime_value("expirationDateTime", self.expiration_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("subjectName", self.subject_name) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_information_protection_i_p_range_collection.py b/msgraph/generated/models/windows_information_protection_i_p_range_collection.py index 64f452774eb..32d51f48494 100644 --- a/msgraph/generated/models/windows_information_protection_i_p_range_collection.py +++ b/msgraph/generated/models/windows_information_protection_i_p_range_collection.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "ranges": lambda n : setattr(self, 'ranges', n.get_collection_of_object_values(IpRange)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("ranges", self.ranges) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_information_protection_proxied_domain_collection.py b/msgraph/generated/models/windows_information_protection_proxied_domain_collection.py index d94ef62a703..dc04d5004c9 100644 --- a/msgraph/generated/models/windows_information_protection_proxied_domain_collection.py +++ b/msgraph/generated/models/windows_information_protection_proxied_domain_collection.py @@ -46,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "proxiedDomains": lambda n : setattr(self, 'proxied_domains', n.get_collection_of_object_values(ProxiedDomain)), } return fields @@ -60,7 +60,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("proxiedDomains", self.proxied_domains) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_information_protection_resource_collection.py b/msgraph/generated/models/windows_information_protection_resource_collection.py index e91bd3d4c2e..bd8df10134a 100644 --- a/msgraph/generated/models/windows_information_protection_resource_collection.py +++ b/msgraph/generated/models/windows_information_protection_resource_collection.py @@ -39,7 +39,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "resources": lambda n : setattr(self, 'resources', n.get_collection_of_primitive_values(str)), } return fields @@ -53,7 +53,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("displayName", self.display_name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_primitive_values("resources", self.resources) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_malware_category_count.py b/msgraph/generated/models/windows_malware_category_count.py index b55cb5e2b56..9548ceef886 100644 --- a/msgraph/generated/models/windows_malware_category_count.py +++ b/msgraph/generated/models/windows_malware_category_count.py @@ -57,7 +57,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "deviceCount": lambda n : setattr(self, 'device_count', n.get_int_value()), "distinctActiveMalwareCount": lambda n : setattr(self, 'distinct_active_malware_count', n.get_int_value()), "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -74,7 +74,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("deviceCount", self.device_count) writer.write_int_value("distinctActiveMalwareCount", self.distinct_active_malware_count) writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_malware_execution_state_count.py b/msgraph/generated/models/windows_malware_execution_state_count.py index 2c368bc9b3a..f7f00a940a8 100644 --- a/msgraph/generated/models/windows_malware_execution_state_count.py +++ b/msgraph/generated/models/windows_malware_execution_state_count.py @@ -51,7 +51,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "deviceCount": lambda n : setattr(self, 'device_count', n.get_int_value()), "executionState": lambda n : setattr(self, 'execution_state', n.get_enum_value(WindowsMalwareExecutionState)), "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -66,7 +66,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("deviceCount", self.device_count) writer.write_enum_value("executionState", self.execution_state) writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_malware_name_count.py b/msgraph/generated/models/windows_malware_name_count.py index 70d05807cc0..d38635f5a68 100644 --- a/msgraph/generated/models/windows_malware_name_count.py +++ b/msgraph/generated/models/windows_malware_name_count.py @@ -47,7 +47,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), "malwareIdentifier": lambda n : setattr(self, 'malware_identifier', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) writer.write_str_value("malwareIdentifier", self.malware_identifier) writer.write_str_value("name", self.name) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_malware_overview.py b/msgraph/generated/models/windows_malware_overview.py index cac02cc9ee6..8da0b70af19 100644 --- a/msgraph/generated/models/windows_malware_overview.py +++ b/msgraph/generated/models/windows_malware_overview.py @@ -80,7 +80,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "malwareNameSummary": lambda n : setattr(self, 'malware_name_summary', n.get_collection_of_object_values(WindowsMalwareNameCount)), "malwareSeveritySummary": lambda n : setattr(self, 'malware_severity_summary', n.get_collection_of_object_values(WindowsMalwareSeverityCount)), "malwareStateSummary": lambda n : setattr(self, 'malware_state_summary', n.get_collection_of_object_values(WindowsMalwareStateCount)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "osVersionsSummary": lambda n : setattr(self, 'os_versions_summary', n.get_collection_of_object_values(OsVersionCount)), "totalDistinctMalwareCount": lambda n : setattr(self, 'total_distinct_malware_count', n.get_int_value()), "totalMalwareCount": lambda n : setattr(self, 'total_malware_count', n.get_int_value()), @@ -101,7 +101,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_collection_of_object_values("malwareNameSummary", self.malware_name_summary) writer.write_collection_of_object_values("malwareSeveritySummary", self.malware_severity_summary) writer.write_collection_of_object_values("malwareStateSummary", self.malware_state_summary) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("osVersionsSummary", self.os_versions_summary) writer.write_int_value("totalDistinctMalwareCount", self.total_distinct_malware_count) writer.write_int_value("totalMalwareCount", self.total_malware_count) diff --git a/msgraph/generated/models/windows_malware_severity_count.py b/msgraph/generated/models/windows_malware_severity_count.py index 84305892cfd..99c7bde48e8 100644 --- a/msgraph/generated/models/windows_malware_severity_count.py +++ b/msgraph/generated/models/windows_malware_severity_count.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "distinctMalwareCount": lambda n : setattr(self, 'distinct_malware_count', n.get_int_value()), "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), "malwareDetectionCount": lambda n : setattr(self, 'malware_detection_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "severity": lambda n : setattr(self, 'severity', n.get_enum_value(WindowsMalwareSeverity)), } return fields @@ -69,7 +69,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("distinctMalwareCount", self.distinct_malware_count) writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) writer.write_int_value("malwareDetectionCount", self.malware_detection_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("severity", self.severity) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_malware_state_count.py b/msgraph/generated/models/windows_malware_state_count.py index fdb650b5610..2cb76c3c5f0 100644 --- a/msgraph/generated/models/windows_malware_state_count.py +++ b/msgraph/generated/models/windows_malware_state_count.py @@ -56,7 +56,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "distinctMalwareCount": lambda n : setattr(self, 'distinct_malware_count', n.get_int_value()), "lastUpdateDateTime": lambda n : setattr(self, 'last_update_date_time', n.get_datetime_value()), "malwareDetectionCount": lambda n : setattr(self, 'malware_detection_count', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "state": lambda n : setattr(self, 'state', n.get_enum_value(WindowsMalwareThreatState)), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_int_value("distinctMalwareCount", self.distinct_malware_count) writer.write_datetime_value("lastUpdateDateTime", self.last_update_date_time) writer.write_int_value("malwareDetectionCount", self.malware_detection_count) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("state", self.state) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/windows_minimum_operating_system.py b/msgraph/generated/models/windows_minimum_operating_system.py index 979a42ff28c..b2f8838c2cc 100644 --- a/msgraph/generated/models/windows_minimum_operating_system.py +++ b/msgraph/generated/models/windows_minimum_operating_system.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "v10_0": lambda n : setattr(self, 'v10_0', n.get_bool_value()), "v8_0": lambda n : setattr(self, 'v8_0', n.get_bool_value()), "v8_1": lambda n : setattr(self, 'v8_1', n.get_bool_value()), @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("v10_0", self.v10_0) writer.write_bool_value("v8_0", self.v8_0) writer.write_bool_value("v8_1", self.v8_1) diff --git a/msgraph/generated/models/windows_update_install_schedule_type.py b/msgraph/generated/models/windows_update_install_schedule_type.py index 852f7f6ecc9..6806b6ab6bb 100644 --- a/msgraph/generated/models/windows_update_install_schedule_type.py +++ b/msgraph/generated/models/windows_update_install_schedule_type.py @@ -53,7 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .windows_update_scheduled_install import WindowsUpdateScheduledInstall fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -65,7 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workbook_chart_font.py b/msgraph/generated/models/workbook_chart_font.py index 7c8044be753..fd4012e2352 100644 --- a/msgraph/generated/models/workbook_chart_font.py +++ b/msgraph/generated/models/workbook_chart_font.py @@ -12,15 +12,15 @@ class WorkbookChartFont(Entity): # Represents the bold status of font. bold: Optional[bool] = None - # HTML color code representation of the text color. E.g. #FF0000 represents Red. + # HTML color code representation of the text color. for example #FF0000 represents Red. color: Optional[str] = None # Represents the italic status of the font. italic: Optional[bool] = None - # Font name (e.g. 'Calibri') + # Font name (for example 'Calibri') name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # Size of the font (e.g. 11) + # Size of the font (for example 11) size: Optional[float] = None # Type of underline applied to the font. The possible values are: None, Single. underline: Optional[str] = None diff --git a/msgraph/generated/models/workbook_chart_point_format.py b/msgraph/generated/models/workbook_chart_point_format.py index 78ac36c3ac7..92286008022 100644 --- a/msgraph/generated/models/workbook_chart_point_format.py +++ b/msgraph/generated/models/workbook_chart_point_format.py @@ -11,7 +11,7 @@ @dataclass class WorkbookChartPointFormat(Entity): - # Represents the fill format of a chart, which includes background formating information. Read-only. + # Represents the fill format of a chart, which includes background formatting information. Read-only. fill: Optional[WorkbookChartFill] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/workbook_chart_series_format.py b/msgraph/generated/models/workbook_chart_series_format.py index 305673e5cd9..d778d0256a7 100644 --- a/msgraph/generated/models/workbook_chart_series_format.py +++ b/msgraph/generated/models/workbook_chart_series_format.py @@ -12,7 +12,7 @@ @dataclass class WorkbookChartSeriesFormat(Entity): - # Represents the fill format of a chart series, which includes background formating information. Read-only. + # Represents the fill format of a chart series, which includes background formatting information. Read-only. fill: Optional[WorkbookChartFill] = None # Represents line formatting. Read-only. line: Optional[WorkbookChartLineFormat] = None diff --git a/msgraph/generated/models/workbook_chart_title.py b/msgraph/generated/models/workbook_chart_title.py index 6c74ab3fe3e..a75dfe7fcfe 100644 --- a/msgraph/generated/models/workbook_chart_title.py +++ b/msgraph/generated/models/workbook_chart_title.py @@ -19,7 +19,7 @@ class WorkbookChartTitle(Entity): overlay: Optional[bool] = None # Represents the title text of a chart. text: Optional[str] = None - # A boolean value the represents the visibility of a chart title object. + # A boolean value that represents the visibility of a chart title object. visible: Optional[bool] = None @staticmethod diff --git a/msgraph/generated/models/workbook_filter_criteria.py b/msgraph/generated/models/workbook_filter_criteria.py index 9651ff7cc23..bc6f2f56940 100644 --- a/msgraph/generated/models/workbook_filter_criteria.py +++ b/msgraph/generated/models/workbook_filter_criteria.py @@ -63,7 +63,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dynamicCriteria": lambda n : setattr(self, 'dynamic_criteria', n.get_str_value()), "filterOn": lambda n : setattr(self, 'filter_on', n.get_str_value()), "icon": lambda n : setattr(self, 'icon', n.get_object_value(WorkbookIcon)), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "operator": lambda n : setattr(self, 'operator', n.get_str_value()), "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), } @@ -83,7 +83,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("dynamicCriteria", self.dynamic_criteria) writer.write_str_value("filterOn", self.filter_on) writer.write_object_value("icon", self.icon) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("operator", self.operator) writer.write_object_value("values", self.values) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workbook_icon.py b/msgraph/generated/models/workbook_icon.py index a5335cb7448..175c3dc50dd 100644 --- a/msgraph/generated/models/workbook_icon.py +++ b/msgraph/generated/models/workbook_icon.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "index": lambda n : setattr(self, 'index', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "set": lambda n : setattr(self, 'set', n.get_str_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_int_value("index", self.index) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("set", self.set) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workbook_operation_error.py b/msgraph/generated/models/workbook_operation_error.py index c605d919937..839340c213a 100644 --- a/msgraph/generated/models/workbook_operation_error.py +++ b/msgraph/generated/models/workbook_operation_error.py @@ -40,7 +40,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "code": lambda n : setattr(self, 'code', n.get_str_value()), "innerError": lambda n : setattr(self, 'inner_error', n.get_object_value(WorkbookOperationError)), "message": lambda n : setattr(self, 'message', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -55,7 +55,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("code", self.code) writer.write_object_value("innerError", self.inner_error) writer.write_str_value("message", self.message) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workbook_range.py b/msgraph/generated/models/workbook_range.py index c9da512834a..58e55f04671 100644 --- a/msgraph/generated/models/workbook_range.py +++ b/msgraph/generated/models/workbook_range.py @@ -48,7 +48,7 @@ class WorkbookRange(Entity): row_index: Optional[int] = None # The worksheet containing the current range. Read-only. sort: Optional[WorkbookRangeSort] = None - # Text values of the specified range. The Text value won't depend on the cell width. The # sign substitution that happens in Excel UI won't affect the text value returned by the API. Read-only. + # Text values of the specified range. The Text value doesn't depend on the cell width. The # sign substitution that happens in Excel UI doesn't affect the text value returned by the API. Read-only. text: Optional[Json] = None # Represents the type of data of each cell. The possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. Read-only. value_types: Optional[Json] = None diff --git a/msgraph/generated/models/workbook_range_fill.py b/msgraph/generated/models/workbook_range_fill.py index eb889fa39b5..b3ef4fb7af7 100644 --- a/msgraph/generated/models/workbook_range_fill.py +++ b/msgraph/generated/models/workbook_range_fill.py @@ -10,7 +10,7 @@ @dataclass class WorkbookRangeFill(Entity): - # HTML color code representing the color of the border line, of the form #RRGGBB (e.g. 'FFA500') or as a named HTML color (e.g. 'orange') + # HTML color code representing the color of the border line, of the form #RRGGBB (for example 'FFA500') or as a named HTML color (for example 'orange') color: Optional[str] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/workbook_range_font.py b/msgraph/generated/models/workbook_range_font.py index 35b546de0eb..8a7319cf964 100644 --- a/msgraph/generated/models/workbook_range_font.py +++ b/msgraph/generated/models/workbook_range_font.py @@ -12,11 +12,11 @@ class WorkbookRangeFont(Entity): # Represents the bold status of font. bold: Optional[bool] = None - # HTML color code representation of the text color. E.g. #FF0000 represents Red. + # HTML color code representation of the text color. for example #FF0000 represents Red. color: Optional[str] = None # Represents the italic status of the font. italic: Optional[bool] = None - # Font name (e.g. 'Calibri') + # Font name (for example 'Calibri') name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/workbook_range_format.py b/msgraph/generated/models/workbook_range_format.py index fd1448c63e7..df29fb7b9de 100644 --- a/msgraph/generated/models/workbook_range_format.py +++ b/msgraph/generated/models/workbook_range_format.py @@ -16,7 +16,7 @@ class WorkbookRangeFormat(Entity): # Collection of border objects that apply to the overall range selected Read-only. borders: Optional[List[WorkbookRangeBorder]] = None - # Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + # Gets or sets the width of all columns within the range. If the column widths aren't uniform, null will be returned. column_width: Optional[float] = None # Returns the fill object defined on the overall range. Read-only. fill: Optional[WorkbookRangeFill] = None @@ -28,7 +28,7 @@ class WorkbookRangeFormat(Entity): odata_type: Optional[str] = None # Returns the format protection object for a range. Read-only. protection: Optional[WorkbookFormatProtection] = None - # Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned. + # Gets or sets the height of all rows in the range. If the row heights aren't uniform null will be returned. row_height: Optional[float] = None # Represents the vertical alignment for the specified object. The possible values are: Top, Center, Bottom, Justify, Distributed. vertical_alignment: Optional[str] = None diff --git a/msgraph/generated/models/workbook_range_view.py b/msgraph/generated/models/workbook_range_view.py index 9d948d5d857..c0db23516be 100644 --- a/msgraph/generated/models/workbook_range_view.py +++ b/msgraph/generated/models/workbook_range_view.py @@ -31,11 +31,11 @@ class WorkbookRangeView(Entity): row_count: Optional[int] = None # Represents a collection of range views associated with the range. Read-only. Read-only. rows: Optional[List[WorkbookRangeView]] = None - # Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + # Text values of the specified range. The Text value won't depend on the cell width. The # sign substitution that happens in Excel UI won't affect the text value returned by the API. Read-only. text: Optional[Json] = None # Represents the type of data of each cell. Read-only. The possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. value_types: Optional[Json] = None - # Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + # Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contains an error returns the error string. values: Optional[Json] = None @staticmethod diff --git a/msgraph/generated/models/workbook_session_info.py b/msgraph/generated/models/workbook_session_info.py index 007b9813718..8504f8ffcea 100644 --- a/msgraph/generated/models/workbook_session_info.py +++ b/msgraph/generated/models/workbook_session_info.py @@ -36,7 +36,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ fields: Dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "persistChanges": lambda n : setattr(self, 'persist_changes', n.get_bool_value()), } return fields @@ -50,7 +50,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("id", self.id) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_bool_value("persistChanges", self.persist_changes) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workbook_sort_field.py b/msgraph/generated/models/workbook_sort_field.py index 7e976821840..20e651a52df 100644 --- a/msgraph/generated/models/workbook_sort_field.py +++ b/msgraph/generated/models/workbook_sort_field.py @@ -55,7 +55,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "dataOption": lambda n : setattr(self, 'data_option', n.get_str_value()), "icon": lambda n : setattr(self, 'icon', n.get_object_value(WorkbookIcon)), "key": lambda n : setattr(self, 'key', n.get_int_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "sortOn": lambda n : setattr(self, 'sort_on', n.get_str_value()), } return fields @@ -73,7 +73,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("dataOption", self.data_option) writer.write_object_value("icon", self.icon) writer.write_int_value("key", self.key) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_str_value("sortOn", self.sort_on) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workbook_worksheet_protection_options.py b/msgraph/generated/models/workbook_worksheet_protection_options.py index 23f45e87bc8..02ce547e9d2 100644 --- a/msgraph/generated/models/workbook_worksheet_protection_options.py +++ b/msgraph/generated/models/workbook_worksheet_protection_options.py @@ -64,7 +64,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "allowInsertRows": lambda n : setattr(self, 'allow_insert_rows', n.get_bool_value()), "allowPivotTables": lambda n : setattr(self, 'allow_pivot_tables', n.get_bool_value()), "allowSort": lambda n : setattr(self, 'allow_sort', n.get_bool_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -87,7 +87,7 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_bool_value("allowInsertRows", self.allow_insert_rows) writer.write_bool_value("allowPivotTables", self.allow_pivot_tables) writer.write_bool_value("allowSort", self.allow_sort) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/workforce_integration_encryption.py b/msgraph/generated/models/workforce_integration_encryption.py index 1ae43bf0840..431f24427f0 100644 --- a/msgraph/generated/models/workforce_integration_encryption.py +++ b/msgraph/generated/models/workforce_integration_encryption.py @@ -42,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .workforce_integration_encryption_protocol import WorkforceIntegrationEncryptionProtocol fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "protocol": lambda n : setattr(self, 'protocol', n.get_enum_value(WorkforceIntegrationEncryptionProtocol)), "secret": lambda n : setattr(self, 'secret', n.get_str_value()), } @@ -56,7 +56,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("protocol", self.protocol) writer.write_str_value("secret", self.secret) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/working_hours.py b/msgraph/generated/models/working_hours.py index 42e9eff319e..5bf6f13d5f6 100644 --- a/msgraph/generated/models/working_hours.py +++ b/msgraph/generated/models/working_hours.py @@ -52,7 +52,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "daysOfWeek": lambda n : setattr(self, 'days_of_week', n.get_collection_of_enum_values(DayOfWeek)), "endTime": lambda n : setattr(self, 'end_time', n.get_time_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "startTime": lambda n : setattr(self, 'start_time', n.get_time_value()), "timeZone": lambda n : setattr(self, 'time_zone', n.get_object_value(TimeZoneBase)), } @@ -68,7 +68,7 @@ def serialize(self,writer: SerializationWriter) -> None: raise TypeError("writer cannot be null.") writer.write_collection_of_enum_values("daysOfWeek", self.days_of_week) writer.write_time_value("endTime", self.end_time) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_time_value("startTime", self.start_time) writer.write_object_value("timeZone", self.time_zone) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/x509_certificate_authentication_method_configuration.py b/msgraph/generated/models/x509_certificate_authentication_method_configuration.py index 324ed3af994..9f0016886c0 100644 --- a/msgraph/generated/models/x509_certificate_authentication_method_configuration.py +++ b/msgraph/generated/models/x509_certificate_authentication_method_configuration.py @@ -17,7 +17,7 @@ class X509CertificateAuthenticationMethodConfiguration(AuthenticationMethodConfi odata_type: Optional[str] = "#microsoft.graph.x509CertificateAuthenticationMethodConfiguration" # Defines strong authentication configurations. This configuration includes the default authentication mode and the different rules for strong authentication bindings. authentication_mode_configuration: Optional[X509CertificateAuthenticationModeConfiguration] = None - # Defines fields in the X.509 certificate that map to attributes of the Azure AD user object in order to bind the certificate to the user. The priority of the object determines the order in which the binding is carried out. The first binding that matches will be used and the rest ignored. + # Defines fields in the X.509 certificate that map to attributes of the Microsoft Entra user object in order to bind the certificate to the user. The priority of the object determines the order in which the binding is carried out. The first binding that matches will be used and the rest ignored. certificate_user_bindings: Optional[List[X509CertificateUserBinding]] = None # A collection of groups that are enabled to use the authentication method. include_targets: Optional[List[AuthenticationMethodTarget]] = None diff --git a/msgraph/generated/models/x509_certificate_authentication_mode_configuration.py b/msgraph/generated/models/x509_certificate_authentication_mode_configuration.py index 5986a72c592..5e011b2c628 100644 --- a/msgraph/generated/models/x509_certificate_authentication_mode_configuration.py +++ b/msgraph/generated/models/x509_certificate_authentication_mode_configuration.py @@ -45,7 +45,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .x509_certificate_rule import X509CertificateRule fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "rules": lambda n : setattr(self, 'rules', n.get_collection_of_object_values(X509CertificateRule)), "x509CertificateAuthenticationDefaultMode": lambda n : setattr(self, 'x509_certificate_authentication_default_mode', n.get_enum_value(X509CertificateAuthenticationMode)), } @@ -59,7 +59,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_collection_of_object_values("rules", self.rules) writer.write_enum_value("x509CertificateAuthenticationDefaultMode", self.x509_certificate_authentication_default_mode) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/x509_certificate_rule.py b/msgraph/generated/models/x509_certificate_rule.py index 47774809ce5..2a96a929d07 100644 --- a/msgraph/generated/models/x509_certificate_rule.py +++ b/msgraph/generated/models/x509_certificate_rule.py @@ -48,7 +48,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "identifier": lambda n : setattr(self, 'identifier', n.get_str_value()), - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "x509CertificateAuthenticationMode": lambda n : setattr(self, 'x509_certificate_authentication_mode', n.get_enum_value(X509CertificateAuthenticationMode)), "x509CertificateRuleType": lambda n : setattr(self, 'x509_certificate_rule_type', n.get_enum_value(X509CertificateRuleType)), } @@ -63,7 +63,7 @@ def serialize(self,writer: SerializationWriter) -> None: if not writer: raise TypeError("writer cannot be null.") writer.write_str_value("identifier", self.identifier) - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_enum_value("x509CertificateAuthenticationMode", self.x509_certificate_authentication_mode) writer.write_enum_value("x509CertificateRuleType", self.x509_certificate_rule_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/x509_certificate_user_binding.py b/msgraph/generated/models/x509_certificate_user_binding.py index 67f0e1deb75..c9a9cbc88d5 100644 --- a/msgraph/generated/models/x509_certificate_user_binding.py +++ b/msgraph/generated/models/x509_certificate_user_binding.py @@ -13,9 +13,9 @@ class X509CertificateUserBinding(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # The OdataType property odata_type: Optional[str] = None - # The priority of the binding. Azure AD uses the binding with the highest priority. This value must be a non-negative integer and unique in the collection of objects in the certificateUserBindings property of an x509CertificateAuthenticationMethodConfiguration object. Required + # The priority of the binding. Microsoft Entra ID uses the binding with the highest priority. This value must be a non-negative integer and unique in the collection of objects in the certificateUserBindings property of an x509CertificateAuthenticationMethodConfiguration object. Required priority: Optional[int] = None - # Defines the Azure AD user property of the user object to use for the binding. The possible values are: userPrincipalName, onPremisesUserPrincipalName, certificateUserIds. Required. + # Defines the Microsoft Entra user property of the user object to use for the binding. The possible values are: userPrincipalName, onPremisesUserPrincipalName, certificateUserIds. Required. user_property: Optional[str] = None # The field on the X.509 certificate to use for the binding. The possible values are: PrincipalName, RFC822Name, SubjectKeyIdentifier, SHA1PublicKey. x509_certificate_field: Optional[str] = None @@ -37,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ fields: Dict[str, Callable[[Any], None]] = { - "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "OdataType": lambda n : setattr(self, 'odata_type', n.get_str_value()), "priority": lambda n : setattr(self, 'priority', n.get_int_value()), "userProperty": lambda n : setattr(self, 'user_property', n.get_str_value()), "x509CertificateField": lambda n : setattr(self, 'x509_certificate_field', n.get_str_value()), @@ -52,7 +52,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") - writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("OdataType", self.odata_type) writer.write_int_value("priority", self.priority) writer.write_str_value("userProperty", self.user_property) writer.write_str_value("x509CertificateField", self.x509_certificate_field) diff --git a/msgraph/generated/oauth2_permission_grants/count/count_request_builder.py b/msgraph/generated/oauth2_permission_grants/count/count_request_builder.py index a645eb29444..636fb37973c 100644 --- a/msgraph/generated/oauth2_permission_grants/count/count_request_builder.py +++ b/msgraph/generated/oauth2_permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/oauth2_permission_grants/delta/delta_response.py b/msgraph/generated/oauth2_permission_grants/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/oauth2_permission_grants/delta/delta_response.py rename to msgraph/generated/oauth2_permission_grants/delta/delta_get_response.py index c0982394a8f..e3c82f879b3 100644 --- a/msgraph/generated/oauth2_permission_grants/delta/delta_response.py +++ b/msgraph/generated/oauth2_permission_grants/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[OAuth2PermissionGrant]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/oauth2_permission_grants/delta/delta_request_builder.py b/msgraph/generated/oauth2_permission_grants/delta/delta_request_builder.py index d83c82121ba..d6a9e142ced 100644 --- a/msgraph/generated/oauth2_permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/oauth2_permission_grants/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/oauth2PermissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py b/msgraph/generated/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py index 19ed4a4c12a..cdc13b8a810 100644 --- a/msgraph/generated/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py +++ b/msgraph/generated/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OAuth2PermissionGrantItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant. + Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant. This API is available in the following national cloud deployments. 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/oauth2permissiongrant-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OAuth2PermissionGrantItemR async def get(self,request_configuration: Optional[OAuth2PermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OAuth2PermissionGrant]: """ - Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. + Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OAuth2PermissionGrant] Find more info here: https://learn.microsoft.com/graph/api/oauth2permissiongrant-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[OAuth2PermissionGrantItemRequ async def patch(self,body: Optional[OAuth2PermissionGrant] = None, request_configuration: Optional[OAuth2PermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[OAuth2PermissionGrant]: """ - Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes. + Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OAuth2PermissionGrant] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[OAuth2PermissionGrant] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[OAuth2PermissionGrantItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant. + Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OAuth2PermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. + Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OAuth2PermissionGrant] = None, request_configuration: Optional[OAuth2PermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes. + Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[OAuth2PermissionGrant] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class OAuth2PermissionGrantItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class OAuth2PermissionGrantItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. + Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/oauth2_permission_grants/oauth2_permission_grants_request_builder.py b/msgraph/generated/oauth2_permission_grants/oauth2_permission_grants_request_builder.py index be0e6650f8f..0ece04feb48 100644 --- a/msgraph/generated/oauth2_permission_grants/oauth2_permission_grants_request_builder.py +++ b/msgraph/generated/oauth2_permission_grants/oauth2_permission_grants_request_builder.py @@ -46,7 +46,7 @@ def by_o_auth2_permission_grant_id(self,o_auth2_permission_grant_id: str) -> OAu async def get(self,request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[OAuth2PermissionGrantCollectionResponse]: """ - Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. + Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OAuth2PermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/oauth2permissiongrant-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[Oauth2PermissionGrantsRequest async def post(self,body: Optional[OAuth2PermissionGrant] = None, request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> Optional[OAuth2PermissionGrant]: """ - Create a delegated permission grant represented by an oAuth2PermissionGrant object. A delegated permission grant authorizes a client service principal (representing a client application) to access a resource service principal (representing an API), on behalf of a signed-in user, for the level of access limited by the delegated permissions which were granted. + Create a delegated permission grant represented by an oAuth2PermissionGrant object. A delegated permission grant authorizes a client service principal (representing a client application) to access a resource service principal (representing an API), on behalf of a signed-in user, for the level of access limited by the delegated permissions which were granted. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OAuth2PermissionGrant] @@ -93,24 +93,24 @@ async def post(self,body: Optional[OAuth2PermissionGrant] = None, request_config def to_get_request_information(self,request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. + Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OAuth2PermissionGrant] = None, request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a delegated permission grant represented by an oAuth2PermissionGrant object. A delegated permission grant authorizes a client service principal (representing a client application) to access a resource service principal (representing an API), on behalf of a signed-in user, for the level of access limited by the delegated permissions which were granted. + Create a delegated permission grant represented by an oAuth2PermissionGrant object. A delegated permission grant authorizes a client service principal (representing a client application) to access a resource service principal (representing an API), on behalf of a signed-in user, for the level of access limited by the delegated permissions which were granted. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[OAuth2PermissionGrant] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class Oauth2PermissionGrantsRequestBuilderGetQueryParameters(): """ - Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. + Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/count/count_request_builder.py b/msgraph/generated/organization/count/count_request_builder.py index 9c95ed38e51..89c4dfbd7ae 100644 --- a/msgraph/generated/organization/count/count_request_builder.py +++ b/msgraph/generated/organization/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/organization/delta/delta_get_response.py b/msgraph/generated/organization/delta/delta_get_response.py new file mode 100644 index 00000000000..9896959749d --- /dev/null +++ b/msgraph/generated/organization/delta/delta_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_delta_function_response import BaseDeltaFunctionResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...models.base_delta_function_response import BaseDeltaFunctionResponse + from ...models.directory_object import DirectoryObject + + from ...models.base_delta_function_response import BaseDeltaFunctionResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/organization/delta/delta_request_builder.py b/msgraph/generated/organization/delta/delta_request_builder.py index 3ec3e2964ba..69652358708 100644 --- a/msgraph/generated/organization/delta/delta_request_builder.py +++ b/msgraph/generated/organization/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/organization/delta/delta_response.py b/msgraph/generated/organization/delta/delta_response.py deleted file mode 100644 index 41ac4f7e1c6..00000000000 --- a/msgraph/generated/organization/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from ...models.base_delta_function_response import BaseDeltaFunctionResponse - from ...models.directory_object import DirectoryObject - -from ...models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from ...models.base_delta_function_response import BaseDeltaFunctionResponse - from ...models.directory_object import DirectoryObject - - from ...models.base_delta_function_response import BaseDeltaFunctionResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/organization/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/organization/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_request_builder.py index b9c2d455403..61bcb9ce379 100644 --- a/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/organization/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/organization/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/organization/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/organization/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/organization/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/organization/get_by_ids/get_by_ids_request_builder.py index 796a1fc022b..50ad640dbac 100644 --- a/msgraph/generated/organization/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/organization/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/get_by_ids/get_by_ids_response.py b/msgraph/generated/organization/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/organization/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/organization/item/branding/background_image/background_image_request_builder.py b/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py index 986d21958b0..fd7bb53b650 100644 --- a/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py +++ b/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[BackgroundIm Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[BackgroundImageRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/banner_logo/banner_logo_request_builder.py b/msgraph/generated/organization/item/branding/banner_logo/banner_logo_request_builder.py index c1e84f27a28..19329643727 100644 --- a/msgraph/generated/organization/item/branding/banner_logo/banner_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/banner_logo/banner_logo_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[BannerLogoRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[BannerLogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/branding_request_builder.py b/msgraph/generated/organization/item/branding/branding_request_builder.py index dc369615306..77879ac38c5 100644 --- a/msgraph/generated/organization/item/branding/branding_request_builder.py +++ b/msgraph/generated/organization/item/branding/branding_request_builder.py @@ -10,8 +10,8 @@ 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.organizational_branding import OrganizationalBranding + from ....models.o_data_errors.o_data_error import ODataError from .background_image.background_image_request_builder import BackgroundImageRequestBuilder from .banner_logo.banner_logo_request_builder import BannerLogoRequestBuilder from .custom_c_s_s.custom_c_s_s_request_builder import CustomCSSRequestBuilder @@ -36,7 +36,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BrandingRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the default organizational branding object. To delete the organizationalBranding object, all images (Stream types) must first be removed from the object. + Delete the default organizational branding object. To delete the organizationalBranding object, all images (Stream types) must first be removed from the object. This API is available in the following national cloud deployments. 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/organizationalbranding-delete?view=graph-rest-1.0 @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[BrandingRequestBuilderDele async def get(self,request_configuration: Optional[BrandingRequestBuilderGetRequestConfiguration] = None) -> Optional[OrganizationalBranding]: """ - Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. + Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationalBranding] Find more info here: https://learn.microsoft.com/graph/api/organizationalbranding-get?view=graph-rest-1.0 @@ -78,7 +78,7 @@ async def get(self,request_configuration: Optional[BrandingRequestBuilderGetRequ async def patch(self,body: Optional[OrganizationalBranding] = None, request_configuration: Optional[BrandingRequestBuilderPatchRequestConfiguration] = None) -> Optional[OrganizationalBranding]: """ - Update the properties of the default branding object specified by the organizationalBranding resource. + Update the properties of the default branding object specified by the organizationalBranding resource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationalBranding] @@ -103,39 +103,39 @@ async def patch(self,body: Optional[OrganizationalBranding] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[BrandingRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the default organizational branding object. To delete the organizationalBranding object, all images (Stream types) must first be removed from the object. + Delete the default organizational branding object. To delete the organizationalBranding object, all images (Stream types) must first be removed from the object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BrandingRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. + Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OrganizationalBranding] = None, request_configuration: Optional[BrandingRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the default branding object specified by the organizationalBranding resource. + Update the properties of the default branding object specified by the organizationalBranding resource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -143,13 +143,13 @@ def to_patch_request_information(self,body: Optional[OrganizationalBranding] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -248,7 +248,7 @@ class BrandingRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class BrandingRequestBuilderGetQueryParameters(): """ - Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. + Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/item/branding/custom_c_s_s/custom_c_s_s_request_builder.py b/msgraph/generated/organization/item/branding/custom_c_s_s/custom_c_s_s_request_builder.py index 4ec810b4d47..a510d3cb8ce 100644 --- a/msgraph/generated/organization/item/branding/custom_c_s_s/custom_c_s_s_request_builder.py +++ b/msgraph/generated/organization/item/branding/custom_c_s_s/custom_c_s_s_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[CustomCSSReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[CustomCSSRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/favicon/favicon_request_builder.py b/msgraph/generated/organization/item/branding/favicon/favicon_request_builder.py index 67c4d4cf1e8..7d00dbe4df5 100644 --- a/msgraph/generated/organization/item/branding/favicon/favicon_request_builder.py +++ b/msgraph/generated/organization/item/branding/favicon/favicon_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FaviconRequestBuilderGetRequestConfiguration] = None) -> bytes: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes Find more info here: https://learn.microsoft.com/graph/api/organizationalbranding-get?view=graph-rest-1.0 @@ -47,7 +47,7 @@ async def get(self,request_configuration: Optional[FaviconRequestBuilderGetReque async def put(self,body: bytes, request_configuration: Optional[FaviconRequestBuilderPutRequestConfiguration] = None) -> bytes: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes @@ -69,22 +69,22 @@ async def put(self,body: bytes, request_configuration: Optional[FaviconRequestBu def to_get_request_information(self,request_configuration: Optional[FaviconRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[FaviconRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/header_logo/header_logo_request_builder.py b/msgraph/generated/organization/item/branding/header_logo/header_logo_request_builder.py index f653af139a3..986d7c1fa4f 100644 --- a/msgraph/generated/organization/item/branding/header_logo/header_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/header_logo/header_logo_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[HeaderLogoRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[HeaderLogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/count/count_request_builder.py b/msgraph/generated/organization/item/branding/localizations/count/count_request_builder.py index 1d96a0cb21b..d7c8bbc1e01 100644 --- a/msgraph/generated/organization/item/branding/localizations/count/count_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py index 19366d448cd..c062fecb7a0 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[BackgroundIm Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[BackgroundImageRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py index ce36fc72f8b..91f904d4d12 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[BannerLogoRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[BannerLogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/item/custom_c_s_s/custom_c_s_s_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/custom_c_s_s/custom_c_s_s_request_builder.py index 7c2b6a61e57..d469b8338b4 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/custom_c_s_s/custom_c_s_s_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/custom_c_s_s/custom_c_s_s_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[CustomCSSReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[CustomCSSRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/item/favicon/favicon_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/favicon/favicon_request_builder.py index f1f4c242f10..8e9741377f9 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/favicon/favicon_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/favicon/favicon_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FaviconRequestBuilderGetRequestConfiguration] = None) -> bytes: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes Find more info here: https://learn.microsoft.com/graph/api/organizationalbranding-list-localizations?view=graph-rest-1.0 @@ -47,7 +47,7 @@ async def get(self,request_configuration: Optional[FaviconRequestBuilderGetReque async def put(self,body: bytes, request_configuration: Optional[FaviconRequestBuilderPutRequestConfiguration] = None) -> bytes: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes @@ -69,22 +69,22 @@ async def put(self,body: bytes, request_configuration: Optional[FaviconRequestBu def to_get_request_information(self,request_configuration: Optional[FaviconRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[FaviconRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + A custom icon (favicon) to replace a default Microsoft product favicon on a Microsoft Entra tenant. param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/item/header_logo/header_logo_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/header_logo/header_logo_request_builder.py index ed874e4d907..ed4aa47ad67 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/header_logo/header_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/header_logo/header_logo_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[HeaderLogoRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[HeaderLogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/item/organizational_branding_localization_item_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/organizational_branding_localization_item_request_builder.py index c4fc8a8d67e..d4c5d4bc14b 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/organizational_branding_localization_item_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/organizational_branding_localization_item_request_builder.py @@ -10,8 +10,8 @@ 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.organizational_branding_localization import OrganizationalBrandingLocalization + from ......models.o_data_errors.o_data_error import ODataError from .background_image.background_image_request_builder import BackgroundImageRequestBuilder from .banner_logo.banner_logo_request_builder import BannerLogoRequestBuilder from .custom_c_s_s.custom_c_s_s_request_builder import CustomCSSRequestBuilder @@ -35,7 +35,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OrganizationalBrandingLocalizationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a localized branding object. To delete the organizationalBrandingLocalization object, all images (Stream types) must first be removed from the object. + Delete a localized branding object. To delete the organizationalBrandingLocalization object, all images (Stream types) must first be removed from the object. This API is available in the following national cloud deployments. 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/organizationalbrandinglocalization-delete?view=graph-rest-1.0 @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[OrganizationalBrandingLoca async def get(self,request_configuration: Optional[OrganizationalBrandingLocalizationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OrganizationalBrandingLocalization]: """ - Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. + Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationalBrandingLocalization] Find more info here: https://learn.microsoft.com/graph/api/organizationalbrandinglocalization-get?view=graph-rest-1.0 @@ -77,7 +77,7 @@ async def get(self,request_configuration: Optional[OrganizationalBrandingLocaliz async def patch(self,body: Optional[OrganizationalBrandingLocalization] = None, request_configuration: Optional[OrganizationalBrandingLocalizationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[OrganizationalBrandingLocalization]: """ - Update the properties of an organizationalBrandingLocalization object for a specific localization. + Update the properties of an organizationalBrandingLocalization object for a specific localization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationalBrandingLocalization] @@ -102,39 +102,39 @@ async def patch(self,body: Optional[OrganizationalBrandingLocalization] = None, def to_delete_request_information(self,request_configuration: Optional[OrganizationalBrandingLocalizationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a localized branding object. To delete the organizationalBrandingLocalization object, all images (Stream types) must first be removed from the object. + Delete a localized branding object. To delete the organizationalBrandingLocalization object, all images (Stream types) must first be removed from the object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OrganizationalBrandingLocalizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. + Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OrganizationalBrandingLocalization] = None, request_configuration: Optional[OrganizationalBrandingLocalizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an organizationalBrandingLocalization object for a specific localization. + Update the properties of an organizationalBrandingLocalization object for a specific localization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[OrganizationalBrandingLocal if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -238,7 +238,7 @@ class OrganizationalBrandingLocalizationItemRequestBuilderDeleteRequestConfigura @dataclass class OrganizationalBrandingLocalizationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. + Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/item/branding/localizations/item/square_logo/square_logo_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/square_logo/square_logo_request_builder.py index 168baead08d..28d8c7f1b0f 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/square_logo/square_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/square_logo/square_logo_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[SquareLogoRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[SquareLogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/item/square_logo_dark/square_logo_dark_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/square_logo_dark/square_logo_dark_request_builder.py index ae223d86e27..96094527c3c 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/square_logo_dark/square_logo_dark_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/square_logo_dark/square_logo_dark_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[SquareLogoDa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[SquareLogoDarkRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/localizations/localizations_request_builder.py b/msgraph/generated/organization/item/branding/localizations/localizations_request_builder.py index fb42b7a9581..295b9ca36f8 100644 --- a/msgraph/generated/organization/item/branding/localizations/localizations_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/localizations_request_builder.py @@ -10,9 +10,9 @@ 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.organizational_branding_localization import OrganizationalBrandingLocalization from .....models.organizational_branding_localization_collection_response import OrganizationalBrandingLocalizationCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.organizational_branding_localization_item_request_builder import OrganizationalBrandingLocalizationItemRequestBuilder @@ -45,7 +45,7 @@ def by_organizational_branding_localization_id(self,organizational_branding_loca async def get(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> Optional[OrganizationalBrandingLocalizationCollectionResponse]: """ - Retrieve all localization branding objects, including the default branding. + Retrieve all localization branding objects, including the default branding. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationalBrandingLocalizationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/organizationalbranding-list-localizations?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[LocalizationsRequestBuilderGe async def post(self,body: Optional[OrganizationalBrandingLocalization] = None, request_configuration: Optional[LocalizationsRequestBuilderPostRequestConfiguration] = None) -> Optional[OrganizationalBrandingLocalization]: """ - Create a new organizationalBrandingLocalization object. This creates a localized branding and at the same time, the default branding if it doesn't exist. The default branding is created only once. It's loaded when a localized branding isn't configured for the user's browser language. To retrieve the default branding, see Get branding. + Create a new organizationalBrandingLocalization object. This creates a localized branding and at the same time, the default branding if it doesn't exist. The default branding is created only once. It's loaded when a localized branding isn't configured for the user's browser language. To retrieve the default branding, see Get branding. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationalBrandingLocalization] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OrganizationalBrandingLocalization] = None, r def to_get_request_information(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve all localization branding objects, including the default branding. + Retrieve all localization branding objects, including the default branding. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OrganizationalBrandingLocalization] = None, request_configuration: Optional[LocalizationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new organizationalBrandingLocalization object. This creates a localized branding and at the same time, the default branding if it doesn't exist. The default branding is created only once. It's loaded when a localized branding isn't configured for the user's browser language. To retrieve the default branding, see Get branding. + Create a new organizationalBrandingLocalization object. This creates a localized branding and at the same time, the default branding if it doesn't exist. The default branding is created only once. It's loaded when a localized branding isn't configured for the user's browser language. To retrieve the default branding, see Get branding. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OrganizationalBrandingLocali if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LocalizationsRequestBuilderGetQueryParameters(): """ - Retrieve all localization branding objects, including the default branding. + Retrieve all localization branding objects, including the default branding. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/item/branding/square_logo/square_logo_request_builder.py b/msgraph/generated/organization/item/branding/square_logo/square_logo_request_builder.py index 91efc1c4df9..a6929a40b17 100644 --- a/msgraph/generated/organization/item/branding/square_logo/square_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/square_logo/square_logo_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[SquareLogoRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[SquareLogoRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/branding/square_logo_dark/square_logo_dark_request_builder.py b/msgraph/generated/organization/item/branding/square_logo_dark/square_logo_dark_request_builder.py index f435e7fa6ff..fd06741e38d 100644 --- a/msgraph/generated/organization/item/branding/square_logo_dark/square_logo_dark_request_builder.py +++ b/msgraph/generated/organization/item/branding/square_logo_dark/square_logo_dark_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[SquareLogoDa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[SquareLogoDarkRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/organization/item/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py b/msgraph/generated/organization/item/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py index fed311f9551..94c03cf464f 100644 --- a/msgraph/generated/organization/item/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py +++ b/msgraph/generated/organization/item/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.py @@ -45,7 +45,7 @@ def by_certificate_based_auth_configuration_id(self,certificate_based_auth_confi async def get(self,request_configuration: Optional[CertificateBasedAuthConfigurationRequestBuilderGetRequestConfiguration] = None) -> Optional[CertificateBasedAuthConfigurationCollectionResponse]: """ - Get a list of certificateBasedAuthConfiguration objects. + Get a list of certificateBasedAuthConfiguration objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CertificateBasedAuthConfigurationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/certificatebasedauthconfiguration-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CertificateBasedAuthConfigura async def post(self,body: Optional[CertificateBasedAuthConfiguration] = None, request_configuration: Optional[CertificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration] = None) -> Optional[CertificateBasedAuthConfiguration]: """ - Create a new certificateBasedAuthConfiguration object. + Create a new certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CertificateBasedAuthConfiguration] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CertificateBasedAuthConfiguration] = None, re def to_get_request_information(self,request_configuration: Optional[CertificateBasedAuthConfigurationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of certificateBasedAuthConfiguration objects. + Get a list of certificateBasedAuthConfiguration objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CertificateBasedAuthConfiguration] = None, request_configuration: Optional[CertificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new certificateBasedAuthConfiguration object. + Create a new certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CertificateBasedAuthConfigur if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CertificateBasedAuthConfigurationRequestBuilderGetQueryParameters(): """ - Get a list of certificateBasedAuthConfiguration objects. + Get a list of certificateBasedAuthConfiguration objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/item/certificate_based_auth_configuration/count/count_request_builder.py b/msgraph/generated/organization/item/certificate_based_auth_configuration/count/count_request_builder.py index bf331c26274..531607bb3e1 100644 --- a/msgraph/generated/organization/item/certificate_based_auth_configuration/count/count_request_builder.py +++ b/msgraph/generated/organization/item/certificate_based_auth_configuration/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/organization/item/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py b/msgraph/generated/organization/item/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py index 8a6150a0971..4698bd726b4 100644 --- a/msgraph/generated/organization/item/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py +++ b/msgraph/generated/organization/item/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a certificateBasedAuthConfiguration object. + Delete a certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. 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/certificatebasedauthconfiguration-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CertificateBasedAuthConfig async def get(self,request_configuration: Optional[CertificateBasedAuthConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CertificateBasedAuthConfiguration]: """ - Get the properties of a certificateBasedAuthConfiguration object. + Get the properties of a certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CertificateBasedAuthConfiguration] Find more info here: https://learn.microsoft.com/graph/api/certificatebasedauthconfiguration-get?view=graph-rest-1.0 @@ -70,34 +70,34 @@ async def get(self,request_configuration: Optional[CertificateBasedAuthConfigura def to_delete_request_information(self,request_configuration: Optional[CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a certificateBasedAuthConfiguration object. + Delete a certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CertificateBasedAuthConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties of a certificateBasedAuthConfiguration object. + Get the properties of a certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CertificateBasedAuthConfigurationItemRequestBuilder: @@ -123,7 +123,7 @@ class CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfigurat @dataclass class CertificateBasedAuthConfigurationItemRequestBuilderGetQueryParameters(): """ - Get the properties of a certificateBasedAuthConfiguration object. + Get the properties of a certificateBasedAuthConfiguration object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/organization/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/organization/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/organization/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/organization/item/check_member_groups/check_member_groups_request_builder.py index 460a56cc657..f30e665fbfe 100644 --- a/msgraph/generated/organization/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/organization/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/{organization%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/organization/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/organization/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/organization/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/organization/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/organization/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/organization/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/organization/item/check_member_objects/check_member_objects_request_builder.py index 6e759fb54eb..4cc14ec4155 100644 --- a/msgraph/generated/organization/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/organization/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/{organization%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/organization/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/organization/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/organization/item/extensions/count/count_request_builder.py b/msgraph/generated/organization/item/extensions/count/count_request_builder.py index 7776e3896e7..da9272a5524 100644 --- a/msgraph/generated/organization/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/organization/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/organization/item/extensions/extensions_request_builder.py b/msgraph/generated/organization/item/extensions/extensions_request_builder.py index 816d3eaebdd..1245813476c 100644 --- a/msgraph/generated/organization/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/organization/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/organization/item/extensions/item/extension_item_request_builder.py index b50dc83b999..b74b0d6a714 100644 --- a/msgraph/generated/organization/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/organization/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/organization/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/organization/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/organization/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/organization/item/get_member_groups/get_member_groups_request_builder.py index 1df300075d7..3ced995bd6a 100644 --- a/msgraph/generated/organization/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/organization/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/{organization%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/organization/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/organization/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/organization/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/organization/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/organization/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/organization/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/organization/item/get_member_objects/get_member_objects_request_builder.py index 3874325b987..fa4912d6ba1 100644 --- a/msgraph/generated/organization/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/organization/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/{organization%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/organization/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/organization/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/organization/item/organization_item_request_builder.py b/msgraph/generated/organization/item/organization_item_request_builder.py index 77734a1c20f..76248ab7795 100644 --- a/msgraph/generated/organization/item/organization_item_request_builder.py +++ b/msgraph/generated/organization/item/organization_item_request_builder.py @@ -10,8 +10,8 @@ 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.organization import Organization + from ...models.o_data_errors.o_data_error import ODataError from .branding.branding_request_builder import BrandingRequestBuilder from .certificate_based_auth_configuration.certificate_based_auth_configuration_request_builder import CertificateBasedAuthConfigurationRequestBuilder from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder @@ -108,12 +108,12 @@ def to_delete_request_information(self,request_configuration: Optional[Organizat Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OrganizationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -123,14 +123,14 @@ def to_get_request_information(self,request_configuration: Optional[Organization Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Organization] = None, request_configuration: Optional[OrganizationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +143,13 @@ def to_patch_request_information(self,body: Optional[Organization] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/organization/item/restore/restore_request_builder.py b/msgraph/generated/organization/item/restore/restore_request_builder.py index ecfde27469b..d6954c2e080 100644 --- a/msgraph/generated/organization/item/restore/restore_request_builder.py +++ b/msgraph/generated/organization/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_post_response.py b/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_post_response.py new file mode 100644 index 00000000000..16763e5b03d --- /dev/null +++ b/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_post_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 SetMobileDeviceManagementAuthorityPostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SetMobileDeviceManagementAuthorityPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetMobileDeviceManagementAuthorityPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetMobileDeviceManagementAuthorityPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_request_builder.py b/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_request_builder.py index fcc8a60f0ef..bd0505b3faa 100644 --- a/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_request_builder.py +++ b/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .set_mobile_device_management_authority_response import SetMobileDeviceManagementAuthorityResponse + from .set_mobile_device_management_authority_post_response import SetMobileDeviceManagementAuthorityPostResponse class SetMobileDeviceManagementAuthorityRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/organization/{organization%2Did}/setMobileDeviceManagementAuthority", path_parameters) - async def post(self,request_configuration: Optional[SetMobileDeviceManagementAuthorityRequestBuilderPostRequestConfiguration] = None) -> Optional[SetMobileDeviceManagementAuthorityResponse]: + async def post(self,request_configuration: Optional[SetMobileDeviceManagementAuthorityRequestBuilderPostRequestConfiguration] = None) -> Optional[SetMobileDeviceManagementAuthorityPostResponse]: """ Set mobile device management authority param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SetMobileDeviceManagementAuthorityResponse] + Returns: Optional[SetMobileDeviceManagementAuthorityPostResponse] Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-organization-setmobiledevicemanagementauthority?view=graph-rest-1.0 """ request_info = self.to_post_request_information( @@ -44,9 +44,9 @@ async def post(self,request_configuration: Optional[SetMobileDeviceManagementAut } if not self.request_adapter: raise Exception("Http core is null") - from .set_mobile_device_management_authority_response import SetMobileDeviceManagementAuthorityResponse + from .set_mobile_device_management_authority_post_response import SetMobileDeviceManagementAuthorityPostResponse - return await self.request_adapter.send_async(request_info, SetMobileDeviceManagementAuthorityResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SetMobileDeviceManagementAuthorityPostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[SetMobileDeviceManagementAuthorityRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -55,13 +55,13 @@ def to_post_request_information(self,request_configuration: Optional[SetMobileDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> SetMobileDeviceManagementAuthorityRequestBuilder: diff --git a/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_response.py b/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_response.py deleted file mode 100644 index 47b019887fa..00000000000 --- a/msgraph/generated/organization/item/set_mobile_device_management_authority/set_mobile_device_management_authority_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 SetMobileDeviceManagementAuthorityResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[int] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SetMobileDeviceManagementAuthorityResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SetMobileDeviceManagementAuthorityResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return SetMobileDeviceManagementAuthorityResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_int_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_int_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/organization/organization_request_builder.py b/msgraph/generated/organization/organization_request_builder.py index d0d31d670db..89c1383db93 100644 --- a/msgraph/generated/organization/organization_request_builder.py +++ b/msgraph/generated/organization/organization_request_builder.py @@ -10,9 +10,9 @@ 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.organization import Organization from ..models.organization_collection_response import OrganizationCollectionResponse + from ..models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .delta.delta_request_builder import DeltaRequestBuilder from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder @@ -49,10 +49,10 @@ def by_organization_id(self,organization_id: str) -> OrganizationItemRequestBuil async def get(self,request_configuration: Optional[OrganizationRequestBuilderGetRequestConfiguration] = None) -> Optional[OrganizationCollectionResponse]: """ - List properties and relationships of the organization objects. + Retrieve a list of organization objects. There's only one organization object in the collection. This API is available in the following national cloud deployments. 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/intune-onboarding-organization-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/organization-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -95,19 +95,19 @@ async def post(self,body: Optional[Organization] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[OrganizationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the organization objects. + Retrieve a list of organization objects. There's only one organization object in the collection. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Organization] = None, request_configuration: Optional[OrganizationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[Organization] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class OrganizationRequestBuilderGetQueryParameters(): """ - List properties and relationships of the organization objects. + Retrieve a list of organization objects. There's only one organization object in the collection. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/organization/validate_properties/validate_properties_request_builder.py b/msgraph/generated/organization/validate_properties/validate_properties_request_builder.py index b7c11532764..7aff87d916a 100644 --- a/msgraph/generated/organization/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/organization/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/delta/delta_get_response.py b/msgraph/generated/permission_grants/delta/delta_get_response.py new file mode 100644 index 00000000000..9896959749d --- /dev/null +++ b/msgraph/generated/permission_grants/delta/delta_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_delta_function_response import BaseDeltaFunctionResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...models.base_delta_function_response import BaseDeltaFunctionResponse + from ...models.directory_object import DirectoryObject + + from ...models.base_delta_function_response import BaseDeltaFunctionResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/permission_grants/delta/delta_request_builder.py b/msgraph/generated/permission_grants/delta/delta_request_builder.py index 76f553a296c..d3a554388ff 100644 --- a/msgraph/generated/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/permission_grants/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/permission_grants/delta/delta_response.py b/msgraph/generated/permission_grants/delta/delta_response.py deleted file mode 100644 index 41ac4f7e1c6..00000000000 --- a/msgraph/generated/permission_grants/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from ...models.base_delta_function_response import BaseDeltaFunctionResponse - from ...models.directory_object import DirectoryObject - -from ...models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from ...models.base_delta_function_response import BaseDeltaFunctionResponse - from ...models.directory_object import DirectoryObject - - from ...models.base_delta_function_response import BaseDeltaFunctionResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/permission_grants/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py index 85041d6854f..36fe0ee251f 100644 --- a/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/permission_grants/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/permission_grants/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/permission_grants/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/permission_grants/get_by_ids/get_by_ids_request_builder.py index 2046dfca80b..0b5670577b8 100644 --- a/msgraph/generated/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/permission_grants/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/permission_grants/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/permission_grants/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/permission_grants/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_request_builder.py index 710da9bea78..38e25c5beb8 100644 --- a/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_request_builder.py index c7d3e2feeb6..a1687b0d918 100644 --- a/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_request_builder.py index f23cbd45354..f9c16d80fa8 100644 --- a/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/permission_grants/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_request_builder.py index e0f2f961e38..f9ebb4b6321 100644 --- a/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index 74a221b22a2..4ca02c6975f 100644 --- a/msgraph/generated/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/permission_grants/item/restore/restore_request_builder.py index c12d4c43ef8..ff8be8400ac 100644 --- a/msgraph/generated/permission_grants/item/restore/restore_request_builder.py +++ b/msgraph/generated/permission_grants/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/permission_grants/permission_grants_request_builder.py b/msgraph/generated/permission_grants/permission_grants_request_builder.py index 328d8b94d6c..a6d6166f944 100644 --- a/msgraph/generated/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/permission_grants/permission_grants_request_builder.py @@ -98,14 +98,14 @@ def to_get_request_information(self,request_configuration: Optional[PermissionGr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/permission_grants/validate_properties/validate_properties_request_builder.py index 47dcc162cac..92e422be979 100644 --- a/msgraph/generated/permission_grants/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/permission_grants/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/places/count/count_request_builder.py b/msgraph/generated/places/count/count_request_builder.py index 52aa2693806..933eb1844f3 100644 --- a/msgraph/generated/places/count/count_request_builder.py +++ b/msgraph/generated/places/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/places/graph_room/count/count_request_builder.py b/msgraph/generated/places/graph_room/count/count_request_builder.py index c47b4b4d816..73e0147cb30 100644 --- a/msgraph/generated/places/graph_room/count/count_request_builder.py +++ b/msgraph/generated/places/graph_room/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/places/graph_room/graph_room_request_builder.py b/msgraph/generated/places/graph_room/graph_room_request_builder.py index c8d9f6f6930..b4a1debe261 100644 --- a/msgraph/generated/places/graph_room/graph_room_request_builder.py +++ b/msgraph/generated/places/graph_room/graph_room_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphRoomReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphRoomRequestBuilder: diff --git a/msgraph/generated/places/graph_room_list/count/count_request_builder.py b/msgraph/generated/places/graph_room_list/count/count_request_builder.py index fb07e64a869..201bee5512d 100644 --- a/msgraph/generated/places/graph_room_list/count/count_request_builder.py +++ b/msgraph/generated/places/graph_room_list/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/places/graph_room_list/graph_room_list_request_builder.py b/msgraph/generated/places/graph_room_list/graph_room_list_request_builder.py index cbcb029dffe..ecb9f826eeb 100644 --- a/msgraph/generated/places/graph_room_list/graph_room_list_request_builder.py +++ b/msgraph/generated/places/graph_room_list/graph_room_list_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphRoomLis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphRoomListRequestBuilder: diff --git a/msgraph/generated/places/item/graph_room/graph_room_request_builder.py b/msgraph/generated/places/item/graph_room/graph_room_request_builder.py index 4b1fc12432e..0f2ce62266a 100644 --- a/msgraph/generated/places/item/graph_room/graph_room_request_builder.py +++ b/msgraph/generated/places/item/graph_room/graph_room_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphRoomReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphRoomRequestBuilder: diff --git a/msgraph/generated/places/item/graph_room_list/graph_room_list_request_builder.py b/msgraph/generated/places/item/graph_room_list/graph_room_list_request_builder.py index f6ebe60a4bf..d81ee8dc27e 100644 --- a/msgraph/generated/places/item/graph_room_list/graph_room_list_request_builder.py +++ b/msgraph/generated/places/item/graph_room_list/graph_room_list_request_builder.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from ....models.room_list import RoomList + from .rooms.rooms_request_builder import RoomsRequestBuilder class GraphRoomListRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphRoomLis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphRoomListRequestBuilder: @@ -74,6 +75,15 @@ def with_url(self,raw_url: Optional[str] = None) -> GraphRoomListRequestBuilder: raise TypeError("raw_url cannot be null.") return GraphRoomListRequestBuilder(self.request_adapter, raw_url) + @property + def rooms(self) -> RoomsRequestBuilder: + """ + Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + """ + from .rooms.rooms_request_builder import RoomsRequestBuilder + + return RoomsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GraphRoomListRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/places/item/graph_room_list/rooms/count/count_request_builder.py b/msgraph/generated/places/item/graph_room_list/rooms/count/count_request_builder.py new file mode 100644 index 00000000000..28cdf5f1664 --- /dev/null +++ b/msgraph/generated/places/item/graph_room_list/rooms/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/places/item/graph_room_list/rooms/item/room_item_request_builder.py b/msgraph/generated/places/item/graph_room_list/rooms/item/room_item_request_builder.py new file mode 100644 index 00000000000..f092fae4dd5 --- /dev/null +++ b/msgraph/generated/places/item/graph_room_list/rooms/item/room_item_request_builder.py @@ -0,0 +1,214 @@ +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.room import Room + +class RoomItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RoomItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms/{room%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[RoomItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property rooms for places + 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[RoomItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Room]: + """ + Get rooms from places + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Room] + """ + 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.room import Room + + return await self.request_adapter.send_async(request_info, Room, error_mapping) + + async def patch(self,body: Optional[Room] = None, request_configuration: Optional[RoomItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Room]: + """ + Update the navigation property rooms in places + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Room] + """ + 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.room import Room + + return await self.request_adapter.send_async(request_info, Room, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RoomItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property rooms for places + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[RoomItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get rooms from places + 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(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[Room] = None, request_configuration: Optional[RoomItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property rooms in places + param body: The request body + param request_configuration: Configuration for 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(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) -> RoomItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RoomItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RoomItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RoomItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class RoomItemRequestBuilderGetQueryParameters(): + """ + Get rooms from places + """ + 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 RoomItemRequestBuilderGetRequestConfiguration(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[RoomItemRequestBuilder.RoomItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RoomItemRequestBuilderPatchRequestConfiguration(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/places/item/graph_room_list/rooms/rooms_request_builder.py b/msgraph/generated/places/item/graph_room_list/rooms/rooms_request_builder.py new file mode 100644 index 00000000000..8752cec7710 --- /dev/null +++ b/msgraph/generated/places/item/graph_room_list/rooms/rooms_request_builder.py @@ -0,0 +1,226 @@ +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.room import Room + from .....models.room_collection_response import RoomCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.room_item_request_builder import RoomItemRequestBuilder + +class RoomsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RoomsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_room_id(self,room_id: str) -> RoomItemRequestBuilder: + """ + Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + param room_id: The unique identifier of room + Returns: RoomItemRequestBuilder + """ + if not room_id: + raise TypeError("room_id cannot be null.") + from .item.room_item_request_builder import RoomItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["room%2Did"] = room_id + return RoomItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RoomsRequestBuilderGetRequestConfiguration] = None) -> Optional[RoomCollectionResponse]: + """ + Get rooms from places + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RoomCollectionResponse] + """ + 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.room_collection_response import RoomCollectionResponse + + return await self.request_adapter.send_async(request_info, RoomCollectionResponse, error_mapping) + + async def post(self,body: Optional[Room] = None, request_configuration: Optional[RoomsRequestBuilderPostRequestConfiguration] = None) -> Optional[Room]: + """ + Create new navigation property to rooms for places + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Room] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.room import Room + + return await self.request_adapter.send_async(request_info, Room, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RoomsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get rooms from places + 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(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[Room] = None, request_configuration: Optional[RoomsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to rooms for places + param body: The request body + param request_configuration: Configuration for 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(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) -> RoomsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RoomsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RoomsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class RoomsRequestBuilderGetQueryParameters(): + """ + Get rooms from places + """ + 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 RoomsRequestBuilderGetRequestConfiguration(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[RoomsRequestBuilder.RoomsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RoomsRequestBuilderPostRequestConfiguration(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/places/item/place_item_request_builder.py b/msgraph/generated/places/item/place_item_request_builder.py index b6dcdeef677..723c1040ae0 100644 --- a/msgraph/generated/places/item/place_item_request_builder.py +++ b/msgraph/generated/places/item/place_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PlaceItemRequestBuilderDel async def patch(self,body: Optional[Place] = None, request_configuration: Optional[PlaceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Place]: """ - Update the properties of place object, which can be a room or roomList. You can identify the room or roomList by specifying the id or emailAddress property. + Update the properties of place object, which can be a room or roomList. You can identify the room or roomList by specifying the id or emailAddress property. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Place] @@ -79,17 +79,17 @@ def to_delete_request_information(self,request_configuration: Optional[PlaceItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_patch_request_information(self,body: Optional[Place] = None, request_configuration: Optional[PlaceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of place object, which can be a room or roomList. You can identify the room or roomList by specifying the id or emailAddress property. + Update the properties of place object, which can be a room or roomList. You can identify the room or roomList by specifying the id or emailAddress property. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -97,13 +97,13 @@ def to_patch_request_information(self,body: Optional[Place] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/planner/buckets/buckets_request_builder.py b/msgraph/generated/planner/buckets/buckets_request_builder.py index a56de7a187e..366b973a33c 100644 --- a/msgraph/generated/planner/buckets/buckets_request_builder.py +++ b/msgraph/generated/planner/buckets/buckets_request_builder.py @@ -45,7 +45,7 @@ def by_planner_bucket_id(self,planner_bucket_id: str) -> PlannerBucketItemReques async def get(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketCollectionResponse]: """ - Retrieve a list of plannerbucket objects. + Retrieve a list of plannerbucket objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/planner-list-buckets?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[BucketsRequestBuilderGetReque async def post(self,body: Optional[PlannerBucket] = None, request_configuration: Optional[BucketsRequestBuilderPostRequestConfiguration] = None) -> Optional[PlannerBucket]: """ - Create a new plannerBucket object. + Create a new plannerBucket object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucket] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PlannerBucket] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerbucket objects. + Retrieve a list of plannerbucket objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[BucketsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new plannerBucket object. + Create a new plannerBucket object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PlannerBucket] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class BucketsRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerbucket objects. + Retrieve a list of plannerbucket objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/buckets/count/count_request_builder.py b/msgraph/generated/planner/buckets/count/count_request_builder.py index a97dc61289b..5fddfd50300 100644 --- a/msgraph/generated/planner/buckets/count/count_request_builder.py +++ b/msgraph/generated/planner/buckets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/buckets/item/planner_bucket_item_request_builder.py b/msgraph/generated/planner/buckets/item/planner_bucket_item_request_builder.py index 605e5f856e2..b0906d7264e 100644 --- a/msgraph/generated/planner/buckets/item/planner_bucket_item_request_builder.py +++ b/msgraph/generated/planner/buckets/item/planner_bucket_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PlannerBucketItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete plannerBucket. + Delete plannerBucket. This API is available in the following national cloud deployments. 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/plannerbucket-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PlannerBucketItemRequestBu async def get(self,request_configuration: Optional[PlannerBucketItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucket]: """ - Retrieve the properties and relationships of a plannerBucket object. + Retrieve the properties and relationships of a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucket] Find more info here: https://learn.microsoft.com/graph/api/plannerbucket-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[PlannerBucket] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[PlannerBucketItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete plannerBucket. + Delete plannerBucket. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerBucketItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerBucket object. + Retrieve the properties and relationships of a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[PlannerBucketItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucket] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class PlannerBucketItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class PlannerBucketItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerBucket object. + Retrieve the properties and relationships of a plannerBucket object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/buckets/item/tasks/count/count_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/count/count_request_builder.py index 5362df7b8e8..22366d953ea 100644 --- a/msgraph/generated/planner/buckets/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index eaa9c05a567..cd6f19f0a29 100644 --- a/msgraph/generated/planner/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index 74f3fcfd8e1..4fa10b685dd 100644 --- a/msgraph/generated/planner/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/buckets/item/tasks/item/details/details_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/item/details/details_request_builder.py index 9312ab6b221..478a2e40672 100644 --- a/msgraph/generated/planner/buckets/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/buckets/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/item/planner_task_item_request_builder.py index a971e90c5f1..a5668c6b5a2 100644 --- a/msgraph/generated/planner/buckets/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/planner/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 10ee1b58349..d19e61f21c7 100644 --- a/msgraph/generated/planner/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/buckets/item/tasks/tasks_request_builder.py b/msgraph/generated/planner/buckets/item/tasks/tasks_request_builder.py index 298febe4228..8c2951ccc04 100644 --- a/msgraph/generated/planner/buckets/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/planner/buckets/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerbucket-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/planner_request_builder.py b/msgraph/generated/planner/planner_request_builder.py index cdc9aac83d3..2755ee24f14 100644 --- a/msgraph/generated/planner/planner_request_builder.py +++ b/msgraph/generated/planner/planner_request_builder.py @@ -81,14 +81,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Planner] = None, request_configuration: Optional[PlannerRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -101,13 +101,13 @@ def to_patch_request_information(self,body: Optional[Planner] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/planner/plans/count/count_request_builder.py b/msgraph/generated/planner/plans/count/count_request_builder.py index a67900d5bf4..db66e28c3e9 100644 --- a/msgraph/generated/planner/plans/count/count_request_builder.py +++ b/msgraph/generated/planner/plans/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/plans/item/buckets/buckets_request_builder.py b/msgraph/generated/planner/plans/item/buckets/buckets_request_builder.py index 37718eeaaa0..240cff3533c 100644 --- a/msgraph/generated/planner/plans/item/buckets/buckets_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/buckets_request_builder.py @@ -45,7 +45,7 @@ def by_planner_bucket_id(self,planner_bucket_id: str) -> PlannerBucketItemReques async def get(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketCollectionResponse]: """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-list-buckets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerBucket] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[BucketsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerBucket] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class BucketsRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/buckets/count/count_request_builder.py b/msgraph/generated/planner/plans/item/buckets/count/count_request_builder.py index b06c62f41c7..ad6204c29b2 100644 --- a/msgraph/generated/planner/plans/item/buckets/count/count_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py index d1f51657b0c..f8a3e8847db 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerBucketItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerBucke Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[PlannerBucketItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucket] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/count/count_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/count/count_request_builder.py index d5af7815131..7449c4ac924 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index c1bb352a487..97c0b789522 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index b1a5deaaa60..ce73e591845 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py index 606bb6fbdb2..e77fdfca70c 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py index 1e810ee6624..a3cdab7846a 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 889dc8d3745..29932e18302 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/buckets/item/tasks/tasks_request_builder.py b/msgraph/generated/planner/plans/item/buckets/item/tasks/tasks_request_builder.py index ae7a5a64ef4..dad5efb4038 100644 --- a/msgraph/generated/planner/plans/item/buckets/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/planner/plans/item/buckets/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerbucket-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/details/details_request_builder.py b/msgraph/generated/planner/plans/item/details/details_request_builder.py index e0a0cf41264..79c7af31f68 100644 --- a/msgraph/generated/planner/plans/item/details/details_request_builder.py +++ b/msgraph/generated/planner/plans/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlanDetails]: """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlanDetails] Find more info here: https://learn.microsoft.com/graph/api/plannerplandetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlanDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerPlanDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/planner_plan_item_request_builder.py b/msgraph/generated/planner/plans/item/planner_plan_item_request_builder.py index 4920d475741..98cf4c3fb46 100644 --- a/msgraph/generated/planner/plans/item/planner_plan_item_request_builder.py +++ b/msgraph/generated/planner/plans/item/planner_plan_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PlannerPlanItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a plannerPlan object. + Delete a plannerPlan object. This API is available in the following national cloud deployments. 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/plannerplan-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[PlannerPlanItemRequestBuil async def get(self,request_configuration: Optional[PlannerPlanItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlan]: """ - Retrieve the properties and relationships of a plannerplan object. + Retrieve the properties and relationships of a plannerplan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlan] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[PlannerPlanItemRequestBuilder async def patch(self,body: Optional[PlannerPlan] = None, request_configuration: Optional[PlannerPlanItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PlannerPlan]: """ - Update the properties of a plannerPlan object. + Update the properties of a plannerPlan object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlan] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[PlannerPlan] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[PlannerPlanItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a plannerPlan object. + Delete a plannerPlan object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerPlanItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerplan object. + Retrieve the properties and relationships of a plannerplan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlan] = None, request_configuration: Optional[PlannerPlanItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a plannerPlan object. + Update the properties of a plannerPlan object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[PlannerPlan] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class PlannerPlanItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class PlannerPlanItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerplan object. + Retrieve the properties and relationships of a plannerplan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/tasks/count/count_request_builder.py b/msgraph/generated/planner/plans/item/tasks/count/count_request_builder.py index b7010355e8d..2d9a978ca3f 100644 --- a/msgraph/generated/planner/plans/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index 4707094ac1b..19666a27312 100644 --- a/msgraph/generated/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index 63938a44c73..4aafbdcc963 100644 --- a/msgraph/generated/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/tasks/item/details/details_request_builder.py b/msgraph/generated/planner/plans/item/tasks/item/details/details_request_builder.py index 472c8c9d6eb..0f0b6271ff1 100644 --- a/msgraph/generated/planner/plans/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/planner/plans/item/tasks/item/planner_task_item_request_builder.py index 3728090b324..3d189d92bd8 100644 --- a/msgraph/generated/planner/plans/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index cd85c1d1326..641c893696c 100644 --- a/msgraph/generated/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/item/tasks/tasks_request_builder.py b/msgraph/generated/planner/plans/item/tasks/tasks_request_builder.py index 95f64861f6a..aba1dbd882d 100644 --- a/msgraph/generated/planner/plans/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/planner/plans/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/plans/plans_request_builder.py b/msgraph/generated/planner/plans/plans_request_builder.py index ff7a1d05c9d..17e8ac3351c 100644 --- a/msgraph/generated/planner/plans/plans_request_builder.py +++ b/msgraph/generated/planner/plans/plans_request_builder.py @@ -45,7 +45,7 @@ def by_planner_plan_id(self,planner_plan_id: str) -> PlannerPlanItemRequestBuild async def get(self,request_configuration: Optional[PlansRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlanCollectionResponse]: """ - Get a list of plannerPlan objects. + Get a list of plannerPlan objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlanCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/planner-list-plans?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PlansRequestBuilderGetRequest async def post(self,body: Optional[PlannerPlan] = None, request_configuration: Optional[PlansRequestBuilderPostRequestConfiguration] = None) -> Optional[PlannerPlan]: """ - Use this API to create a new plannerPlan. + Use this API to create a new plannerPlan. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlan] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PlannerPlan] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PlansRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of plannerPlan objects. + Get a list of plannerPlan objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlan] = None, request_configuration: Optional[PlansRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new plannerPlan. + Use this API to create a new plannerPlan. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PlannerPlan] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PlansRequestBuilderGetQueryParameters(): """ - Get a list of plannerPlan objects. + Get a list of plannerPlan objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/tasks/count/count_request_builder.py b/msgraph/generated/planner/tasks/count/count_request_builder.py index 7b070657e44..666e16a0020 100644 --- a/msgraph/generated/planner/tasks/count/count_request_builder.py +++ b/msgraph/generated/planner/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index 16e5b6d209a..2b504f1c2a8 100644 --- a/msgraph/generated/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index 6e54d4b7c6a..2ede1c3dea1 100644 --- a/msgraph/generated/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/tasks/item/details/details_request_builder.py b/msgraph/generated/planner/tasks/item/details/details_request_builder.py index fbc961e12f6..641b94f4de2 100644 --- a/msgraph/generated/planner/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/planner/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/planner/tasks/item/planner_task_item_request_builder.py index a9b36b133c3..c6902b899dd 100644 --- a/msgraph/generated/planner/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/planner/tasks/item/planner_task_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PlannerTaskItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a plannerTask object. + Delete a plannerTask object. This API is available in the following national cloud deployments. 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/plannertask-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[PlannerTaskItemRequestBuil async def get(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTask]: """ - Retrieve the properties and relationships of plannerTask object. + Retrieve the properties and relationships of plannerTask object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTask] Find more info here: https://learn.microsoft.com/graph/api/plannertask-get?view=graph-rest-1.0 @@ -99,34 +99,34 @@ async def patch(self,body: Optional[PlannerTask] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a plannerTask object. + Delete a plannerTask object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerTask object. + Retrieve the properties and relationships of plannerTask object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class PlannerTaskItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class PlannerTaskItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerTask object. + Retrieve the properties and relationships of plannerTask object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 17f8c34b1ac..090cba6e136 100644 --- a/msgraph/generated/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/planner/tasks/tasks_request_builder.py b/msgraph/generated/planner/tasks/tasks_request_builder.py index 2ac184b16c3..bda223603fe 100644 --- a/msgraph/generated/planner/tasks/tasks_request_builder.py +++ b/msgraph/generated/planner/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannertask objects. + Retrieve a list of plannertask objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/planner-list-tasks?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequest async def post(self,body: Optional[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> Optional[PlannerTask]: """ - Create a new plannerTask. + Create a new plannerTask. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTask] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannertask objects. + Retrieve a list of plannertask objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new plannerTask. + Create a new plannerTask. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannertask objects. + Retrieve a list of plannertask objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/activity_based_timeout_policies/activity_based_timeout_policies_request_builder.py b/msgraph/generated/policies/activity_based_timeout_policies/activity_based_timeout_policies_request_builder.py index ee14eda43b9..3c6cf27ffee 100644 --- a/msgraph/generated/policies/activity_based_timeout_policies/activity_based_timeout_policies_request_builder.py +++ b/msgraph/generated/policies/activity_based_timeout_policies/activity_based_timeout_policies_request_builder.py @@ -45,7 +45,7 @@ def by_activity_based_timeout_policy_id(self,activity_based_timeout_policy_id: s async def get(self,request_configuration: Optional[ActivityBasedTimeoutPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[ActivityBasedTimeoutPolicyCollectionResponse]: """ - Get a list of activityBasedTimeoutPolicy objects. + Get a list of activityBasedTimeoutPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ActivityBasedTimeoutPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/activitybasedtimeoutpolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ActivityBasedTimeoutPoliciesR async def post(self,body: Optional[ActivityBasedTimeoutPolicy] = None, request_configuration: Optional[ActivityBasedTimeoutPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[ActivityBasedTimeoutPolicy]: """ - Create a new activityBasedTimeoutPolicy object. + Create a new activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ActivityBasedTimeoutPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ActivityBasedTimeoutPolicy] = None, request_c def to_get_request_information(self,request_configuration: Optional[ActivityBasedTimeoutPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of activityBasedTimeoutPolicy objects. + Get a list of activityBasedTimeoutPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ActivityBasedTimeoutPolicy] = None, request_configuration: Optional[ActivityBasedTimeoutPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new activityBasedTimeoutPolicy object. + Create a new activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ActivityBasedTimeoutPolicy] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ActivityBasedTimeoutPoliciesRequestBuilderGetQueryParameters(): """ - Get a list of activityBasedTimeoutPolicy objects. + Get a list of activityBasedTimeoutPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/activity_based_timeout_policies/count/count_request_builder.py b/msgraph/generated/policies/activity_based_timeout_policies/count/count_request_builder.py index e03a86d8dc0..a4f0b842d60 100644 --- a/msgraph/generated/policies/activity_based_timeout_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/activity_based_timeout_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/activity_based_timeout_policies/item/activity_based_timeout_policy_item_request_builder.py b/msgraph/generated/policies/activity_based_timeout_policies/item/activity_based_timeout_policy_item_request_builder.py index ab710103836..8a748cb89ee 100644 --- a/msgraph/generated/policies/activity_based_timeout_policies/item/activity_based_timeout_policy_item_request_builder.py +++ b/msgraph/generated/policies/activity_based_timeout_policies/item/activity_based_timeout_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ActivityBasedTimeoutPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an activityBasedTimeoutPolicy object. + Delete an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. 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/activitybasedtimeoutpolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ActivityBasedTimeoutPolicy async def get(self,request_configuration: Optional[ActivityBasedTimeoutPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ActivityBasedTimeoutPolicy]: """ - Get the properties of an activityBasedTimeoutPolicy object. + Get the properties of an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ActivityBasedTimeoutPolicy] Find more info here: https://learn.microsoft.com/graph/api/activitybasedtimeoutpolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ActivityBasedTimeoutPolicyIte async def patch(self,body: Optional[ActivityBasedTimeoutPolicy] = None, request_configuration: Optional[ActivityBasedTimeoutPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ActivityBasedTimeoutPolicy]: """ - Update the properties of an activityBasedTimeoutPolicy object. + Update the properties of an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ActivityBasedTimeoutPolicy] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ActivityBasedTimeoutPolicy] = None, request_ def to_delete_request_information(self,request_configuration: Optional[ActivityBasedTimeoutPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an activityBasedTimeoutPolicy object. + Delete an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ActivityBasedTimeoutPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties of an activityBasedTimeoutPolicy object. + Get the properties of an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ActivityBasedTimeoutPolicy] = None, request_configuration: Optional[ActivityBasedTimeoutPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an activityBasedTimeoutPolicy object. + Update the properties of an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ActivityBasedTimeoutPolicy] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ActivityBasedTimeoutPolicyItemRequestBuilderDeleteRequestConfiguration(Bas @dataclass class ActivityBasedTimeoutPolicyItemRequestBuilderGetQueryParameters(): """ - Get the properties of an activityBasedTimeoutPolicy object. + Get the properties of an activityBasedTimeoutPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/applies_to_request_builder.py index 8cdaec89aa3..bfd0fcba587 100644 --- a/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/applies_to_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AppliesToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppliesToRequestBuilder: diff --git a/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/count/count_request_builder.py index a0bf0a57695..d0374781310 100644 --- a/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/item/directory_object_item_request_builder.py b/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/item/directory_object_item_request_builder.py index adab0f5bc8a..fd21b9df31f 100644 --- a/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/item/directory_object_item_request_builder.py +++ b/msgraph/generated/policies/activity_based_timeout_policies/item/applies_to/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/policies/admin_consent_request_policy/admin_consent_request_policy_request_builder.py b/msgraph/generated/policies/admin_consent_request_policy/admin_consent_request_policy_request_builder.py index 38a2add2b88..8700f4ae685 100644 --- a/msgraph/generated/policies/admin_consent_request_policy/admin_consent_request_policy_request_builder.py +++ b/msgraph/generated/policies/admin_consent_request_policy/admin_consent_request_policy_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AdminConsentRequestPolicyR async def get(self,request_configuration: Optional[AdminConsentRequestPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[AdminConsentRequestPolicy]: """ - Read the properties and relationships of an adminConsentRequestPolicy object. + Read the properties and relationships of an adminConsentRequestPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AdminConsentRequestPolicy] Find more info here: https://learn.microsoft.com/graph/api/adminconsentrequestpolicy-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AdminCons Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AdminConsentRequestPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an adminConsentRequestPolicy object. + Read the properties and relationships of an adminConsentRequestPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AdminConsentRequestPolicy] = None, request_configuration: Optional[AdminConsentRequestPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AdminConsentRequestPolicy] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AdminConsentRequestPolicyRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AdminConsentRequestPolicyRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an adminConsentRequestPolicy object. + Read the properties and relationships of an adminConsentRequestPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/app_management_policies/app_management_policies_request_builder.py b/msgraph/generated/policies/app_management_policies/app_management_policies_request_builder.py index 05690220b92..6154c44b73c 100644 --- a/msgraph/generated/policies/app_management_policies/app_management_policies_request_builder.py +++ b/msgraph/generated/policies/app_management_policies/app_management_policies_request_builder.py @@ -45,7 +45,7 @@ def by_app_management_policy_id(self,app_management_policy_id: str) -> AppManage async def get(self,request_configuration: Optional[AppManagementPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[AppManagementPolicyCollectionResponse]: """ - Retrieve a list of appManagementPolicy objects. + Retrieve a list of appManagementPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppManagementPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/appmanagementpolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AppManagementPoliciesRequestB async def post(self,body: Optional[AppManagementPolicy] = None, request_configuration: Optional[AppManagementPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[AppManagementPolicy]: """ - Create an appManagementPolicy object. + Create an appManagementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppManagementPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AppManagementPolicy] = None, request_configur def to_get_request_information(self,request_configuration: Optional[AppManagementPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of appManagementPolicy objects. + Retrieve a list of appManagementPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppManagementPolicy] = None, request_configuration: Optional[AppManagementPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an appManagementPolicy object. + Create an appManagementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AppManagementPolicy] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AppManagementPoliciesRequestBuilderGetQueryParameters(): """ - Retrieve a list of appManagementPolicy objects. + Retrieve a list of appManagementPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/app_management_policies/count/count_request_builder.py b/msgraph/generated/policies/app_management_policies/count/count_request_builder.py index 41541886b8d..37d7c9e4351 100644 --- a/msgraph/generated/policies/app_management_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/app_management_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/app_management_policies/item/app_management_policy_item_request_builder.py b/msgraph/generated/policies/app_management_policies/item/app_management_policy_item_request_builder.py index f234c514209..e94df75c72d 100644 --- a/msgraph/generated/policies/app_management_policies/item/app_management_policy_item_request_builder.py +++ b/msgraph/generated/policies/app_management_policies/item/app_management_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an appManagementPolicy object. + Delete an appManagementPolicy object. This API is available in the following national cloud deployments. 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/appmanagementpolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[AppManagementPolicyItemReq async def get(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AppManagementPolicy]: """ - Read the properties of an appManagementPolicy object. + Read the properties of an appManagementPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppManagementPolicy] Find more info here: https://learn.microsoft.com/graph/api/appmanagementpolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[AppManagementPolicyItemReques async def patch(self,body: Optional[AppManagementPolicy] = None, request_configuration: Optional[AppManagementPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AppManagementPolicy]: """ - Update an appManagementPolicy object. + Update an appManagementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppManagementPolicy] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[AppManagementPolicy] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an appManagementPolicy object. + Delete an appManagementPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of an appManagementPolicy object. + Read the properties of an appManagementPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppManagementPolicy] = None, request_configuration: Optional[AppManagementPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an appManagementPolicy object. + Update an appManagementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[AppManagementPolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class AppManagementPolicyItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class AppManagementPolicyItemRequestBuilderGetQueryParameters(): """ - Read the properties of an appManagementPolicy object. + Read the properties of an appManagementPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/app_management_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/app_management_policies/item/applies_to/applies_to_request_builder.py index cf11bf0cd5d..11a8f42d6e4 100644 --- a/msgraph/generated/policies/app_management_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/app_management_policies/item/applies_to/applies_to_request_builder.py @@ -44,7 +44,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[AppliesToRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - List application and service principal objects that are assigned an appManagementPolicy policy object. + List application and service principal objects that are assigned an appManagementPolicy policy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/appmanagementpolicy-list-appliesto?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AppliesToRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[AppliesToRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List application and service principal objects that are assigned an appManagementPolicy policy object. + List application and service principal objects that are assigned an appManagementPolicy policy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppliesToRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AppliesToRequestBuilderGetQueryParameters(): """ - List application and service principal objects that are assigned an appManagementPolicy policy object. + List application and service principal objects that are assigned an appManagementPolicy policy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/app_management_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/app_management_policies/item/applies_to/count/count_request_builder.py index 9f9987cc1bf..e2968877052 100644 --- a/msgraph/generated/policies/app_management_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/app_management_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/app_management_policies/item/applies_to/item/directory_object_item_request_builder.py b/msgraph/generated/policies/app_management_policies/item/applies_to/item/directory_object_item_request_builder.py index 4b987b20c2a..63ff0ecf652 100644 --- a/msgraph/generated/policies/app_management_policies/item/applies_to/item/directory_object_item_request_builder.py +++ b/msgraph/generated/policies/app_management_policies/item/applies_to/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/policies/authentication_flows_policy/authentication_flows_policy_request_builder.py b/msgraph/generated/policies/authentication_flows_policy/authentication_flows_policy_request_builder.py index 3283b79ef54..2c0e66db769 100644 --- a/msgraph/generated/policies/authentication_flows_policy/authentication_flows_policy_request_builder.py +++ b/msgraph/generated/policies/authentication_flows_policy/authentication_flows_policy_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AuthenticationFlowsPolicyR async def get(self,request_configuration: Optional[AuthenticationFlowsPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationFlowsPolicy]: """ - Read the properties and relationships of an authenticationFlowsPolicy object. + Read the properties and relationships of an authenticationFlowsPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationFlowsPolicy] Find more info here: https://learn.microsoft.com/graph/api/authenticationflowspolicy-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[AuthenticationFlowsPolicyRequ async def patch(self,body: Optional[AuthenticationFlowsPolicy] = None, request_configuration: Optional[AuthenticationFlowsPolicyRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthenticationFlowsPolicy]: """ - Update the selfServiceSignUp property of an authenticationFlowsPolicy object. The properties id, type, and description cannot be modified. + Update the selfServiceSignUp property of an authenticationFlowsPolicy object. The properties id, type, and description cannot be modified. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationFlowsPolicy] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationFlowsPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an authenticationFlowsPolicy object. + Read the properties and relationships of an authenticationFlowsPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationFlowsPolicy] = None, request_configuration: Optional[AuthenticationFlowsPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the selfServiceSignUp property of an authenticationFlowsPolicy object. The properties id, type, and description cannot be modified. + Update the selfServiceSignUp property of an authenticationFlowsPolicy object. The properties id, type, and description cannot be modified. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationFlowsPolicy] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AuthenticationFlowsPolicyRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AuthenticationFlowsPolicyRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an authenticationFlowsPolicy object. + Read the properties and relationships of an authenticationFlowsPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py b/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py index 96e11cf4bbf..59d822cae7a 100644 --- a/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py +++ b/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodConfiguration] = None, request_configuration: Optional[AuthenticationMethodConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[AuthenticationMethodConfigur if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py b/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py index 9efec746c29..81147972ffe 100644 --- a/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py +++ b/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py b/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py index ff0088728ca..30a7cfc51a5 100644 --- a/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py +++ b/msgraph/generated/policies/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodConfiguration] = None, request_configuration: Optional[AuthenticationMethodConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodConfigu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/authentication_methods_policy/authentication_methods_policy_request_builder.py b/msgraph/generated/policies/authentication_methods_policy/authentication_methods_policy_request_builder.py index 2ac880956e9..5b0432ef4c2 100644 --- a/msgraph/generated/policies/authentication_methods_policy/authentication_methods_policy_request_builder.py +++ b/msgraph/generated/policies/authentication_methods_policy/authentication_methods_policy_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AuthenticationMethodsPolic async def get(self,request_configuration: Optional[AuthenticationMethodsPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationMethodsPolicy]: """ - Read the properties and relationships of an authenticationMethodsPolicy object. + Read the properties and relationships of an authenticationMethodsPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationMethodsPolicy] Find more info here: https://learn.microsoft.com/graph/api/authenticationmethodspolicy-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AuthenticationMethodsPolicyRe async def patch(self,body: Optional[AuthenticationMethodsPolicy] = None, request_configuration: Optional[AuthenticationMethodsPolicyRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthenticationMethodsPolicy]: """ - Update the properties of an authenticationMethodsPolicy object. + Update the properties of an authenticationMethodsPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationMethodsPolicy] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodsPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an authenticationMethodsPolicy object. + Read the properties and relationships of an authenticationMethodsPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodsPolicy] = None, request_configuration: Optional[AuthenticationMethodsPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an authenticationMethodsPolicy object. + Update the properties of an authenticationMethodsPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodsPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class AuthenticationMethodsPolicyRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class AuthenticationMethodsPolicyRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an authenticationMethodsPolicy object. + Read the properties and relationships of an authenticationMethodsPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/authentication_strength_policies/authentication_strength_policies_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/authentication_strength_policies_request_builder.py index d430db33cb9..d926fb9b029 100644 --- a/msgraph/generated/policies/authentication_strength_policies/authentication_strength_policies_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/authentication_strength_policies_request_builder.py @@ -45,7 +45,7 @@ def by_authentication_strength_policy_id(self,authentication_strength_policy_id: async def get(self,request_configuration: Optional[AuthenticationStrengthPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationStrengthPolicyCollectionResponse]: """ - Get a list of the authenticationStrengthPolicy objects and their properties. This API returns both built-in and custom policies. + Get a list of the authenticationStrengthPolicy objects and their properties. This API returns both built-in and custom policies. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationStrengthPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authenticationstrengthroot-list-policies?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AuthenticationStrengthPolicie async def post(self,body: Optional[AuthenticationStrengthPolicy] = None, request_configuration: Optional[AuthenticationStrengthPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[AuthenticationStrengthPolicy]: """ - Create a new custom authenticationStrengthPolicy object. + Create a new custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationStrengthPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AuthenticationStrengthPolicy] = None, request def to_get_request_information(self,request_configuration: Optional[AuthenticationStrengthPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the authenticationStrengthPolicy objects and their properties. This API returns both built-in and custom policies. + Get a list of the authenticationStrengthPolicy objects and their properties. This API returns both built-in and custom policies. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationStrengthPolicy] = None, request_configuration: Optional[AuthenticationStrengthPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new custom authenticationStrengthPolicy object. + Create a new custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AuthenticationStrengthPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AuthenticationStrengthPoliciesRequestBuilderGetQueryParameters(): """ - Get a list of the authenticationStrengthPolicy objects and their properties. This API returns both built-in and custom policies. + Get a list of the authenticationStrengthPolicy objects and their properties. This API returns both built-in and custom policies. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/authentication_strength_policies/count/count_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/count/count_request_builder.py index 0fd3660f739..2938f5cf136 100644 --- a/msgraph/generated/policies/authentication_strength_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/authentication_strength_policies/item/authentication_strength_policy_item_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/item/authentication_strength_policy_item_request_builder.py index b474951f140..f733f093903 100644 --- a/msgraph/generated/policies/authentication_strength_policies/item/authentication_strength_policy_item_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/item/authentication_strength_policy_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a custom authenticationStrengthPolicy object. + Delete a custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. 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/authenticationstrengthroot-delete-policies?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[AuthenticationStrengthPoli async def get(self,request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationStrengthPolicy]: """ - Read the properties and relationships of an authenticationStrengthPolicy object. + Read the properties and relationships of an authenticationStrengthPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationStrengthPolicy] Find more info here: https://learn.microsoft.com/graph/api/authenticationstrengthpolicy-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[AuthenticationStrengthPolicyI async def patch(self,body: Optional[AuthenticationStrengthPolicy] = None, request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthenticationStrengthPolicy]: """ - Update the properties of an authenticationStrengthPolicy object. You cannot update the allowed auth method combinations using this request. To do so, use the Update allowed combinations action. + Update the properties of an authenticationStrengthPolicy object. You cannot update the allowed auth method combinations using this request. To do so, use the Update allowed combinations action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationStrengthPolicy] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[AuthenticationStrengthPolicy] = None, reques def to_delete_request_information(self,request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a custom authenticationStrengthPolicy object. + Delete a custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an authenticationStrengthPolicy object. + Read the properties and relationships of an authenticationStrengthPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationStrengthPolicy] = None, request_configuration: Optional[AuthenticationStrengthPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an authenticationStrengthPolicy object. You cannot update the allowed auth method combinations using this request. To do so, use the Update allowed combinations action. + Update the properties of an authenticationStrengthPolicy object. You cannot update the allowed auth method combinations using this request. To do so, use the Update allowed combinations action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationStrengthPolic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class AuthenticationStrengthPolicyItemRequestBuilderDeleteRequestConfiguration(B @dataclass class AuthenticationStrengthPolicyItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an authenticationStrengthPolicy object. + Read the properties and relationships of an authenticationStrengthPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/combination_configurations_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/combination_configurations_request_builder.py index a69dcd4f98f..d766e8d8f61 100644 --- a/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/combination_configurations_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/combination_configurations_request_builder.py @@ -45,7 +45,7 @@ def by_authentication_combination_configuration_id(self,authentication_combinati async def get(self,request_configuration: Optional[CombinationConfigurationsRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfigurationCollectionResponse]: """ - Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. + Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfigurationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authenticationstrengthpolicy-list-combinationconfigurations?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CombinationConfigurationsRequ async def post(self,body: Optional[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[CombinationConfigurationsRequestBuilderPostRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfiguration]: """ - Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. + Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfiguration] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AuthenticationCombinationConfiguration] = Non def to_get_request_information(self,request_configuration: Optional[CombinationConfigurationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. + Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[CombinationConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. + Create a new authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be created, and these may only be created for custom authentication strength policies. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AuthenticationCombinationCon if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CombinationConfigurationsRequestBuilderGetQueryParameters(): """ - Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. + Get the authenticationCombinationConfiguration objects for an authentication strength policy. authenticationCombinationConfiguration represents requirements placed on specific authentication method combinations that require specified variants of those authentication methods to be used when authenticating. Currently, only fido2combinationConfigurations objects are supported. authenticationCombinationConfiguration objects are supported only for custom authentication strengths. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/count/count_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/count/count_request_builder.py index 139faacf835..f53b1b9ebf9 100644 --- a/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/count/count_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py index 39266a374df..38362991005 100644 --- a/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/item/combination_configurations/item/authentication_combination_configuration_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. + Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. 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/authenticationstrengthpolicy-delete-combinationconfigurations?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AuthenticationCombinationC async def get(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfiguration]: """ - Read the properties and relationships of an authenticationCombinationConfiguration object. + Read the properties and relationships of an authenticationCombinationConfiguration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfiguration] Find more info here: https://learn.microsoft.com/graph/api/authenticationcombinationconfiguration-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AuthenticationCombinationConf async def patch(self,body: Optional[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthenticationCombinationConfiguration]: """ - Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationCombinationConfiguration] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[AuthenticationCombinationConfiguration] = No def to_delete_request_information(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. + Delete an authenticationCombinationConfiguration for a custom authenticationStrengthPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an authenticationCombinationConfiguration object. + Read the properties and relationships of an authenticationCombinationConfiguration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationCombinationConfiguration] = None, request_configuration: Optional[AuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationCombinationCo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class AuthenticationCombinationConfigurationItemRequestBuilderDeleteRequestConfi @dataclass class AuthenticationCombinationConfigurationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an authenticationCombinationConfiguration object. + Read the properties and relationships of an authenticationCombinationConfiguration object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/authentication_strength_policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py index 737ef9207dd..6b34a300878 100644 --- a/msgraph/generated/policies/authentication_strength_policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/item/update_allowed_combinations/update_allowed_combinations_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpdateAllowedCombinationsPostRequestBody] = None, request_configuration: Optional[UpdateAllowedCombinationsRequestBuilderPostRequestConfiguration] = None) -> Optional[UpdateAllowedCombinationsResult]: """ - Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. + Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UpdateAllowedCombinationsResult] @@ -54,7 +54,7 @@ async def post(self,body: Optional[UpdateAllowedCombinationsPostRequestBody] = N def to_post_request_information(self,body: Optional[UpdateAllowedCombinationsPostRequestBody] = None, request_configuration: Optional[UpdateAllowedCombinationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. + Update the allowedCombinations property of an authenticationStrengthPolicy object. To update other properties of an authenticationStrengthPolicy object, use the Update authenticationStrengthPolicy method. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[UpdateAllowedCombinationsPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/authentication_strength_policies/item/usage/usage_request_builder.py b/msgraph/generated/policies/authentication_strength_policies/item/usage/usage_request_builder.py index 33725da702f..6e8d059c57c 100644 --- a/msgraph/generated/policies/authentication_strength_policies/item/usage/usage_request_builder.py +++ b/msgraph/generated/policies/authentication_strength_policies/item/usage/usage_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[UsageRequest Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsageRequestBuilder: diff --git a/msgraph/generated/policies/authorization_policy/authorization_policy_request_builder.py b/msgraph/generated/policies/authorization_policy/authorization_policy_request_builder.py index 30567fd5f65..56e2cc9b126 100644 --- a/msgraph/generated/policies/authorization_policy/authorization_policy_request_builder.py +++ b/msgraph/generated/policies/authorization_policy/authorization_policy_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AuthorizationPolicyRequest async def get(self,request_configuration: Optional[AuthorizationPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthorizationPolicy]: """ - Retrieve the properties of an authorizationPolicy object. + Retrieve the properties of an authorizationPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthorizationPolicy] Find more info here: https://learn.microsoft.com/graph/api/authorizationpolicy-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[AuthorizationPolicyRequestBui async def patch(self,body: Optional[AuthorizationPolicy] = None, request_configuration: Optional[AuthorizationPolicyRequestBuilderPatchRequestConfiguration] = None) -> Optional[AuthorizationPolicy]: """ - Update the properties of an authorizationPolicy object. + Update the properties of an authorizationPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthorizationPolicy] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Authoriza Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthorizationPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of an authorizationPolicy object. + Retrieve the properties of an authorizationPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthorizationPolicy] = None, request_configuration: Optional[AuthorizationPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an authorizationPolicy object. + Update the properties of an authorizationPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[AuthorizationPolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AuthorizationPolicyRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class AuthorizationPolicyRequestBuilderGetQueryParameters(): """ - Retrieve the properties of an authorizationPolicy object. + Retrieve the properties of an authorizationPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/claims_mapping_policies/claims_mapping_policies_request_builder.py b/msgraph/generated/policies/claims_mapping_policies/claims_mapping_policies_request_builder.py index 346ed9571d3..8dbaa3c8e11 100644 --- a/msgraph/generated/policies/claims_mapping_policies/claims_mapping_policies_request_builder.py +++ b/msgraph/generated/policies/claims_mapping_policies/claims_mapping_policies_request_builder.py @@ -45,7 +45,7 @@ def by_claims_mapping_policy_id(self,claims_mapping_policy_id: str) -> ClaimsMap async def get(self,request_configuration: Optional[ClaimsMappingPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[ClaimsMappingPolicyCollectionResponse]: """ - Get a list of claimsMappingPolicy objects. + Get a list of claimsMappingPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ClaimsMappingPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/claimsmappingpolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ClaimsMappingPoliciesRequestB async def post(self,body: Optional[ClaimsMappingPolicy] = None, request_configuration: Optional[ClaimsMappingPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[ClaimsMappingPolicy]: """ - Create a new claimsMappingPolicy object. + Create a new claimsMappingPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ClaimsMappingPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ClaimsMappingPolicy] = None, request_configur def to_get_request_information(self,request_configuration: Optional[ClaimsMappingPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of claimsMappingPolicy objects. + Get a list of claimsMappingPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ClaimsMappingPolicy] = None, request_configuration: Optional[ClaimsMappingPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new claimsMappingPolicy object. + Create a new claimsMappingPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ClaimsMappingPolicy] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ClaimsMappingPoliciesRequestBuilderGetQueryParameters(): """ - Get a list of claimsMappingPolicy objects. + Get a list of claimsMappingPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/claims_mapping_policies/count/count_request_builder.py b/msgraph/generated/policies/claims_mapping_policies/count/count_request_builder.py index 3dd25162885..2a15305f98d 100644 --- a/msgraph/generated/policies/claims_mapping_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/claims_mapping_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/claims_mapping_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/claims_mapping_policies/item/applies_to/applies_to_request_builder.py index dfb2a2ceeb2..344691a7ae4 100644 --- a/msgraph/generated/policies/claims_mapping_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/claims_mapping_policies/item/applies_to/applies_to_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AppliesToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppliesToRequestBuilder: diff --git a/msgraph/generated/policies/claims_mapping_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/claims_mapping_policies/item/applies_to/count/count_request_builder.py index 54000ded5a0..d116e18bd9b 100644 --- a/msgraph/generated/policies/claims_mapping_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/claims_mapping_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/claims_mapping_policies/item/applies_to/item/directory_object_item_request_builder.py b/msgraph/generated/policies/claims_mapping_policies/item/applies_to/item/directory_object_item_request_builder.py index fff8f861ee3..22bac64f193 100644 --- a/msgraph/generated/policies/claims_mapping_policies/item/applies_to/item/directory_object_item_request_builder.py +++ b/msgraph/generated/policies/claims_mapping_policies/item/applies_to/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/policies/claims_mapping_policies/item/claims_mapping_policy_item_request_builder.py b/msgraph/generated/policies/claims_mapping_policies/item/claims_mapping_policy_item_request_builder.py index 70f082a0fb3..54b3bc3baa4 100644 --- a/msgraph/generated/policies/claims_mapping_policies/item/claims_mapping_policy_item_request_builder.py +++ b/msgraph/generated/policies/claims_mapping_policies/item/claims_mapping_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ClaimsMappingPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a claimsMappingPolicy object. + Delete a claimsMappingPolicy object. This API is available in the following national cloud deployments. 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/claimsmappingpolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ClaimsMappingPolicyItemReq async def get(self,request_configuration: Optional[ClaimsMappingPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ClaimsMappingPolicy]: """ - Retrieve the properties and relationships of a claimsMappingPolicy object. + Retrieve the properties and relationships of a claimsMappingPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ClaimsMappingPolicy] Find more info here: https://learn.microsoft.com/graph/api/claimsmappingpolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ClaimsMappingPolicyItemReques async def patch(self,body: Optional[ClaimsMappingPolicy] = None, request_configuration: Optional[ClaimsMappingPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ClaimsMappingPolicy]: """ - Update the properties of a claimsMappingPolicy object. + Update the properties of a claimsMappingPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ClaimsMappingPolicy] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ClaimsMappingPolicy] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[ClaimsMappingPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a claimsMappingPolicy object. + Delete a claimsMappingPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ClaimsMappingPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a claimsMappingPolicy object. + Retrieve the properties and relationships of a claimsMappingPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ClaimsMappingPolicy] = None, request_configuration: Optional[ClaimsMappingPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a claimsMappingPolicy object. + Update the properties of a claimsMappingPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ClaimsMappingPolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ClaimsMappingPolicyItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ClaimsMappingPolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a claimsMappingPolicy object. + Retrieve the properties and relationships of a claimsMappingPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/conditional_access_policies/conditional_access_policies_request_builder.py b/msgraph/generated/policies/conditional_access_policies/conditional_access_policies_request_builder.py index 4900ad399f9..46475de5e06 100644 --- a/msgraph/generated/policies/conditional_access_policies/conditional_access_policies_request_builder.py +++ b/msgraph/generated/policies/conditional_access_policies/conditional_access_policies_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ConditionalA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConditionalAccessPolicy] = None, request_configuration: Optional[ConditionalAccessPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ConditionalAccessPolicy] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/conditional_access_policies/count/count_request_builder.py b/msgraph/generated/policies/conditional_access_policies/count/count_request_builder.py index 987a16ac9fd..87e0b71598b 100644 --- a/msgraph/generated/policies/conditional_access_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/conditional_access_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/conditional_access_policies/item/conditional_access_policy_item_request_builder.py b/msgraph/generated/policies/conditional_access_policies/item/conditional_access_policy_item_request_builder.py index 23e4d267bef..97bd88e73e9 100644 --- a/msgraph/generated/policies/conditional_access_policies/item/conditional_access_policy_item_request_builder.py +++ b/msgraph/generated/policies/conditional_access_policies/item/conditional_access_policy_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Condition Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ConditionalA Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConditionalAccessPolicy] = None, request_configuration: Optional[ConditionalAccessPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ConditionalAccessPolicy] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/cross_tenant_access_policy/cross_tenant_access_policy_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/cross_tenant_access_policy_request_builder.py index abe5aeb3bf4..1afbea1d319 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/cross_tenant_access_policy_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/cross_tenant_access_policy_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[CrossTenantAccessPolicyReq async def get(self,request_configuration: Optional[CrossTenantAccessPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicy]: """ - Read the properties and relationships of a crossTenantAccessPolicy object. + Read the properties and relationships of a crossTenantAccessPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicy] Find more info here: https://learn.microsoft.com/graph/api/crosstenantaccesspolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[CrossTenantAccessPolicyReques async def patch(self,body: Optional[CrossTenantAccessPolicy] = None, request_configuration: Optional[CrossTenantAccessPolicyRequestBuilderPatchRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicy]: """ - Update the properties of a cross-tenant access policy. + Update the properties of a cross-tenant access policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicy] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[CrossTena Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CrossTenantAccessPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a crossTenantAccessPolicy object. + Read the properties and relationships of a crossTenantAccessPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CrossTenantAccessPolicy] = None, request_configuration: Optional[CrossTenantAccessPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a cross-tenant access policy. + Update the properties of a cross-tenant access policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[CrossTenantAccessPolicy] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class CrossTenantAccessPolicyRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class CrossTenantAccessPolicyRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a crossTenantAccessPolicy object. + Read the properties and relationships of a crossTenantAccessPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/cross_tenant_access_policy/default/default_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/default/default_request_builder.py index 1a1528021f3..a6a0db3b677 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/default/default_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/default/default_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[DefaultRequestBuilderDelet async def get(self,request_configuration: Optional[DefaultRequestBuilderGetRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicyConfigurationDefault]: """ - Read the default configuration of a cross-tenant access policy. This default configuration may be the service default assigned by Azure AD (isServiceDefault is true) or may be customized in your tenant (isServiceDefault is false). + Read the default configuration of a cross-tenant access policy. This default configuration may be the service default assigned by Microsoft Entra ID (isServiceDefault is true) or may be customized in your tenant (isServiceDefault is false). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicyConfigurationDefault] Find more info here: https://learn.microsoft.com/graph/api/crosstenantaccesspolicyconfigurationdefault-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[DefaultRequestBuilderGetReque async def patch(self,body: Optional[CrossTenantAccessPolicyConfigurationDefault] = None, request_configuration: Optional[DefaultRequestBuilderPatchRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicyConfigurationDefault]: """ - Update the default configuration of a cross-tenant access policy. + Update the default configuration of a cross-tenant access policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicyConfigurationDefault] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[DefaultRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DefaultRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the default configuration of a cross-tenant access policy. This default configuration may be the service default assigned by Azure AD (isServiceDefault is true) or may be customized in your tenant (isServiceDefault is false). + Read the default configuration of a cross-tenant access policy. This default configuration may be the service default assigned by Microsoft Entra ID (isServiceDefault is true) or may be customized in your tenant (isServiceDefault is false). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CrossTenantAccessPolicyConfigurationDefault] = None, request_configuration: Optional[DefaultRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the default configuration of a cross-tenant access policy. + Update the default configuration of a cross-tenant access policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CrossTenantAccessPolicyConf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class DefaultRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DefaultRequestBuilderGetQueryParameters(): """ - Read the default configuration of a cross-tenant access policy. This default configuration may be the service default assigned by Azure AD (isServiceDefault is true) or may be customized in your tenant (isServiceDefault is false). + Read the default configuration of a cross-tenant access policy. This default configuration may be the service default assigned by Microsoft Entra ID (isServiceDefault is true) or may be customized in your tenant (isServiceDefault is false). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/cross_tenant_access_policy/default/reset_to_system_default/reset_to_system_default_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/default/reset_to_system_default/reset_to_system_default_request_builder.py index 39a8701d801..a74de5ada3a 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/default/reset_to_system_default/reset_to_system_default_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/default/reset_to_system_default/reset_to_system_default_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ResetToSystemDefaultRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reset any changes made to the default configuration in a cross-tenant access policy back to the system default. + Reset any changes made to the default configuration in a cross-tenant access policy back to the system default. This API is available in the following national cloud deployments. 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/crosstenantaccesspolicyconfigurationdefault-resettosystemdefault?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ResetToSystemDefaultRequestB def to_post_request_information(self,request_configuration: Optional[ResetToSystemDefaultRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reset any changes made to the default configuration in a cross-tenant access policy back to the system default. + Reset any changes made to the default configuration in a cross-tenant access policy back to the system default. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ResetToSystemDefaultRequestBuilder: diff --git a/msgraph/generated/policies/cross_tenant_access_policy/partners/count/count_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/partners/count/count_request_builder.py index 15273926772..bdae2a63ec9 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/partners/count/count_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/partners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/cross_tenant_access_policy/partners/item/cross_tenant_access_policy_configuration_partner_tenant_item_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/partners/item/cross_tenant_access_policy_configuration_partner_tenant_item_request_builder.py index ca50fd3734c..1ddf777b40d 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/partners/item/cross_tenant_access_policy_configuration_partner_tenant_item_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/partners/item/cross_tenant_access_policy_configuration_partner_tenant_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a partner-specific configuration in a cross-tenant access policy. If a configuration includes a user synchronization policy, you must first delete the user synchronization policy before you can delete the partner-specific configuration. + Delete a partner-specific configuration in a cross-tenant access policy. If a configuration includes a user synchronization policy, you must first delete the user synchronization policy before you can delete the partner-specific configuration. This API is available in the following national cloud deployments. 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/crosstenantaccesspolicyconfigurationpartner-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[CrossTenantAccessPolicyCon async def get(self,request_configuration: Optional[CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicyConfigurationPartner]: """ - Read the properties and relationships of a partner-specific configuration. + Read the properties and relationships of a partner-specific configuration. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicyConfigurationPartner] Find more info here: https://learn.microsoft.com/graph/api/crosstenantaccesspolicyconfigurationpartner-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[CrossTenantAccessPolicyConfig async def patch(self,body: Optional[CrossTenantAccessPolicyConfigurationPartner] = None, request_configuration: Optional[CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicyConfigurationPartner]: """ - Update the properties of a partner-specific configuration. + Update the properties of a partner-specific configuration. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicyConfigurationPartner] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[CrossTenantAccessPolicyConfigurationPartner] def to_delete_request_information(self,request_configuration: Optional[CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a partner-specific configuration in a cross-tenant access policy. If a configuration includes a user synchronization policy, you must first delete the user synchronization policy before you can delete the partner-specific configuration. + Delete a partner-specific configuration in a cross-tenant access policy. If a configuration includes a user synchronization policy, you must first delete the user synchronization policy before you can delete the partner-specific configuration. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a partner-specific configuration. + Read the properties and relationships of a partner-specific configuration. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CrossTenantAccessPolicyConfigurationPartner] = None, request_configuration: Optional[CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a partner-specific configuration. + Update the properties of a partner-specific configuration. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[CrossTenantAccessPolicyConf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderDeleteR @dataclass class CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a partner-specific configuration. + Read the properties and relationships of a partner-specific configuration. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py index efee8a40bf1..d0b66fae8e8 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[IdentitySynchronizationRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the user synchronization policy for a partner-specific configuration. + Delete the user synchronization policy for a partner-specific configuration. This API is available in the following national cloud deployments. 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/crosstenantidentitysyncpolicypartner-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IdentitySynchronizationReq async def get(self,request_configuration: Optional[IdentitySynchronizationRequestBuilderGetRequestConfiguration] = None) -> Optional[CrossTenantIdentitySyncPolicyPartner]: """ - Get the user synchronization policy of a partner-specific configuration. + Get the user synchronization policy of a partner-specific configuration. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantIdentitySyncPolicyPartner] Find more info here: https://learn.microsoft.com/graph/api/crosstenantidentitysyncpolicypartner-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def put(self,body: Optional[CrossTenantIdentitySyncPolicyPartner] = None, def to_delete_request_information(self,request_configuration: Optional[IdentitySynchronizationRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the user synchronization policy for a partner-specific configuration. + Delete the user synchronization policy for a partner-specific configuration. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentitySynchronizationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the user synchronization policy of a partner-specific configuration. + Get the user synchronization policy of a partner-specific configuration. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[CrossTenantIdentitySyncPolicyPartner] = None, request_configuration: Optional[IdentitySynchronizationRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_put_request_information(self,body: Optional[CrossTenantIdentitySyncPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class IdentitySynchronizationRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class IdentitySynchronizationRequestBuilderGetQueryParameters(): """ - Get the user synchronization policy of a partner-specific configuration. + Get the user synchronization policy of a partner-specific configuration. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/cross_tenant_access_policy/partners/partners_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/partners/partners_request_builder.py index 1cb1c05a2dd..da7960337a7 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/partners/partners_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/partners/partners_request_builder.py @@ -45,7 +45,7 @@ def by_cross_tenant_access_policy_configuration_partner_tenant_id(self,cross_ten async def get(self,request_configuration: Optional[PartnersRequestBuilderGetRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicyConfigurationPartnerCollectionResponse]: """ - Get a list of all partner configurations within a cross-tenant access policy. You can also use the $expand parameter to list the user synchronization policy for all partner configurations. + Get a list of all partner configurations within a cross-tenant access policy. You can also use the $expand parameter to list the user synchronization policy for all partner configurations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicyConfigurationPartnerCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/crosstenantaccesspolicy-list-partners?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PartnersRequestBuilderGetRequ async def post(self,body: Optional[CrossTenantAccessPolicyConfigurationPartner] = None, request_configuration: Optional[PartnersRequestBuilderPostRequestConfiguration] = None) -> Optional[CrossTenantAccessPolicyConfigurationPartner]: """ - Create a new partner configuration in a cross-tenant access policy. + Create a new partner configuration in a cross-tenant access policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantAccessPolicyConfigurationPartner] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CrossTenantAccessPolicyConfigurationPartner] def to_get_request_information(self,request_configuration: Optional[PartnersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of all partner configurations within a cross-tenant access policy. You can also use the $expand parameter to list the user synchronization policy for all partner configurations. + Get a list of all partner configurations within a cross-tenant access policy. You can also use the $expand parameter to list the user synchronization policy for all partner configurations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CrossTenantAccessPolicyConfigurationPartner] = None, request_configuration: Optional[PartnersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new partner configuration in a cross-tenant access policy. + Create a new partner configuration in a cross-tenant access policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CrossTenantAccessPolicyConfi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PartnersRequestBuilderGetQueryParameters(): """ - Get a list of all partner configurations within a cross-tenant access policy. You can also use the $expand parameter to list the user synchronization policy for all partner configurations. + Get a list of all partner configurations within a cross-tenant access policy. You can also use the $expand parameter to list the user synchronization policy for all partner configurations. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/default_app_management_policy/default_app_management_policy_request_builder.py b/msgraph/generated/policies/default_app_management_policy/default_app_management_policy_request_builder.py index cf7554a4150..b01996cc98c 100644 --- a/msgraph/generated/policies/default_app_management_policy/default_app_management_policy_request_builder.py +++ b/msgraph/generated/policies/default_app_management_policy/default_app_management_policy_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DefaultAppManagementPolicy async def get(self,request_configuration: Optional[DefaultAppManagementPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[TenantAppManagementPolicy]: """ - Read the properties of a tenantAppManagementPolicy object. + Read the properties of a tenantAppManagementPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TenantAppManagementPolicy] Find more info here: https://learn.microsoft.com/graph/api/tenantappmanagementpolicy-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[DefaultAppManagementPolicyReq async def patch(self,body: Optional[TenantAppManagementPolicy] = None, request_configuration: Optional[DefaultAppManagementPolicyRequestBuilderPatchRequestConfiguration] = None) -> Optional[TenantAppManagementPolicy]: """ - Update the properties of a tenantAppManagementPolicy object. + Update the properties of a tenantAppManagementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TenantAppManagementPolicy] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[DefaultAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DefaultAppManagementPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of a tenantAppManagementPolicy object. + Read the properties of a tenantAppManagementPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TenantAppManagementPolicy] = None, request_configuration: Optional[DefaultAppManagementPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a tenantAppManagementPolicy object. + Update the properties of a tenantAppManagementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TenantAppManagementPolicy] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DefaultAppManagementPolicyRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class DefaultAppManagementPolicyRequestBuilderGetQueryParameters(): """ - Read the properties of a tenantAppManagementPolicy object. + Read the properties of a tenantAppManagementPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/feature_rollout_policies/count/count_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/count/count_request_builder.py index 3d2d83f9a9e..9251f654382 100644 --- a/msgraph/generated/policies/feature_rollout_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/feature_rollout_policies/feature_rollout_policies_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/feature_rollout_policies_request_builder.py index 38777a14828..42fa309a6d6 100644 --- a/msgraph/generated/policies/feature_rollout_policies/feature_rollout_policies_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/feature_rollout_policies_request_builder.py @@ -45,7 +45,7 @@ def by_feature_rollout_policy_id(self,feature_rollout_policy_id: str) -> Feature async def get(self,request_configuration: Optional[FeatureRolloutPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[FeatureRolloutPolicyCollectionResponse]: """ - Retrieve a list of featureRolloutPolicy objects. + Retrieve a list of featureRolloutPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FeatureRolloutPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/featurerolloutpolicies-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[FeatureRolloutPoliciesRequest async def post(self,body: Optional[FeatureRolloutPolicy] = None, request_configuration: Optional[FeatureRolloutPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[FeatureRolloutPolicy]: """ - Create a new featureRolloutPolicy object. + Create a new featureRolloutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FeatureRolloutPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[FeatureRolloutPolicy] = None, request_configu def to_get_request_information(self,request_configuration: Optional[FeatureRolloutPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of featureRolloutPolicy objects. + Retrieve a list of featureRolloutPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FeatureRolloutPolicy] = None, request_configuration: Optional[FeatureRolloutPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new featureRolloutPolicy object. + Create a new featureRolloutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[FeatureRolloutPolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class FeatureRolloutPoliciesRequestBuilderGetQueryParameters(): """ - Retrieve a list of featureRolloutPolicy objects. + Retrieve a list of featureRolloutPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/applies_to_request_builder.py index a343bae7f4c..132546cd6e0 100644 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/applies_to_request_builder.py @@ -14,12 +14,8 @@ from .....models.directory_object_collection_response import DirectoryObjectCollectionResponse from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.directory_object_item_request_builder import DirectoryObjectItemRequestBuilder from .ref.ref_request_builder import RefRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class AppliesToRequestBuilder(BaseRequestBuilder): """ @@ -71,7 +67,7 @@ async def get(self,request_configuration: Optional[AppliesToRequestBuilderGetReq async def post(self,body: Optional[DirectoryObject] = None, request_configuration: Optional[AppliesToRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. + Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] @@ -101,19 +97,19 @@ def to_get_request_information(self,request_configuration: Optional[AppliesToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryObject] = None, request_configuration: Optional[AppliesToRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. + Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -121,13 +117,13 @@ def to_post_request_information(self,body: Optional[DirectoryObject] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -150,33 +146,6 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - @property def ref(self) -> RefRequestBuilder: """ @@ -186,15 +155,6 @@ def ref(self) -> RefRequestBuilder: return RefRequestBuilder(self.request_adapter, self.path_parameters) - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class AppliesToRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/count/count_request_builder.py index bd0a059917c..3e10d3c8f14 100644 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/delta/delta_response.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/delta/delta_response.py deleted file mode 100644 index 52ae1e97709..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from ......models.base_delta_function_response import BaseDeltaFunctionResponse - from ......models.directory_object import DirectoryObject - -from ......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from ......models.base_delta_function_response import BaseDeltaFunctionResponse - from ......models.directory_object import DirectoryObject - - from ......models.base_delta_function_response import BaseDeltaFunctionResponse - from ......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 67696f02cd0..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/policies/featureRolloutPolicies/{featureRolloutPolicy%2Did}/appliesTo/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index d555917bbea..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ......models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index b8e209c9eb5..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/policies/featureRolloutPolicies/{featureRolloutPolicy%2Did}/appliesTo/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_response.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 1adfa89b776..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/policies/feature_rollout_policies/item/applies_to/item/ref/ref_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/item/ref/ref_request_builder.py index ba14d61d7bc..8a460f3dea6 100644 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/item/ref/ref_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an appliesTo on a featureRolloutPolicy object to remove the directoryObject from feature rollout. + Remove an appliesTo on a featureRolloutPolicy object to remove the directoryObject from feature rollout. This API is available in the following national cloud deployments. 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/featurerolloutpolicy-delete-appliesto?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an appliesTo on a featureRolloutPolicy object to remove the directoryObject from feature rollout. + Remove an appliesTo on a featureRolloutPolicy object to remove the directoryObject from feature rollout. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an appliesTo on a featureRolloutPolicy object to remove the directoryObject from feature rollout. + Remove an appliesTo on a featureRolloutPolicy object to remove the directoryObject from feature rollout. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/ref/ref_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/ref/ref_request_builder.py index 8cc67e49332..5ad459e5284 100644 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/ref/ref_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/ref/ref_request_builder.py @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. + Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -78,19 +78,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. + Add an appliesTo on a featureRolloutPolicy object to specify the directoryObject to which the featureRolloutPolicy should be applied. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -98,12 +98,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index bdb502437ed..00000000000 --- a/msgraph/generated/policies/feature_rollout_policies/item/applies_to/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/policies/featureRolloutPolicies/{featureRolloutPolicy%2Did}/appliesTo/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/policies/feature_rollout_policies/item/feature_rollout_policy_item_request_builder.py b/msgraph/generated/policies/feature_rollout_policies/item/feature_rollout_policy_item_request_builder.py index 222af7121c4..62f43f35ecf 100644 --- a/msgraph/generated/policies/feature_rollout_policies/item/feature_rollout_policy_item_request_builder.py +++ b/msgraph/generated/policies/feature_rollout_policies/item/feature_rollout_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[FeatureRolloutPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a featureRolloutPolicy object. + Delete a featureRolloutPolicy object. This API is available in the following national cloud deployments. 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/featurerolloutpolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[FeatureRolloutPolicyItemRe async def get(self,request_configuration: Optional[FeatureRolloutPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[FeatureRolloutPolicy]: """ - Retrieve the properties and relationships of a featureRolloutPolicy object. + Retrieve the properties and relationships of a featureRolloutPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FeatureRolloutPolicy] Find more info here: https://learn.microsoft.com/graph/api/featurerolloutpolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[FeatureRolloutPolicyItemReque async def patch(self,body: Optional[FeatureRolloutPolicy] = None, request_configuration: Optional[FeatureRolloutPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[FeatureRolloutPolicy]: """ - Update the properties of featureRolloutPolicy object. + Update the properties of featureRolloutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FeatureRolloutPolicy] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[FeatureRolloutPolicy] = None, request_config def to_delete_request_information(self,request_configuration: Optional[FeatureRolloutPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a featureRolloutPolicy object. + Delete a featureRolloutPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FeatureRolloutPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a featureRolloutPolicy object. + Retrieve the properties and relationships of a featureRolloutPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FeatureRolloutPolicy] = None, request_configuration: Optional[FeatureRolloutPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of featureRolloutPolicy object. + Update the properties of featureRolloutPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[FeatureRolloutPolicy] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class FeatureRolloutPolicyItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class FeatureRolloutPolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a featureRolloutPolicy object. + Retrieve the properties and relationships of a featureRolloutPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/home_realm_discovery_policies/count/count_request_builder.py b/msgraph/generated/policies/home_realm_discovery_policies/count/count_request_builder.py index 614024fdc40..4cfbfbf26d9 100644 --- a/msgraph/generated/policies/home_realm_discovery_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/home_realm_discovery_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py b/msgraph/generated/policies/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py index 5eabebc1310..ebdd587b246 100644 --- a/msgraph/generated/policies/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py +++ b/msgraph/generated/policies/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py @@ -45,7 +45,7 @@ def by_home_realm_discovery_policy_id(self,home_realm_discovery_policy_id: str) async def get(self,request_configuration: Optional[HomeRealmDiscoveryPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[HomeRealmDiscoveryPolicyCollectionResponse]: """ - Get a list of homeRealmDiscoveryPolicy objects. + Get a list of homeRealmDiscoveryPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HomeRealmDiscoveryPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/homerealmdiscoverypolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[HomeRealmDiscoveryPoliciesReq async def post(self,body: Optional[HomeRealmDiscoveryPolicy] = None, request_configuration: Optional[HomeRealmDiscoveryPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[HomeRealmDiscoveryPolicy]: """ - Create a new homeRealmDiscoveryPolicy object. + Create a new homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HomeRealmDiscoveryPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[HomeRealmDiscoveryPolicy] = None, request_con def to_get_request_information(self,request_configuration: Optional[HomeRealmDiscoveryPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of homeRealmDiscoveryPolicy objects. + Get a list of homeRealmDiscoveryPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HomeRealmDiscoveryPolicy] = None, request_configuration: Optional[HomeRealmDiscoveryPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new homeRealmDiscoveryPolicy object. + Create a new homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[HomeRealmDiscoveryPolicy] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HomeRealmDiscoveryPoliciesRequestBuilderGetQueryParameters(): """ - Get a list of homeRealmDiscoveryPolicy objects. + Get a list of homeRealmDiscoveryPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/applies_to_request_builder.py index ee9baf76168..0133a9f4f1e 100644 --- a/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/applies_to_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AppliesToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppliesToRequestBuilder: diff --git a/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/count/count_request_builder.py index 4bae699c9f2..489bad28da9 100644 --- a/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/item/directory_object_item_request_builder.py b/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/item/directory_object_item_request_builder.py index 8179d6f5a09..c8e38e65c83 100644 --- a/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/item/directory_object_item_request_builder.py +++ b/msgraph/generated/policies/home_realm_discovery_policies/item/applies_to/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/policies/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py b/msgraph/generated/policies/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py index 9f4a69af385..ab080aac9ee 100644 --- a/msgraph/generated/policies/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py +++ b/msgraph/generated/policies/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[HomeRealmDiscoveryPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a homeRealmDiscoveryPolicy object. + Delete a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. 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/homerealmdiscoverypolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[HomeRealmDiscoveryPolicyIt async def get(self,request_configuration: Optional[HomeRealmDiscoveryPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HomeRealmDiscoveryPolicy]: """ - Retrieve the properties and relationships of a homeRealmDiscoveryPolicy object. + Retrieve the properties and relationships of a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HomeRealmDiscoveryPolicy] Find more info here: https://learn.microsoft.com/graph/api/homerealmdiscoverypolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[HomeRealmDiscoveryPolicyItemR async def patch(self,body: Optional[HomeRealmDiscoveryPolicy] = None, request_configuration: Optional[HomeRealmDiscoveryPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[HomeRealmDiscoveryPolicy]: """ - Update the properties of a homeRealmDiscoveryPolicy object. + Update the properties of a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HomeRealmDiscoveryPolicy] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[HomeRealmDiscoveryPolicy] = None, request_co def to_delete_request_information(self,request_configuration: Optional[HomeRealmDiscoveryPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a homeRealmDiscoveryPolicy object. + Delete a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[HomeRealmDiscoveryPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a homeRealmDiscoveryPolicy object. + Retrieve the properties and relationships of a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HomeRealmDiscoveryPolicy] = None, request_configuration: Optional[HomeRealmDiscoveryPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a homeRealmDiscoveryPolicy object. + Update the properties of a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[HomeRealmDiscoveryPolicy] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class HomeRealmDiscoveryPolicyItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class HomeRealmDiscoveryPolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a homeRealmDiscoveryPolicy object. + Retrieve the properties and relationships of a homeRealmDiscoveryPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/identity_security_defaults_enforcement_policy/identity_security_defaults_enforcement_policy_request_builder.py b/msgraph/generated/policies/identity_security_defaults_enforcement_policy/identity_security_defaults_enforcement_policy_request_builder.py index 746ce0201d6..257734c1ba5 100644 --- a/msgraph/generated/policies/identity_security_defaults_enforcement_policy/identity_security_defaults_enforcement_policy_request_builder.py +++ b/msgraph/generated/policies/identity_security_defaults_enforcement_policy/identity_security_defaults_enforcement_policy_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[IdentitySecurityDefaultsEn async def get(self,request_configuration: Optional[IdentitySecurityDefaultsEnforcementPolicyRequestBuilderGetRequestConfiguration] = None) -> Optional[IdentitySecurityDefaultsEnforcementPolicy]: """ - Retrieve the properties of an identitySecurityDefaultsEnforcementPolicy object. + Retrieve the properties of an identitySecurityDefaultsEnforcementPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentitySecurityDefaultsEnforcementPolicy] Find more info here: https://learn.microsoft.com/graph/api/identitysecuritydefaultsenforcementpolicy-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[IdentitySecurityDefaultsEnfor async def patch(self,body: Optional[IdentitySecurityDefaultsEnforcementPolicy] = None, request_configuration: Optional[IdentitySecurityDefaultsEnforcementPolicyRequestBuilderPatchRequestConfiguration] = None) -> Optional[IdentitySecurityDefaultsEnforcementPolicy]: """ - Update the properties of an identitySecurityDefaultsEnforcementPolicy object. + Update the properties of an identitySecurityDefaultsEnforcementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IdentitySecurityDefaultsEnforcementPolicy] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[IdentityS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IdentitySecurityDefaultsEnforcementPolicyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties of an identitySecurityDefaultsEnforcementPolicy object. + Retrieve the properties of an identitySecurityDefaultsEnforcementPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IdentitySecurityDefaultsEnforcementPolicy] = None, request_configuration: Optional[IdentitySecurityDefaultsEnforcementPolicyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an identitySecurityDefaultsEnforcementPolicy object. + Update the properties of an identitySecurityDefaultsEnforcementPolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[IdentitySecurityDefaultsEnf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class IdentitySecurityDefaultsEnforcementPolicyRequestBuilderDeleteRequestConfig @dataclass class IdentitySecurityDefaultsEnforcementPolicyRequestBuilderGetQueryParameters(): """ - Retrieve the properties of an identitySecurityDefaultsEnforcementPolicy object. + Retrieve the properties of an identitySecurityDefaultsEnforcementPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/permission_grant_policies/count/count_request_builder.py b/msgraph/generated/policies/permission_grant_policies/count/count_request_builder.py index ba33d1f7a6d..2a1b585560c 100644 --- a/msgraph/generated/policies/permission_grant_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/permission_grant_policies/item/excludes/count/count_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/excludes/count/count_request_builder.py index 36484a8d72e..55a9ed42304 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/excludes/count/count_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/excludes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/permission_grant_policies/item/excludes/excludes_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/excludes/excludes_request_builder.py index d096e58e0ea..2a5257179ca 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/excludes/excludes_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/excludes/excludes_request_builder.py @@ -45,7 +45,7 @@ def by_permission_grant_condition_set_id(self,permission_grant_condition_set_id: async def get(self,request_configuration: Optional[ExcludesRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionGrantConditionSetCollectionResponse]: """ - Retrieve the condition sets which are *excluded* in a permissionGrantPolicy. + Retrieve the condition sets which are *excluded* in a permissionGrantPolicy. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantConditionSetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/permissiongrantpolicy-list-excludes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ExcludesRequestBuilderGetRequ async def post(self,body: Optional[PermissionGrantConditionSet] = None, request_configuration: Optional[ExcludesRequestBuilderPostRequestConfiguration] = None) -> Optional[PermissionGrantConditionSet]: """ - Add conditions under which a permission grant event is *excluded* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the excludes collection of a permissionGrantPolicy. + Add conditions under which a permission grant event is *excluded* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the excludes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantConditionSet] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PermissionGrantConditionSet] = None, request_ def to_get_request_information(self,request_configuration: Optional[ExcludesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the condition sets which are *excluded* in a permissionGrantPolicy. + Retrieve the condition sets which are *excluded* in a permissionGrantPolicy. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PermissionGrantConditionSet] = None, request_configuration: Optional[ExcludesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add conditions under which a permission grant event is *excluded* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the excludes collection of a permissionGrantPolicy. + Add conditions under which a permission grant event is *excluded* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the excludes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PermissionGrantConditionSet] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExcludesRequestBuilderGetQueryParameters(): """ - Retrieve the condition sets which are *excluded* in a permissionGrantPolicy. + Retrieve the condition sets which are *excluded* in a permissionGrantPolicy. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/permission_grant_policies/item/excludes/item/permission_grant_condition_set_item_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/excludes/item/permission_grant_condition_set_item_request_builder.py index 528363b3de5..f7f59d57b74 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/excludes/item/permission_grant_condition_set_item_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/excludes/item/permission_grant_condition_set_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a permissionGrantConditionSet from the excludes collection of a permissionGrantPolicy. + Deletes a permissionGrantConditionSet from the excludes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. 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/permissiongrantpolicy-delete-excludes?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[PermissionGrantConditionSet] = None, request def to_delete_request_information(self,request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a permissionGrantConditionSet from the excludes collection of a permissionGrantPolicy. + Deletes a permissionGrantConditionSet from the excludes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PermissionGr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PermissionGrantConditionSet] = None, request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PermissionGrantConditionSet if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/permission_grant_policies/item/includes/count/count_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/includes/count/count_request_builder.py index 527cff21d8e..90b95bdab70 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/includes/count/count_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/includes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/permission_grant_policies/item/includes/includes_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/includes/includes_request_builder.py index 82990fa7ac6..2deb3131148 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/includes/includes_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/includes/includes_request_builder.py @@ -45,7 +45,7 @@ def by_permission_grant_condition_set_id(self,permission_grant_condition_set_id: async def get(self,request_configuration: Optional[IncludesRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionGrantConditionSetCollectionResponse]: """ - Retrieve the condition sets which are *included* in a permissionGrantPolicy. + Retrieve the condition sets which are *included* in a permissionGrantPolicy. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantConditionSetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/permissiongrantpolicy-list-includes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[IncludesRequestBuilderGetRequ async def post(self,body: Optional[PermissionGrantConditionSet] = None, request_configuration: Optional[IncludesRequestBuilderPostRequestConfiguration] = None) -> Optional[PermissionGrantConditionSet]: """ - Add conditions under which a permission grant event is *included* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the includes collection of a permissionGrantPolicy. + Add conditions under which a permission grant event is *included* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the includes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantConditionSet] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PermissionGrantConditionSet] = None, request_ def to_get_request_information(self,request_configuration: Optional[IncludesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the condition sets which are *included* in a permissionGrantPolicy. + Retrieve the condition sets which are *included* in a permissionGrantPolicy. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PermissionGrantConditionSet] = None, request_configuration: Optional[IncludesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add conditions under which a permission grant event is *included* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the includes collection of a permissionGrantPolicy. + Add conditions under which a permission grant event is *included* in a permission grant policy. You do this by adding a permissionGrantConditionSet to the includes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PermissionGrantConditionSet] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IncludesRequestBuilderGetQueryParameters(): """ - Retrieve the condition sets which are *included* in a permissionGrantPolicy. + Retrieve the condition sets which are *included* in a permissionGrantPolicy. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/permission_grant_policies/item/includes/item/permission_grant_condition_set_item_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/includes/item/permission_grant_condition_set_item_request_builder.py index ddc4feaf6ad..a744a27e98f 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/includes/item/permission_grant_condition_set_item_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/includes/item/permission_grant_condition_set_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a permissionGrantConditionSet from the includes collection of a permissionGrantPolicy. + Deletes a permissionGrantConditionSet from the includes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. 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/permissiongrantpolicy-delete-includes?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[PermissionGrantConditionSet] = None, request def to_delete_request_information(self,request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a permissionGrantConditionSet from the includes collection of a permissionGrantPolicy. + Deletes a permissionGrantConditionSet from the includes collection of a permissionGrantPolicy. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PermissionGr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PermissionGrantConditionSet] = None, request_configuration: Optional[PermissionGrantConditionSetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PermissionGrantConditionSet if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/permission_grant_policies/item/permission_grant_policy_item_request_builder.py b/msgraph/generated/policies/permission_grant_policies/item/permission_grant_policy_item_request_builder.py index 3f1c9dafa19..35e103ca1f0 100644 --- a/msgraph/generated/policies/permission_grant_policies/item/permission_grant_policy_item_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/item/permission_grant_policy_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PermissionGrantPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a permissionGrantPolicy object. + Delete a permissionGrantPolicy object. This API is available in the following national cloud deployments. 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/permissiongrantpolicy-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[PermissionGrantPolicyItemR async def get(self,request_configuration: Optional[PermissionGrantPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionGrantPolicy]: """ - Retrieve a single permissionGrantPolicy object. + Retrieve a single permissionGrantPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantPolicy] Find more info here: https://learn.microsoft.com/graph/api/permissiongrantpolicy-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[PermissionGrantPolicyItemRequ async def patch(self,body: Optional[PermissionGrantPolicy] = None, request_configuration: Optional[PermissionGrantPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PermissionGrantPolicy]: """ - Update properties of a permissionGrantPolicy. + Update properties of a permissionGrantPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantPolicy] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[PermissionGrantPolicy] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[PermissionGrantPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a permissionGrantPolicy object. + Delete a permissionGrantPolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionGrantPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single permissionGrantPolicy object. + Retrieve a single permissionGrantPolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PermissionGrantPolicy] = None, request_configuration: Optional[PermissionGrantPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update properties of a permissionGrantPolicy. + Update properties of a permissionGrantPolicy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[PermissionGrantPolicy] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class PermissionGrantPolicyItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class PermissionGrantPolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve a single permissionGrantPolicy object. + Retrieve a single permissionGrantPolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/permission_grant_policies/permission_grant_policies_request_builder.py b/msgraph/generated/policies/permission_grant_policies/permission_grant_policies_request_builder.py index c00918f3954..381433bfb91 100644 --- a/msgraph/generated/policies/permission_grant_policies/permission_grant_policies_request_builder.py +++ b/msgraph/generated/policies/permission_grant_policies/permission_grant_policies_request_builder.py @@ -45,7 +45,7 @@ def by_permission_grant_policy_id(self,permission_grant_policy_id: str) -> Permi async def get(self,request_configuration: Optional[PermissionGrantPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionGrantPolicyCollectionResponse]: """ - Retrieve the list of permissionGrantPolicy objects. + Retrieve the list of permissionGrantPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/permissiongrantpolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PermissionGrantPoliciesReques async def post(self,body: Optional[PermissionGrantPolicy] = None, request_configuration: Optional[PermissionGrantPoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[PermissionGrantPolicy]: """ - Creates a permissionGrantPolicy. A permission grant policy is used to describe the conditions under which permissions can be granted (for example, during application consent). After creating the permission grant policy, you can add include condition sets to add matching rules, and add exclude condition sets to add exclusion rules. + Creates a permissionGrantPolicy. A permission grant policy is used to describe the conditions under which permissions can be granted (for example, during application consent). After creating the permission grant policy, you can add include condition sets to add matching rules, and add exclude condition sets to add exclusion rules. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PermissionGrantPolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PermissionGrantPolicy] = None, request_config def to_get_request_information(self,request_configuration: Optional[PermissionGrantPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of permissionGrantPolicy objects. + Retrieve the list of permissionGrantPolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PermissionGrantPolicy] = None, request_configuration: Optional[PermissionGrantPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Creates a permissionGrantPolicy. A permission grant policy is used to describe the conditions under which permissions can be granted (for example, during application consent). After creating the permission grant policy, you can add include condition sets to add matching rules, and add exclude condition sets to add exclusion rules. + Creates a permissionGrantPolicy. A permission grant policy is used to describe the conditions under which permissions can be granted (for example, during application consent). After creating the permission grant policy, you can add include condition sets to add matching rules, and add exclude condition sets to add exclusion rules. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PermissionGrantPolicy] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PermissionGrantPoliciesRequestBuilderGetQueryParameters(): """ - Retrieve the list of permissionGrantPolicy objects. + Retrieve the list of permissionGrantPolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/policies_request_builder.py b/msgraph/generated/policies/policies_request_builder.py index 09924fcce6b..b6b0796fd34 100644 --- a/msgraph/generated/policies/policies_request_builder.py +++ b/msgraph/generated/policies/policies_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[PoliciesRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PolicyRoot] = None, request_configuration: Optional[PoliciesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_patch_request_information(self,body: Optional[PolicyRoot] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/role_management_policies/count/count_request_builder.py b/msgraph/generated/policies/role_management_policies/count/count_request_builder.py index d39f9c3ffdc..be8d23b1b6f 100644 --- a/msgraph/generated/policies/role_management_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/role_management_policies/item/effective_rules/count/count_request_builder.py b/msgraph/generated/policies/role_management_policies/item/effective_rules/count/count_request_builder.py index 7a0e3c7293d..87f9150f2c5 100644 --- a/msgraph/generated/policies/role_management_policies/item/effective_rules/count/count_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/effective_rules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/role_management_policies/item/effective_rules/effective_rules_request_builder.py b/msgraph/generated/policies/role_management_policies/item/effective_rules/effective_rules_request_builder.py index 33d5824fef8..c09dd79f791 100644 --- a/msgraph/generated/policies/role_management_policies/item/effective_rules/effective_rules_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/effective_rules/effective_rules_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[EffectiveRul Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicyRule] = None, request_configuration: Optional[EffectiveRulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleManagementPolicyR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/role_management_policies/item/effective_rules/item/unified_role_management_policy_rule_item_request_builder.py b/msgraph/generated/policies/role_management_policies/item/effective_rules/item/unified_role_management_policy_rule_item_request_builder.py index 3e75a2563ef..3c7a03d1a1c 100644 --- a/msgraph/generated/policies/role_management_policies/item/effective_rules/item/unified_role_management_policy_rule_item_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/effective_rules/item/unified_role_management_policy_rule_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleManagementPolicyRuleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UnifiedRoleM Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicyRule] = None, request_configuration: Optional[UnifiedRoleManagementPolicyRuleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleManagementPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/policies/role_management_policies/item/rules/count/count_request_builder.py b/msgraph/generated/policies/role_management_policies/item/rules/count/count_request_builder.py index 5f6ac12610a..e453abe030d 100644 --- a/msgraph/generated/policies/role_management_policies/item/rules/count/count_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/rules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/role_management_policies/item/rules/item/unified_role_management_policy_rule_item_request_builder.py b/msgraph/generated/policies/role_management_policies/item/rules/item/unified_role_management_policy_rule_item_request_builder.py index 472e996e4a0..d19f486cf46 100644 --- a/msgraph/generated/policies/role_management_policies/item/rules/item/unified_role_management_policy_rule_item_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/rules/item/unified_role_management_policy_rule_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleManagementPolic async def get(self,request_configuration: Optional[UnifiedRoleManagementPolicyRuleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicyRule]: """ - Retrieve a rule or settings defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifiedRoleManagementPolicyExpirationRule+ unifiedRoleManagementPolicyNotificationRule + Retrieve a rule or settings defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicyRule] Find more info here: https://learn.microsoft.com/graph/api/unifiedrolemanagementpolicyrule-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[UnifiedRoleManagementPolicyRu async def patch(self,body: Optional[UnifiedRoleManagementPolicyRule] = None, request_configuration: Optional[UnifiedRoleManagementPolicyRuleItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicyRule]: """ - Update a rule defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: For more information about rules for Azure AD roles and examples of updating rules, see the following articles: + Update a rule defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: For more information about rules for Microsoft Entra roles and examples of updating rules, see the following articles: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicyRule] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleManagementPolicyRuleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a rule or settings defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifiedRoleManagementPolicyExpirationRule+ unifiedRoleManagementPolicyNotificationRule + Retrieve a rule or settings defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicyRule] = None, request_configuration: Optional[UnifiedRoleManagementPolicyRuleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a rule defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: For more information about rules for Azure AD roles and examples of updating rules, see the following articles: + Update a rule defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: For more information about rules for Microsoft Entra roles and examples of updating rules, see the following articles: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleManagementPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class UnifiedRoleManagementPolicyRuleItemRequestBuilderDeleteRequestConfiguratio @dataclass class UnifiedRoleManagementPolicyRuleItemRequestBuilderGetQueryParameters(): """ - Retrieve a rule or settings defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifiedRoleManagementPolicyExpirationRule+ unifiedRoleManagementPolicyNotificationRule + Retrieve a rule or settings defined for a role management policy. The rule can be one of the following types that are derived from the unifiedRoleManagementPolicyRule object: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/role_management_policies/item/rules/rules_request_builder.py b/msgraph/generated/policies/role_management_policies/item/rules/rules_request_builder.py index 65c866db4b6..2b4ffebbaf5 100644 --- a/msgraph/generated/policies/role_management_policies/item/rules/rules_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/rules/rules_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_management_policy_rule_id(self,unified_role_management_polic async def get(self,request_configuration: Optional[RulesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicyRuleCollectionResponse]: """ - Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifiedRoleManagementPolicyExpirationRule+ unifiedRoleManagementPolicyNotificationRule + Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicyRuleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/unifiedrolemanagementpolicy-list-rules?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UnifiedRoleManagementPolicyRule] = None, requ def to_get_request_information(self,request_configuration: Optional[RulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifiedRoleManagementPolicyExpirationRule+ unifiedRoleManagementPolicyNotificationRule + Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicyRule] = None, request_configuration: Optional[RulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleManagementPolicyR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RulesRequestBuilderGetQueryParameters(): """ - Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifiedRoleManagementPolicyExpirationRule+ unifiedRoleManagementPolicyNotificationRule + Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/role_management_policies/item/unified_role_management_policy_item_request_builder.py b/msgraph/generated/policies/role_management_policies/item/unified_role_management_policy_item_request_builder.py index 280ff832357..3b425c9df95 100644 --- a/msgraph/generated/policies/role_management_policies/item/unified_role_management_policy_item_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/item/unified_role_management_policy_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleManagementPolic async def get(self,request_configuration: Optional[UnifiedRoleManagementPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicy]: """ - Retrieve the details of a role management policy. + Retrieve the details of a role management policy. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicy] Find more info here: https://learn.microsoft.com/graph/api/unifiedrolemanagementpolicy-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleManagementPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the details of a role management policy. + Retrieve the details of a role management policy. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicy] = None, request_configuration: Optional[UnifiedRoleManagementPolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleManagementPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class UnifiedRoleManagementPolicyItemRequestBuilderDeleteRequestConfiguration(Ba @dataclass class UnifiedRoleManagementPolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the details of a role management policy. + Retrieve the details of a role management policy. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/role_management_policies/role_management_policies_request_builder.py b/msgraph/generated/policies/role_management_policies/role_management_policies_request_builder.py index 791f64ec352..a799d3aad40 100644 --- a/msgraph/generated/policies/role_management_policies/role_management_policies_request_builder.py +++ b/msgraph/generated/policies/role_management_policies/role_management_policies_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_management_policy_id(self,unified_role_management_policy_id: async def get(self,request_configuration: Optional[RoleManagementPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicyCollectionResponse]: """ - Get role management policies and their details. + Get the details of the policies in PIM that can be applied to Microsoft Entra roles or group membership or ownership. To retrieve policies that apply to Azure RBAC, use the Azure REST PIM API for role management policies. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/policyroot-list-rolemanagementpolicies?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UnifiedRoleManagementPolicy] = None, request_ def to_get_request_information(self,request_configuration: Optional[RoleManagementPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get role management policies and their details. + Get the details of the policies in PIM that can be applied to Microsoft Entra roles or group membership or ownership. To retrieve policies that apply to Azure RBAC, use the Azure REST PIM API for role management policies. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicy] = None, request_configuration: Optional[RoleManagementPoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleManagementPolicy] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleManagementPoliciesRequestBuilderGetQueryParameters(): """ - Get role management policies and their details. + Get the details of the policies in PIM that can be applied to Microsoft Entra roles or group membership or ownership. To retrieve policies that apply to Azure RBAC, use the Azure REST PIM API for role management policies. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/role_management_policy_assignments/count/count_request_builder.py b/msgraph/generated/policies/role_management_policy_assignments/count/count_request_builder.py index 01456726869..f6c95e8987b 100644 --- a/msgraph/generated/policies/role_management_policy_assignments/count/count_request_builder.py +++ b/msgraph/generated/policies/role_management_policy_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/role_management_policy_assignments/item/policy/policy_request_builder.py b/msgraph/generated/policies/role_management_policy_assignments/item/policy/policy_request_builder.py index dee30ee14a8..80b3770bb31 100644 --- a/msgraph/generated/policies/role_management_policy_assignments/item/policy/policy_request_builder.py +++ b/msgraph/generated/policies/role_management_policy_assignments/item/policy/policy_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PolicyReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PolicyRequestBuilder: diff --git a/msgraph/generated/policies/role_management_policy_assignments/item/unified_role_management_policy_assignment_item_request_builder.py b/msgraph/generated/policies/role_management_policy_assignments/item/unified_role_management_policy_assignment_item_request_builder.py index a98ac7f24bc..8275ea9a1ec 100644 --- a/msgraph/generated/policies/role_management_policy_assignments/item/unified_role_management_policy_assignment_item_request_builder.py +++ b/msgraph/generated/policies/role_management_policy_assignments/item/unified_role_management_policy_assignment_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleManagementPolic async def get(self,request_configuration: Optional[UnifiedRoleManagementPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicyAssignment]: """ - Get the details of a role management policy assignment including the policy and rules associated with the Azure AD role. + Get the details of a policy assignment in PIM that's assigned to Microsoft Entra roles or group membership or ownership. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicyAssignment] Find more info here: https://learn.microsoft.com/graph/api/unifiedrolemanagementpolicyassignment-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleManagementPolicyAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the details of a role management policy assignment including the policy and rules associated with the Azure AD role. + Get the details of a policy assignment in PIM that's assigned to Microsoft Entra roles or group membership or ownership. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicyAssignment] = None, request_configuration: Optional[UnifiedRoleManagementPolicyAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleManagementPolicy if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class UnifiedRoleManagementPolicyAssignmentItemRequestBuilderDeleteRequestConfig @dataclass class UnifiedRoleManagementPolicyAssignmentItemRequestBuilderGetQueryParameters(): """ - Get the details of a role management policy assignment including the policy and rules associated with the Azure AD role. + Get the details of a policy assignment in PIM that's assigned to Microsoft Entra roles or group membership or ownership. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/role_management_policy_assignments/role_management_policy_assignments_request_builder.py b/msgraph/generated/policies/role_management_policy_assignments/role_management_policy_assignments_request_builder.py index caedf577da8..6b2b85ddc49 100644 --- a/msgraph/generated/policies/role_management_policy_assignments/role_management_policy_assignments_request_builder.py +++ b/msgraph/generated/policies/role_management_policy_assignments/role_management_policy_assignments_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_management_policy_assignment_id(self,unified_role_management async def get(self,request_configuration: Optional[RoleManagementPolicyAssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleManagementPolicyAssignmentCollectionResponse]: """ - Get the details of all role management policy assignments including the policies and rules associated with the Azure AD roles. + Get the details of all role management policy assignments made in PIM for Microsoft Entra roles and PIM for groups. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleManagementPolicyAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/policyroot-list-rolemanagementpolicyassignments?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UnifiedRoleManagementPolicyAssignment] = None def to_get_request_information(self,request_configuration: Optional[RoleManagementPolicyAssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the details of all role management policy assignments including the policies and rules associated with the Azure AD roles. + Get the details of all role management policy assignments made in PIM for Microsoft Entra roles and PIM for groups. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleManagementPolicyAssignment] = None, request_configuration: Optional[RoleManagementPolicyAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleManagementPolicyA if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleManagementPolicyAssignmentsRequestBuilderGetQueryParameters(): """ - Get the details of all role management policy assignments including the policies and rules associated with the Azure AD roles. + Get the details of all role management policy assignments made in PIM for Microsoft Entra roles and PIM for groups. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/token_issuance_policies/count/count_request_builder.py b/msgraph/generated/policies/token_issuance_policies/count/count_request_builder.py index 34b4cce207e..3338b4b1f44 100644 --- a/msgraph/generated/policies/token_issuance_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/token_issuance_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/token_issuance_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/token_issuance_policies/item/applies_to/applies_to_request_builder.py index a14978bfec8..a5700d83f46 100644 --- a/msgraph/generated/policies/token_issuance_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/token_issuance_policies/item/applies_to/applies_to_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AppliesToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppliesToRequestBuilder: diff --git a/msgraph/generated/policies/token_issuance_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/token_issuance_policies/item/applies_to/count/count_request_builder.py index ea2a0dd832c..bc302d344a4 100644 --- a/msgraph/generated/policies/token_issuance_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/token_issuance_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/token_issuance_policies/item/applies_to/item/directory_object_item_request_builder.py b/msgraph/generated/policies/token_issuance_policies/item/applies_to/item/directory_object_item_request_builder.py index 13d91e8cb93..def080cadbc 100644 --- a/msgraph/generated/policies/token_issuance_policies/item/applies_to/item/directory_object_item_request_builder.py +++ b/msgraph/generated/policies/token_issuance_policies/item/applies_to/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/policies/token_issuance_policies/item/token_issuance_policy_item_request_builder.py b/msgraph/generated/policies/token_issuance_policies/item/token_issuance_policy_item_request_builder.py index 7c19357edd5..61bf7c67631 100644 --- a/msgraph/generated/policies/token_issuance_policies/item/token_issuance_policy_item_request_builder.py +++ b/msgraph/generated/policies/token_issuance_policies/item/token_issuance_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TokenIssuancePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a tokenIssuancePolicy object. + Delete a tokenIssuancePolicy object. This API is available in the following national cloud deployments. 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/tokenissuancepolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TokenIssuancePolicyItemReq async def get(self,request_configuration: Optional[TokenIssuancePolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenIssuancePolicy]: """ - The policy that specifies the characteristics of SAML tokens issued by Azure AD. + The policy that specifies the characteristics of SAML tokens issued by Microsoft Entra ID. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenIssuancePolicy] """ @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[TokenIssuancePolicyItemReques async def patch(self,body: Optional[TokenIssuancePolicy] = None, request_configuration: Optional[TokenIssuancePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TokenIssuancePolicy]: """ - Update the properties of a tokenIssuancePolicy object. + Update the properties of a tokenIssuancePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenIssuancePolicy] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[TokenIssuancePolicy] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[TokenIssuancePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a tokenIssuancePolicy object. + Delete a tokenIssuancePolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TokenIssuancePolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The policy that specifies the characteristics of SAML tokens issued by Azure AD. + The policy that specifies the characteristics of SAML tokens issued by Microsoft Entra ID. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TokenIssuancePolicy] = None, request_configuration: Optional[TokenIssuancePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a tokenIssuancePolicy object. + Update the properties of a tokenIssuancePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TokenIssuancePolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class TokenIssuancePolicyItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class TokenIssuancePolicyItemRequestBuilderGetQueryParameters(): """ - The policy that specifies the characteristics of SAML tokens issued by Azure AD. + The policy that specifies the characteristics of SAML tokens issued by Microsoft Entra ID. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/token_issuance_policies/token_issuance_policies_request_builder.py b/msgraph/generated/policies/token_issuance_policies/token_issuance_policies_request_builder.py index 0dd921cfb0e..67f3b200e23 100644 --- a/msgraph/generated/policies/token_issuance_policies/token_issuance_policies_request_builder.py +++ b/msgraph/generated/policies/token_issuance_policies/token_issuance_policies_request_builder.py @@ -45,7 +45,7 @@ def by_token_issuance_policy_id(self,token_issuance_policy_id: str) -> TokenIssu async def get(self,request_configuration: Optional[TokenIssuancePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenIssuancePolicyCollectionResponse]: """ - Get a list of tokenIssuancePolicy objects. + Get a list of tokenIssuancePolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenIssuancePolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/tokenissuancepolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TokenIssuancePoliciesRequestB async def post(self,body: Optional[TokenIssuancePolicy] = None, request_configuration: Optional[TokenIssuancePoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[TokenIssuancePolicy]: """ - Create a new tokenIssuancePolicy object. + Create a new tokenIssuancePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenIssuancePolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TokenIssuancePolicy] = None, request_configur def to_get_request_information(self,request_configuration: Optional[TokenIssuancePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of tokenIssuancePolicy objects. + Get a list of tokenIssuancePolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TokenIssuancePolicy] = None, request_configuration: Optional[TokenIssuancePoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new tokenIssuancePolicy object. + Create a new tokenIssuancePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TokenIssuancePolicy] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TokenIssuancePoliciesRequestBuilderGetQueryParameters(): """ - Get a list of tokenIssuancePolicy objects. + Get a list of tokenIssuancePolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/token_lifetime_policies/count/count_request_builder.py b/msgraph/generated/policies/token_lifetime_policies/count/count_request_builder.py index 2edd09c13a2..362a6343c83 100644 --- a/msgraph/generated/policies/token_lifetime_policies/count/count_request_builder.py +++ b/msgraph/generated/policies/token_lifetime_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/token_lifetime_policies/item/applies_to/applies_to_request_builder.py b/msgraph/generated/policies/token_lifetime_policies/item/applies_to/applies_to_request_builder.py index ef75af19450..63d5bcaa5b4 100644 --- a/msgraph/generated/policies/token_lifetime_policies/item/applies_to/applies_to_request_builder.py +++ b/msgraph/generated/policies/token_lifetime_policies/item/applies_to/applies_to_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AppliesToReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppliesToRequestBuilder: diff --git a/msgraph/generated/policies/token_lifetime_policies/item/applies_to/count/count_request_builder.py b/msgraph/generated/policies/token_lifetime_policies/item/applies_to/count/count_request_builder.py index c22c9ef399e..68bf03fef5f 100644 --- a/msgraph/generated/policies/token_lifetime_policies/item/applies_to/count/count_request_builder.py +++ b/msgraph/generated/policies/token_lifetime_policies/item/applies_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/policies/token_lifetime_policies/item/applies_to/item/directory_object_item_request_builder.py b/msgraph/generated/policies/token_lifetime_policies/item/applies_to/item/directory_object_item_request_builder.py index e77ce810104..5ebfe0c3454 100644 --- a/msgraph/generated/policies/token_lifetime_policies/item/applies_to/item/directory_object_item_request_builder.py +++ b/msgraph/generated/policies/token_lifetime_policies/item/applies_to/item/directory_object_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/policies/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py b/msgraph/generated/policies/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py index ffa49c4a9b0..e54ccc1356b 100644 --- a/msgraph/generated/policies/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py +++ b/msgraph/generated/policies/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TokenLifetimePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a tokenLifetimePolicy object. + Delete a tokenLifetimePolicy object. This API is available in the following national cloud deployments. 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/tokenlifetimepolicy-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TokenLifetimePolicyItemReq async def get(self,request_configuration: Optional[TokenLifetimePolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenLifetimePolicy]: """ - Retrieve the properties and relationships of a tokenLifetimePolicy object. + Retrieve the properties and relationships of a tokenLifetimePolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenLifetimePolicy] Find more info here: https://learn.microsoft.com/graph/api/tokenlifetimepolicy-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TokenLifetimePolicyItemReques async def patch(self,body: Optional[TokenLifetimePolicy] = None, request_configuration: Optional[TokenLifetimePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TokenLifetimePolicy]: """ - Update the properties of a tokenLifetimePolicy object. + Update the properties of a tokenLifetimePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenLifetimePolicy] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TokenLifetimePolicy] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[TokenLifetimePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a tokenLifetimePolicy object. + Delete a tokenLifetimePolicy object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TokenLifetimePolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a tokenLifetimePolicy object. + Retrieve the properties and relationships of a tokenLifetimePolicy object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TokenLifetimePolicy] = None, request_configuration: Optional[TokenLifetimePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a tokenLifetimePolicy object. + Update the properties of a tokenLifetimePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TokenLifetimePolicy] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TokenLifetimePolicyItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class TokenLifetimePolicyItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a tokenLifetimePolicy object. + Retrieve the properties and relationships of a tokenLifetimePolicy object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/policies/token_lifetime_policies/token_lifetime_policies_request_builder.py b/msgraph/generated/policies/token_lifetime_policies/token_lifetime_policies_request_builder.py index e8b544e6594..d2c4889b07c 100644 --- a/msgraph/generated/policies/token_lifetime_policies/token_lifetime_policies_request_builder.py +++ b/msgraph/generated/policies/token_lifetime_policies/token_lifetime_policies_request_builder.py @@ -45,7 +45,7 @@ def by_token_lifetime_policy_id(self,token_lifetime_policy_id: str) -> TokenLife async def get(self,request_configuration: Optional[TokenLifetimePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenLifetimePolicyCollectionResponse]: """ - Get a list of tokenLifetimePolicy objects. + Get a list of tokenLifetimePolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenLifetimePolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/tokenlifetimepolicy-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TokenLifetimePoliciesRequestB async def post(self,body: Optional[TokenLifetimePolicy] = None, request_configuration: Optional[TokenLifetimePoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[TokenLifetimePolicy]: """ - Create a new tokenLifetimePolicy object. + Create a new tokenLifetimePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TokenLifetimePolicy] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TokenLifetimePolicy] = None, request_configur def to_get_request_information(self,request_configuration: Optional[TokenLifetimePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of tokenLifetimePolicy objects. + Get a list of tokenLifetimePolicy objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TokenLifetimePolicy] = None, request_configuration: Optional[TokenLifetimePoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new tokenLifetimePolicy object. + Create a new tokenLifetimePolicy object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TokenLifetimePolicy] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TokenLifetimePoliciesRequestBuilderGetQueryParameters(): """ - Get a list of tokenLifetimePolicy objects. + Get a list of tokenLifetimePolicy objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/connectors/connectors_request_builder.py b/msgraph/generated/print/connectors/connectors_request_builder.py index 9c43a0a1d3e..b7fcf640b59 100644 --- a/msgraph/generated/print/connectors/connectors_request_builder.py +++ b/msgraph/generated/print/connectors/connectors_request_builder.py @@ -45,7 +45,7 @@ def by_print_connector_id(self,print_connector_id: str) -> PrintConnectorItemReq async def get(self,request_configuration: Optional[ConnectorsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintConnectorCollectionResponse]: """ - Retrieve a list of print connectors. + Retrieve a list of print connectors. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintConnectorCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/print-list-connectors?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintConnector] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[ConnectorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of print connectors. + Retrieve a list of print connectors. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintConnector] = None, request_configuration: Optional[ConnectorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintConnector] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ConnectorsRequestBuilderGetQueryParameters(): """ - Retrieve a list of print connectors. + Retrieve a list of print connectors. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/connectors/count/count_request_builder.py b/msgraph/generated/print/connectors/count/count_request_builder.py index 063299ce91c..4aa79f58bbc 100644 --- a/msgraph/generated/print/connectors/count/count_request_builder.py +++ b/msgraph/generated/print/connectors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/connectors/item/print_connector_item_request_builder.py b/msgraph/generated/print/connectors/item/print_connector_item_request_builder.py index d64501dd793..adec15a1136 100644 --- a/msgraph/generated/print/connectors/item/print_connector_item_request_builder.py +++ b/msgraph/generated/print/connectors/item/print_connector_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PrintConnectorItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete (unregister) a printConnector. + Delete (unregister) a printConnector. This API is available in the following national cloud deployments. 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/printconnector-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[PrintConnectorItemRequestB async def get(self,request_configuration: Optional[PrintConnectorItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintConnector]: """ - Retrieve the properties and relationships of a printConnector object. + Retrieve the properties and relationships of a printConnector object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintConnector] Find more info here: https://learn.microsoft.com/graph/api/printconnector-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[PrintConnectorItemRequestBuil async def patch(self,body: Optional[PrintConnector] = None, request_configuration: Optional[PrintConnectorItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrintConnector]: """ - Update the properties of a printConnector object. + Update the properties of a printConnector object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintConnector] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[PrintConnector] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[PrintConnectorItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete (unregister) a printConnector. + Delete (unregister) a printConnector. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintConnectorItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a printConnector object. + Retrieve the properties and relationships of a printConnector object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintConnector] = None, request_configuration: Optional[PrintConnectorItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a printConnector object. + Update the properties of a printConnector object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[PrintConnector] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class PrintConnectorItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class PrintConnectorItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a printConnector object. + Retrieve the properties and relationships of a printConnector object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/operations/count/count_request_builder.py b/msgraph/generated/print/operations/count/count_request_builder.py index 44228aa14f7..525f76a54e4 100644 --- a/msgraph/generated/print/operations/count/count_request_builder.py +++ b/msgraph/generated/print/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/operations/item/print_operation_item_request_builder.py b/msgraph/generated/print/operations/item/print_operation_item_request_builder.py index a25ed003845..e45cf89f531 100644 --- a/msgraph/generated/print/operations/item/print_operation_item_request_builder.py +++ b/msgraph/generated/print/operations/item/print_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[PrintOperationItemRequestB async def get(self,request_configuration: Optional[PrintOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintOperation]: """ - Retrieve the properties and relationships of a printOperation object. + Retrieve the properties and relationships of a printOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintOperation] Find more info here: https://learn.microsoft.com/graph/api/printoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrintOper Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a printOperation object. + Retrieve the properties and relationships of a printOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintOperation] = None, request_configuration: Optional[PrintOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PrintOperation] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class PrintOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class PrintOperationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a printOperation object. + Retrieve the properties and relationships of a printOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/operations/operations_request_builder.py b/msgraph/generated/print/operations/operations_request_builder.py index 770dc07cb68..cda68cbea96 100644 --- a/msgraph/generated/print/operations/operations_request_builder.py +++ b/msgraph/generated/print/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_print_operation_id(self,print_operation_id: str) -> PrintOperationItemReq async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintOperationCollectionResponse]: """ - Retrieve the properties and relationships of a printOperation object. + Retrieve the properties and relationships of a printOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[PrintOperation] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a printOperation object. + Retrieve the properties and relationships of a printOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintOperation] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a printOperation object. + Retrieve the properties and relationships of a printOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/print_request_builder.py b/msgraph/generated/print/print_request_builder.py index f611e383aab..d2198ae86bf 100644 --- a/msgraph/generated/print/print_request_builder.py +++ b/msgraph/generated/print/print_request_builder.py @@ -84,14 +84,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Print] = None, request_configuration: Optional[PrintRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -104,13 +104,13 @@ def to_patch_request_information(self,body: Optional[Print] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/count/count_request_builder.py b/msgraph/generated/print/printers/count/count_request_builder.py index 5e14a585b9d..9389ddc0d8a 100644 --- a/msgraph/generated/print/printers/count/count_request_builder.py +++ b/msgraph/generated/print/printers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/create/create_request_builder.py b/msgraph/generated/print/printers/create/create_request_builder.py index 55b0c3b26d3..151fcb843a5 100644 --- a/msgraph/generated/print/printers/create/create_request_builder.py +++ b/msgraph/generated/print/printers/create/create_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreatePostRequestBody] = None, request_configuration: Optional[CreateRequestBuilderPostRequestConfiguration] = None) -> None: """ - Create (register) a printer with the Universal Print service. This is a long-running operation and as such, it returns a printerCreateOperation that can be used to track and verify the registration of the printer. For help creating the required Certificate Signing Request (CSR) for creating printer, see the CSR generation code sample. + Create (register) a printer with the Universal Print service. This is a long-running operation and as such, it returns a printerCreateOperation that can be used to track and verify the registration of the printer. For help creating the required Certificate Signing Request (CSR) for creating printer, see the CSR generation code sample. This API is available in the following national cloud deployments. 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[CreatePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CreatePostRequestBody] = None, request_configuration: Optional[CreateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create (register) a printer with the Universal Print service. This is a long-running operation and as such, it returns a printerCreateOperation that can be used to track and verify the registration of the printer. For help creating the required Certificate Signing Request (CSR) for creating printer, see the CSR generation code sample. + Create (register) a printer with the Universal Print service. This is a long-running operation and as such, it returns a printerCreateOperation that can be used to track and verify the registration of the printer. For help creating the required Certificate Signing Request (CSR) for creating printer, see the CSR generation code sample. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CreatePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/connectors/connectors_request_builder.py b/msgraph/generated/print/printers/item/connectors/connectors_request_builder.py index da7322d6293..6537340eb6e 100644 --- a/msgraph/generated/print/printers/item/connectors/connectors_request_builder.py +++ b/msgraph/generated/print/printers/item/connectors/connectors_request_builder.py @@ -44,7 +44,7 @@ def by_print_connector_id(self,print_connector_id: str) -> PrintConnectorItemReq async def get(self,request_configuration: Optional[ConnectorsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintConnectorCollectionResponse]: """ - Retrieve a list of printConnectors associated with the printer. + Retrieve a list of printConnectors associated with the printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintConnectorCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printer-list-connectors?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[ConnectorsRequestBuilderGetRe def to_get_request_information(self,request_configuration: Optional[ConnectorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of printConnectors associated with the printer. + Retrieve a list of printConnectors associated with the printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConnectorsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ConnectorsRequestBuilderGetQueryParameters(): """ - Retrieve a list of printConnectors associated with the printer. + Retrieve a list of printConnectors associated with the printer. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/printers/item/connectors/count/count_request_builder.py b/msgraph/generated/print/printers/item/connectors/count/count_request_builder.py index f8e9454658e..6c82f64a528 100644 --- a/msgraph/generated/print/printers/item/connectors/count/count_request_builder.py +++ b/msgraph/generated/print/printers/item/connectors/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/item/connectors/item/print_connector_item_request_builder.py b/msgraph/generated/print/printers/item/connectors/item/print_connector_item_request_builder.py index 50df638c1e7..934e799168f 100644 --- a/msgraph/generated/print/printers/item/connectors/item/print_connector_item_request_builder.py +++ b/msgraph/generated/print/printers/item/connectors/item/print_connector_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintConnect Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrintConnectorItemRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/count/count_request_builder.py b/msgraph/generated/print/printers/item/jobs/count/count_request_builder.py index 7ee75fdf4ca..508395cb4f3 100644 --- a/msgraph/generated/print/printers/item/jobs/count/count_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/abort/abort_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/abort/abort_request_builder.py index 33cdcdf74b6..c6ee7aedb9a 100644 --- a/msgraph/generated/print/printers/item/jobs/item/abort/abort_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/abort/abort_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AbortPostRequestBody] = None, request_configuration: Optional[AbortRequestBuilderPostRequestConfiguration] = None) -> None: """ - Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. + Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. 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[AbortPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[AbortPostRequestBody] = None, request_configuration: Optional[AbortRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. + Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AbortPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/cancel/cancel_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/cancel/cancel_request_builder.py index 56fae83e3c7..fdb874c6575 100644 --- a/msgraph/generated/print/printers/item/jobs/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. + Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. This API is available in the following national cloud deployments. 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/printjob-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. + Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/documents/count/count_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/documents/count/count_request_builder.py index 83fd4d2d84a..f2f1b79f7c9 100644 --- a/msgraph/generated/print/printers/item/jobs/item/documents/count/count_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/documents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/documents/documents_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/documents/documents_request_builder.py index 40a6614afe9..d91bb565f4a 100644 --- a/msgraph/generated/print/printers/item/jobs/item/documents/documents_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/documents/documents_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DocumentsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintDocument] = None, request_configuration: Optional[DocumentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintDocument] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py index 5a07b6fc2a1..21d31e75782 100644 --- a/msgraph/generated/print/printers/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. + Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. + Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/documents/item/print_document_item_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/documents/item/print_document_item_request_builder.py index 775292ca348..24cb000b64f 100644 --- a/msgraph/generated/print/printers/item/jobs/item/documents/item/print_document_item_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/documents/item/print_document_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintDocu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintDocumentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintDocumen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintDocument] = None, request_configuration: Optional[PrintDocumentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PrintDocument] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/documents/item/value/content_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/documents/item/value/content_request_builder.py index 241430d2294..30784c0065e 100644 --- a/msgraph/generated/print/printers/item/jobs/item/documents/item/value/content_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/documents/item/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/print_job_item_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/print_job_item_request_builder.py index 61836d2bfa1..5fb76282fa4 100644 --- a/msgraph/generated/print/printers/item/jobs/item/print_job_item_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/print_job_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintJobI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintJobItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintJobItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintJob] = None, request_configuration: Optional[PrintJobItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[PrintJob] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/redirect/redirect_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/redirect/redirect_request_builder.py index 24e594a1abd..55d1aa22b1d 100644 --- a/msgraph/generated/print/printers/item/jobs/item/redirect/redirect_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/redirect/redirect_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RedirectPostRequestBody] = None, request_configuration: Optional[RedirectRequestBuilderPostRequestConfiguration] = None) -> Optional[PrintJob]: """ - Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintJob] @@ -54,7 +54,7 @@ async def post(self,body: Optional[RedirectPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[RedirectPostRequestBody] = None, request_configuration: Optional[RedirectRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RedirectPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/start/start_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/start/start_request_builder.py index ed7c9b97f68..45e1315b5a7 100644 --- a/msgraph/generated/print/printers/item/jobs/item/start/start_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/start/start_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> Optional[PrintJobStatus]: """ - Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. + Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintJobStatus] Find more info here: https://learn.microsoft.com/graph/api/printjob-start?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[StartRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. + Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> StartRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/tasks/count/count_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/tasks/count/count_request_builder.py index 6661823b52f..055841b936f 100644 --- a/msgraph/generated/print/printers/item/jobs/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/tasks/item/definition/definition_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/tasks/item/definition/definition_request_builder.py index a8c9cc31738..891b207b79b 100644 --- a/msgraph/generated/print/printers/item/jobs/item/tasks/item/definition/definition_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/tasks/item/definition/definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DefinitionRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DefinitionRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/tasks/item/print_task_item_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/tasks/item/print_task_item_request_builder.py index 1fad73c5850..cdd2eaad715 100644 --- a/msgraph/generated/print/printers/item/jobs/item/tasks/item/print_task_item_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/tasks/item/print_task_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintTask Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintTaskIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTask] = None, request_configuration: Optional[PrintTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PrintTask] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/item/tasks/item/trigger/trigger_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/tasks/item/trigger/trigger_request_builder.py index ec28c510f1f..23eed4f35c8 100644 --- a/msgraph/generated/print/printers/item/jobs/item/tasks/item/trigger/trigger_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/tasks/item/trigger/trigger_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TriggerReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TriggerRequestBuilder: diff --git a/msgraph/generated/print/printers/item/jobs/item/tasks/tasks_request_builder.py b/msgraph/generated/print/printers/item/jobs/item/tasks/tasks_request_builder.py index 368b459863e..2cf6b99f853 100644 --- a/msgraph/generated/print/printers/item/jobs/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/item/tasks/tasks_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintTask] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/jobs/jobs_request_builder.py b/msgraph/generated/print/printers/item/jobs/jobs_request_builder.py index 9a4e9e0bb2a..9dfa5a9ae2b 100644 --- a/msgraph/generated/print/printers/item/jobs/jobs_request_builder.py +++ b/msgraph/generated/print/printers/item/jobs/jobs_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[JobsRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintJob] = None, request_configuration: Optional[JobsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintJob] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/printers/item/printer_item_request_builder.py b/msgraph/generated/print/printers/item/printer_item_request_builder.py index 098a33215fd..587bb014118 100644 --- a/msgraph/generated/print/printers/item/printer_item_request_builder.py +++ b/msgraph/generated/print/printers/item/printer_item_request_builder.py @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PrinterItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete (unregister) a printer. + Delete (unregister) a printer. This API is available in the following national cloud deployments. 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/printer-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[PrinterItemRequestBuilderD async def get(self,request_configuration: Optional[PrinterItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Printer]: """ - Retrieve the properties and relationships of a printer object. + Retrieve the properties and relationships of a printer object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Printer] Find more info here: https://learn.microsoft.com/graph/api/printer-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[PrinterItemRequestBuilderGetR async def patch(self,body: Optional[Printer] = None, request_configuration: Optional[PrinterItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Printer]: """ - Update the properties of a printer object. + Update the properties of a printer object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Printer] @@ -100,39 +100,39 @@ async def patch(self,body: Optional[Printer] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[PrinterItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete (unregister) a printer. + Delete (unregister) a printer. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrinterItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a printer object. + Retrieve the properties and relationships of a printer object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Printer] = None, request_configuration: Optional[PrinterItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a printer object. + Update the properties of a printer object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[Printer] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -218,7 +218,7 @@ class PrinterItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class PrinterItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a printer object. + Retrieve the properties and relationships of a printer object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/printers/item/restore_factory_defaults/restore_factory_defaults_request_builder.py b/msgraph/generated/print/printers/item/restore_factory_defaults/restore_factory_defaults_request_builder.py index 8200256a53f..18f6718502a 100644 --- a/msgraph/generated/print/printers/item/restore_factory_defaults/restore_factory_defaults_request_builder.py +++ b/msgraph/generated/print/printers/item/restore_factory_defaults/restore_factory_defaults_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreFactoryDefaultsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a printer's default settings to the values specified by the manufacturer. + Restore a printer's default settings to the values specified by the manufacturer. This API is available in the following national cloud deployments. 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/printer-restorefactorydefaults?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreFactoryDefaultsReques def to_post_request_information(self,request_configuration: Optional[RestoreFactoryDefaultsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a printer's default settings to the values specified by the manufacturer. + Restore a printer's default settings to the values specified by the manufacturer. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreFactoryDefaultsRequestBuilder: diff --git a/msgraph/generated/print/printers/item/shares/count/count_request_builder.py b/msgraph/generated/print/printers/item/shares/count/count_request_builder.py index 6352f996cfd..842ead84640 100644 --- a/msgraph/generated/print/printers/item/shares/count/count_request_builder.py +++ b/msgraph/generated/print/printers/item/shares/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/item/shares/item/printer_share_item_request_builder.py b/msgraph/generated/print/printers/item/shares/item/printer_share_item_request_builder.py index e18065c6250..562625fa6e7 100644 --- a/msgraph/generated/print/printers/item/shares/item/printer_share_item_request_builder.py +++ b/msgraph/generated/print/printers/item/shares/item/printer_share_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrinterShare Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrinterShareItemRequestBuilder: diff --git a/msgraph/generated/print/printers/item/shares/shares_request_builder.py b/msgraph/generated/print/printers/item/shares/shares_request_builder.py index ff43e1cb6d2..dbad921b274 100644 --- a/msgraph/generated/print/printers/item/shares/shares_request_builder.py +++ b/msgraph/generated/print/printers/item/shares/shares_request_builder.py @@ -44,7 +44,7 @@ def by_printer_share_id(self,printer_share_id: str) -> PrinterShareItemRequestBu async def get(self,request_configuration: Optional[SharesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrinterShareCollectionResponse]: """ - Retrieve a list of printer shares associated with the printer. + Retrieve a list of printer shares associated with the printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrinterShareCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printer-list-shares?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SharesRequestBuilderGetReques def to_get_request_information(self,request_configuration: Optional[SharesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of printer shares associated with the printer. + Retrieve a list of printer shares associated with the printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SharesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharesRequestBuilderGetQueryParameters(): """ - Retrieve a list of printer shares associated with the printer. + Retrieve a list of printer shares associated with the printer. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/printers/item/task_triggers/count/count_request_builder.py b/msgraph/generated/print/printers/item/task_triggers/count/count_request_builder.py index 6d24fdea94b..83ff988bf2b 100644 --- a/msgraph/generated/print/printers/item/task_triggers/count/count_request_builder.py +++ b/msgraph/generated/print/printers/item/task_triggers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/printers/item/task_triggers/item/definition/definition_request_builder.py b/msgraph/generated/print/printers/item/task_triggers/item/definition/definition_request_builder.py index 436539d4a7d..3f5f8c05dcd 100644 --- a/msgraph/generated/print/printers/item/task_triggers/item/definition/definition_request_builder.py +++ b/msgraph/generated/print/printers/item/task_triggers/item/definition/definition_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DefinitionRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTaskDefinition]: """ - An abstract definition that will be used to create a printTask when triggered by a print event. Read-only. + An abstract definition that is used to create a printTask when triggered by a print event. Read-only. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskDefinition] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[DefinitionRequestBuilderGetRe def to_get_request_information(self,request_configuration: Optional[DefinitionRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - An abstract definition that will be used to create a printTask when triggered by a print event. Read-only. + An abstract definition that is used to create a printTask when triggered by a print event. Read-only. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DefinitionRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DefinitionRequestBuilder: @dataclass class DefinitionRequestBuilderGetQueryParameters(): """ - An abstract definition that will be used to create a printTask when triggered by a print event. Read-only. + An abstract definition that is used to create a printTask when triggered by a print event. Read-only. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/printers/item/task_triggers/item/print_task_trigger_item_request_builder.py b/msgraph/generated/print/printers/item/task_triggers/item/print_task_trigger_item_request_builder.py index bd1f667b7bd..cbe044fed89 100644 --- a/msgraph/generated/print/printers/item/task_triggers/item/print_task_trigger_item_request_builder.py +++ b/msgraph/generated/print/printers/item/task_triggers/item/print_task_trigger_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PrintTaskTriggerItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the task trigger of a printer to prevent related print events from triggering tasks on the specified printer. + Delete the task trigger of a printer to prevent related print events from triggering tasks on the specified printer. This API is available in the following national cloud deployments. 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/printer-delete-tasktrigger?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PrintTaskTriggerItemReques async def get(self,request_configuration: Optional[PrintTaskTriggerItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTaskTrigger]: """ - Get a task trigger from a printer. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get a task trigger from a printer. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskTrigger] Find more info here: https://learn.microsoft.com/graph/api/printtasktrigger-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[PrintTaskTrigger] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[PrintTaskTriggerItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the task trigger of a printer to prevent related print events from triggering tasks on the specified printer. + Delete the task trigger of a printer to prevent related print events from triggering tasks on the specified printer. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintTaskTriggerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a task trigger from a printer. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get a task trigger from a printer. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTaskTrigger] = None, request_configuration: Optional[PrintTaskTriggerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[PrintTaskTrigger] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class PrintTaskTriggerItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class PrintTaskTriggerItemRequestBuilderGetQueryParameters(): """ - Get a task trigger from a printer. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get a task trigger from a printer. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/printers/item/task_triggers/task_triggers_request_builder.py b/msgraph/generated/print/printers/item/task_triggers/task_triggers_request_builder.py index 5bb660d3ee1..53d15c5a177 100644 --- a/msgraph/generated/print/printers/item/task_triggers/task_triggers_request_builder.py +++ b/msgraph/generated/print/printers/item/task_triggers/task_triggers_request_builder.py @@ -45,7 +45,7 @@ def by_print_task_trigger_id(self,print_task_trigger_id: str) -> PrintTaskTrigge async def get(self,request_configuration: Optional[TaskTriggersRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTaskTriggerCollectionResponse]: """ - Retrieve a list of task triggers associated with the printer. The list of task triggers defines which tasks will be triggered as a result of events that occur during printing. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of task triggers associated with the printer. The list of task triggers defines which tasks will be triggered as a result of events that occur during printing. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskTriggerCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printer-list-tasktriggers?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TaskTriggersRequestBuilderGet async def post(self,body: Optional[PrintTaskTrigger] = None, request_configuration: Optional[TaskTriggersRequestBuilderPostRequestConfiguration] = None) -> Optional[PrintTaskTrigger]: """ - Create a new task trigger on the specified printer. Currently, only one task trigger can be specified per printer, but this limit might be removed in the future. + Create a new task trigger on the specified printer. Currently, only one task trigger can be specified per printer, but this limit might be removed in the future. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskTrigger] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PrintTaskTrigger] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[TaskTriggersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of task triggers associated with the printer. The list of task triggers defines which tasks will be triggered as a result of events that occur during printing. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of task triggers associated with the printer. The list of task triggers defines which tasks will be triggered as a result of events that occur during printing. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTaskTrigger] = None, request_configuration: Optional[TaskTriggersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new task trigger on the specified printer. Currently, only one task trigger can be specified per printer, but this limit might be removed in the future. + Create a new task trigger on the specified printer. Currently, only one task trigger can be specified per printer, but this limit might be removed in the future. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PrintTaskTrigger] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskTriggersRequestBuilderGetQueryParameters(): """ - Retrieve a list of task triggers associated with the printer. The list of task triggers defines which tasks will be triggered as a result of events that occur during printing. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of task triggers associated with the printer. The list of task triggers defines which tasks will be triggered as a result of events that occur during printing. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/printers/printers_request_builder.py b/msgraph/generated/print/printers/printers_request_builder.py index f27a7261fb6..e5ef0b02a58 100644 --- a/msgraph/generated/print/printers/printers_request_builder.py +++ b/msgraph/generated/print/printers/printers_request_builder.py @@ -46,7 +46,7 @@ def by_printer_id(self,printer_id: str) -> PrinterItemRequestBuilder: async def get(self,request_configuration: Optional[PrintersRequestBuilderGetRequestConfiguration] = None) -> Optional[PrinterCollectionResponse]: """ - Retrieve the list of printers that are registered in the tenant. + Retrieve the list of printers that are registered in the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrinterCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/print-list-printers?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Printer] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[PrintersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of printers that are registered in the tenant. + Retrieve the list of printers that are registered in the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Printer] = None, request_configuration: Optional[PrintersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Printer] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def create(self) -> CreateRequestBuilder: @dataclass class PrintersRequestBuilderGetQueryParameters(): """ - Retrieve the list of printers that are registered in the tenant. + Retrieve the list of printers that are registered in the tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/services/count/count_request_builder.py b/msgraph/generated/print/services/count/count_request_builder.py index 88e563e7887..918880b1689 100644 --- a/msgraph/generated/print/services/count/count_request_builder.py +++ b/msgraph/generated/print/services/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/services/item/endpoints/count/count_request_builder.py b/msgraph/generated/print/services/item/endpoints/count/count_request_builder.py index 9fdc628822a..baeba455c4a 100644 --- a/msgraph/generated/print/services/item/endpoints/count/count_request_builder.py +++ b/msgraph/generated/print/services/item/endpoints/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/services/item/endpoints/endpoints_request_builder.py b/msgraph/generated/print/services/item/endpoints/endpoints_request_builder.py index 4d576720d7b..0ffba7a3d27 100644 --- a/msgraph/generated/print/services/item/endpoints/endpoints_request_builder.py +++ b/msgraph/generated/print/services/item/endpoints/endpoints_request_builder.py @@ -45,7 +45,7 @@ def by_print_service_endpoint_id(self,print_service_endpoint_id: str) -> PrintSe async def get(self,request_configuration: Optional[EndpointsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintServiceEndpointCollectionResponse]: """ - Retrieve a list of endpoints exposed by a print service. + Retrieve a list of endpoints exposed by a print service. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintServiceEndpointCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printservice-list-endpoints?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintServiceEndpoint] = None, request_configu def to_get_request_information(self,request_configuration: Optional[EndpointsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of endpoints exposed by a print service. + Retrieve a list of endpoints exposed by a print service. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintServiceEndpoint] = None, request_configuration: Optional[EndpointsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintServiceEndpoint] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class EndpointsRequestBuilderGetQueryParameters(): """ - Retrieve a list of endpoints exposed by a print service. + Retrieve a list of endpoints exposed by a print service. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/services/item/endpoints/item/print_service_endpoint_item_request_builder.py b/msgraph/generated/print/services/item/endpoints/item/print_service_endpoint_item_request_builder.py index 7480e2adaf5..730e7a3e64e 100644 --- a/msgraph/generated/print/services/item/endpoints/item/print_service_endpoint_item_request_builder.py +++ b/msgraph/generated/print/services/item/endpoints/item/print_service_endpoint_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[PrintServiceEndpointItemRe async def get(self,request_configuration: Optional[PrintServiceEndpointItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintServiceEndpoint]: """ - Retrieve the properties and relationships of a print service endpoint. + Retrieve the properties and relationships of a print service endpoint. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintServiceEndpoint] Find more info here: https://learn.microsoft.com/graph/api/printserviceendpoint-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrintServ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintServiceEndpointItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a print service endpoint. + Retrieve the properties and relationships of a print service endpoint. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintServiceEndpoint] = None, request_configuration: Optional[PrintServiceEndpointItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PrintServiceEndpoint] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class PrintServiceEndpointItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class PrintServiceEndpointItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a print service endpoint. + Retrieve the properties and relationships of a print service endpoint. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/services/item/print_service_item_request_builder.py b/msgraph/generated/print/services/item/print_service_item_request_builder.py index 5528e03196c..2aeda06769e 100644 --- a/msgraph/generated/print/services/item/print_service_item_request_builder.py +++ b/msgraph/generated/print/services/item/print_service_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[PrintServiceItemRequestBui async def get(self,request_configuration: Optional[PrintServiceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintService]: """ - Retrieve the properties and relationships of a print service. + Retrieve the properties and relationships of a print service. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintService] Find more info here: https://learn.microsoft.com/graph/api/printservice-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrintServ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintServiceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a print service. + Retrieve the properties and relationships of a print service. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintService] = None, request_configuration: Optional[PrintServiceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PrintService] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class PrintServiceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class PrintServiceItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a print service. + Retrieve the properties and relationships of a print service. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/services/services_request_builder.py b/msgraph/generated/print/services/services_request_builder.py index 76b7b850c18..13fa6695421 100644 --- a/msgraph/generated/print/services/services_request_builder.py +++ b/msgraph/generated/print/services/services_request_builder.py @@ -45,7 +45,7 @@ def by_print_service_id(self,print_service_id: str) -> PrintServiceItemRequestBu async def get(self,request_configuration: Optional[ServicesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintServiceCollectionResponse]: """ - Retrieve a list of printService objects that represent the services available to your tenant. + Retrieve a list of printService objects that represent the services available to your tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintServiceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/print-list-services?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintService] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ServicesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of printService objects that represent the services available to your tenant. + Retrieve a list of printService objects that represent the services available to your tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintService] = None, request_configuration: Optional[ServicesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintService] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ServicesRequestBuilderGetQueryParameters(): """ - Retrieve a list of printService objects that represent the services available to your tenant. + Retrieve a list of printService objects that represent the services available to your tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/count/count_request_builder.py b/msgraph/generated/print/shares/count/count_request_builder.py index 44cd764fbe5..eaeb3d13244 100644 --- a/msgraph/generated/print/shares/count/count_request_builder.py +++ b/msgraph/generated/print/shares/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/shares/item/allowed_groups/allowed_groups_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/allowed_groups_request_builder.py index d7e2ef4f80e..f9f9c9746e0 100644 --- a/msgraph/generated/print/shares/item/allowed_groups/allowed_groups_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_groups/allowed_groups_request_builder.py @@ -45,7 +45,7 @@ def by_group_id(self,group_id: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[AllowedGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printershare-list-allowedgroups?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[AllowedGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[AllowedGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedGroupsRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class AllowedGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/item/allowed_groups/count/count_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/count/count_request_builder.py index 0f0171dc1f5..1a24e76c1f2 100644 --- a/msgraph/generated/print/shares/item/allowed_groups/count/count_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/shares/item/allowed_groups/item/group_item_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/item/group_item_request_builder.py index 775d17be887..90189c4f930 100644 --- a/msgraph/generated/print/shares/item/allowed_groups/item/group_item_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_groups/item/group_item_request_builder.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from .ref.ref_request_builder import RefRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupItemRequestBuilder(BaseRequestBuilder): """ @@ -29,4 +30,13 @@ def ref(self) -> RefRequestBuilder: return RefRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + diff --git a/msgraph/generated/print/shares/item/allowed_groups/item/ref/ref_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/item/ref/ref_request_builder.py index e723c22bcdb..0f8f9f0fb9d 100644 --- a/msgraph/generated/print/shares/item/allowed_groups/item/ref/ref_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_groups/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Revoke the specified group's access to submit print jobs to the associated printerShare. + Revoke the specified group's access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. 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/printershare-delete-allowedgroup?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Revoke the specified group's access to submit print jobs to the associated printerShare. + Revoke the specified group's access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Revoke the specified group's access to submit print jobs to the associated printerShare. + Revoke the specified group's access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..a68321d30b9 --- /dev/null +++ b/msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..278250e72b9 --- /dev/null +++ b/msgraph/generated/print/shares/item/allowed_groups/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /print/shares/{printerShare-id}/allowedGroups/{group-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/print/shares/item/allowed_groups/ref/ref_request_builder.py b/msgraph/generated/print/shares/item/allowed_groups/ref/ref_request_builder.py index 0074326d915..9f75f2cfaa3 100644 --- a/msgraph/generated/print/shares/item/allowed_groups/ref/ref_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_groups/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printershare-list-allowedgroups?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Grant the specified group access to submit print jobs to the associated printerShare. + Grant the specified group access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Grant the specified group access to submit print jobs to the associated printerShare. + Grant the specified group access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of groups that have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/item/allowed_users/allowed_users_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/allowed_users_request_builder.py index 1cf8425d1cb..100133b0ad5 100644 --- a/msgraph/generated/print/shares/item/allowed_users/allowed_users_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_users/allowed_users_request_builder.py @@ -45,7 +45,7 @@ def by_user_id(self,user_id: str) -> UserItemRequestBuilder: async def get(self,request_configuration: Optional[AllowedUsersRequestBuilderGetRequestConfiguration] = None) -> Optional[UserCollectionResponse]: """ - Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. 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/printershare-list-allowedusers?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[AllowedUsersRequestBuilderGet def to_get_request_information(self,request_configuration: Optional[AllowedUsersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedUsersRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class AllowedUsersRequestBuilderGetQueryParameters(): """ - Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/item/allowed_users/count/count_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/count/count_request_builder.py index 355966a0467..4cb942d7d4c 100644 --- a/msgraph/generated/print/shares/item/allowed_users/count/count_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_users/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/shares/item/allowed_users/item/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/item/mailbox_settings/mailbox_settings_request_builder.py index 58deda153c9..213eff2a1a8 100644 --- a/msgraph/generated/print/shares/item/allowed_users/item/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_users/item/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/allowed_users/item/ref/ref_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/item/ref/ref_request_builder.py index 3da26f14090..7ea9453df9a 100644 --- a/msgraph/generated/print/shares/item/allowed_users/item/ref/ref_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_users/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Revoke the specified user's access to submit print jobs to the associated printerShare. + Revoke the specified user's access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. 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/printershare-delete-alloweduser?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Revoke the specified user's access to submit print jobs to the associated printerShare. + Revoke the specified user's access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Revoke the specified user's access to submit print jobs to the associated printerShare. + Revoke the specified user's access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..088f7bac203 --- /dev/null +++ b/msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..03fcd9cc285 --- /dev/null +++ b/msgraph/generated/print/shares/item/allowed_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /print/shares/{printerShare-id}/allowedUsers/{user-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/print/shares/item/allowed_users/item/user_item_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/item/user_item_request_builder.py index c7e47c2029b..a47111b802e 100644 --- a/msgraph/generated/print/shares/item/allowed_users/item/user_item_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_users/item/user_item_request_builder.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder from .ref.ref_request_builder import RefRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserItemRequestBuilder(BaseRequestBuilder): """ @@ -39,4 +40,13 @@ def ref(self) -> RefRequestBuilder: return RefRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + diff --git a/msgraph/generated/print/shares/item/allowed_users/ref/ref_request_builder.py b/msgraph/generated/print/shares/item/allowed_users/ref/ref_request_builder.py index 3e1d6a2d965..5ca41288d38 100644 --- a/msgraph/generated/print/shares/item/allowed_users/ref/ref_request_builder.py +++ b/msgraph/generated/print/shares/item/allowed_users/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printershare-list-allowedusers?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Grant the specified user access to submit print jobs to the associated printerShare. + Grant the specified user access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Grant the specified user access to submit print jobs to the associated printerShare. + Grant the specified user access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. + Retrieve a list of users who have been granted access to submit print jobs to the associated printerShare. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/item/jobs/count/count_request_builder.py b/msgraph/generated/print/shares/item/jobs/count/count_request_builder.py index acfcf52dd5b..df3b0df1c07 100644 --- a/msgraph/generated/print/shares/item/jobs/count/count_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/abort/abort_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/abort/abort_request_builder.py index 1efcd3cfae1..10bf2c3d003 100644 --- a/msgraph/generated/print/shares/item/jobs/item/abort/abort_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/abort/abort_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AbortPostRequestBody] = None, request_configuration: Optional[AbortRequestBuilderPostRequestConfiguration] = None) -> None: """ - Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. + Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. 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[AbortPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[AbortPostRequestBody] = None, request_configuration: Optional[AbortRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. + Abort a print job. Only applications using application permissions can abort a print job. Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AbortPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/cancel/cancel_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/cancel/cancel_request_builder.py index 4bda0581d1c..46e7b5e9e38 100644 --- a/msgraph/generated/print/shares/item/jobs/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. + Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. This API is available in the following national cloud deployments. 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/printjob-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. + Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/documents/count/count_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/documents/count/count_request_builder.py index a2a1f384e74..71ea86b9111 100644 --- a/msgraph/generated/print/shares/item/jobs/item/documents/count/count_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/documents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/documents/documents_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/documents/documents_request_builder.py index ff2d97b8a12..9df57035018 100644 --- a/msgraph/generated/print/shares/item/jobs/item/documents/documents_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/documents/documents_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DocumentsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintDocument] = None, request_configuration: Optional[DocumentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintDocument] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py index 23defdfe7df..8f733dd7a0d 100644 --- a/msgraph/generated/print/shares/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/documents/item/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. + Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. + Create an upload session that allows an app to iteratively upload ranges of a binary file linked to the print document. As part of the response, this action returns an upload URL that can be used in subsequent sequential PUT queries. Request headers for each PUT operation can be used to specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/documents/item/print_document_item_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/documents/item/print_document_item_request_builder.py index bcb4d429da0..f96a9a04a43 100644 --- a/msgraph/generated/print/shares/item/jobs/item/documents/item/print_document_item_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/documents/item/print_document_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintDocu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintDocumentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintDocumen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintDocument] = None, request_configuration: Optional[PrintDocumentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PrintDocument] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/documents/item/value/content_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/documents/item/value/content_request_builder.py index 0ceb285416c..0ffea05a3ef 100644 --- a/msgraph/generated/print/shares/item/jobs/item/documents/item/value/content_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/documents/item/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/print_job_item_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/print_job_item_request_builder.py index ee816c2dce0..81849896432 100644 --- a/msgraph/generated/print/shares/item/jobs/item/print_job_item_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/print_job_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintJobI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintJobItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintJobItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintJob] = None, request_configuration: Optional[PrintJobItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[PrintJob] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/redirect/redirect_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/redirect/redirect_request_builder.py index 91bdf1ee105..1cc19759316 100644 --- a/msgraph/generated/print/shares/item/jobs/item/redirect/redirect_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/redirect/redirect_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RedirectPostRequestBody] = None, request_configuration: Optional[RedirectRequestBuilderPostRequestConfiguration] = None) -> Optional[PrintJob]: """ - Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintJob] @@ -54,7 +54,7 @@ async def post(self,body: Optional[RedirectPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[RedirectPostRequestBody] = None, request_configuration: Optional[RedirectRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Redirect a print job to a different printer. Redirecting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RedirectPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/start/start_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/start/start_request_builder.py index 200287c0134..c793d8fc41b 100644 --- a/msgraph/generated/print/shares/item/jobs/item/start/start_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/start/start_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> Optional[PrintJobStatus]: """ - Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. + Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintJobStatus] Find more info here: https://learn.microsoft.com/graph/api/printjob-start?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[StartRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. + Submits the print job to the associated printer or printerShare. It will be printed after any existing pending jobs are completed, aborted, or canceled. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> StartRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/tasks/count/count_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/tasks/count/count_request_builder.py index a30385a0fd3..fb659ed1af9 100644 --- a/msgraph/generated/print/shares/item/jobs/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/tasks/item/definition/definition_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/tasks/item/definition/definition_request_builder.py index 516946166aa..1277e6f444d 100644 --- a/msgraph/generated/print/shares/item/jobs/item/tasks/item/definition/definition_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/tasks/item/definition/definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DefinitionRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DefinitionRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/tasks/item/print_task_item_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/tasks/item/print_task_item_request_builder.py index e71647a649e..fb3451ceeb3 100644 --- a/msgraph/generated/print/shares/item/jobs/item/tasks/item/print_task_item_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/tasks/item/print_task_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintTask Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintTaskIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTask] = None, request_configuration: Optional[PrintTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PrintTask] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/item/tasks/item/trigger/trigger_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/tasks/item/trigger/trigger_request_builder.py index 4f57bbe815c..2ae51ad8361 100644 --- a/msgraph/generated/print/shares/item/jobs/item/tasks/item/trigger/trigger_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/tasks/item/trigger/trigger_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TriggerReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TriggerRequestBuilder: diff --git a/msgraph/generated/print/shares/item/jobs/item/tasks/tasks_request_builder.py b/msgraph/generated/print/shares/item/jobs/item/tasks/tasks_request_builder.py index f541fef1fc5..f990e0beb63 100644 --- a/msgraph/generated/print/shares/item/jobs/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/item/tasks/tasks_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TasksRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintTask] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/jobs/jobs_request_builder.py b/msgraph/generated/print/shares/item/jobs/jobs_request_builder.py index 46c010faa08..ee3fd43453f 100644 --- a/msgraph/generated/print/shares/item/jobs/jobs_request_builder.py +++ b/msgraph/generated/print/shares/item/jobs/jobs_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[JobsRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintJob] = None, request_configuration: Optional[JobsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PrintJob] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/print/shares/item/printer/printer_request_builder.py b/msgraph/generated/print/shares/item/printer/printer_request_builder.py index be8c8f23984..cd33960c31c 100644 --- a/msgraph/generated/print/shares/item/printer/printer_request_builder.py +++ b/msgraph/generated/print/shares/item/printer/printer_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrinterReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrinterRequestBuilder: diff --git a/msgraph/generated/print/shares/item/printer_share_item_request_builder.py b/msgraph/generated/print/shares/item/printer_share_item_request_builder.py index 9414e0bc20e..9dec4fbf7cc 100644 --- a/msgraph/generated/print/shares/item/printer_share_item_request_builder.py +++ b/msgraph/generated/print/shares/item/printer_share_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PrinterShareItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a printer share (unshare the associated printer). This action can't be undone. If the printer is shared again in the future, any Windows users who had previously installed the printer needs to discover and reinstall it. + Delete a printer share (unshare the associated printer). This action can't be undone. If the printer is shared again in the future, any Windows users who had previously installed the printer needs to discover and reinstall it. This API is available in the following national cloud deployments. 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/printershare-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[PrinterShareItemRequestBui async def get(self,request_configuration: Optional[PrinterShareItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrinterShare]: """ - Retrieve the properties and relationships of a printer share. + Retrieve the properties and relationships of a printer share. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrinterShare] Find more info here: https://learn.microsoft.com/graph/api/printershare-get?view=graph-rest-1.0 @@ -74,7 +74,7 @@ async def get(self,request_configuration: Optional[PrinterShareItemRequestBuilde async def patch(self,body: Optional[PrinterShare] = None, request_configuration: Optional[PrinterShareItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrinterShare]: """ - Update the properties of a printer share. This method can be used to swap printers. For example, if a physical printer device breaks, an administrator can register a new printer device and update this printerShare to point to the new printer without requiring users to take any action. + Update the properties of a printer share. This method can be used to swap printers. For example, if a physical printer device breaks, an administrator can register a new printer device and update this printerShare to point to the new printer without requiring users to take any action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrinterShare] @@ -99,39 +99,39 @@ async def patch(self,body: Optional[PrinterShare] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[PrinterShareItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a printer share (unshare the associated printer). This action can't be undone. If the printer is shared again in the future, any Windows users who had previously installed the printer needs to discover and reinstall it. + Delete a printer share (unshare the associated printer). This action can't be undone. If the printer is shared again in the future, any Windows users who had previously installed the printer needs to discover and reinstall it. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrinterShareItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a printer share. + Retrieve the properties and relationships of a printer share. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrinterShare] = None, request_configuration: Optional[PrinterShareItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a printer share. This method can be used to swap printers. For example, if a physical printer device breaks, an administrator can register a new printer device and update this printerShare to point to the new printer without requiring users to take any action. + Update the properties of a printer share. This method can be used to swap printers. For example, if a physical printer device breaks, an administrator can register a new printer device and update this printerShare to point to the new printer without requiring users to take any action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[PrinterShare] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class PrinterShareItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class PrinterShareItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a printer share. + Retrieve the properties and relationships of a printer share. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/shares/shares_request_builder.py b/msgraph/generated/print/shares/shares_request_builder.py index 7c42c0100c7..035f2bb9c18 100644 --- a/msgraph/generated/print/shares/shares_request_builder.py +++ b/msgraph/generated/print/shares/shares_request_builder.py @@ -45,7 +45,7 @@ def by_printer_share_id(self,printer_share_id: str) -> PrinterShareItemRequestBu async def get(self,request_configuration: Optional[SharesRequestBuilderGetRequestConfiguration] = None) -> Optional[PrinterShareCollectionResponse]: """ - Retrieve a list of printerShares. + Retrieve a list of printerShares. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrinterShareCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/print-list-shares?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SharesRequestBuilderGetReques async def post(self,body: Optional[PrinterShare] = None, request_configuration: Optional[SharesRequestBuilderPostRequestConfiguration] = None) -> Optional[PrinterShare]: """ - Create a new printerShare for the specified printer. + Create a new printerShare for the specified printer. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrinterShare] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PrinterShare] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SharesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of printerShares. + Retrieve a list of printerShares. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrinterShare] = None, request_configuration: Optional[SharesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new printerShare for the specified printer. + Create a new printerShare for the specified printer. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PrinterShare] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharesRequestBuilderGetQueryParameters(): """ - Retrieve a list of printerShares. + Retrieve a list of printerShares. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/task_definitions/count/count_request_builder.py b/msgraph/generated/print/task_definitions/count/count_request_builder.py index 2e72f3d6752..22a1b0668d6 100644 --- a/msgraph/generated/print/task_definitions/count/count_request_builder.py +++ b/msgraph/generated/print/task_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/task_definitions/item/print_task_definition_item_request_builder.py b/msgraph/generated/print/task_definitions/item/print_task_definition_item_request_builder.py index 06f53f017cf..6f9754d2643 100644 --- a/msgraph/generated/print/task_definitions/item/print_task_definition_item_request_builder.py +++ b/msgraph/generated/print/task_definitions/item/print_task_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PrintTaskDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a taskDefinition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Delete a taskDefinition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. 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/print-delete-taskdefinition?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PrintTaskDefinitionItemReq async def get(self,request_configuration: Optional[PrintTaskDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTaskDefinition]: """ - Get details about a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get details about a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskDefinition] Find more info here: https://learn.microsoft.com/graph/api/printtaskdefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[PrintTaskDefinitionItemReques async def patch(self,body: Optional[PrintTaskDefinition] = None, request_configuration: Optional[PrintTaskDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrintTaskDefinition]: """ - Update a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Update a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[PrintTaskDefinition] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[PrintTaskDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a taskDefinition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Delete a taskDefinition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintTaskDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get details about a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get details about a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTaskDefinition] = None, request_configuration: Optional[PrintTaskDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Update a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PrintTaskDefinition] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class PrintTaskDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class PrintTaskDefinitionItemRequestBuilderGetQueryParameters(): """ - Get details about a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get details about a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/task_definitions/item/tasks/count/count_request_builder.py b/msgraph/generated/print/task_definitions/item/tasks/count/count_request_builder.py index b630281100f..9db90535f83 100644 --- a/msgraph/generated/print/task_definitions/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/print/task_definitions/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/print/task_definitions/item/tasks/item/definition/definition_request_builder.py b/msgraph/generated/print/task_definitions/item/tasks/item/definition/definition_request_builder.py index 22bb9391391..4aea325e9f7 100644 --- a/msgraph/generated/print/task_definitions/item/tasks/item/definition/definition_request_builder.py +++ b/msgraph/generated/print/task_definitions/item/tasks/item/definition/definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DefinitionRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DefinitionRequestBuilder: diff --git a/msgraph/generated/print/task_definitions/item/tasks/item/print_task_item_request_builder.py b/msgraph/generated/print/task_definitions/item/tasks/item/print_task_item_request_builder.py index 720321be736..aa6a57c7b97 100644 --- a/msgraph/generated/print/task_definitions/item/tasks/item/print_task_item_request_builder.py +++ b/msgraph/generated/print/task_definitions/item/tasks/item/print_task_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PrintTaskItemRequestBuilde async def get(self,request_configuration: Optional[PrintTaskItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTask]: """ - Get details about a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get details about a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTask] Find more info here: https://learn.microsoft.com/graph/api/printtask-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[PrintTaskItemRequestBuilderGe async def patch(self,body: Optional[PrintTask] = None, request_configuration: Optional[PrintTaskItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PrintTask]: """ - Update a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Update a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTask] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[PrintTask Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get details about a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get details about a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTask] = None, request_configuration: Optional[PrintTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Update a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PrintTask] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class PrintTaskItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class PrintTaskItemRequestBuilderGetQueryParameters(): """ - Get details about a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Get details about a print task. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/task_definitions/item/tasks/item/trigger/trigger_request_builder.py b/msgraph/generated/print/task_definitions/item/tasks/item/trigger/trigger_request_builder.py index 4bdb85f5efd..e0526e71f0d 100644 --- a/msgraph/generated/print/task_definitions/item/tasks/item/trigger/trigger_request_builder.py +++ b/msgraph/generated/print/task_definitions/item/tasks/item/trigger/trigger_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TriggerReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TriggerRequestBuilder: diff --git a/msgraph/generated/print/task_definitions/item/tasks/tasks_request_builder.py b/msgraph/generated/print/task_definitions/item/tasks/tasks_request_builder.py index 19ef1b92848..45f36f2aa73 100644 --- a/msgraph/generated/print/task_definitions/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/print/task_definitions/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_print_task_id(self,print_task_id: str) -> PrintTaskItemRequestBuilder: async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTaskCollectionResponse]: """ - Retrieve a list of tasks associated with a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of tasks associated with a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/printtaskdefinition-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintTask] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of tasks associated with a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of tasks associated with a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintTask] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of tasks associated with a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of tasks associated with a task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/print/task_definitions/task_definitions_request_builder.py b/msgraph/generated/print/task_definitions/task_definitions_request_builder.py index a879cd199e4..5adbac70289 100644 --- a/msgraph/generated/print/task_definitions/task_definitions_request_builder.py +++ b/msgraph/generated/print/task_definitions/task_definitions_request_builder.py @@ -45,7 +45,7 @@ def by_print_task_definition_id(self,print_task_definition_id: str) -> PrintTask async def get(self,request_configuration: Optional[TaskDefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintTaskDefinitionCollectionResponse]: """ - Retrieve a list of task definitions that the requesting app defined in the tenant. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of task definitions that the requesting app defined in the tenant. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/print-list-taskdefinitions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TaskDefinitionsRequestBuilder async def post(self,body: Optional[PrintTaskDefinition] = None, request_configuration: Optional[TaskDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[PrintTaskDefinition]: """ - Create a new task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Create a new task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintTaskDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PrintTaskDefinition] = None, request_configur def to_get_request_information(self,request_configuration: Optional[TaskDefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of task definitions that the requesting app defined in the tenant. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of task definitions that the requesting app defined in the tenant. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintTaskDefinition] = None, request_configuration: Optional[TaskDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Create a new task definition. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PrintTaskDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TaskDefinitionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of task definitions that the requesting app defined in the tenant. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. + Retrieve a list of task definitions that the requesting app defined in the tenant. For details about how to use this API to add pull printing support to Universal Print, see Extending Universal Print to support pull printing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/privacy_request_builder.py b/msgraph/generated/privacy/privacy_request_builder.py index ee90c0a96a2..0ea442d7df5 100644 --- a/msgraph/generated/privacy/privacy_request_builder.py +++ b/msgraph/generated/privacy/privacy_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[PrivacyReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Privacy] = None, request_configuration: Optional[PrivacyRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[Privacy] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/privacy/subject_rights_requests/count/count_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/count/count_request_builder.py index aeb5a4047ed..a40aada0428 100644 --- a/msgraph/generated/privacy/subject_rights_requests/count/count_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/item/approvers/approvers_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/approvers/approvers_request_builder.py index f9ba6972dd5..0256ee0824b 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/approvers/approvers_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/approvers/approvers_request_builder.py @@ -44,7 +44,7 @@ def by_user_id(self,user_id: str) -> UserItemRequestBuilder: async def get(self,request_configuration: Optional[ApproversRequestBuilderGetRequestConfiguration] = None) -> Optional[UserCollectionResponse]: """ - Get approvers from privacy + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[ApproversRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[ApproversRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get approvers from privacy + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ApproversRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ApproversRequestBuilderGetQueryParameters(): """ - Get approvers from privacy + Collection of users who can approve the request. Currently only supported for requests of type delete. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/subject_rights_requests/item/approvers/count/count_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/approvers/count/count_request_builder.py index d21809f8622..8b42136a553 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/approvers/count/count_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/approvers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py index 93ed6c4da0e..ea2424446cc 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..9ba0537d83d --- /dev/null +++ b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..a2ce2640e7c --- /dev/null +++ b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /privacy/subjectRightsRequests/{subjectRightsRequest-id}/approvers/{user-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/user_item_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/user_item_request_builder.py index 7ae3199ba59..cb60dd58b5f 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/user_item_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/approvers/item/user_item_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserItemRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Get approvers from privacy + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get approvers from privacy + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserItemRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class UserItemRequestBuilderGetQueryParameters(): """ - Get approvers from privacy + Collection of users who can approve the request. Currently only supported for requests of type delete. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/collaborators_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/collaborators_request_builder.py index 859b0e50e69..99780819fe8 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/collaborators_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/collaborators_request_builder.py @@ -44,7 +44,7 @@ def by_user_id(self,user_id: str) -> UserItemRequestBuilder: async def get(self,request_configuration: Optional[CollaboratorsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserCollectionResponse]: """ - Get collaborators from privacy + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[CollaboratorsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[CollaboratorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get collaborators from privacy + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CollaboratorsRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CollaboratorsRequestBuilderGetQueryParameters(): """ - Get collaborators from privacy + Collection of users who can collaborate on the request. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/count/count_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/count/count_request_builder.py index d45f20284c3..7bf9b186ad7 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/count/count_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py index 77fb0dc82fa..b11ffbe77bb 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..258bd8fb307 --- /dev/null +++ b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..2fb33aaa594 --- /dev/null +++ b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /privacy/subjectRightsRequests/{subjectRightsRequest-id}/collaborators/{user-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/user_item_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/user_item_request_builder.py index 87681814637..7b6d6a5378b 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/user_item_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/collaborators/item/user_item_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserItemRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Get collaborators from privacy + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get collaborators from privacy + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserItemRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class UserItemRequestBuilderGetQueryParameters(): """ - Get collaborators from privacy + Collection of users who can collaborate on the request. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py index 0477bc51902..7a35c82a821 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetFinalAtta Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetFinalAttachmentRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py index 237207e8141..7c6caeb72ce 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetFinalRepo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetFinalReportRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/item/notes/count/count_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/notes/count/count_request_builder.py index bb55c052dfc..8d53cf8af49 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/notes/count/count_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/notes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py index 91e2ab5c6d1..5d0502b08a5 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AuthoredN Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthoredNoteItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AuthoredNote Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthoredNote] = None, request_configuration: Optional[AuthoredNoteItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AuthoredNote] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/privacy/subject_rights_requests/item/notes/notes_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/notes/notes_request_builder.py index 7008eca6707..5537682cf6c 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/notes/notes_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/notes/notes_request_builder.py @@ -45,7 +45,7 @@ def by_authored_note_id(self,authored_note_id: str) -> AuthoredNoteItemRequestBu async def get(self,request_configuration: Optional[NotesRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthoredNoteCollectionResponse]: """ - Get the list of authored notes assoicated with a subject rights request. + Get the list of authored notes assoicated with a subject rights request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthoredNoteCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/subjectrightsrequest-list-notes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[NotesRequestBuilderGetRequest async def post(self,body: Optional[AuthoredNote] = None, request_configuration: Optional[NotesRequestBuilderPostRequestConfiguration] = None) -> Optional[AuthoredNote]: """ - Create a new authoredNote object. + Create a new authoredNote object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthoredNote] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AuthoredNote] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[NotesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of authored notes assoicated with a subject rights request. + Get the list of authored notes assoicated with a subject rights request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthoredNote] = None, request_configuration: Optional[NotesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new authoredNote object. + Create a new authoredNote object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AuthoredNote] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class NotesRequestBuilderGetQueryParameters(): """ - Get the list of authored notes assoicated with a subject rights request. + Get the list of authored notes assoicated with a subject rights request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/subject_rights_requests/item/subject_rights_request_item_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/subject_rights_request_item_request_builder.py index 8f35b07a71c..041364d372c 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/subject_rights_request_item_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/subject_rights_request_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[SubjectRightsRequestItemRe async def get(self,request_configuration: Optional[SubjectRightsRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SubjectRightsRequest]: """ - Read the properties and relationships of a subjectRightsRequest object. + Read the properties and relationships of a subjectRightsRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubjectRightsRequest] Find more info here: https://learn.microsoft.com/graph/api/subjectrightsrequest-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[SubjectRightsRequestItemReque async def patch(self,body: Optional[SubjectRightsRequest] = None, request_configuration: Optional[SubjectRightsRequestItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[SubjectRightsRequest]: """ - Update the properties of a subjectRightsRequest object. + Update the properties of a subjectRightsRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubjectRightsRequest] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[SubjectRi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubjectRightsRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a subjectRightsRequest object. + Read the properties and relationships of a subjectRightsRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SubjectRightsRequest] = None, request_configuration: Optional[SubjectRightsRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a subjectRightsRequest object. + Update the properties of a subjectRightsRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[SubjectRightsRequest] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class SubjectRightsRequestItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class SubjectRightsRequestItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a subjectRightsRequest object. + Read the properties and relationships of a subjectRightsRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/privacy/subject_rights_requests/item/team/team_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/item/team/team_request_builder.py index d5e69b0de9c..5b202ea7652 100644 --- a/msgraph/generated/privacy/subject_rights_requests/item/team/team_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/privacy/subject_rights_requests/subject_rights_requests_request_builder.py b/msgraph/generated/privacy/subject_rights_requests/subject_rights_requests_request_builder.py index 3885b8941af..e34319765f5 100644 --- a/msgraph/generated/privacy/subject_rights_requests/subject_rights_requests_request_builder.py +++ b/msgraph/generated/privacy/subject_rights_requests/subject_rights_requests_request_builder.py @@ -45,7 +45,7 @@ def by_subject_rights_request_id(self,subject_rights_request_id: str) -> Subject async def get(self,request_configuration: Optional[SubjectRightsRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[SubjectRightsRequestCollectionResponse]: """ - Get a list of subjectRightsRequest objects and their properties. + Get a list of subjectRightsRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubjectRightsRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/subjectrightsrequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SubjectRightsRequestsRequestB async def post(self,body: Optional[SubjectRightsRequest] = None, request_configuration: Optional[SubjectRightsRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[SubjectRightsRequest]: """ - Create a new subjectRightsRequest object. + Create a new subjectRightsRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubjectRightsRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SubjectRightsRequest] = None, request_configu def to_get_request_information(self,request_configuration: Optional[SubjectRightsRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of subjectRightsRequest objects and their properties. + Get a list of subjectRightsRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SubjectRightsRequest] = None, request_configuration: Optional[SubjectRightsRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new subjectRightsRequest object. + Create a new subjectRightsRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SubjectRightsRequest] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SubjectRightsRequestsRequestBuilderGetQueryParameters(): """ - Get a list of subjectRightsRequest objects and their properties. + Get a list of subjectRightsRequest objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/authentication_methods/authentication_methods_request_builder.py b/msgraph/generated/reports/authentication_methods/authentication_methods_request_builder.py index 1b72a8823a0..262b43c1f33 100644 --- a/msgraph/generated/reports/authentication_methods/authentication_methods_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/authentication_methods_request_builder.py @@ -12,11 +12,11 @@ if TYPE_CHECKING: from ...models.authentication_methods_root import AuthenticationMethodsRoot from ...models.o_data_errors.o_data_error import ODataError - from .user_registration_details.user_registration_details_request_builder import UserRegistrationDetailsRequestBuilder from .users_registered_by_feature.users_registered_by_feature_request_builder import UsersRegisteredByFeatureRequestBuilder from .users_registered_by_feature_with_included_user_types_with_included_user_roles.users_registered_by_feature_with_included_user_types_with_included_user_roles_request_builder import UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder from .users_registered_by_method.users_registered_by_method_request_builder import UsersRegisteredByMethodRequestBuilder from .users_registered_by_method_with_included_user_types_with_included_user_roles.users_registered_by_method_with_included_user_types_with_included_user_roles_request_builder import UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder + from .user_registration_details.user_registration_details_request_builder import UserRegistrationDetailsRequestBuilder class AuthenticationMethodsRequestBuilder(BaseRequestBuilder): """ @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[AuthenticationMethodsReque async def get(self,request_configuration: Optional[AuthenticationMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationMethodsRoot]: """ - Container for navigation properties for Azure AD authentication methods resources. + Container for navigation properties for Microsoft Entra authentication methods resources. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationMethodsRoot] """ @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Container for navigation properties for Azure AD authentication methods resources. + Container for navigation properties for Microsoft Entra authentication methods resources. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethodsRoot] = None, request_configuration: Optional[AuthenticationMethodsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethodsRoot] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class AuthenticationMethodsRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class AuthenticationMethodsRequestBuilderGetQueryParameters(): """ - Container for navigation properties for Azure AD authentication methods resources. + Container for navigation properties for Microsoft Entra authentication methods resources. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/authentication_methods/user_registration_details/count/count_request_builder.py b/msgraph/generated/reports/authentication_methods/user_registration_details/count/count_request_builder.py index 7b8c8886222..d49a97adb8a 100644 --- a/msgraph/generated/reports/authentication_methods/user_registration_details/count/count_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/user_registration_details/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/reports/authentication_methods/user_registration_details/item/user_registration_details_item_request_builder.py b/msgraph/generated/reports/authentication_methods/user_registration_details/item/user_registration_details_item_request_builder.py index 8e1084d0741..3120a8a19c8 100644 --- a/msgraph/generated/reports/authentication_methods/user_registration_details/item/user_registration_details_item_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/user_registration_details/item/user_registration_details_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[UserRegistrationDetailsIte async def get(self,request_configuration: Optional[UserRegistrationDetailsItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserRegistrationDetails]: """ - Read the properties and relationships of a userRegistrationDetails object. + Read the properties and relationships of a userRegistrationDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserRegistrationDetails] Find more info here: https://learn.microsoft.com/graph/api/userregistrationdetails-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[UserRegis Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserRegistrationDetailsItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a userRegistrationDetails object. + Read the properties and relationships of a userRegistrationDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserRegistrationDetails] = None, request_configuration: Optional[UserRegistrationDetailsItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UserRegistrationDetails] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class UserRegistrationDetailsItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class UserRegistrationDetailsItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a userRegistrationDetails object. + Read the properties and relationships of a userRegistrationDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/authentication_methods/user_registration_details/user_registration_details_request_builder.py b/msgraph/generated/reports/authentication_methods/user_registration_details/user_registration_details_request_builder.py index ce55f3cd74a..d7ae307a53d 100644 --- a/msgraph/generated/reports/authentication_methods/user_registration_details/user_registration_details_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/user_registration_details/user_registration_details_request_builder.py @@ -45,7 +45,7 @@ def by_user_registration_details_id(self,user_registration_details_id: str) -> U async def get(self,request_configuration: Optional[UserRegistrationDetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserRegistrationDetailsCollectionResponse]: """ - Get a list of the authentication methods registered for a user as defined in the userRegistrationDetails object. + Get a list of the authentication methods registered for a user as defined in the userRegistrationDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserRegistrationDetailsCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authenticationmethodsroot-list-userregistrationdetails?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UserRegistrationDetails] = None, request_conf def to_get_request_information(self,request_configuration: Optional[UserRegistrationDetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the authentication methods registered for a user as defined in the userRegistrationDetails object. + Get a list of the authentication methods registered for a user as defined in the userRegistrationDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserRegistrationDetails] = None, request_configuration: Optional[UserRegistrationDetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UserRegistrationDetails] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserRegistrationDetailsRequestBuilderGetQueryParameters(): """ - Get a list of the authentication methods registered for a user as defined in the userRegistrationDetails object. + Get a list of the authentication methods registered for a user as defined in the userRegistrationDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/authentication_methods/users_registered_by_feature/users_registered_by_feature_request_builder.py b/msgraph/generated/reports/authentication_methods/users_registered_by_feature/users_registered_by_feature_request_builder.py index d1db3f63540..ed641f47996 100644 --- a/msgraph/generated/reports/authentication_methods/users_registered_by_feature/users_registered_by_feature_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/users_registered_by_feature/users_registered_by_feature_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[UsersRegiste Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsersRegisteredByFeatureRequestBuilder: diff --git a/msgraph/generated/reports/authentication_methods/users_registered_by_feature_with_included_user_types_with_included_user_roles/users_registered_by_feature_with_included_user_types_with_included_user_roles_request_builder.py b/msgraph/generated/reports/authentication_methods/users_registered_by_feature_with_included_user_types_with_included_user_roles/users_registered_by_feature_with_included_user_types_with_included_user_roles_request_builder.py index b55ed6f4cf4..0271c06f7fb 100644 --- a/msgraph/generated/reports/authentication_methods/users_registered_by_feature_with_included_user_types_with_included_user_roles/users_registered_by_feature_with_included_user_types_with_included_user_roles_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/users_registered_by_feature_with_included_user_types_with_included_user_roles/users_registered_by_feature_with_included_user_types_with_included_user_roles_request_builder.py @@ -26,6 +26,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['included_user_roles'] = str(included_user_roles) + path_parameters['included_user_types'] = str(included_user_types) super().__init__(request_adapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByFeature(includedUserTypes='{includedUserTypes}',includedUserRoles='{includedUserRoles}')", path_parameters) async def get(self,request_configuration: Optional[UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserRegistrationFeatureSummary]: @@ -56,13 +59,13 @@ def to_get_request_information(self,request_configuration: Optional[UsersRegiste Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder: diff --git a/msgraph/generated/reports/authentication_methods/users_registered_by_method/users_registered_by_method_request_builder.py b/msgraph/generated/reports/authentication_methods/users_registered_by_method/users_registered_by_method_request_builder.py index bac8fe75afe..950a38aee24 100644 --- a/msgraph/generated/reports/authentication_methods/users_registered_by_method/users_registered_by_method_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/users_registered_by_method/users_registered_by_method_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[UsersRegiste Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsersRegisteredByMethodRequestBuilder: diff --git a/msgraph/generated/reports/authentication_methods/users_registered_by_method_with_included_user_types_with_included_user_roles/users_registered_by_method_with_included_user_types_with_included_user_roles_request_builder.py b/msgraph/generated/reports/authentication_methods/users_registered_by_method_with_included_user_types_with_included_user_roles/users_registered_by_method_with_included_user_types_with_included_user_roles_request_builder.py index 30a5d2ac5b6..85e29d17c43 100644 --- a/msgraph/generated/reports/authentication_methods/users_registered_by_method_with_included_user_types_with_included_user_roles/users_registered_by_method_with_included_user_types_with_included_user_roles_request_builder.py +++ b/msgraph/generated/reports/authentication_methods/users_registered_by_method_with_included_user_types_with_included_user_roles/users_registered_by_method_with_included_user_types_with_included_user_roles_request_builder.py @@ -26,6 +26,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['included_user_roles'] = str(included_user_roles) + path_parameters['included_user_types'] = str(included_user_types) super().__init__(request_adapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByMethod(includedUserTypes='{includedUserTypes}',includedUserRoles='{includedUserRoles}')", path_parameters) async def get(self,request_configuration: Optional[UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserRegistrationMethodSummary]: @@ -56,13 +59,13 @@ def to_get_request_information(self,request_configuration: Optional[UsersRegiste Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder: diff --git a/msgraph/generated/reports/daily_print_usage_by_printer/count/count_request_builder.py b/msgraph/generated/reports/daily_print_usage_by_printer/count/count_request_builder.py index 8af74d2c5b0..5ab0618353a 100644 --- a/msgraph/generated/reports/daily_print_usage_by_printer/count/count_request_builder.py +++ b/msgraph/generated/reports/daily_print_usage_by_printer/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/reports/daily_print_usage_by_printer/daily_print_usage_by_printer_request_builder.py b/msgraph/generated/reports/daily_print_usage_by_printer/daily_print_usage_by_printer_request_builder.py index 864d1c2bc64..02c5a508f38 100644 --- a/msgraph/generated/reports/daily_print_usage_by_printer/daily_print_usage_by_printer_request_builder.py +++ b/msgraph/generated/reports/daily_print_usage_by_printer/daily_print_usage_by_printer_request_builder.py @@ -45,7 +45,7 @@ def by_print_usage_by_printer_id(self,print_usage_by_printer_id: str) -> PrintUs async def get(self,request_configuration: Optional[DailyPrintUsageByPrinterRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintUsageByPrinterCollectionResponse]: """ - Retrieve a list of daily print usage summaries, grouped by printer. + Retrieve a list of daily print usage summaries, grouped by printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintUsageByPrinterCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/reportroot-list-dailyprintusagebyprinter?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintUsageByPrinter] = None, request_configur def to_get_request_information(self,request_configuration: Optional[DailyPrintUsageByPrinterRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of daily print usage summaries, grouped by printer. + Retrieve a list of daily print usage summaries, grouped by printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByPrinter] = None, request_configuration: Optional[DailyPrintUsageByPrinterRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintUsageByPrinter] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DailyPrintUsageByPrinterRequestBuilderGetQueryParameters(): """ - Retrieve a list of daily print usage summaries, grouped by printer. + Retrieve a list of daily print usage summaries, grouped by printer. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/daily_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py b/msgraph/generated/reports/daily_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py index 2ba11338059..03db195ea4c 100644 --- a/msgraph/generated/reports/daily_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py +++ b/msgraph/generated/reports/daily_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[PrintUsageByPrinterItemReq async def get(self,request_configuration: Optional[PrintUsageByPrinterItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintUsageByPrinter]: """ - Retrieve a usage summary for a printer for a particular time period. For descriptions of each of the endpoints, see printUsageByPrinter. + Retrieve a usage summary for a printer for a particular time period. For descriptions of each of the endpoints, see printUsageByPrinter. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintUsageByPrinter] Find more info here: https://learn.microsoft.com/graph/api/printusagebyprinter-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrintUsag Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintUsageByPrinterItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a usage summary for a printer for a particular time period. For descriptions of each of the endpoints, see printUsageByPrinter. + Retrieve a usage summary for a printer for a particular time period. For descriptions of each of the endpoints, see printUsageByPrinter. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByPrinter] = None, request_configuration: Optional[PrintUsageByPrinterItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PrintUsageByPrinter] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class PrintUsageByPrinterItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class PrintUsageByPrinterItemRequestBuilderGetQueryParameters(): """ - Retrieve a usage summary for a printer for a particular time period. For descriptions of each of the endpoints, see printUsageByPrinter. + Retrieve a usage summary for a printer for a particular time period. For descriptions of each of the endpoints, see printUsageByPrinter. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/daily_print_usage_by_user/count/count_request_builder.py b/msgraph/generated/reports/daily_print_usage_by_user/count/count_request_builder.py index 30a3aaecce4..5f967950fc5 100644 --- a/msgraph/generated/reports/daily_print_usage_by_user/count/count_request_builder.py +++ b/msgraph/generated/reports/daily_print_usage_by_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/reports/daily_print_usage_by_user/daily_print_usage_by_user_request_builder.py b/msgraph/generated/reports/daily_print_usage_by_user/daily_print_usage_by_user_request_builder.py index 3d2f144ce27..29a42026bb9 100644 --- a/msgraph/generated/reports/daily_print_usage_by_user/daily_print_usage_by_user_request_builder.py +++ b/msgraph/generated/reports/daily_print_usage_by_user/daily_print_usage_by_user_request_builder.py @@ -45,7 +45,7 @@ def by_print_usage_by_user_id(self,print_usage_by_user_id: str) -> PrintUsageByU async def get(self,request_configuration: Optional[DailyPrintUsageByUserRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintUsageByUserCollectionResponse]: """ - Retrieve a list of daily print usage summaries, grouped by user. + Retrieve a list of daily print usage summaries, grouped by user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintUsageByUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/reportroot-list-dailyprintusagebyuser?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintUsageByUser] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[DailyPrintUsageByUserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of daily print usage summaries, grouped by user. + Retrieve a list of daily print usage summaries, grouped by user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByUser] = None, request_configuration: Optional[DailyPrintUsageByUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintUsageByUser] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DailyPrintUsageByUserRequestBuilderGetQueryParameters(): """ - Retrieve a list of daily print usage summaries, grouped by user. + Retrieve a list of daily print usage summaries, grouped by user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/daily_print_usage_by_user/item/print_usage_by_user_item_request_builder.py b/msgraph/generated/reports/daily_print_usage_by_user/item/print_usage_by_user_item_request_builder.py index 4a4f3357186..e8bde677e83 100644 --- a/msgraph/generated/reports/daily_print_usage_by_user/item/print_usage_by_user_item_request_builder.py +++ b/msgraph/generated/reports/daily_print_usage_by_user/item/print_usage_by_user_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[PrintUsageByUserItemReques async def get(self,request_configuration: Optional[PrintUsageByUserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintUsageByUser]: """ - Retrieve a user's usage summary for a particular time period. For descriptions of each endpoint, see printUsageByUser. + Retrieve a user's usage summary for a particular time period. For descriptions of each endpoint, see printUsageByUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintUsageByUser] Find more info here: https://learn.microsoft.com/graph/api/printusagebyuser-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrintUsag Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintUsageByUserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a user's usage summary for a particular time period. For descriptions of each endpoint, see printUsageByUser. + Retrieve a user's usage summary for a particular time period. For descriptions of each endpoint, see printUsageByUser. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByUser] = None, request_configuration: Optional[PrintUsageByUserItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PrintUsageByUser] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class PrintUsageByUserItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class PrintUsageByUserItemRequestBuilderGetQueryParameters(): """ - Retrieve a user's usage summary for a particular time period. For descriptions of each endpoint, see printUsageByUser. + Retrieve a user's usage summary for a particular time period. For descriptions of each endpoint, see printUsageByUser. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/device_configuration_device_activity/device_configuration_device_activity_request_builder.py b/msgraph/generated/reports/device_configuration_device_activity/device_configuration_device_activity_request_builder.py index 9f7dfa81f75..6d8bacd4b9b 100644 --- a/msgraph/generated/reports/device_configuration_device_activity/device_configuration_device_activity_request_builder.py +++ b/msgraph/generated/reports/device_configuration_device_activity/device_configuration_device_activity_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DeviceConfigurationDeviceActivityRequestBuilder: diff --git a/msgraph/generated/reports/device_configuration_user_activity/device_configuration_user_activity_request_builder.py b/msgraph/generated/reports/device_configuration_user_activity/device_configuration_user_activity_request_builder.py index 77c820622eb..3219e37566d 100644 --- a/msgraph/generated/reports/device_configuration_user_activity/device_configuration_user_activity_request_builder.py +++ b/msgraph/generated/reports/device_configuration_user_activity/device_configuration_user_activity_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DeviceConfigurationUserActivityRequestBuilder: diff --git a/msgraph/generated/reports/get_email_activity_counts_with_period/get_email_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_email_activity_counts_with_period/get_email_activity_counts_with_period_request_builder.py index 28ff04452aa..a4bcc19a09c 100644 --- a/msgraph/generated/reports/get_email_activity_counts_with_period/get_email_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_activity_counts_with_period/get_email_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailActi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_email_activity_user_counts_with_period/get_email_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_email_activity_user_counts_with_period/get_email_activity_user_counts_with_period_request_builder.py index 82ec16243e8..e525864480b 100644 --- a/msgraph/generated/reports/get_email_activity_user_counts_with_period/get_email_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_activity_user_counts_with_period/get_email_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailActi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_email_activity_user_detail_with_date/get_email_activity_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_email_activity_user_detail_with_date/get_email_activity_user_detail_with_date_request_builder.py index 87c7797c91f..73de5e16fbe 100644 --- a/msgraph/generated/reports/get_email_activity_user_detail_with_date/get_email_activity_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_email_activity_user_detail_with_date/get_email_activity_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getEmailActivityUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetEmailActivityUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailActi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailActivityUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_email_activity_user_detail_with_period/get_email_activity_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_email_activity_user_detail_with_period/get_email_activity_user_detail_with_period_request_builder.py index 00dccb1ce1d..6d351880ce8 100644 --- a/msgraph/generated/reports/get_email_activity_user_detail_with_period/get_email_activity_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_activity_user_detail_with_period/get_email_activity_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailActivityUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailActivityUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailActi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailActivityUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_email_app_usage_apps_user_counts_with_period/get_email_app_usage_apps_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_email_app_usage_apps_user_counts_with_period/get_email_app_usage_apps_user_counts_with_period_request_builder.py index c0f48324fce..5bf951ffc52 100644 --- a/msgraph/generated/reports/get_email_app_usage_apps_user_counts_with_period/get_email_app_usage_apps_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_app_usage_apps_user_counts_with_period/get_email_app_usage_apps_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailAppUsageAppsUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailAppUsageAppsUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailAppU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailAppUsageAppsUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_email_app_usage_user_counts_with_period/get_email_app_usage_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_email_app_usage_user_counts_with_period/get_email_app_usage_user_counts_with_period_request_builder.py index 2875b701556..dffe864fe2b 100644 --- a/msgraph/generated/reports/get_email_app_usage_user_counts_with_period/get_email_app_usage_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_app_usage_user_counts_with_period/get_email_app_usage_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailAppUsageUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailAppUsageUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailAppU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailAppUsageUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_email_app_usage_user_detail_with_date/get_email_app_usage_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_email_app_usage_user_detail_with_date/get_email_app_usage_user_detail_with_date_request_builder.py index f5bc62ee1ca..2b80e584f09 100644 --- a/msgraph/generated/reports/get_email_app_usage_user_detail_with_date/get_email_app_usage_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_email_app_usage_user_detail_with_date/get_email_app_usage_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getEmailAppUsageUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetEmailAppUsageUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailAppU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailAppUsageUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_email_app_usage_user_detail_with_period/get_email_app_usage_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_email_app_usage_user_detail_with_period/get_email_app_usage_user_detail_with_period_request_builder.py index 525929fb3e0..659403ea2c9 100644 --- a/msgraph/generated/reports/get_email_app_usage_user_detail_with_period/get_email_app_usage_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_app_usage_user_detail_with_period/get_email_app_usage_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailAppUsageUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailAppUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailAppU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailAppUsageUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_email_app_usage_versions_user_counts_with_period/get_email_app_usage_versions_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_email_app_usage_versions_user_counts_with_period/get_email_app_usage_versions_user_counts_with_period_request_builder.py index c08065cca00..4484468e736 100644 --- a/msgraph/generated/reports/get_email_app_usage_versions_user_counts_with_period/get_email_app_usage_versions_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_email_app_usage_versions_user_counts_with_period/get_email_app_usage_versions_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getEmailAppUsageVersionsUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetEmailAppUsageVersionsUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetEmailAppU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetEmailAppUsageVersionsUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_response.py b/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_get_response.py similarity index 93% rename from msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_response.py rename to msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_get_response.py index 5e10d19c430..f9563a972b2 100644 --- a/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_response.py +++ b/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse(BaseCollectionPaginationCountResponse): +class GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ArchivedPrintJob]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse + Returns: GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse() + return GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_request_builder.py index 58909f2e814..dbac1467bf0 100644 --- a/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/reports/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time/get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_response import GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse + from .get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_get_response import GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse class GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilder(BaseRequestBuilder): """ @@ -28,13 +28,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['group_id'] = str(group_id) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/reports/getGroupArchivedPrintJobs(groupId='{groupId}',startDateTime={startDateTime},endDateTime={endDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse]: + async def get(self,request_configuration: Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse]: """ Invoke function getGroupArchivedPrintJobs param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse] + Returns: Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -47,9 +51,9 @@ async def get(self,request_configuration: Optional[GetGroupArchivedPrintJobsWith } if not self.request_adapter: raise Exception("Http core is null") - from .get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_response import GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse + from .get_group_archived_print_jobs_with_group_id_with_start_date_time_with_end_date_time_get_response import GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse - return await self.request_adapter.send_async(request_info, GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -58,14 +62,14 @@ def to_get_request_information(self,request_configuration: Optional[GetGroupArch Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/reports/get_m365_app_platform_user_counts_with_period/get_m365_app_platform_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_m365_app_platform_user_counts_with_period/get_m365_app_platform_user_counts_with_period_request_builder.py index 0ecb1447cfe..145bdb54dc9 100644 --- a/msgraph/generated/reports/get_m365_app_platform_user_counts_with_period/get_m365_app_platform_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_m365_app_platform_user_counts_with_period/get_m365_app_platform_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getM365AppPlatformUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetM365AppPlatformUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetM365AppPl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetM365AppPlatformUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_m365_app_user_counts_with_period/get_m365_app_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_m365_app_user_counts_with_period/get_m365_app_user_counts_with_period_request_builder.py index e17ae8aec87..995f64b1767 100644 --- a/msgraph/generated/reports/get_m365_app_user_counts_with_period/get_m365_app_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_m365_app_user_counts_with_period/get_m365_app_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getM365AppUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetM365AppUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetM365AppUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetM365AppUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_m365_app_user_detail_with_date/get_m365_app_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_m365_app_user_detail_with_date/get_m365_app_user_detail_with_date_request_builder.py index ca115c1ebb7..10cb69e5c31 100644 --- a/msgraph/generated/reports/get_m365_app_user_detail_with_date/get_m365_app_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_m365_app_user_detail_with_date/get_m365_app_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getM365AppUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetM365AppUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetM365AppUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetM365AppUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_m365_app_user_detail_with_period/get_m365_app_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_m365_app_user_detail_with_period/get_m365_app_user_detail_with_period_request_builder.py index fd0ca57da40..69c17f33076 100644 --- a/msgraph/generated/reports/get_m365_app_user_detail_with_period/get_m365_app_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_m365_app_user_detail_with_period/get_m365_app_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getM365AppUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetM365AppUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetM365AppUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetM365AppUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_mailbox_usage_detail_with_period/get_mailbox_usage_detail_with_period_request_builder.py b/msgraph/generated/reports/get_mailbox_usage_detail_with_period/get_mailbox_usage_detail_with_period_request_builder.py index 3ff9fd76beb..a134c5c5213 100644 --- a/msgraph/generated/reports/get_mailbox_usage_detail_with_period/get_mailbox_usage_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_mailbox_usage_detail_with_period/get_mailbox_usage_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getMailboxUsageDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetMailboxUsageDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetMailboxUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetMailboxUsageDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_mailbox_usage_mailbox_counts_with_period/get_mailbox_usage_mailbox_counts_with_period_request_builder.py b/msgraph/generated/reports/get_mailbox_usage_mailbox_counts_with_period/get_mailbox_usage_mailbox_counts_with_period_request_builder.py index 60e2ccb8544..6b5fd55e611 100644 --- a/msgraph/generated/reports/get_mailbox_usage_mailbox_counts_with_period/get_mailbox_usage_mailbox_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_mailbox_usage_mailbox_counts_with_period/get_mailbox_usage_mailbox_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getMailboxUsageMailboxCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetMailboxUsageMailboxCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetMailboxUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetMailboxUsageMailboxCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_mailbox_usage_quota_status_mailbox_counts_with_period/get_mailbox_usage_quota_status_mailbox_counts_with_period_request_builder.py b/msgraph/generated/reports/get_mailbox_usage_quota_status_mailbox_counts_with_period/get_mailbox_usage_quota_status_mailbox_counts_with_period_request_builder.py index 285e90c976f..27d352b9031 100644 --- a/msgraph/generated/reports/get_mailbox_usage_quota_status_mailbox_counts_with_period/get_mailbox_usage_quota_status_mailbox_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_mailbox_usage_quota_status_mailbox_counts_with_period/get_mailbox_usage_quota_status_mailbox_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getMailboxUsageQuotaStatusMailboxCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetMailboxUsageQuotaStatusMailboxCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetMailboxUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetMailboxUsageQuotaStatusMailboxCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_mailbox_usage_storage_with_period/get_mailbox_usage_storage_with_period_request_builder.py b/msgraph/generated/reports/get_mailbox_usage_storage_with_period/get_mailbox_usage_storage_with_period_request_builder.py index dfe840c03c7..d01cf43679e 100644 --- a/msgraph/generated/reports/get_mailbox_usage_storage_with_period/get_mailbox_usage_storage_with_period_request_builder.py +++ b/msgraph/generated/reports/get_mailbox_usage_storage_with_period/get_mailbox_usage_storage_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getMailboxUsageStorage(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetMailboxUsageStorageWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetMailboxUs Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetMailboxUsageStorageWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_activation_counts/get_office365_activation_counts_request_builder.py b/msgraph/generated/reports/get_office365_activation_counts/get_office365_activation_counts_request_builder.py index 10e8ac907a7..d50a1ab2e60 100644 --- a/msgraph/generated/reports/get_office365_activation_counts/get_office365_activation_counts_request_builder.py +++ b/msgraph/generated/reports/get_office365_activation_counts/get_office365_activation_counts_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ActivationCountsRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_activations_user_counts/get_office365_activations_user_counts_request_builder.py b/msgraph/generated/reports/get_office365_activations_user_counts/get_office365_activations_user_counts_request_builder.py index 4ff9530f5d4..06d52592c69 100644 --- a/msgraph/generated/reports/get_office365_activations_user_counts/get_office365_activations_user_counts_request_builder.py +++ b/msgraph/generated/reports/get_office365_activations_user_counts/get_office365_activations_user_counts_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ActivationsUserCountsRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_activations_user_detail/get_office365_activations_user_detail_request_builder.py b/msgraph/generated/reports/get_office365_activations_user_detail/get_office365_activations_user_detail_request_builder.py index 5f3686ff65b..1b444bf0adf 100644 --- a/msgraph/generated/reports/get_office365_activations_user_detail/get_office365_activations_user_detail_request_builder.py +++ b/msgraph/generated/reports/get_office365_activations_user_detail/get_office365_activations_user_detail_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ActivationsUserDetailRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_active_user_counts_with_period/get_office365_active_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_office365_active_user_counts_with_period/get_office365_active_user_counts_with_period_request_builder.py index 94c28774da8..e477860921f 100644 --- a/msgraph/generated/reports/get_office365_active_user_counts_with_period/get_office365_active_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_active_user_counts_with_period/get_office365_active_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365ActiveUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365ActiveUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ActiveUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_active_user_detail_with_date/get_office365_active_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_office365_active_user_detail_with_date/get_office365_active_user_detail_with_date_request_builder.py index c96056eeab9..1aea3aa9f6f 100644 --- a/msgraph/generated/reports/get_office365_active_user_detail_with_date/get_office365_active_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_office365_active_user_detail_with_date/get_office365_active_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365ActiveUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetOffice365ActiveUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ActiveUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_active_user_detail_with_period/get_office365_active_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_office365_active_user_detail_with_period/get_office365_active_user_detail_with_period_request_builder.py index 34e422a1d45..b7a4b183d6a 100644 --- a/msgraph/generated/reports/get_office365_active_user_detail_with_period/get_office365_active_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_active_user_detail_with_period/get_office365_active_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365ActiveUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365ActiveUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ActiveUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_groups_activity_counts_with_period/get_office365_groups_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_office365_groups_activity_counts_with_period/get_office365_groups_activity_counts_with_period_request_builder.py index 019749a048a..434c1aea87f 100644 --- a/msgraph/generated/reports/get_office365_groups_activity_counts_with_period/get_office365_groups_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_groups_activity_counts_with_period/get_office365_groups_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365GroupsActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365GroupsActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365GroupsActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_groups_activity_detail_with_date/get_office365_groups_activity_detail_with_date_request_builder.py b/msgraph/generated/reports/get_office365_groups_activity_detail_with_date/get_office365_groups_activity_detail_with_date_request_builder.py index 4c15b02dcdd..b22862ca499 100644 --- a/msgraph/generated/reports/get_office365_groups_activity_detail_with_date/get_office365_groups_activity_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_office365_groups_activity_detail_with_date/get_office365_groups_activity_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365GroupsActivityDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetOffice365GroupsActivityDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365GroupsActivityDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_groups_activity_detail_with_period/get_office365_groups_activity_detail_with_period_request_builder.py b/msgraph/generated/reports/get_office365_groups_activity_detail_with_period/get_office365_groups_activity_detail_with_period_request_builder.py index b71773303f0..3954bf31354 100644 --- a/msgraph/generated/reports/get_office365_groups_activity_detail_with_period/get_office365_groups_activity_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_groups_activity_detail_with_period/get_office365_groups_activity_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365GroupsActivityDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365GroupsActivityDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365GroupsActivityDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_groups_activity_file_counts_with_period/get_office365_groups_activity_file_counts_with_period_request_builder.py b/msgraph/generated/reports/get_office365_groups_activity_file_counts_with_period/get_office365_groups_activity_file_counts_with_period_request_builder.py index 7df7b72a97b..82365755ab0 100644 --- a/msgraph/generated/reports/get_office365_groups_activity_file_counts_with_period/get_office365_groups_activity_file_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_groups_activity_file_counts_with_period/get_office365_groups_activity_file_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365GroupsActivityFileCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365GroupsActivityFileCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365GroupsActivityFileCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_groups_activity_group_counts_with_period/get_office365_groups_activity_group_counts_with_period_request_builder.py b/msgraph/generated/reports/get_office365_groups_activity_group_counts_with_period/get_office365_groups_activity_group_counts_with_period_request_builder.py index 585a1e67310..8ee9cb8938c 100644 --- a/msgraph/generated/reports/get_office365_groups_activity_group_counts_with_period/get_office365_groups_activity_group_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_groups_activity_group_counts_with_period/get_office365_groups_activity_group_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365GroupsActivityGroupCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365GroupsActivityGroupCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365GroupsActivityGroupCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_groups_activity_storage_with_period/get_office365_groups_activity_storage_with_period_request_builder.py b/msgraph/generated/reports/get_office365_groups_activity_storage_with_period/get_office365_groups_activity_storage_with_period_request_builder.py index b0be298e7a8..a2574a100b6 100644 --- a/msgraph/generated/reports/get_office365_groups_activity_storage_with_period/get_office365_groups_activity_storage_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_groups_activity_storage_with_period/get_office365_groups_activity_storage_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365GroupsActivityStorage(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365GroupsActivityStorageWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365GroupsActivityStorageWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_office365_services_user_counts_with_period/get_office365_services_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_office365_services_user_counts_with_period/get_office365_services_user_counts_with_period_request_builder.py index 85dc473bfe0..2a873c92581 100644 --- a/msgraph/generated/reports/get_office365_services_user_counts_with_period/get_office365_services_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_office365_services_user_counts_with_period/get_office365_services_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOffice365ServicesUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOffice365ServicesUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOffice365 Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOffice365ServicesUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_activity_file_counts_with_period/get_one_drive_activity_file_counts_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_activity_file_counts_with_period/get_one_drive_activity_file_counts_with_period_request_builder.py index 88d50dcf1ad..45793b9f8bb 100644 --- a/msgraph/generated/reports/get_one_drive_activity_file_counts_with_period/get_one_drive_activity_file_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_activity_file_counts_with_period/get_one_drive_activity_file_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveActivityFileCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveActivityFileCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveActivityFileCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_activity_user_counts_with_period/get_one_drive_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_activity_user_counts_with_period/get_one_drive_activity_user_counts_with_period_request_builder.py index 565330c0fdf..9b9def87cbe 100644 --- a/msgraph/generated/reports/get_one_drive_activity_user_counts_with_period/get_one_drive_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_activity_user_counts_with_period/get_one_drive_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_activity_user_detail_with_date/get_one_drive_activity_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_one_drive_activity_user_detail_with_date/get_one_drive_activity_user_detail_with_date_request_builder.py index bfe21780e9f..12986c5b96f 100644 --- a/msgraph/generated/reports/get_one_drive_activity_user_detail_with_date/get_one_drive_activity_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_activity_user_detail_with_date/get_one_drive_activity_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveActivityUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveActivityUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveActivityUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_activity_user_detail_with_period/get_one_drive_activity_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_activity_user_detail_with_period/get_one_drive_activity_user_detail_with_period_request_builder.py index 9670c40d30c..fc1fe5dfe63 100644 --- a/msgraph/generated/reports/get_one_drive_activity_user_detail_with_period/get_one_drive_activity_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_activity_user_detail_with_period/get_one_drive_activity_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveActivityUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveActivityUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveA Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveActivityUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_usage_account_counts_with_period/get_one_drive_usage_account_counts_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_usage_account_counts_with_period/get_one_drive_usage_account_counts_with_period_request_builder.py index 884092a3f48..36ba3a510ba 100644 --- a/msgraph/generated/reports/get_one_drive_usage_account_counts_with_period/get_one_drive_usage_account_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_usage_account_counts_with_period/get_one_drive_usage_account_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveUsageAccountCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveUsageAccountCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveUsageAccountCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_usage_account_detail_with_date/get_one_drive_usage_account_detail_with_date_request_builder.py b/msgraph/generated/reports/get_one_drive_usage_account_detail_with_date/get_one_drive_usage_account_detail_with_date_request_builder.py index 841f5190dc7..d4c25e9c482 100644 --- a/msgraph/generated/reports/get_one_drive_usage_account_detail_with_date/get_one_drive_usage_account_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_usage_account_detail_with_date/get_one_drive_usage_account_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveUsageAccountDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveUsageAccountDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveUsageAccountDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_usage_account_detail_with_period/get_one_drive_usage_account_detail_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_usage_account_detail_with_period/get_one_drive_usage_account_detail_with_period_request_builder.py index 12700f8e602..0e887675e16 100644 --- a/msgraph/generated/reports/get_one_drive_usage_account_detail_with_period/get_one_drive_usage_account_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_usage_account_detail_with_period/get_one_drive_usage_account_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveUsageAccountDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveUsageAccountDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveUsageAccountDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_usage_file_counts_with_period/get_one_drive_usage_file_counts_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_usage_file_counts_with_period/get_one_drive_usage_file_counts_with_period_request_builder.py index f84dea91ef5..ca63f1fe252 100644 --- a/msgraph/generated/reports/get_one_drive_usage_file_counts_with_period/get_one_drive_usage_file_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_usage_file_counts_with_period/get_one_drive_usage_file_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveUsageFileCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveUsageFileCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveUsageFileCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_one_drive_usage_storage_with_period/get_one_drive_usage_storage_with_period_request_builder.py b/msgraph/generated/reports/get_one_drive_usage_storage_with_period/get_one_drive_usage_storage_with_period_request_builder.py index 515fac99099..cc414c4b8fa 100644 --- a/msgraph/generated/reports/get_one_drive_usage_storage_with_period/get_one_drive_usage_storage_with_period_request_builder.py +++ b/msgraph/generated/reports/get_one_drive_usage_storage_with_period/get_one_drive_usage_storage_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getOneDriveUsageStorage(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetOneDriveUsageStorageWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetOneDriveU Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetOneDriveUsageStorageWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_response.py b/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_get_response.py similarity index 93% rename from msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_response.py rename to msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_get_response.py index e022ceea6ea..cbcf05ff848 100644 --- a/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_response.py +++ b/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse(BaseCollectionPaginationCountResponse): +class GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ArchivedPrintJob]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse + Returns: GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse() + return GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_request_builder.py index 2a68e5adb09..b4fcc116e10 100644 --- a/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/reports/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time/get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_response import GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse + from .get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_get_response import GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse class GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilder(BaseRequestBuilder): """ @@ -28,13 +28,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime={startDateTime} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['printer_id'] = str(printer_id) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/reports/getPrinterArchivedPrintJobs(printerId='{printerId}',startDateTime={startDateTime},endDateTime={endDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse]: + async def get(self,request_configuration: Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse]: """ Invoke function getPrinterArchivedPrintJobs param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse] + Returns: Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -47,9 +51,9 @@ async def get(self,request_configuration: Optional[GetPrinterArchivedPrintJobsWi } if not self.request_adapter: raise Exception("Http core is null") - from .get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_response import GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse + from .get_printer_archived_print_jobs_with_printer_id_with_start_date_time_with_end_date_time_get_response import GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse - return await self.request_adapter.send_async(request_info, GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -58,14 +62,14 @@ def to_get_request_information(self,request_configuration: Optional[GetPrinterAr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_activity_file_counts_with_period/get_share_point_activity_file_counts_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_activity_file_counts_with_period/get_share_point_activity_file_counts_with_period_request_builder.py index 7a2a8c29d2d..0517f44a1a1 100644 --- a/msgraph/generated/reports/get_share_point_activity_file_counts_with_period/get_share_point_activity_file_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_activity_file_counts_with_period/get_share_point_activity_file_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointActivityFileCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointActivityFileCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointActivityFileCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_activity_pages_with_period/get_share_point_activity_pages_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_activity_pages_with_period/get_share_point_activity_pages_with_period_request_builder.py index 7290e848ace..727069c8864 100644 --- a/msgraph/generated/reports/get_share_point_activity_pages_with_period/get_share_point_activity_pages_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_activity_pages_with_period/get_share_point_activity_pages_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointActivityPages(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointActivityPagesWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointActivityPagesWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_activity_user_counts_with_period/get_share_point_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_activity_user_counts_with_period/get_share_point_activity_user_counts_with_period_request_builder.py index 47101ea5f03..f35c7352666 100644 --- a/msgraph/generated/reports/get_share_point_activity_user_counts_with_period/get_share_point_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_activity_user_counts_with_period/get_share_point_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_activity_user_detail_with_date/get_share_point_activity_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_share_point_activity_user_detail_with_date/get_share_point_activity_user_detail_with_date_request_builder.py index dd2da9e5001..03ad81df3bd 100644 --- a/msgraph/generated/reports/get_share_point_activity_user_detail_with_date/get_share_point_activity_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_share_point_activity_user_detail_with_date/get_share_point_activity_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointActivityUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetSharePointActivityUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointActivityUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_activity_user_detail_with_period/get_share_point_activity_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_activity_user_detail_with_period/get_share_point_activity_user_detail_with_period_request_builder.py index 26c561cbc63..289126ed65a 100644 --- a/msgraph/generated/reports/get_share_point_activity_user_detail_with_period/get_share_point_activity_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_activity_user_detail_with_period/get_share_point_activity_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointActivityUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointActivityUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointActivityUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_site_usage_detail_with_date/get_share_point_site_usage_detail_with_date_request_builder.py b/msgraph/generated/reports/get_share_point_site_usage_detail_with_date/get_share_point_site_usage_detail_with_date_request_builder.py index dc8cb234b90..6e7432899e3 100644 --- a/msgraph/generated/reports/get_share_point_site_usage_detail_with_date/get_share_point_site_usage_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_share_point_site_usage_detail_with_date/get_share_point_site_usage_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointSiteUsageDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetSharePointSiteUsageDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointSiteUsageDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_site_usage_detail_with_period/get_share_point_site_usage_detail_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_site_usage_detail_with_period/get_share_point_site_usage_detail_with_period_request_builder.py index 624ac4a92ed..bc243e56688 100644 --- a/msgraph/generated/reports/get_share_point_site_usage_detail_with_period/get_share_point_site_usage_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_site_usage_detail_with_period/get_share_point_site_usage_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointSiteUsageDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointSiteUsageDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointSiteUsageDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_site_usage_file_counts_with_period/get_share_point_site_usage_file_counts_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_site_usage_file_counts_with_period/get_share_point_site_usage_file_counts_with_period_request_builder.py index 6e0815f269e..efce068a4e7 100644 --- a/msgraph/generated/reports/get_share_point_site_usage_file_counts_with_period/get_share_point_site_usage_file_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_site_usage_file_counts_with_period/get_share_point_site_usage_file_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointSiteUsageFileCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointSiteUsageFileCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointSiteUsageFileCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_site_usage_pages_with_period/get_share_point_site_usage_pages_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_site_usage_pages_with_period/get_share_point_site_usage_pages_with_period_request_builder.py index e185720b6a8..a91b94a447f 100644 --- a/msgraph/generated/reports/get_share_point_site_usage_pages_with_period/get_share_point_site_usage_pages_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_site_usage_pages_with_period/get_share_point_site_usage_pages_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointSiteUsagePages(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointSiteUsagePagesWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointSiteUsagePagesWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_site_usage_site_counts_with_period/get_share_point_site_usage_site_counts_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_site_usage_site_counts_with_period/get_share_point_site_usage_site_counts_with_period_request_builder.py index bba833731cf..e2a7a72f703 100644 --- a/msgraph/generated/reports/get_share_point_site_usage_site_counts_with_period/get_share_point_site_usage_site_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_site_usage_site_counts_with_period/get_share_point_site_usage_site_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointSiteUsageSiteCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointSiteUsageSiteCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointSiteUsageSiteCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_share_point_site_usage_storage_with_period/get_share_point_site_usage_storage_with_period_request_builder.py b/msgraph/generated/reports/get_share_point_site_usage_storage_with_period/get_share_point_site_usage_storage_with_period_request_builder.py index c729a790dff..7d2ab8d2d44 100644 --- a/msgraph/generated/reports/get_share_point_site_usage_storage_with_period/get_share_point_site_usage_storage_with_period_request_builder.py +++ b/msgraph/generated/reports/get_share_point_site_usage_storage_with_period/get_share_point_site_usage_storage_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSharePointSiteUsageStorage(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSharePointSiteUsageStorageWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSharePoin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSharePointSiteUsageStorageWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_activity_counts_with_period/get_skype_for_business_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_activity_counts_with_period/get_skype_for_business_activity_counts_with_period_request_builder.py index 11b73c227d3..587f4e6bfc9 100644 --- a/msgraph/generated/reports/get_skype_for_business_activity_counts_with_period/get_skype_for_business_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_activity_counts_with_period/get_skype_for_business_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_activity_user_counts_with_period/get_skype_for_business_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_activity_user_counts_with_period/get_skype_for_business_activity_user_counts_with_period_request_builder.py index e1832c7a231..002525b858b 100644 --- a/msgraph/generated/reports/get_skype_for_business_activity_user_counts_with_period/get_skype_for_business_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_activity_user_counts_with_period/get_skype_for_business_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_date/get_skype_for_business_activity_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_date/get_skype_for_business_activity_user_detail_with_date_request_builder.py index 5ecaed496e8..32f141caf58 100644 --- a/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_date/get_skype_for_business_activity_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_date/get_skype_for_business_activity_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessActivityUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessActivityUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessActivityUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_period/get_skype_for_business_activity_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_period/get_skype_for_business_activity_user_detail_with_period_request_builder.py index adbca599705..136da126817 100644 --- a/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_period/get_skype_for_business_activity_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_activity_user_detail_with_period/get_skype_for_business_activity_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessActivityUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessActivityUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessActivityUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_device_usage_distribution_user_counts_with_period/get_skype_for_business_device_usage_distribution_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_device_usage_distribution_user_counts_with_period/get_skype_for_business_device_usage_distribution_user_counts_with_period_request_builder.py index 85d77b75ef8..4a8fff3fd47 100644 --- a/msgraph/generated/reports/get_skype_for_business_device_usage_distribution_user_counts_with_period/get_skype_for_business_device_usage_distribution_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_device_usage_distribution_user_counts_with_period/get_skype_for_business_device_usage_distribution_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessDeviceUsageDistributionUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessDeviceUsageDistributionUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessDeviceUsageDistributionUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_device_usage_user_counts_with_period/get_skype_for_business_device_usage_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_device_usage_user_counts_with_period/get_skype_for_business_device_usage_user_counts_with_period_request_builder.py index 8f1c6d105f6..a4e2bfa29f5 100644 --- a/msgraph/generated/reports/get_skype_for_business_device_usage_user_counts_with_period/get_skype_for_business_device_usage_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_device_usage_user_counts_with_period/get_skype_for_business_device_usage_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessDeviceUsageUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessDeviceUsageUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessDeviceUsageUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_date/get_skype_for_business_device_usage_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_date/get_skype_for_business_device_usage_user_detail_with_date_request_builder.py index 0d69dd21b62..fdc09b7f303 100644 --- a/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_date/get_skype_for_business_device_usage_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_date/get_skype_for_business_device_usage_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessDeviceUsageUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessDeviceUsageUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessDeviceUsageUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_period/get_skype_for_business_device_usage_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_period/get_skype_for_business_device_usage_user_detail_with_period_request_builder.py index 9e702e599e2..8f22857e741 100644 --- a/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_period/get_skype_for_business_device_usage_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_device_usage_user_detail_with_period/get_skype_for_business_device_usage_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessDeviceUsageUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessDeviceUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessDeviceUsageUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_organizer_activity_counts_with_period/get_skype_for_business_organizer_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_organizer_activity_counts_with_period/get_skype_for_business_organizer_activity_counts_with_period_request_builder.py index 7c36835bb04..a1f8009fab9 100644 --- a/msgraph/generated/reports/get_skype_for_business_organizer_activity_counts_with_period/get_skype_for_business_organizer_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_organizer_activity_counts_with_period/get_skype_for_business_organizer_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessOrganizerActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessOrganizerActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessOrganizerActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_organizer_activity_minute_counts_with_period/get_skype_for_business_organizer_activity_minute_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_organizer_activity_minute_counts_with_period/get_skype_for_business_organizer_activity_minute_counts_with_period_request_builder.py index d56aa825281..00144f1ef03 100644 --- a/msgraph/generated/reports/get_skype_for_business_organizer_activity_minute_counts_with_period/get_skype_for_business_organizer_activity_minute_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_organizer_activity_minute_counts_with_period/get_skype_for_business_organizer_activity_minute_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessOrganizerActivityMinuteCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessOrganizerActivityMinuteCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessOrganizerActivityMinuteCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_organizer_activity_user_counts_with_period/get_skype_for_business_organizer_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_organizer_activity_user_counts_with_period/get_skype_for_business_organizer_activity_user_counts_with_period_request_builder.py index b8e59257108..4c0f692fa21 100644 --- a/msgraph/generated/reports/get_skype_for_business_organizer_activity_user_counts_with_period/get_skype_for_business_organizer_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_organizer_activity_user_counts_with_period/get_skype_for_business_organizer_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessOrganizerActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessOrganizerActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessOrganizerActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_participant_activity_counts_with_period/get_skype_for_business_participant_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_participant_activity_counts_with_period/get_skype_for_business_participant_activity_counts_with_period_request_builder.py index d08f65d43d8..b36acbb0838 100644 --- a/msgraph/generated/reports/get_skype_for_business_participant_activity_counts_with_period/get_skype_for_business_participant_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_participant_activity_counts_with_period/get_skype_for_business_participant_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessParticipantActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessParticipantActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessParticipantActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_participant_activity_minute_counts_with_period/get_skype_for_business_participant_activity_minute_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_participant_activity_minute_counts_with_period/get_skype_for_business_participant_activity_minute_counts_with_period_request_builder.py index 0a4d3998092..1b2ac745cc1 100644 --- a/msgraph/generated/reports/get_skype_for_business_participant_activity_minute_counts_with_period/get_skype_for_business_participant_activity_minute_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_participant_activity_minute_counts_with_period/get_skype_for_business_participant_activity_minute_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessParticipantActivityMinuteCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessParticipantActivityMinuteCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessParticipantActivityMinuteCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_participant_activity_user_counts_with_period/get_skype_for_business_participant_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_participant_activity_user_counts_with_period/get_skype_for_business_participant_activity_user_counts_with_period_request_builder.py index 1344bffac72..b936058da44 100644 --- a/msgraph/generated/reports/get_skype_for_business_participant_activity_user_counts_with_period/get_skype_for_business_participant_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_participant_activity_user_counts_with_period/get_skype_for_business_participant_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessParticipantActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessParticipantActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessParticipantActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_counts_with_period/get_skype_for_business_peer_to_peer_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_counts_with_period/get_skype_for_business_peer_to_peer_activity_counts_with_period_request_builder.py index 5b179e5001a..cc3126d55ce 100644 --- a/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_counts_with_period/get_skype_for_business_peer_to_peer_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_counts_with_period/get_skype_for_business_peer_to_peer_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessPeerToPeerActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessPeerToPeerActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessPeerToPeerActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period_request_builder.py index 3572136792c..f96bfe66cc0 100644 --- a/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period/get_skype_for_business_peer_to_peer_activity_minute_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessPeerToPeerActivityMinuteCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessPeerToPeerActivityMinuteCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessPeerToPeerActivityMinuteCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_user_counts_with_period/get_skype_for_business_peer_to_peer_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_user_counts_with_period/get_skype_for_business_peer_to_peer_activity_user_counts_with_period_request_builder.py index 352084645f5..24cf83b4736 100644 --- a/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_user_counts_with_period/get_skype_for_business_peer_to_peer_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_skype_for_business_peer_to_peer_activity_user_counts_with_period/get_skype_for_business_peer_to_peer_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getSkypeForBusinessPeerToPeerActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetSkypeForBusinessPeerToPeerActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetSkypeForB Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetSkypeForBusinessPeerToPeerActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_device_usage_distribution_user_counts_with_period/get_teams_device_usage_distribution_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_device_usage_distribution_user_counts_with_period/get_teams_device_usage_distribution_user_counts_with_period_request_builder.py index 12829a7d96d..737fb6fb1d8 100644 --- a/msgraph/generated/reports/get_teams_device_usage_distribution_user_counts_with_period/get_teams_device_usage_distribution_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_device_usage_distribution_user_counts_with_period/get_teams_device_usage_distribution_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsDeviceUsageDistributionUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsDeviceUsageDistributionUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsDevi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsDeviceUsageDistributionUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_device_usage_user_counts_with_period/get_teams_device_usage_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_device_usage_user_counts_with_period/get_teams_device_usage_user_counts_with_period_request_builder.py index fb95866318b..2852723d8ce 100644 --- a/msgraph/generated/reports/get_teams_device_usage_user_counts_with_period/get_teams_device_usage_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_device_usage_user_counts_with_period/get_teams_device_usage_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsDeviceUsageUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsDeviceUsageUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsDevi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsDeviceUsageUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_device_usage_user_detail_with_date/get_teams_device_usage_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_teams_device_usage_user_detail_with_date/get_teams_device_usage_user_detail_with_date_request_builder.py index 3b59a21d590..f2c161ccffd 100644 --- a/msgraph/generated/reports/get_teams_device_usage_user_detail_with_date/get_teams_device_usage_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_teams_device_usage_user_detail_with_date/get_teams_device_usage_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsDeviceUsageUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetTeamsDeviceUsageUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsDevi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsDeviceUsageUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_device_usage_user_detail_with_period/get_teams_device_usage_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_teams_device_usage_user_detail_with_period/get_teams_device_usage_user_detail_with_period_request_builder.py index 813504eb2a3..aff09bc6bc6 100644 --- a/msgraph/generated/reports/get_teams_device_usage_user_detail_with_period/get_teams_device_usage_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_device_usage_user_detail_with_period/get_teams_device_usage_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsDeviceUsageUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsDeviceUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsDevi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsDeviceUsageUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_team_activity_counts_with_period/get_teams_team_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_team_activity_counts_with_period/get_teams_team_activity_counts_with_period_request_builder.py index dc398f5af12..28f6f1fc5ae 100644 --- a/msgraph/generated/reports/get_teams_team_activity_counts_with_period/get_teams_team_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_team_activity_counts_with_period/get_teams_team_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsTeamActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsTeamActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsTeam Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsTeamActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_team_activity_detail_with_date/get_teams_team_activity_detail_with_date_request_builder.py b/msgraph/generated/reports/get_teams_team_activity_detail_with_date/get_teams_team_activity_detail_with_date_request_builder.py index 68c80589e32..1b8cdc820f8 100644 --- a/msgraph/generated/reports/get_teams_team_activity_detail_with_date/get_teams_team_activity_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_teams_team_activity_detail_with_date/get_teams_team_activity_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsTeamActivityDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetTeamsTeamActivityDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsTeam Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsTeamActivityDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_team_activity_detail_with_period/get_teams_team_activity_detail_with_period_request_builder.py b/msgraph/generated/reports/get_teams_team_activity_detail_with_period/get_teams_team_activity_detail_with_period_request_builder.py index e7ae64f3afb..a42249153c6 100644 --- a/msgraph/generated/reports/get_teams_team_activity_detail_with_period/get_teams_team_activity_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_team_activity_detail_with_period/get_teams_team_activity_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsTeamActivityDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsTeamActivityDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsTeam Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsTeamActivityDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_team_activity_distribution_counts_with_period/get_teams_team_activity_distribution_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_team_activity_distribution_counts_with_period/get_teams_team_activity_distribution_counts_with_period_request_builder.py index b044b281ef7..a197636a21b 100644 --- a/msgraph/generated/reports/get_teams_team_activity_distribution_counts_with_period/get_teams_team_activity_distribution_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_team_activity_distribution_counts_with_period/get_teams_team_activity_distribution_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsTeamActivityDistributionCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsTeamActivityDistributionCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsTeam Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsTeamActivityDistributionCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_team_counts_with_period/get_teams_team_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_team_counts_with_period/get_teams_team_counts_with_period_request_builder.py index 8753f087a6c..b887f269404 100644 --- a/msgraph/generated/reports/get_teams_team_counts_with_period/get_teams_team_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_team_counts_with_period/get_teams_team_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsTeamCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsTeamCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsTeam Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsTeamCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_user_activity_counts_with_period/get_teams_user_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_user_activity_counts_with_period/get_teams_user_activity_counts_with_period_request_builder.py index 33ceb07813f..f777ed8921f 100644 --- a/msgraph/generated/reports/get_teams_user_activity_counts_with_period/get_teams_user_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_user_activity_counts_with_period/get_teams_user_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsUserActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsUserActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsUser Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsUserActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_user_activity_user_counts_with_period/get_teams_user_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_teams_user_activity_user_counts_with_period/get_teams_user_activity_user_counts_with_period_request_builder.py index 2cc373d37c6..7201c2a96c0 100644 --- a/msgraph/generated/reports/get_teams_user_activity_user_counts_with_period/get_teams_user_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_user_activity_user_counts_with_period/get_teams_user_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsUserActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsUserActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsUser Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsUserActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_user_activity_user_detail_with_date/get_teams_user_activity_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_teams_user_activity_user_detail_with_date/get_teams_user_activity_user_detail_with_date_request_builder.py index c3ac1348d7c..b390467139b 100644 --- a/msgraph/generated/reports/get_teams_user_activity_user_detail_with_date/get_teams_user_activity_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_teams_user_activity_user_detail_with_date/get_teams_user_activity_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsUserActivityUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetTeamsUserActivityUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsUser Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsUserActivityUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_teams_user_activity_user_detail_with_period/get_teams_user_activity_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_teams_user_activity_user_detail_with_period/get_teams_user_activity_user_detail_with_period_request_builder.py index af94089da8b..ef106edc999 100644 --- a/msgraph/generated/reports/get_teams_user_activity_user_detail_with_period/get_teams_user_activity_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_teams_user_activity_user_detail_with_period/get_teams_user_activity_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getTeamsUserActivityUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetTeamsUserActivityUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetTeamsUser Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetTeamsUserActivityUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_response.py b/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_get_response.py similarity index 94% rename from msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_response.py rename to msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_get_response.py index f8a17d68f6e..61cbf6abcdb 100644 --- a/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_response.py +++ b/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse(BaseCollectionPaginationCountResponse): +class GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ArchivedPrintJob]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse + Returns: GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse() + return GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_request_builder.py index 84787da9eb7..11486560cb7 100644 --- a/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/reports/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time/get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_response import GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse + from .get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_get_response import GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse class GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilder(BaseRequestBuilder): """ @@ -28,13 +28,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param user_id: Usage: userId='{userId}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) + path_parameters['user_id'] = str(user_id) super().__init__(request_adapter, "{+baseurl}/reports/getUserArchivedPrintJobs(userId='{userId}',startDateTime={startDateTime},endDateTime={endDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse]: + async def get(self,request_configuration: Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse]: """ Invoke function getUserArchivedPrintJobs param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse] + Returns: Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -47,9 +51,9 @@ async def get(self,request_configuration: Optional[GetUserArchivedPrintJobsWithU } if not self.request_adapter: raise Exception("Http core is null") - from .get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_response import GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse + from .get_user_archived_print_jobs_with_user_id_with_start_date_time_with_end_date_time_get_response import GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse - return await self.request_adapter.send_async(request_info, GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -58,14 +62,14 @@ def to_get_request_information(self,request_configuration: Optional[GetUserArchi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_activity_counts_with_period/get_yammer_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_activity_counts_with_period/get_yammer_activity_counts_with_period_request_builder.py index 5182440f2e8..63964692c3c 100644 --- a/msgraph/generated/reports/get_yammer_activity_counts_with_period/get_yammer_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_activity_counts_with_period/get_yammer_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerAct Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_activity_user_counts_with_period/get_yammer_activity_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_activity_user_counts_with_period/get_yammer_activity_user_counts_with_period_request_builder.py index 2eb0af958f2..13313b288b8 100644 --- a/msgraph/generated/reports/get_yammer_activity_user_counts_with_period/get_yammer_activity_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_activity_user_counts_with_period/get_yammer_activity_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerActivityUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerActivityUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerAct Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerActivityUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_activity_user_detail_with_date/get_yammer_activity_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_yammer_activity_user_detail_with_date/get_yammer_activity_user_detail_with_date_request_builder.py index 4e13323c254..f8587c3614b 100644 --- a/msgraph/generated/reports/get_yammer_activity_user_detail_with_date/get_yammer_activity_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_yammer_activity_user_detail_with_date/get_yammer_activity_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getYammerActivityUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetYammerActivityUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerAct Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerActivityUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_activity_user_detail_with_period/get_yammer_activity_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_activity_user_detail_with_period/get_yammer_activity_user_detail_with_period_request_builder.py index f0784d71de1..7db70843462 100644 --- a/msgraph/generated/reports/get_yammer_activity_user_detail_with_period/get_yammer_activity_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_activity_user_detail_with_period/get_yammer_activity_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerActivityUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerActivityUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerAct Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerActivityUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_device_usage_distribution_user_counts_with_period/get_yammer_device_usage_distribution_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_device_usage_distribution_user_counts_with_period/get_yammer_device_usage_distribution_user_counts_with_period_request_builder.py index 461d308bc55..fe4296e92a8 100644 --- a/msgraph/generated/reports/get_yammer_device_usage_distribution_user_counts_with_period/get_yammer_device_usage_distribution_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_device_usage_distribution_user_counts_with_period/get_yammer_device_usage_distribution_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerDeviceUsageDistributionUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerDeviceUsageDistributionUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerDev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerDeviceUsageDistributionUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_device_usage_user_counts_with_period/get_yammer_device_usage_user_counts_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_device_usage_user_counts_with_period/get_yammer_device_usage_user_counts_with_period_request_builder.py index 2e3172c9678..8c434f3bf81 100644 --- a/msgraph/generated/reports/get_yammer_device_usage_user_counts_with_period/get_yammer_device_usage_user_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_device_usage_user_counts_with_period/get_yammer_device_usage_user_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerDeviceUsageUserCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerDeviceUsageUserCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerDev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerDeviceUsageUserCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_date/get_yammer_device_usage_user_detail_with_date_request_builder.py b/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_date/get_yammer_device_usage_user_detail_with_date_request_builder.py index 9e75c0c0e96..8af62ca2f56 100644 --- a/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_date/get_yammer_device_usage_user_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_date/get_yammer_device_usage_user_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getYammerDeviceUsageUserDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetYammerDeviceUsageUserDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerDev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerDeviceUsageUserDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_period/get_yammer_device_usage_user_detail_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_period/get_yammer_device_usage_user_detail_with_period_request_builder.py index ef13c30eaac..ee2948456e9 100644 --- a/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_period/get_yammer_device_usage_user_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_device_usage_user_detail_with_period/get_yammer_device_usage_user_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerDeviceUsageUserDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerDeviceUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerDev Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerDeviceUsageUserDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_groups_activity_counts_with_period/get_yammer_groups_activity_counts_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_groups_activity_counts_with_period/get_yammer_groups_activity_counts_with_period_request_builder.py index e58f173f002..93c053dc3e1 100644 --- a/msgraph/generated/reports/get_yammer_groups_activity_counts_with_period/get_yammer_groups_activity_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_groups_activity_counts_with_period/get_yammer_groups_activity_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerGroupsActivityCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerGroupsActivityCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerGroupsActivityCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_groups_activity_detail_with_date/get_yammer_groups_activity_detail_with_date_request_builder.py b/msgraph/generated/reports/get_yammer_groups_activity_detail_with_date/get_yammer_groups_activity_detail_with_date_request_builder.py index 47c6fb824ee..7a98bc6d42e 100644 --- a/msgraph/generated/reports/get_yammer_groups_activity_detail_with_date/get_yammer_groups_activity_detail_with_date_request_builder.py +++ b/msgraph/generated/reports/get_yammer_groups_activity_detail_with_date/get_yammer_groups_activity_detail_with_date_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['date'] = str(date) super().__init__(request_adapter, "{+baseurl}/reports/getYammerGroupsActivityDetail(date={date})", path_parameters) async def get(self,request_configuration: Optional[GetYammerGroupsActivityDetailWithDateRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -53,12 +55,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerGroupsActivityDetailWithDateRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_groups_activity_detail_with_period/get_yammer_groups_activity_detail_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_groups_activity_detail_with_period/get_yammer_groups_activity_detail_with_period_request_builder.py index d544e3c0673..51ab34d5705 100644 --- a/msgraph/generated/reports/get_yammer_groups_activity_detail_with_period/get_yammer_groups_activity_detail_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_groups_activity_detail_with_period/get_yammer_groups_activity_detail_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerGroupsActivityDetail(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerGroupsActivityDetailWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerGroupsActivityDetailWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/get_yammer_groups_activity_group_counts_with_period/get_yammer_groups_activity_group_counts_with_period_request_builder.py b/msgraph/generated/reports/get_yammer_groups_activity_group_counts_with_period/get_yammer_groups_activity_group_counts_with_period_request_builder.py index f133c1667de..bc5c4bcd833 100644 --- a/msgraph/generated/reports/get_yammer_groups_activity_group_counts_with_period/get_yammer_groups_activity_group_counts_with_period_request_builder.py +++ b/msgraph/generated/reports/get_yammer_groups_activity_group_counts_with_period/get_yammer_groups_activity_group_counts_with_period_request_builder.py @@ -24,6 +24,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/getYammerGroupsActivityGroupCounts(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[GetYammerGroupsActivityGroupCountsWithPeriodRequestBuilderGetRequestConfiguration] = None) -> bytes: @@ -52,12 +54,12 @@ def to_get_request_information(self,request_configuration: Optional[GetYammerGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetYammerGroupsActivityGroupCountsWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/managed_device_enrollment_failure_details/managed_device_enrollment_failure_details_request_builder.py b/msgraph/generated/reports/managed_device_enrollment_failure_details/managed_device_enrollment_failure_details_request_builder.py index 4e4798502b2..db887967ab6 100644 --- a/msgraph/generated/reports/managed_device_enrollment_failure_details/managed_device_enrollment_failure_details_request_builder.py +++ b/msgraph/generated/reports/managed_device_enrollment_failure_details/managed_device_enrollment_failure_details_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ManagedDeviceEnrollmentFailureDetailsRequestBuilder: diff --git a/msgraph/generated/reports/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token_request_builder.py b/msgraph/generated/reports/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token_request_builder.py index 446adde668d..cc41ba10166 100644 --- a/msgraph/generated/reports/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token_request_builder.py +++ b/msgraph/generated/reports/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token/managed_device_enrollment_failure_details_with_skip_with_top_with_filter_with_skip_token_request_builder.py @@ -28,6 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param top: Usage: top={top} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['filter'] = str(filter) + path_parameters['skip'] = str(skip) + path_parameters['skip_token'] = str(skip_token) + path_parameters['top'] = str(top) super().__init__(request_adapter, "{+baseurl}/reports/managedDeviceEnrollmentFailureDetails(skip={skip},top={top},filter='{filter}',skipToken='{skipToken}')", path_parameters) async def get(self,request_configuration: Optional[ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipTokenRequestBuilderGetRequestConfiguration] = None) -> Optional[Report]: @@ -58,13 +63,13 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipTokenRequestBuilder: diff --git a/msgraph/generated/reports/managed_device_enrollment_top_failures/managed_device_enrollment_top_failures_request_builder.py b/msgraph/generated/reports/managed_device_enrollment_top_failures/managed_device_enrollment_top_failures_request_builder.py index 619cec1abbf..46a90e22713 100644 --- a/msgraph/generated/reports/managed_device_enrollment_top_failures/managed_device_enrollment_top_failures_request_builder.py +++ b/msgraph/generated/reports/managed_device_enrollment_top_failures/managed_device_enrollment_top_failures_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ManagedDeviceEnrollmentTopFailuresRequestBuilder: diff --git a/msgraph/generated/reports/managed_device_enrollment_top_failures_with_period/managed_device_enrollment_top_failures_with_period_request_builder.py b/msgraph/generated/reports/managed_device_enrollment_top_failures_with_period/managed_device_enrollment_top_failures_with_period_request_builder.py index 9b97a5ebe3c..bb73d1c5f18 100644 --- a/msgraph/generated/reports/managed_device_enrollment_top_failures_with_period/managed_device_enrollment_top_failures_with_period_request_builder.py +++ b/msgraph/generated/reports/managed_device_enrollment_top_failures_with_period/managed_device_enrollment_top_failures_with_period_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['period'] = str(period) super().__init__(request_adapter, "{+baseurl}/reports/managedDeviceEnrollmentTopFailures(period='{period}')", path_parameters) async def get(self,request_configuration: Optional[ManagedDeviceEnrollmentTopFailuresWithPeriodRequestBuilderGetRequestConfiguration] = None) -> Optional[Report]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ManagedDeviceEnrollmentTopFailuresWithPeriodRequestBuilder: diff --git a/msgraph/generated/reports/monthly_print_usage_by_printer/count/count_request_builder.py b/msgraph/generated/reports/monthly_print_usage_by_printer/count/count_request_builder.py index 90e913d3686..6b4b2186008 100644 --- a/msgraph/generated/reports/monthly_print_usage_by_printer/count/count_request_builder.py +++ b/msgraph/generated/reports/monthly_print_usage_by_printer/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/reports/monthly_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py b/msgraph/generated/reports/monthly_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py index c02bb0a3645..70858a7c393 100644 --- a/msgraph/generated/reports/monthly_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py +++ b/msgraph/generated/reports/monthly_print_usage_by_printer/item/print_usage_by_printer_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintUsag Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintUsageByPrinterItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintUsageBy Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByPrinter] = None, request_configuration: Optional[PrintUsageByPrinterItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[PrintUsageByPrinter] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/reports/monthly_print_usage_by_printer/monthly_print_usage_by_printer_request_builder.py b/msgraph/generated/reports/monthly_print_usage_by_printer/monthly_print_usage_by_printer_request_builder.py index a1af73f3727..2f5ccb7a297 100644 --- a/msgraph/generated/reports/monthly_print_usage_by_printer/monthly_print_usage_by_printer_request_builder.py +++ b/msgraph/generated/reports/monthly_print_usage_by_printer/monthly_print_usage_by_printer_request_builder.py @@ -45,7 +45,7 @@ def by_print_usage_by_printer_id(self,print_usage_by_printer_id: str) -> PrintUs async def get(self,request_configuration: Optional[MonthlyPrintUsageByPrinterRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintUsageByPrinterCollectionResponse]: """ - Retrieve a list of monthly print usage summaries, grouped by printer. + Retrieve a list of monthly print usage summaries, grouped by printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintUsageByPrinterCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/reportroot-list-monthlyprintusagebyprinter?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintUsageByPrinter] = None, request_configur def to_get_request_information(self,request_configuration: Optional[MonthlyPrintUsageByPrinterRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of monthly print usage summaries, grouped by printer. + Retrieve a list of monthly print usage summaries, grouped by printer. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByPrinter] = None, request_configuration: Optional[MonthlyPrintUsageByPrinterRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintUsageByPrinter] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MonthlyPrintUsageByPrinterRequestBuilderGetQueryParameters(): """ - Retrieve a list of monthly print usage summaries, grouped by printer. + Retrieve a list of monthly print usage summaries, grouped by printer. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/monthly_print_usage_by_user/count/count_request_builder.py b/msgraph/generated/reports/monthly_print_usage_by_user/count/count_request_builder.py index 5a0941430e4..1f5fafc62e9 100644 --- a/msgraph/generated/reports/monthly_print_usage_by_user/count/count_request_builder.py +++ b/msgraph/generated/reports/monthly_print_usage_by_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/reports/monthly_print_usage_by_user/item/print_usage_by_user_item_request_builder.py b/msgraph/generated/reports/monthly_print_usage_by_user/item/print_usage_by_user_item_request_builder.py index 2d5d2c474a7..bb8d1c91591 100644 --- a/msgraph/generated/reports/monthly_print_usage_by_user/item/print_usage_by_user_item_request_builder.py +++ b/msgraph/generated/reports/monthly_print_usage_by_user/item/print_usage_by_user_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[PrintUsag Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrintUsageByUserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[PrintUsageBy Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByUser] = None, request_configuration: Optional[PrintUsageByUserItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[PrintUsageByUser] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/reports/monthly_print_usage_by_user/monthly_print_usage_by_user_request_builder.py b/msgraph/generated/reports/monthly_print_usage_by_user/monthly_print_usage_by_user_request_builder.py index 7a404219263..18aeb587f31 100644 --- a/msgraph/generated/reports/monthly_print_usage_by_user/monthly_print_usage_by_user_request_builder.py +++ b/msgraph/generated/reports/monthly_print_usage_by_user/monthly_print_usage_by_user_request_builder.py @@ -45,7 +45,7 @@ def by_print_usage_by_user_id(self,print_usage_by_user_id: str) -> PrintUsageByU async def get(self,request_configuration: Optional[MonthlyPrintUsageByUserRequestBuilderGetRequestConfiguration] = None) -> Optional[PrintUsageByUserCollectionResponse]: """ - Retrieve a list of monthly print usage summaries, grouped by user. + Retrieve a list of monthly print usage summaries, grouped by user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PrintUsageByUserCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/reportroot-list-monthlyprintusagebyuser?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PrintUsageByUser] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[MonthlyPrintUsageByUserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of monthly print usage summaries, grouped by user. + Retrieve a list of monthly print usage summaries, grouped by user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PrintUsageByUser] = None, request_configuration: Optional[MonthlyPrintUsageByUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PrintUsageByUser] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MonthlyPrintUsageByUserRequestBuilderGetQueryParameters(): """ - Retrieve a list of monthly print usage summaries, grouped by user. + Retrieve a list of monthly print usage summaries, grouped by user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/reports/reports_request_builder.py b/msgraph/generated/reports/reports_request_builder.py index 911dbcaedff..ac1a8d78b7b 100644 --- a/msgraph/generated/reports/reports_request_builder.py +++ b/msgraph/generated/reports/reports_request_builder.py @@ -36,9 +36,9 @@ from .get_mailbox_usage_mailbox_counts_with_period.get_mailbox_usage_mailbox_counts_with_period_request_builder import GetMailboxUsageMailboxCountsWithPeriodRequestBuilder from .get_mailbox_usage_quota_status_mailbox_counts_with_period.get_mailbox_usage_quota_status_mailbox_counts_with_period_request_builder import GetMailboxUsageQuotaStatusMailboxCountsWithPeriodRequestBuilder from .get_mailbox_usage_storage_with_period.get_mailbox_usage_storage_with_period_request_builder import GetMailboxUsageStorageWithPeriodRequestBuilder - from .get_office365_activation_counts.get_office365_activation_counts_request_builder import GetOffice365ActivationCountsRequestBuilder from .get_office365_activations_user_counts.get_office365_activations_user_counts_request_builder import GetOffice365ActivationsUserCountsRequestBuilder from .get_office365_activations_user_detail.get_office365_activations_user_detail_request_builder import GetOffice365ActivationsUserDetailRequestBuilder + from .get_office365_activation_counts.get_office365_activation_counts_request_builder import GetOffice365ActivationCountsRequestBuilder from .get_office365_active_user_counts_with_period.get_office365_active_user_counts_with_period_request_builder import GetOffice365ActiveUserCountsWithPeriodRequestBuilder from .get_office365_active_user_detail_with_date.get_office365_active_user_detail_with_date_request_builder import GetOffice365ActiveUserDetailWithDateRequestBuilder from .get_office365_active_user_detail_with_period.get_office365_active_user_detail_with_period_request_builder import GetOffice365ActiveUserDetailWithPeriodRequestBuilder @@ -1343,14 +1343,14 @@ def to_get_request_information(self,request_configuration: Optional[ReportsReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReportRoot] = None, request_configuration: Optional[ReportsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -1363,13 +1363,13 @@ def to_patch_request_information(self,body: Optional[ReportRoot] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_response.py b/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_get_response.py similarity index 89% rename from msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_response.py rename to msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_get_response.py index be83409e35d..d38dcf92c5f 100644 --- a/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_response.py +++ b/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAttackSimulationRepeatOffendersResponse(BaseCollectionPaginationCountResponse): +class GetAttackSimulationRepeatOffendersGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttackSimulationRepeatOffender]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAttackSimulationRepeatOffendersResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAttackSimulationRepeatOffendersGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAttackSimulationRepeatOffendersResponse + Returns: GetAttackSimulationRepeatOffendersGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAttackSimulationRepeatOffendersResponse() + return GetAttackSimulationRepeatOffendersGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_request_builder.py b/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_request_builder.py index d8ec39b6737..81de8b714e5 100644 --- a/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_request_builder.py +++ b/msgraph/generated/reports/security/get_attack_simulation_repeat_offenders/get_attack_simulation_repeat_offenders_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_attack_simulation_repeat_offenders_response import GetAttackSimulationRepeatOffendersResponse + from .get_attack_simulation_repeat_offenders_get_response import GetAttackSimulationRepeatOffendersGetResponse class GetAttackSimulationRepeatOffendersRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/reports/security/getAttackSimulationRepeatOffenders(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetAttackSimulationRepeatOffendersRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAttackSimulationRepeatOffendersResponse]: + async def get(self,request_configuration: Optional[GetAttackSimulationRepeatOffendersRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAttackSimulationRepeatOffendersGetResponse]: """ Invoke function getAttackSimulationRepeatOffenders param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAttackSimulationRepeatOffendersResponse] + Returns: Optional[GetAttackSimulationRepeatOffendersGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAttackSimulationRepeatOffe } if not self.request_adapter: raise Exception("Http core is null") - from .get_attack_simulation_repeat_offenders_response import GetAttackSimulationRepeatOffendersResponse + from .get_attack_simulation_repeat_offenders_get_response import GetAttackSimulationRepeatOffendersGetResponse - return await self.request_adapter.send_async(request_info, GetAttackSimulationRepeatOffendersResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAttackSimulationRepeatOffendersGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAttackSimulationRepeatOffendersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAttackSim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAttackSimulationRepeatOffendersRequestBuilder: diff --git a/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_response.py b/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_get_response.py similarity index 88% rename from msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_response.py rename to msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_get_response.py index b337a43829e..d898e23d5b1 100644 --- a/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_response.py +++ b/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAttackSimulationSimulationUserCoverageResponse(BaseCollectionPaginationCountResponse): +class GetAttackSimulationSimulationUserCoverageGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttackSimulationSimulationUserCoverage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAttackSimulationSimulationUserCoverageResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAttackSimulationSimulationUserCoverageGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAttackSimulationSimulationUserCoverageResponse + Returns: GetAttackSimulationSimulationUserCoverageGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAttackSimulationSimulationUserCoverageResponse() + return GetAttackSimulationSimulationUserCoverageGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_request_builder.py b/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_request_builder.py index 4d075569b77..adb15b39712 100644 --- a/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_request_builder.py +++ b/msgraph/generated/reports/security/get_attack_simulation_simulation_user_coverage/get_attack_simulation_simulation_user_coverage_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_attack_simulation_simulation_user_coverage_response import GetAttackSimulationSimulationUserCoverageResponse + from .get_attack_simulation_simulation_user_coverage_get_response import GetAttackSimulationSimulationUserCoverageGetResponse class GetAttackSimulationSimulationUserCoverageRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/reports/security/getAttackSimulationSimulationUserCoverage(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetAttackSimulationSimulationUserCoverageRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAttackSimulationSimulationUserCoverageResponse]: + async def get(self,request_configuration: Optional[GetAttackSimulationSimulationUserCoverageRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAttackSimulationSimulationUserCoverageGetResponse]: """ Invoke function getAttackSimulationSimulationUserCoverage param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAttackSimulationSimulationUserCoverageResponse] + Returns: Optional[GetAttackSimulationSimulationUserCoverageGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAttackSimulationSimulation } if not self.request_adapter: raise Exception("Http core is null") - from .get_attack_simulation_simulation_user_coverage_response import GetAttackSimulationSimulationUserCoverageResponse + from .get_attack_simulation_simulation_user_coverage_get_response import GetAttackSimulationSimulationUserCoverageGetResponse - return await self.request_adapter.send_async(request_info, GetAttackSimulationSimulationUserCoverageResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAttackSimulationSimulationUserCoverageGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAttackSimulationSimulationUserCoverageRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAttackSim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAttackSimulationSimulationUserCoverageRequestBuilder: diff --git a/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_response.py b/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_get_response.py similarity index 89% rename from msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_response.py rename to msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_get_response.py index 20d78d6cf74..fcd70c7a1dd 100644 --- a/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_response.py +++ b/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAttackSimulationTrainingUserCoverageResponse(BaseCollectionPaginationCountResponse): +class GetAttackSimulationTrainingUserCoverageGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttackSimulationTrainingUserCoverage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAttackSimulationTrainingUserCoverageResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAttackSimulationTrainingUserCoverageGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAttackSimulationTrainingUserCoverageResponse + Returns: GetAttackSimulationTrainingUserCoverageGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAttackSimulationTrainingUserCoverageResponse() + return GetAttackSimulationTrainingUserCoverageGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_request_builder.py b/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_request_builder.py index f2ed7545615..599b42b3f9f 100644 --- a/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_request_builder.py +++ b/msgraph/generated/reports/security/get_attack_simulation_training_user_coverage/get_attack_simulation_training_user_coverage_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_attack_simulation_training_user_coverage_response import GetAttackSimulationTrainingUserCoverageResponse + from .get_attack_simulation_training_user_coverage_get_response import GetAttackSimulationTrainingUserCoverageGetResponse class GetAttackSimulationTrainingUserCoverageRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/reports/security/getAttackSimulationTrainingUserCoverage(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetAttackSimulationTrainingUserCoverageRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAttackSimulationTrainingUserCoverageResponse]: + async def get(self,request_configuration: Optional[GetAttackSimulationTrainingUserCoverageRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAttackSimulationTrainingUserCoverageGetResponse]: """ Invoke function getAttackSimulationTrainingUserCoverage param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAttackSimulationTrainingUserCoverageResponse] + Returns: Optional[GetAttackSimulationTrainingUserCoverageGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAttackSimulationTrainingUs } if not self.request_adapter: raise Exception("Http core is null") - from .get_attack_simulation_training_user_coverage_response import GetAttackSimulationTrainingUserCoverageResponse + from .get_attack_simulation_training_user_coverage_get_response import GetAttackSimulationTrainingUserCoverageGetResponse - return await self.request_adapter.send_async(request_info, GetAttackSimulationTrainingUserCoverageResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAttackSimulationTrainingUserCoverageGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAttackSimulationTrainingUserCoverageRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAttackSim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAttackSimulationTrainingUserCoverageRequestBuilder: diff --git a/msgraph/generated/reports/security/security_request_builder.py b/msgraph/generated/reports/security/security_request_builder.py index a26e4c4dd92..d556dc6aabd 100644 --- a/msgraph/generated/reports/security/security_request_builder.py +++ b/msgraph/generated/reports/security/security_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[SecurityR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SecurityRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[SecurityRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SecurityReportsRoot] = None, request_configuration: Optional[SecurityRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[SecurityReportsRoot] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/directory/directory_request_builder.py b/msgraph/generated/role_management/directory/directory_request_builder.py index 54b85b0a8aa..1fdb8064b56 100644 --- a/msgraph/generated/role_management/directory/directory_request_builder.py +++ b/msgraph/generated/role_management/directory/directory_request_builder.py @@ -14,13 +14,13 @@ from ...models.rbac_application import RbacApplication from .resource_namespaces.resource_namespaces_request_builder import ResourceNamespacesRequestBuilder from .role_assignments.role_assignments_request_builder import RoleAssignmentsRequestBuilder + from .role_assignment_schedules.role_assignment_schedules_request_builder import RoleAssignmentSchedulesRequestBuilder from .role_assignment_schedule_instances.role_assignment_schedule_instances_request_builder import RoleAssignmentScheduleInstancesRequestBuilder from .role_assignment_schedule_requests.role_assignment_schedule_requests_request_builder import RoleAssignmentScheduleRequestsRequestBuilder - from .role_assignment_schedules.role_assignment_schedules_request_builder import RoleAssignmentSchedulesRequestBuilder from .role_definitions.role_definitions_request_builder import RoleDefinitionsRequestBuilder + from .role_eligibility_schedules.role_eligibility_schedules_request_builder import RoleEligibilitySchedulesRequestBuilder from .role_eligibility_schedule_instances.role_eligibility_schedule_instances_request_builder import RoleEligibilityScheduleInstancesRequestBuilder from .role_eligibility_schedule_requests.role_eligibility_schedule_requests_request_builder import RoleEligibilityScheduleRequestsRequestBuilder - from .role_eligibility_schedules.role_eligibility_schedules_request_builder import RoleEligibilitySchedulesRequestBuilder class DirectoryRequestBuilder(BaseRequestBuilder): """ @@ -106,12 +106,12 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -121,14 +121,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RbacApplication] = None, request_configuration: Optional[DirectoryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[RbacApplication] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -170,15 +170,6 @@ def resource_namespaces(self) -> ResourceNamespacesRequestBuilder: return ResourceNamespacesRequestBuilder(self.request_adapter, self.path_parameters) - @property - def role_assignments(self) -> RoleAssignmentsRequestBuilder: - """ - Provides operations to manage the roleAssignments property of the microsoft.graph.rbacApplication entity. - """ - from .role_assignments.role_assignments_request_builder import RoleAssignmentsRequestBuilder - - return RoleAssignmentsRequestBuilder(self.request_adapter, self.path_parameters) - @property def role_assignment_schedule_instances(self) -> RoleAssignmentScheduleInstancesRequestBuilder: """ @@ -206,6 +197,15 @@ def role_assignment_schedules(self) -> RoleAssignmentSchedulesRequestBuilder: return RoleAssignmentSchedulesRequestBuilder(self.request_adapter, self.path_parameters) + @property + def role_assignments(self) -> RoleAssignmentsRequestBuilder: + """ + Provides operations to manage the roleAssignments property of the microsoft.graph.rbacApplication entity. + """ + from .role_assignments.role_assignments_request_builder import RoleAssignmentsRequestBuilder + + return RoleAssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + @property def role_definitions(self) -> RoleDefinitionsRequestBuilder: """ diff --git a/msgraph/generated/role_management/directory/resource_namespaces/count/count_request_builder.py b/msgraph/generated/role_management/directory/resource_namespaces/count/count_request_builder.py index 322137d51c8..f4157046d1b 100644 --- a/msgraph/generated/role_management/directory/resource_namespaces/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/resource_namespaces/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/count/count_request_builder.py b/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/count/count_request_builder.py index e968fc3f41f..25cbeab2fa2 100644 --- a/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py b/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py index 644bccbefb4..fdc6d042afd 100644 --- a/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py +++ b/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRb Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRbacResourceActionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UnifiedRbacR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceAction] = None, request_configuration: Optional[UnifiedRbacResourceActionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRbacResourceAction] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/resource_actions_request_builder.py b/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/resource_actions_request_builder.py index a4763c69a9c..43f083b8183 100644 --- a/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/resource_actions_request_builder.py +++ b/msgraph/generated/role_management/directory/resource_namespaces/item/resource_actions/resource_actions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceActi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceAction] = None, request_configuration: Optional[ResourceActionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRbacResourceAction] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/directory/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py b/msgraph/generated/role_management/directory/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py index 6bf8d93b48f..c4934efa183 100644 --- a/msgraph/generated/role_management/directory/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py +++ b/msgraph/generated/role_management/directory/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRb Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRbacResourceNamespaceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UnifiedRbacR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceNamespace] = None, request_configuration: Optional[UnifiedRbacResourceNamespaceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRbacResourceNamespac if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/directory/resource_namespaces/resource_namespaces_request_builder.py b/msgraph/generated/role_management/directory/resource_namespaces/resource_namespaces_request_builder.py index 50de4ac6f3e..050f6f39610 100644 --- a/msgraph/generated/role_management/directory/resource_namespaces/resource_namespaces_request_builder.py +++ b/msgraph/generated/role_management/directory/resource_namespaces/resource_namespaces_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceName Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceNamespace] = None, request_configuration: Optional[ResourceNamespacesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRbacResourceNamespace if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/count/count_request_builder.py index fd19d07696b..e06c442529a 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index a92530953c5..e9e8009572d 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleAssignmentScheduleInstance]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index c3c60ce64ae..8d2b748e5e7 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py index c5fcbb26c8e..30261f66c77 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivatedUsi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivatedUsingRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py index 4e2bde18c3d..b0dc8adc508 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py index 2f97e59886e..785b23bc8d8 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/principal/principal_request_builder.py index 22b21e81313..d628fc4bb35 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py index 311cd860712..94ef85dd2c6 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py index 1bae9d2f5b6..1ac25fb200e 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentSched async def get(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleInstance]: """ - Get the instance of an active role assignment. + Get the instance of an active role assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleInstance] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignmentscheduleinstance-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instance of an active role assignment. + Get the instance of an active role assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleInstance] = None, request_configuration: Optional[UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignmentSchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfig @dataclass class UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters(): """ - Get the instance of an active role assignment. + Get the instance of an active role assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py index a25bde020bc..53de5e30eb0 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleAssignmentScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleInstanceCollectionResponse]: """ - Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. + Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleInstanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignmentscheduleinstances?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleAssignmentScheduleInstance] = None def to_get_request_information(self,request_configuration: Optional[RoleAssignmentScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. + Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleInstance] = None, request_configuration: Optional[RoleAssignmentScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignmentSchedul if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentScheduleInstancesRequestBuilderGetQueryParameters(): """ - Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. + Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/count/count_request_builder.py index e7e8016cdb0..8d8ffc13c9d 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index a77953a67d4..b093b7afe7b 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleAssignmentScheduleRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index cca3b3f34de..e5570785f30 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py index 768c0c96b04..20d5a0a5f9c 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivatedUsi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivatedUsingRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py index cf74e3885be..7329ab4a022 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py index a073c0fe612..e37d44f9b71 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. + Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. This API is available in the following national cloud deployments. 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/unifiedroleassignmentschedulerequest-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. + Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py index c86a2e97c09..434b46df33b 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/principal/principal_request_builder.py index 7cb809705f6..6dfbcfdeccf 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py index d62a3180da6..48e20c6dc51 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py index 6f1486dda02..24740513088 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetSchedu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TargetScheduleRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py index 8c518810df7..f9ab764807a 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentSched async def get(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleRequest]: """ - In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. + In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleRequest] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignmentschedulerequest-get?view=graph-rest-1.0 @@ -105,29 +105,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. + In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleRequest] = None, request_configuration: Optional[UnifiedRoleAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignmentSchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -236,7 +236,7 @@ class UnifiedRoleAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfigu @dataclass class UnifiedRoleAssignmentScheduleRequestItemRequestBuilderGetQueryParameters(): """ - In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. + In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py index 5c791b5f67e..2c0f2fd6fbc 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleRequestCollectionResponse]: """ - Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. + Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignmentschedulerequests?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[RoleAssignmentScheduleRequest async def post(self,body: Optional[UnifiedRoleAssignmentScheduleRequest] = None, request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleRequest]: """ - In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object:+ Request active and persistent role assignments for a principal, with or without expiry dates.+ Activate, deactivate, extend, or renew an eligible role assignment for a principal. To call this API to update, renew, and extend assignments for yourself, you must have multi-factor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Azure AD Multi-Factor Authentication to secure sign-in events. + In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object: To call this API to update, renew, and extend assignments for yourself, you must have multifactor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Microsoft Entra multifactor authentication to secure sign-in events. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleRequest] @@ -105,24 +105,24 @@ async def post(self,body: Optional[UnifiedRoleAssignmentScheduleRequest] = None, def to_get_request_information(self,request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. + Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleRequest] = None, request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object:+ Request active and persistent role assignments for a principal, with or without expiry dates.+ Activate, deactivate, extend, or renew an eligible role assignment for a principal. To call this API to update, renew, and extend assignments for yourself, you must have multi-factor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Azure AD Multi-Factor Authentication to secure sign-in events. + In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object: To call this API to update, renew, and extend assignments for yourself, you must have multifactor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Microsoft Entra multifactor authentication to secure sign-in events. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignmentSchedul if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentScheduleRequestsRequestBuilderGetQueryParameters(): """ - Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. + Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/count/count_request_builder.py index f2b684af872..ac16851dfdc 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 1100b6cbd96..2199499226f 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleAssignmentSchedule]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index eb8afb7f84e..b0f5ffcbc7d 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/item/activated_using/activated_using_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/item/activated_using/activated_using_request_builder.py index 733b6d54227..0de6cf6ab71 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/item/activated_using/activated_using_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/item/activated_using/activated_using_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivatedUsi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivatedUsingRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/item/app_scope/app_scope_request_builder.py index 3a80e265c55..9d7796c5020 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py index ca2f5a02a1e..ee6442d2926 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/item/principal/principal_request_builder.py index 0b5c4d35b82..f06e955ea59 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/item/role_definition/role_definition_request_builder.py index 3fcd9b3bc47..f534bc2242d 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py index 4893f468d5d..1d6e7d33c1f 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentSched async def get(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentSchedule]: """ - Retrieve the schedule for an active role assignment operation. + Retrieve the schedule for an active role assignment operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentSchedule] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignmentschedule-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the schedule for an active role assignment operation. + Retrieve the schedule for an active role assignment operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentSchedule] = None, request_configuration: Optional[UnifiedRoleAssignmentScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignmentSchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class UnifiedRoleAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration( @dataclass class UnifiedRoleAssignmentScheduleItemRequestBuilderGetQueryParameters(): """ - Retrieve the schedule for an active role assignment operation. + Retrieve the schedule for an active role assignment operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignment_schedules/role_assignment_schedules_request_builder.py b/msgraph/generated/role_management/directory/role_assignment_schedules/role_assignment_schedules_request_builder.py index bb9e6462249..8c9f22bac7a 100644 --- a/msgraph/generated/role_management/directory/role_assignment_schedules/role_assignment_schedules_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignment_schedules/role_assignment_schedules_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleAssignmentSchedulesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleCollectionResponse]: """ - Get the schedules for active role assignment operations. + Get the schedules for active role assignment operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignmentschedules?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleAssignmentSchedule] = None, reques def to_get_request_information(self,request_configuration: Optional[RoleAssignmentSchedulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the schedules for active role assignment operations. + Get the schedules for active role assignment operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentSchedule] = None, request_configuration: Optional[RoleAssignmentSchedulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignmentSchedul if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentSchedulesRequestBuilderGetQueryParameters(): """ - Get the schedules for active role assignment operations. + Get the schedules for active role assignment operations. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignments/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/count/count_request_builder.py index c5397de0f5c..0b90117b248 100644 --- a/msgraph/generated/role_management/directory/role_assignments/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignments/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/item/app_scope/app_scope_request_builder.py index 322d2514c99..6fb21100b40 100644 --- a/msgraph/generated/role_management/directory/role_assignments/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/item/app_scope/app_scope_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AppScopeR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppScope] = None, request_configuration: Optional[AppScopeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AppScope] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/directory/role_assignments/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/item/directory_scope/directory_scope_request_builder.py index 47c8ef058bf..4a5e4646d77 100644 --- a/msgraph/generated/role_management/directory/role_assignments/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignments/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/item/principal/principal_request_builder.py index fd9fa5f48d7..46831dacf94 100644 --- a/msgraph/generated/role_management/directory/role_assignments/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignments/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/item/role_definition/role_definition_request_builder.py index 5ba866faf13..fb8b389c64d 100644 --- a/msgraph/generated/role_management/directory/role_assignments/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_assignments/item/unified_role_assignment_item_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/item/unified_role_assignment_item_request_builder.py index ffd9a5fd591..50e59d41ec0 100644 --- a/msgraph/generated/role_management/directory/role_assignments/item/unified_role_assignment_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/item/unified_role_assignment_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a unifiedRoleAssignment object. + Delete a unifiedRoleAssignment object. This API is available in the following national cloud deployments. 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/unifiedroleassignment-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentItemR async def get(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignment]: """ - Retrieve the properties and relationships of a unifiedRoleAssignment object. + Retrieve the properties and relationships of a unifiedRoleAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignment] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignment-get?view=graph-rest-1.0 @@ -98,34 +98,34 @@ async def patch(self,body: Optional[UnifiedRoleAssignment] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a unifiedRoleAssignment object. + Delete a unifiedRoleAssignment object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a unifiedRoleAssignment object. + Retrieve the properties and relationships of a unifiedRoleAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignment] = None, request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignment] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -207,7 +207,7 @@ class UnifiedRoleAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class UnifiedRoleAssignmentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a unifiedRoleAssignment object. + Retrieve the properties and relationships of a unifiedRoleAssignment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_assignments/role_assignments_request_builder.py b/msgraph/generated/role_management/directory/role_assignments/role_assignments_request_builder.py index f026c05722b..253d2de2df8 100644 --- a/msgraph/generated/role_management/directory/role_assignments/role_assignments_request_builder.py +++ b/msgraph/generated/role_management/directory/role_assignments/role_assignments_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_assignment_id(self,unified_role_assignment_id: str) -> Unifi async def get(self,request_configuration: Optional[RoleAssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentCollectionResponse]: """ - Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignments?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RoleAssignmentsRequestBuilder async def post(self,body: Optional[UnifiedRoleAssignment] = None, request_configuration: Optional[RoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleAssignment]: """ - Create a new unifiedRoleAssignment object. + Create a new unifiedRoleAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignment] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UnifiedRoleAssignment] = None, request_config def to_get_request_information(self,request_configuration: Optional[RoleAssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignment] = None, request_configuration: Optional[RoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new unifiedRoleAssignment object. + Create a new unifiedRoleAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignment] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentsRequestBuilderGetQueryParameters(): """ - Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_definitions/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_definitions/count/count_request_builder.py index 0d75e972d72..0c83a07f3a4 100644 --- a/msgraph/generated/role_management/directory/role_definitions/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/count/count_request_builder.py index 4164564f754..80aa49ab1b4 100644 --- a/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py b/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py index f85789e878d..69a6a94f01e 100644 --- a/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py +++ b/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_definition_id1(self,unified_role_definition_id1: str) -> Uni async def get(self,request_configuration: Optional[InheritsPermissionsFromRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinitionCollectionResponse]: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinitionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[UnifiedRoleDefinition] = None, request_config def to_get_request_information(self,request_configuration: Optional[InheritsPermissionsFromRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[InheritsPermissionsFromRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleDefinition] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InheritsPermissionsFromRequestBuilderGetQueryParameters(): """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py b/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py index 6132bb656f2..52ff5117ee8 100644 --- a/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleDefinitionItemR async def get(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleDefinition] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class UnifiedRoleDefinitionItemRequestBuilderGetQueryParameters(): """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_definitions/item/unified_role_definition_item_request_builder.py b/msgraph/generated/role_management/directory/role_definitions/item/unified_role_definition_item_request_builder.py index 460175e1f54..7220d8fc1b9 100644 --- a/msgraph/generated/role_management/directory/role_definitions/item/unified_role_definition_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_definitions/item/unified_role_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a unifiedRoleDefinition object. You cannot delete built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Delete a unifiedRoleDefinition object. You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. 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/unifiedroledefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleDefinitionItemR async def get(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: + Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] Find more info here: https://learn.microsoft.com/graph/api/unifiedroledefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequ async def patch(self,body: Optional[UnifiedRoleDefinition] = None, request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[UnifiedRoleDefinition] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a unifiedRoleDefinition object. You cannot delete built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Delete a unifiedRoleDefinition object. You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: + Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleDefinition] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class UnifiedRoleDefinitionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: + Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_definitions/role_definitions_request_builder.py b/msgraph/generated/role_management/directory/role_definitions/role_definitions_request_builder.py index bd2927ffbbf..9b40f4ab149 100644 --- a/msgraph/generated/role_management/directory/role_definitions/role_definitions_request_builder.py +++ b/msgraph/generated/role_management/directory/role_definitions/role_definitions_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_definition_id(self,unified_role_definition_id: str) -> Unifi async def get(self,request_configuration: Optional[RoleDefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinitionCollectionResponse]: """ - Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roledefinitions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RoleDefinitionsRequestBuilder async def post(self,body: Optional[UnifiedRoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Create a new custom unifiedRoleDefinition object. This feature requires an Azure AD Premium P1 or P2 license. + Create a new custom unifiedRoleDefinition object. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UnifiedRoleDefinition] = None, request_config def to_get_request_information(self,request_configuration: Optional[RoleDefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new custom unifiedRoleDefinition object. This feature requires an Azure AD Premium P1 or P2 license. + Create a new custom unifiedRoleDefinition object. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleDefinition] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleDefinitionsRequestBuilderGetQueryParameters(): """ - Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/count/count_request_builder.py index 4343d57c8a1..fc0d124bc90 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 6e96f539498..a709c5a5c4f 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleEligibilityScheduleInstance]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 9044c555c36..af42f7a1817 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py index 27b2d842742..3fe820270a7 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py index 2d8cc0865ce..dbf376bfc27 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/principal/principal_request_builder.py index f5e2aa1a3f4..a55d7c83d02 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py index 420d562e6b8..14a5bfbab52 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py index 33f09313d58..f7d89cddd2d 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleEligibilitySche async def get(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleInstance]: """ - Get the instance of a role eligibility. + Get the instance of a role eligibility. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleInstance] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleeligibilityscheduleinstance-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instance of a role eligibility. + Get the instance of a role eligibility. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleInstance] = None, request_configuration: Optional[UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleEligibilitySched if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfi @dataclass class UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters(): """ - Get the instance of a role eligibility. + Get the instance of a role eligibility. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py index 766c292dc38..bf8fcf70cbd 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleEligibilityScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleInstanceCollectionResponse]: """ - Get the instances of role eligibilities. + Get the instances of role eligibilities. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleInstanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleeligibilityscheduleinstances?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleEligibilityScheduleInstance] = Non def to_get_request_information(self,request_configuration: Optional[RoleEligibilityScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instances of role eligibilities. + Get the instances of role eligibilities. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleInstance] = None, request_configuration: Optional[RoleEligibilityScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleEligibilitySchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleEligibilityScheduleInstancesRequestBuilderGetQueryParameters(): """ - Get the instances of role eligibilities. + Get the instances of role eligibilities. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/count/count_request_builder.py index 3c373b6b189..84863fc139a 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 0724fdc2985..972abf62465 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleEligibilityScheduleRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 382b323a0d1..19897f04e11 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py index ab7f6025e64..d57efce3e69 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py index 29987efd719..1983abcff13 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. + Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. This API is available in the following national cloud deployments. 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/unifiedroleeligibilityschedulerequest-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. + Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py index 6a04bf59c3e..1ef354b34cf 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/principal/principal_request_builder.py index 686ad0a66e3..dbb0984c8bb 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py index cd3e740f59e..9df4ec19201 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py index 13b0569f51f..dba5ee2b1f0 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetSchedu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TargetScheduleRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py index e171bca165e..cd9cebaeca3 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleEligibilitySche async def get(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleRequest]: """ - In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleRequest] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleeligibilityschedulerequest-get?view=graph-rest-1.0 @@ -104,29 +104,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleRequest] = None, request_configuration: Optional[UnifiedRoleEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleEligibilitySched if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -226,7 +226,7 @@ class UnifiedRoleEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfig @dataclass class UnifiedRoleEligibilityScheduleRequestItemRequestBuilderGetQueryParameters(): """ - In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py index 048ec1b09f2..952acb21069 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleRequestCollectionResponse]: """ - In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleeligibilityschedulerequests?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[RoleEligibilityScheduleReques async def post(self,body: Optional[UnifiedRoleEligibilityScheduleRequest] = None, request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleRequest]: """ - In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. + In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleRequest] @@ -105,24 +105,24 @@ async def post(self,body: Optional[UnifiedRoleEligibilityScheduleRequest] = None def to_get_request_information(self,request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleRequest] = None, request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. + In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleEligibilitySchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleEligibilityScheduleRequestsRequestBuilderGetQueryParameters(): """ - In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/count/count_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/count/count_request_builder.py index 0aeb578142c..8acaf7e2b8f 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/count/count_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index d1fbd90395d..4436892d477 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleEligibilitySchedule]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index cb555815810..ef4a7fc7ee7 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py index 040070ceb63..db0f5e4e9b8 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py index 6fea9869aa0..eb18d733b45 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/principal/principal_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/principal/principal_request_builder.py index 4766b223f82..69b155bedfa 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py index 2dfd8c9a41d..c92fbc0f82f 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py index 0ac2021b741..874a6f45883 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleEligibilitySche async def get(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilitySchedule]: """ - Retrieve the schedule for a role eligibility operation. + Retrieve the schedule for a role eligibility operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilitySchedule] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleeligibilityschedule-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the schedule for a role eligibility operation. + Retrieve the schedule for a role eligibility operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilitySchedule] = None, request_configuration: Optional[UnifiedRoleEligibilityScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleEligibilitySched if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class UnifiedRoleEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration @dataclass class UnifiedRoleEligibilityScheduleItemRequestBuilderGetQueryParameters(): """ - Retrieve the schedule for a role eligibility operation. + Retrieve the schedule for a role eligibility operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/directory/role_eligibility_schedules/role_eligibility_schedules_request_builder.py b/msgraph/generated/role_management/directory/role_eligibility_schedules/role_eligibility_schedules_request_builder.py index 034759db508..dbf9dcabe28 100644 --- a/msgraph/generated/role_management/directory/role_eligibility_schedules/role_eligibility_schedules_request_builder.py +++ b/msgraph/generated/role_management/directory/role_eligibility_schedules/role_eligibility_schedules_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleEligibilitySchedulesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleCollectionResponse]: """ - Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. + Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleeligibilityschedules?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleEligibilitySchedule] = None, reque def to_get_request_information(self,request_configuration: Optional[RoleEligibilitySchedulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. + Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilitySchedule] = None, request_configuration: Optional[RoleEligibilitySchedulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleEligibilitySchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleEligibilitySchedulesRequestBuilderGetQueryParameters(): """ - Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. + Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/entitlement_management_request_builder.py b/msgraph/generated/role_management/entitlement_management/entitlement_management_request_builder.py index 882d91c4374..e9910389dd0 100644 --- a/msgraph/generated/role_management/entitlement_management/entitlement_management_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/entitlement_management_request_builder.py @@ -14,13 +14,13 @@ from ...models.rbac_application import RbacApplication from .resource_namespaces.resource_namespaces_request_builder import ResourceNamespacesRequestBuilder from .role_assignments.role_assignments_request_builder import RoleAssignmentsRequestBuilder + from .role_assignment_schedules.role_assignment_schedules_request_builder import RoleAssignmentSchedulesRequestBuilder from .role_assignment_schedule_instances.role_assignment_schedule_instances_request_builder import RoleAssignmentScheduleInstancesRequestBuilder from .role_assignment_schedule_requests.role_assignment_schedule_requests_request_builder import RoleAssignmentScheduleRequestsRequestBuilder - from .role_assignment_schedules.role_assignment_schedules_request_builder import RoleAssignmentSchedulesRequestBuilder from .role_definitions.role_definitions_request_builder import RoleDefinitionsRequestBuilder + from .role_eligibility_schedules.role_eligibility_schedules_request_builder import RoleEligibilitySchedulesRequestBuilder from .role_eligibility_schedule_instances.role_eligibility_schedule_instances_request_builder import RoleEligibilityScheduleInstancesRequestBuilder from .role_eligibility_schedule_requests.role_eligibility_schedule_requests_request_builder import RoleEligibilityScheduleRequestsRequestBuilder - from .role_eligibility_schedules.role_eligibility_schedules_request_builder import RoleEligibilitySchedulesRequestBuilder class EntitlementManagementRequestBuilder(BaseRequestBuilder): """ @@ -106,12 +106,12 @@ def to_delete_request_information(self,request_configuration: Optional[Entitleme Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EntitlementManagementRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -121,14 +121,14 @@ def to_get_request_information(self,request_configuration: Optional[EntitlementM Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RbacApplication] = None, request_configuration: Optional[EntitlementManagementRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[RbacApplication] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -170,15 +170,6 @@ def resource_namespaces(self) -> ResourceNamespacesRequestBuilder: return ResourceNamespacesRequestBuilder(self.request_adapter, self.path_parameters) - @property - def role_assignments(self) -> RoleAssignmentsRequestBuilder: - """ - Provides operations to manage the roleAssignments property of the microsoft.graph.rbacApplication entity. - """ - from .role_assignments.role_assignments_request_builder import RoleAssignmentsRequestBuilder - - return RoleAssignmentsRequestBuilder(self.request_adapter, self.path_parameters) - @property def role_assignment_schedule_instances(self) -> RoleAssignmentScheduleInstancesRequestBuilder: """ @@ -206,6 +197,15 @@ def role_assignment_schedules(self) -> RoleAssignmentSchedulesRequestBuilder: return RoleAssignmentSchedulesRequestBuilder(self.request_adapter, self.path_parameters) + @property + def role_assignments(self) -> RoleAssignmentsRequestBuilder: + """ + Provides operations to manage the roleAssignments property of the microsoft.graph.rbacApplication entity. + """ + from .role_assignments.role_assignments_request_builder import RoleAssignmentsRequestBuilder + + return RoleAssignmentsRequestBuilder(self.request_adapter, self.path_parameters) + @property def role_definitions(self) -> RoleDefinitionsRequestBuilder: """ diff --git a/msgraph/generated/role_management/entitlement_management/resource_namespaces/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/resource_namespaces/count/count_request_builder.py index 84fcbfbc444..ebf011ab05a 100644 --- a/msgraph/generated/role_management/entitlement_management/resource_namespaces/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/resource_namespaces/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/count/count_request_builder.py index a6ef2d8e785..1becd2b699f 100644 --- a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py index d4ef0374cca..d52eb856f78 100644 --- a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/item/unified_rbac_resource_action_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRb Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRbacResourceActionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UnifiedRbacR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceAction] = None, request_configuration: Optional[UnifiedRbacResourceActionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRbacResourceAction] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/resource_actions_request_builder.py b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/resource_actions_request_builder.py index e96ee301da7..9edf451925d 100644 --- a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/resource_actions_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/resource_actions/resource_actions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceActi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceAction] = None, request_configuration: Optional[ResourceActionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRbacResourceAction] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py index 7becb18a5c8..36cbeef2dc0 100644 --- a/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/resource_namespaces/item/unified_rbac_resource_namespace_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRb Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRbacResourceNamespaceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UnifiedRbacR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceNamespace] = None, request_configuration: Optional[UnifiedRbacResourceNamespaceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRbacResourceNamespac if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/entitlement_management/resource_namespaces/resource_namespaces_request_builder.py b/msgraph/generated/role_management/entitlement_management/resource_namespaces/resource_namespaces_request_builder.py index 089d413e8d4..3359501c584 100644 --- a/msgraph/generated/role_management/entitlement_management/resource_namespaces/resource_namespaces_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/resource_namespaces/resource_namespaces_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceName Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRbacResourceNamespace] = None, request_configuration: Optional[ResourceNamespacesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRbacResourceNamespace if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/count/count_request_builder.py index 294e537cc94..489a4554402 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index a92530953c5..e9e8009572d 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleAssignmentScheduleInstance]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 271d50809d2..2c8e04432b7 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py index e11bd1ef4f8..e65a4c776b6 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/activated_using/activated_using_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivatedUsi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivatedUsingRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py index 4964f96c028..ce4369ef7b9 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py index 7b21b470d51..265dd6b3c28 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/principal/principal_request_builder.py index ac004b58e34..18e67eec820 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py index 788a190bec8..214354d94e9 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py index 53ca5ec40af..2ae4c1069a7 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/item/unified_role_assignment_schedule_instance_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentSched async def get(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleInstance]: """ - Get the instance of an active role assignment. + Get the instance of an active role assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleInstance] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignmentscheduleinstance-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instance of an active role assignment. + Get the instance of an active role assignment. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleInstance] = None, request_configuration: Optional[UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignmentSchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfig @dataclass class UnifiedRoleAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters(): """ - Get the instance of an active role assignment. + Get the instance of an active role assignment. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py index 79baa82c9f2..ed97d754044 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_instances/role_assignment_schedule_instances_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleAssignmentScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleInstanceCollectionResponse]: """ - Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. + Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleInstanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignmentscheduleinstances?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleAssignmentScheduleInstance] = None def to_get_request_information(self,request_configuration: Optional[RoleAssignmentScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. + Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleInstance] = None, request_configuration: Optional[RoleAssignmentScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignmentSchedul if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentScheduleInstancesRequestBuilderGetQueryParameters(): """ - Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. + Get the instances of active role assignments in your tenant. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/count/count_request_builder.py index 57a002c4100..70f964817f2 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index a77953a67d4..b093b7afe7b 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleAssignmentScheduleRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 3c614382c9c..019d051f766 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py index 19e241dddc8..7b9532a5ec9 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/activated_using/activated_using_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivatedUsi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivatedUsingRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py index 3dd161df137..840135f1a71 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py index a5784d5a40a..e9db084c36c 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. + Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. This API is available in the following national cloud deployments. 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/unifiedroleassignmentschedulerequest-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. + Immediately cancel a unifiedRoleAssignmentScheduleRequest object that is in a Granted status, and have the system automatically delete the canceled request after 30 days. After calling this action, the status of the canceled unifiedRoleAssignmentScheduleRequest changes to Canceled. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py index ce4ae474de5..532457d951a 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/principal/principal_request_builder.py index 0a2870fb151..c5bcc5a2eb0 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py index be11c45d9fe..8662e4f05b9 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py index 4dd35b2a65d..5614b8e4380 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/target_schedule/target_schedule_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetSchedu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TargetScheduleRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py index 3e7ec532bcd..116bcf4847d 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/item/unified_role_assignment_schedule_request_item_request_builder.py @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentSched async def get(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleRequest]: """ - In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. + In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleRequest] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignmentschedulerequest-get?view=graph-rest-1.0 @@ -105,29 +105,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. + In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleRequest] = None, request_configuration: Optional[UnifiedRoleAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignmentSchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -236,7 +236,7 @@ class UnifiedRoleAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfigu @dataclass class UnifiedRoleAssignmentScheduleRequestItemRequestBuilderGetQueryParameters(): """ - In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. + In PIM, read the details of a request for an active and persistent role assignment made through the unifiedRoleAssignmentScheduleRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py index cc5f0ac1949..112c191a997 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedule_requests/role_assignment_schedule_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleRequestCollectionResponse]: """ - Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. + Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignmentschedulerequests?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[RoleAssignmentScheduleRequest async def post(self,body: Optional[UnifiedRoleAssignmentScheduleRequest] = None, request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleRequest]: """ - In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object:+ Request active and persistent role assignments for a principal, with or without expiry dates.+ Activate, deactivate, extend, or renew an eligible role assignment for a principal. To call this API to update, renew, and extend assignments for yourself, you must have multi-factor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Azure AD Multi-Factor Authentication to secure sign-in events. + In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object: To call this API to update, renew, and extend assignments for yourself, you must have multifactor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Microsoft Entra multifactor authentication to secure sign-in events. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleRequest] @@ -105,24 +105,24 @@ async def post(self,body: Optional[UnifiedRoleAssignmentScheduleRequest] = None, def to_get_request_information(self,request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. + Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentScheduleRequest] = None, request_configuration: Optional[RoleAssignmentScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object:+ Request active and persistent role assignments for a principal, with or without expiry dates.+ Activate, deactivate, extend, or renew an eligible role assignment for a principal. To call this API to update, renew, and extend assignments for yourself, you must have multi-factor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Azure AD Multi-Factor Authentication to secure sign-in events. + In PIM, carry out the following operations through the unifiedRoleAssignmentScheduleRequest object: To call this API to update, renew, and extend assignments for yourself, you must have multifactor authentication (MFA) enforced, and running the query in a session in which they were challenged for MFA. See Enable per-user Microsoft Entra multifactor authentication to secure sign-in events. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignmentSchedul if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentScheduleRequestsRequestBuilderGetQueryParameters(): """ - Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. + Retrieve the requests for active role assignments to principals. The active assignments include those made through assignments and activation requests, and directly through the role assignments API. The role assignments can be permanently active with or without an expiry date, or temporarily active after user activation of eligible assignments. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/count/count_request_builder.py index 48e2d147cab..3fe5b7266b4 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 1100b6cbd96..2199499226f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleAssignmentSchedule]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 07996ddd464..5f574ce4071 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/activated_using/activated_using_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/activated_using/activated_using_request_builder.py index 3b6ea4e448e..b81d051ea6b 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/activated_using/activated_using_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/activated_using/activated_using_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivatedUsi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivatedUsingRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/app_scope/app_scope_request_builder.py index caa1fd7343c..47b580504a7 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py index 63b1e950b75..a6222b93ea0 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/principal/principal_request_builder.py index 0991b66c24a..a4527e2300f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/role_definition/role_definition_request_builder.py index 9cf541020ce..e16e806d015 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py index f962bd6844b..c9150f27099 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/item/unified_role_assignment_schedule_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentSched async def get(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentSchedule]: """ - Retrieve the schedule for an active role assignment operation. + Retrieve the schedule for an active role assignment operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentSchedule] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignmentschedule-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentScheduleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the schedule for an active role assignment operation. + Retrieve the schedule for an active role assignment operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentSchedule] = None, request_configuration: Optional[UnifiedRoleAssignmentScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignmentSchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class UnifiedRoleAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration( @dataclass class UnifiedRoleAssignmentScheduleItemRequestBuilderGetQueryParameters(): """ - Retrieve the schedule for an active role assignment operation. + Retrieve the schedule for an active role assignment operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/role_assignment_schedules_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/role_assignment_schedules_request_builder.py index 0158919664f..c49fa41fb4e 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/role_assignment_schedules_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignment_schedules/role_assignment_schedules_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleAssignmentSchedulesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentScheduleCollectionResponse]: """ - Get the schedules for active role assignment operations. + Get the schedules for active role assignment operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentScheduleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignmentschedules?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleAssignmentSchedule] = None, reques def to_get_request_information(self,request_configuration: Optional[RoleAssignmentSchedulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the schedules for active role assignment operations. + Get the schedules for active role assignment operations. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignmentSchedule] = None, request_configuration: Optional[RoleAssignmentSchedulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignmentSchedul if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentSchedulesRequestBuilderGetQueryParameters(): """ - Get the schedules for active role assignment operations. + Get the schedules for active role assignment operations. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/count/count_request_builder.py index f7cda6103a5..ebb6889267e 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/item/app_scope/app_scope_request_builder.py index c998dec3e79..7d7a8aa339e 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/item/app_scope/app_scope_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AppScopeR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppScopeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppScope] = None, request_configuration: Optional[AppScopeRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AppScope] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/item/directory_scope/directory_scope_request_builder.py index 39e79815799..284bdedca5f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/item/principal/principal_request_builder.py index 40d2ae46c6a..dbbd3789e84 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/item/role_definition/role_definition_request_builder.py index 04ef82dc45c..9be4c978d5e 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/item/unified_role_assignment_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/item/unified_role_assignment_item_request_builder.py index 3af2d33b320..fed04b415f8 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/item/unified_role_assignment_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/item/unified_role_assignment_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a unifiedRoleAssignment object. + Delete a unifiedRoleAssignment object. This API is available in the following national cloud deployments. 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/unifiedroleassignment-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleAssignmentItemR async def get(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignment]: """ - Retrieve the properties and relationships of a unifiedRoleAssignment object. + Retrieve the properties and relationships of a unifiedRoleAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignment] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleassignment-get?view=graph-rest-1.0 @@ -98,34 +98,34 @@ async def patch(self,body: Optional[UnifiedRoleAssignment] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a unifiedRoleAssignment object. + Delete a unifiedRoleAssignment object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a unifiedRoleAssignment object. + Retrieve the properties and relationships of a unifiedRoleAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignment] = None, request_configuration: Optional[UnifiedRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleAssignment] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -207,7 +207,7 @@ class UnifiedRoleAssignmentItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class UnifiedRoleAssignmentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a unifiedRoleAssignment object. + Retrieve the properties and relationships of a unifiedRoleAssignment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_assignments/role_assignments_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_assignments/role_assignments_request_builder.py index e2fe89b8ff4..2b2894f9fb6 100644 --- a/msgraph/generated/role_management/entitlement_management/role_assignments/role_assignments_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_assignments/role_assignments_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_assignment_id(self,unified_role_assignment_id: str) -> Unifi async def get(self,request_configuration: Optional[RoleAssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleAssignmentCollectionResponse]: """ - Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleassignments?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RoleAssignmentsRequestBuilder async def post(self,body: Optional[UnifiedRoleAssignment] = None, request_configuration: Optional[RoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleAssignment]: """ - Create a new unifiedRoleAssignment object. + Create a new unifiedRoleAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleAssignment] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UnifiedRoleAssignment] = None, request_config def to_get_request_information(self,request_configuration: Optional[RoleAssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleAssignment] = None, request_configuration: Optional[RoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new unifiedRoleAssignment object. + Create a new unifiedRoleAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleAssignment] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleAssignmentsRequestBuilderGetQueryParameters(): """ - Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleAssignment objects for the RBAC provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_definitions/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_definitions/count/count_request_builder.py index 8343d36688b..589b3ebb21a 100644 --- a/msgraph/generated/role_management/entitlement_management/role_definitions/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_definitions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/count/count_request_builder.py index bc650ec5397..fcf6788f6b3 100644 --- a/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py index 45c8103421b..3ebef40818d 100644 --- a/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/inherits_permissions_from_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_definition_id1(self,unified_role_definition_id1: str) -> Uni async def get(self,request_configuration: Optional[InheritsPermissionsFromRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinitionCollectionResponse]: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinitionCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[UnifiedRoleDefinition] = None, request_config def to_get_request_information(self,request_configuration: Optional[InheritsPermissionsFromRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[InheritsPermissionsFromRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleDefinition] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InheritsPermissionsFromRequestBuilderGetQueryParameters(): """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py index 0ed9ec5b1d6..cac9271f0b8 100644 --- a/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_definitions/item/inherits_permissions_from/item/unified_role_definition_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleDefinitionItemR async def get(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] """ @@ -97,29 +97,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleDefinition] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +165,7 @@ class UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class UnifiedRoleDefinitionItemRequestBuilderGetQueryParameters(): """ - Read-only collection of role definitions that the given role definition inherits from. Only Azure AD built-in roles (isBuiltIn is true) support this attribute. Supports $expand. + Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles (isBuiltIn is true) support this attribute. Supports $expand. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_definitions/item/unified_role_definition_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_definitions/item/unified_role_definition_item_request_builder.py index cd040449748..9cff8ef1e51 100644 --- a/msgraph/generated/role_management/entitlement_management/role_definitions/item/unified_role_definition_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_definitions/item/unified_role_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a unifiedRoleDefinition object. You cannot delete built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Delete a unifiedRoleDefinition object. You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. 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/unifiedroledefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleDefinitionItemR async def get(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: + Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] Find more info here: https://learn.microsoft.com/graph/api/unifiedroledefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequ async def patch(self,body: Optional[UnifiedRoleDefinition] = None, request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[UnifiedRoleDefinition] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a unifiedRoleDefinition object. You cannot delete built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Delete a unifiedRoleDefinition object. You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: + Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[UnifiedRoleDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires an Azure AD Premium P1 or P2 license. + Update the properties of a unifiedRoleDefinition object. You cannot update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleDefinition] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class UnifiedRoleDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class UnifiedRoleDefinitionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: + Read the properties and relationships of a unifiedRoleDefinition object. The following role-based access control (RBAC) providers are currently supported: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_definitions/role_definitions_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_definitions/role_definitions_request_builder.py index 9b89da4cae4..8dfc4ab64f9 100644 --- a/msgraph/generated/role_management/entitlement_management/role_definitions/role_definitions_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_definitions/role_definitions_request_builder.py @@ -45,7 +45,7 @@ def by_unified_role_definition_id(self,unified_role_definition_id: str) -> Unifi async def get(self,request_configuration: Optional[RoleDefinitionsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleDefinitionCollectionResponse]: """ - Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinitionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roledefinitions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RoleDefinitionsRequestBuilder async def post(self,body: Optional[UnifiedRoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleDefinition]: """ - Create a new custom unifiedRoleDefinition object. This feature requires an Azure AD Premium P1 or P2 license. + Create a new custom unifiedRoleDefinition object. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UnifiedRoleDefinition] = None, request_config def to_get_request_information(self,request_configuration: Optional[RoleDefinitionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new custom unifiedRoleDefinition object. This feature requires an Azure AD Premium P1 or P2 license. + Create a new custom unifiedRoleDefinition object. This feature requires a Microsoft Entra ID P1 or P2 license. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleDefinition] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleDefinitionsRequestBuilderGetQueryParameters(): """ - Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Azure AD)- entitlement management (Azure AD) + Get a list of unifiedRoleDefinition objects for the provider. The following RBAC providers are currently supported:- directory (Microsoft Entra ID)- entitlement management (Microsoft Entra Entitlement Management) This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/count/count_request_builder.py index 32f2ad19e14..ad6bebb38e8 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 6e96f539498..a709c5a5c4f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleEligibilityScheduleInstance]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 712a09ff4de..46bda486358 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py index 4cfa8802d4c..99b08006782 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py index 9689c8cbf8a..59eff1c2cb4 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/principal/principal_request_builder.py index 3c8e3931f6c..826880ae305 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py index fb01ea8cf3a..0f8aacad725 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py index 2ebf1cc7144..a6f9a51659c 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/item/unified_role_eligibility_schedule_instance_item_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleEligibilitySche async def get(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleInstance]: """ - Get the instance of a role eligibility. + Get the instance of a role eligibility. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleInstance] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleeligibilityscheduleinstance-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instance of a role eligibility. + Get the instance of a role eligibility. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleInstance] = None, request_configuration: Optional[UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleEligibilitySched if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfi @dataclass class UnifiedRoleEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters(): """ - Get the instance of a role eligibility. + Get the instance of a role eligibility. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py index c447730881b..ffac7c42410 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_instances/role_eligibility_schedule_instances_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleEligibilityScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleInstanceCollectionResponse]: """ - Get the instances of role eligibilities. + Get the instances of role eligibilities. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleInstanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleeligibilityscheduleinstances?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleEligibilityScheduleInstance] = Non def to_get_request_information(self,request_configuration: Optional[RoleEligibilityScheduleInstancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the instances of role eligibilities. + Get the instances of role eligibilities. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleInstance] = None, request_configuration: Optional[RoleEligibilityScheduleInstancesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleEligibilitySchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleEligibilityScheduleInstancesRequestBuilderGetQueryParameters(): """ - Get the instances of role eligibilities. + Get the instances of role eligibilities. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/count/count_request_builder.py index dd4a92fb2d2..042b8be5824 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index 0724fdc2985..972abf62465 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleEligibilityScheduleRequest]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 908283f6050..1892e76d6e9 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py index a4e3715c442..e7acc6a94b0 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py index 9b26521e83e..3cb79e748e1 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/cancel/cancel_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. + Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. This API is available in the following national cloud deployments. 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/unifiedroleeligibilityschedulerequest-cancel?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CancelRequestBuilderPostRequ def to_post_request_information(self,request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. + Immediately cancel a unifiedRoleEligibilityScheduleRequest object whose status is Granted and have the system automatically delete the cancelled request after 30 days. After calling this action, the status of the cancelled unifiedRoleEligibilityScheduleRequest changes to Revoked. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CancelRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py index da6b9466e14..9695aebd2a5 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/principal/principal_request_builder.py index a90d545bc5b..bc4e020d0d1 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py index 8ffae125c5d..407de8a0b7d 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py index de2c226b8a3..c8acbab806f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/target_schedule/target_schedule_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TargetSchedu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TargetScheduleRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py index 51ecaff04b5..fddedc496e3 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/item/unified_role_eligibility_schedule_request_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleEligibilitySche async def get(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleRequest]: """ - In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleRequest] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleeligibilityschedulerequest-get?view=graph-rest-1.0 @@ -104,29 +104,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleRequest] = None, request_configuration: Optional[UnifiedRoleEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleEligibilitySched if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -226,7 +226,7 @@ class UnifiedRoleEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfig @dataclass class UnifiedRoleEligibilityScheduleRequestItemRequestBuilderGetQueryParameters(): """ - In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, read the details of a request for for a role eligibility request made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py index 8f9b427ffe5..f26828b7ac7 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedule_requests/role_eligibility_schedule_requests_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleRequestCollectionResponse]: """ - In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleeligibilityschedulerequests?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[RoleEligibilityScheduleReques async def post(self,body: Optional[UnifiedRoleEligibilityScheduleRequest] = None, request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleRequest]: """ - In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. + In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleRequest] @@ -105,24 +105,24 @@ async def post(self,body: Optional[UnifiedRoleEligibilityScheduleRequest] = None def to_get_request_information(self,request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilityScheduleRequest] = None, request_configuration: Optional[RoleEligibilityScheduleRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. + In PIM, request for a role eligibility for a principal through the unifiedRoleEligibilityScheduleRequest object. This operation allows both admins and eligible users to add, revoke, or extend eligible assignments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,13 +130,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleEligibilitySchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleEligibilityScheduleRequestsRequestBuilderGetQueryParameters(): """ - In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. + In PIM, retrieve the requests for role eligibilities for principals made through the unifiedRoleEligibilityScheduleRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/count/count_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/count/count_request_builder.py index 63a1071aec7..f540b34c225 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/count/count_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py similarity index 90% rename from msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py rename to msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py index d1fbd90395d..4436892d477 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_response.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterByCurrentUserWithOnResponse(BaseCollectionPaginationCountResponse): +class FilterByCurrentUserWithOnGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UnifiedRoleEligibilitySchedule]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterByCurrentUserWithOnGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterByCurrentUserWithOnResponse + Returns: FilterByCurrentUserWithOnGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterByCurrentUserWithOnResponse() + return FilterByCurrentUserWithOnGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py index 7cc58cbc477..cbc16870e79 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/filter_by_current_user_with_on/filter_by_current_user_with_on_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse class FilterByCurrentUserWithOnRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['on'] = str(on) super().__init__(request_adapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnResponse]: + async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterByCurrentUserWithOnGetResponse]: """ Invoke function filterByCurrentUser param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterByCurrentUserWithOnResponse] + Returns: Optional[FilterByCurrentUserWithOnGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[FilterByCurrentUserWithOnRequ } if not self.request_adapter: raise Exception("Http core is null") - from .filter_by_current_user_with_on_response import FilterByCurrentUserWithOnResponse + from .filter_by_current_user_with_on_get_response import FilterByCurrentUserWithOnGetResponse - return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterByCurrentUserWithOnGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterByCurr Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterByCurrentUserWithOnRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py index 13e944b0168..fcd800e8e9f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/app_scope/app_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AppScopeRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py index 9487f227135..2a57a3727ba 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/directory_scope/directory_scope_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectorySco Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryScopeRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/principal/principal_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/principal/principal_request_builder.py index 951cad812af..edab749cf0f 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/principal/principal_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/principal/principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PrincipalReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PrincipalRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py index 6e1ccce6750..f00c085361e 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/role_definition/role_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RoleDefinitionRequestBuilder: diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py index 2c276a1f6df..f389ec9b1f0 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/item/unified_role_eligibility_schedule_item_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[UnifiedRoleEligibilitySche async def get(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilitySchedule]: """ - Retrieve the schedule for a role eligibility operation. + Retrieve the schedule for a role eligibility operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilitySchedule] Find more info here: https://learn.microsoft.com/graph/api/unifiedroleeligibilityschedule-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedRo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedRoleEligibilityScheduleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the schedule for a role eligibility operation. + Retrieve the schedule for a role eligibility operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilitySchedule] = None, request_configuration: Optional[UnifiedRoleEligibilityScheduleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[UnifiedRoleEligibilitySched if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class UnifiedRoleEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration @dataclass class UnifiedRoleEligibilityScheduleItemRequestBuilderGetQueryParameters(): """ - Retrieve the schedule for a role eligibility operation. + Retrieve the schedule for a role eligibility operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/role_eligibility_schedules_request_builder.py b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/role_eligibility_schedules_request_builder.py index 19639d1bbb5..e0f59084b30 100644 --- a/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/role_eligibility_schedules_request_builder.py +++ b/msgraph/generated/role_management/entitlement_management/role_eligibility_schedules/role_eligibility_schedules_request_builder.py @@ -58,7 +58,7 @@ def filter_by_current_user_with_on(self,on: Optional[str] = None) -> FilterByCur async def get(self,request_configuration: Optional[RoleEligibilitySchedulesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedRoleEligibilityScheduleCollectionResponse]: """ - Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. + Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedRoleEligibilityScheduleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/rbacapplication-list-roleeligibilityschedules?view=graph-rest-1.0 @@ -104,19 +104,19 @@ async def post(self,body: Optional[UnifiedRoleEligibilitySchedule] = None, reque def to_get_request_information(self,request_configuration: Optional[RoleEligibilitySchedulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. + Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedRoleEligibilitySchedule] = None, request_configuration: Optional[RoleEligibilitySchedulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -129,13 +129,13 @@ def to_post_request_information(self,body: Optional[UnifiedRoleEligibilitySchedu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,7 +161,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleEligibilitySchedulesRequestBuilderGetQueryParameters(): """ - Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. + Get the unifiedRoleEligibilitySchedule resources from the roleEligibilitySchedules navigation property. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/role_management/role_management_request_builder.py b/msgraph/generated/role_management/role_management_request_builder.py index 69f29b7cf3f..ad46cbbac7d 100644 --- a/msgraph/generated/role_management/role_management_request_builder.py +++ b/msgraph/generated/role_management/role_management_request_builder.py @@ -80,14 +80,14 @@ def to_get_request_information(self,request_configuration: Optional[RoleManageme Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RoleManagement] = None, request_configuration: Optional[RoleManagementRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[RoleManagement] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/schema_extensions/count/count_request_builder.py b/msgraph/generated/schema_extensions/count/count_request_builder.py index 78992075434..48fa419b46d 100644 --- a/msgraph/generated/schema_extensions/count/count_request_builder.py +++ b/msgraph/generated/schema_extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/schema_extensions/item/schema_extension_item_request_builder.py b/msgraph/generated/schema_extensions/item/schema_extension_item_request_builder.py index 40cc2d3b0b5..2d63d0a3a32 100644 --- a/msgraph/generated/schema_extensions/item/schema_extension_item_request_builder.py +++ b/msgraph/generated/schema_extensions/item/schema_extension_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SchemaExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the definition of a schema extension. Only the app that created the schema extension (owner app) can delete the schema extension definition, and only when the extension is in the InDevelopment state. Deleting a schema extension definition does not affect accessing custom data that has been added to resource instances based on that definition. + Delete the definition of a schema extension. Only the app that created the schema extension (owner app) can delete the schema extension definition, and only when the extension is in the InDevelopment state. Deleting a schema extension definition does not affect accessing custom data that has been added to resource instances based on that definition. This API is available in the following national cloud deployments. 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/schemaextension-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SchemaExtensionItemRequest async def get(self,request_configuration: Optional[SchemaExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SchemaExtension]: """ - Get schemaExtension + This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchemaExtension] Find more info here: https://learn.microsoft.com/graph/api/schemaextension-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[SchemaExtensionItemRequestBui async def patch(self,body: Optional[SchemaExtension] = None, request_configuration: Optional[SchemaExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[SchemaExtension]: """ - Update properties in the definition of the specified schemaExtension. Additive updates to the extension can only be made when the extension is in the InDevelopment or Available status. This means custom properties or target resource types cannot be removed from the definition, but new custom properties can be added and the description of the extension changed. The update applies to all the resources that are included in the targetTypes property of the extension. These resources are among the supporting resource types. For delegated flows, the signed-in user can update a schema extension as long as the owner property of the extension is set to the appId of an application the signed-in user owns. That application can be the one that initially created the extension, or some other application owned by the signed-in user. This criteria for the owner property allows a signed-in user to make updates through other applications they don't own, such as Microsoft Graph Explorer. When using Graph Explorer to update a schemaExtension resource, include the owner property in the PATCH request body. + Update properties in the definition of the specified schemaExtension. Additive updates to the extension can only be made when the extension is in the InDevelopment or Available status. This means custom properties or target resource types cannot be removed from the definition, but new custom properties can be added and the description of the extension changed. The update applies to all the resources that are included in the targetTypes property of the extension. These resources are among the supporting resource types. For delegated flows, the signed-in user can update a schema extension as long as the owner property of the extension is set to the appId of an application the signed-in user owns. That application can be the one that initially created the extension, or some other application owned by the signed-in user. This criteria for the owner property allows a signed-in user to make updates through other applications they don't own, such as Microsoft Graph Explorer. When using Graph Explorer to update a schemaExtension resource, include the owner property in the PATCH request body. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchemaExtension] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[SchemaExtension] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[SchemaExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the definition of a schema extension. Only the app that created the schema extension (owner app) can delete the schema extension definition, and only when the extension is in the InDevelopment state. Deleting a schema extension definition does not affect accessing custom data that has been added to resource instances based on that definition. + Delete the definition of a schema extension. Only the app that created the schema extension (owner app) can delete the schema extension definition, and only when the extension is in the InDevelopment state. Deleting a schema extension definition does not affect accessing custom data that has been added to resource instances based on that definition. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchemaExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get schemaExtension + This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchemaExtension] = None, request_configuration: Optional[SchemaExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update properties in the definition of the specified schemaExtension. Additive updates to the extension can only be made when the extension is in the InDevelopment or Available status. This means custom properties or target resource types cannot be removed from the definition, but new custom properties can be added and the description of the extension changed. The update applies to all the resources that are included in the targetTypes property of the extension. These resources are among the supporting resource types. For delegated flows, the signed-in user can update a schema extension as long as the owner property of the extension is set to the appId of an application the signed-in user owns. That application can be the one that initially created the extension, or some other application owned by the signed-in user. This criteria for the owner property allows a signed-in user to make updates through other applications they don't own, such as Microsoft Graph Explorer. When using Graph Explorer to update a schemaExtension resource, include the owner property in the PATCH request body. + Update properties in the definition of the specified schemaExtension. Additive updates to the extension can only be made when the extension is in the InDevelopment or Available status. This means custom properties or target resource types cannot be removed from the definition, but new custom properties can be added and the description of the extension changed. The update applies to all the resources that are included in the targetTypes property of the extension. These resources are among the supporting resource types. For delegated flows, the signed-in user can update a schema extension as long as the owner property of the extension is set to the appId of an application the signed-in user owns. That application can be the one that initially created the extension, or some other application owned by the signed-in user. This criteria for the owner property allows a signed-in user to make updates through other applications they don't own, such as Microsoft Graph Explorer. When using Graph Explorer to update a schemaExtension resource, include the owner property in the PATCH request body. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[SchemaExtension] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class SchemaExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class SchemaExtensionItemRequestBuilderGetQueryParameters(): """ - Get schemaExtension + This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/schema_extensions/schema_extensions_request_builder.py b/msgraph/generated/schema_extensions/schema_extensions_request_builder.py index 33205696707..b0201dc0934 100644 --- a/msgraph/generated/schema_extensions/schema_extensions_request_builder.py +++ b/msgraph/generated/schema_extensions/schema_extensions_request_builder.py @@ -45,7 +45,7 @@ def by_schema_extension_id(self,schema_extension_id: str) -> SchemaExtensionItem async def get(self,request_configuration: Optional[SchemaExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[SchemaExtensionCollectionResponse]: """ - Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions:+ Created by any apps you own in the current tenant.+ Owned by other apps that are marked as Available.+ Created by other developers from other tenants and marked as Available. This is different from other APIs that only return tenant-specific data. Extension data created based on schema extension definitions is tenant-specific and can only be accessed by apps explicitly granted permission. + Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchemaExtensionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schemaextension-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SchemaExtensionsRequestBuilde async def post(self,body: Optional[SchemaExtension] = None, request_configuration: Optional[SchemaExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[SchemaExtension]: """ - Create a new schemaExtension definition and its associated schema extension property to extend a supporting resource type. Schema extensions let you add strongly-typed custom data to a resource. The app that creates a schema extension is the owner app. Depending on the state of the extension, the owner app, and only the owner app, may update or delete the extension. See examples of how to define a schema extension that describes a training course, use the schema extension definition to create a new group with training course data, and add training course data to an existing group. + Create a new schemaExtension definition and its associated schema extension property to extend a supporting resource type. Schema extensions let you add strongly-typed custom data to a resource. The app that creates a schema extension is the owner app. Depending on the state of the extension, the owner app, and only the owner app, may update or delete the extension. See examples of how to define a schema extension that describes a training course, use the schema extension definition to create a new group with training course data, and add training course data to an existing group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchemaExtension] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SchemaExtension] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SchemaExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions:+ Created by any apps you own in the current tenant.+ Owned by other apps that are marked as Available.+ Created by other developers from other tenants and marked as Available. This is different from other APIs that only return tenant-specific data. Extension data created based on schema extension definitions is tenant-specific and can only be accessed by apps explicitly granted permission. + Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchemaExtension] = None, request_configuration: Optional[SchemaExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new schemaExtension definition and its associated schema extension property to extend a supporting resource type. Schema extensions let you add strongly-typed custom data to a resource. The app that creates a schema extension is the owner app. Depending on the state of the extension, the owner app, and only the owner app, may update or delete the extension. See examples of how to define a schema extension that describes a training course, use the schema extension definition to create a new group with training course data, and add training course data to an existing group. + Create a new schemaExtension definition and its associated schema extension property to extend a supporting resource type. Schema extensions let you add strongly-typed custom data to a resource. The app that creates a schema extension is the owner app. Depending on the state of the extension, the owner app, and only the owner app, may update or delete the extension. See examples of how to define a schema extension that describes a training course, use the schema extension definition to create a new group with training course data, and add training course data to an existing group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SchemaExtension] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchemaExtensionsRequestBuilderGetQueryParameters(): """ - Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions:+ Created by any apps you own in the current tenant.+ Owned by other apps that are marked as Available.+ Created by other developers from other tenants and marked as Available. This is different from other APIs that only return tenant-specific data. Extension data created based on schema extension definitions is tenant-specific and can only be accessed by apps explicitly granted permission. + Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/scoped_role_memberships/count/count_request_builder.py b/msgraph/generated/scoped_role_memberships/count/count_request_builder.py index 0a99b94cafc..5fc706be06b 100644 --- a/msgraph/generated/scoped_role_memberships/count/count_request_builder.py +++ b/msgraph/generated/scoped_role_memberships/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/scoped_role_memberships/item/scoped_role_membership_item_request_builder.py b/msgraph/generated/scoped_role_memberships/item/scoped_role_membership_item_request_builder.py index c9bbe0eacfc..a9f1726f787 100644 --- a/msgraph/generated/scoped_role_memberships/item/scoped_role_membership_item_request_builder.py +++ b/msgraph/generated/scoped_role_memberships/item/scoped_role_membership_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ScopedRol Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopedRoleMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ScopedRoleMembership] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/scoped_role_memberships/scoped_role_memberships_request_builder.py b/msgraph/generated/scoped_role_memberships/scoped_role_memberships_request_builder.py index 4febc314338..d2e1f9f1e42 100644 --- a/msgraph/generated/scoped_role_memberships/scoped_role_memberships_request_builder.py +++ b/msgraph/generated/scoped_role_memberships/scoped_role_memberships_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopedRoleMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembershipsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ScopedRoleMembership] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/search/query/query_response.py b/msgraph/generated/search/query/query_post_response.py similarity index 92% rename from msgraph/generated/search/query/query_response.py rename to msgraph/generated/search/query/query_post_response.py index 9ae609e83e9..31b737ff803 100644 --- a/msgraph/generated/search/query/query_response.py +++ b/msgraph/generated/search/query/query_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class QueryResponse(BaseCollectionPaginationCountResponse): +class QueryPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[SearchResponse]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> QueryResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> QueryPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: QueryResponse + Returns: QueryPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return QueryResponse() + return QueryPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/search/query/query_request_builder.py b/msgraph/generated/search/query/query_request_builder.py index 567881b5308..e1a68225295 100644 --- a/msgraph/generated/search/query/query_request_builder.py +++ b/msgraph/generated/search/query/query_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .query_post_request_body import QueryPostRequestBody - from .query_response import QueryResponse + from .query_post_response import QueryPostResponse class QueryRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/search/query", path_parameters) - async def post(self,body: Optional[QueryPostRequestBody] = None, request_configuration: Optional[QueryRequestBuilderPostRequestConfiguration] = None) -> Optional[QueryResponse]: + async def post(self,body: Optional[QueryPostRequestBody] = None, request_configuration: Optional[QueryRequestBuilderPostRequestConfiguration] = None) -> Optional[QueryPostResponse]: """ - Runs the query specified in the request body. Search results are provided in the response. + Runs the query specified in the request body. Search results are provided in the response. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[QueryResponse] + Returns: Optional[QueryPostResponse] Find more info here: https://learn.microsoft.com/graph/api/search-query?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[QueryPostRequestBody] = None, request_configu } if not self.request_adapter: raise Exception("Http core is null") - from .query_response import QueryResponse + from .query_post_response import QueryPostResponse - return await self.request_adapter.send_async(request_info, QueryResponse, error_mapping) + return await self.request_adapter.send_async(request_info, QueryPostResponse, error_mapping) def to_post_request_information(self,body: Optional[QueryPostRequestBody] = None, request_configuration: Optional[QueryRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Runs the query specified in the request body. Search results are provided in the response. + Runs the query specified in the request body. Search results are provided in the response. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[QueryPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/search/search_request_builder.py b/msgraph/generated/search/search_request_builder.py index 900eecb4a07..534e10a325d 100644 --- a/msgraph/generated/search/search_request_builder.py +++ b/msgraph/generated/search/search_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[SearchReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SearchEntity] = None, request_configuration: Optional[SearchRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[SearchEntity] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/alerts/alerts_request_builder.py b/msgraph/generated/security/alerts/alerts_request_builder.py index 01fa27433f1..d0bb8e09f5f 100644 --- a/msgraph/generated/security/alerts/alerts_request_builder.py +++ b/msgraph/generated/security/alerts/alerts_request_builder.py @@ -45,7 +45,7 @@ def by_alert_id(self,alert_id: str) -> AlertItemRequestBuilder: async def get(self,request_configuration: Optional[AlertsRequestBuilderGetRequestConfiguration] = None) -> Optional[AlertCollectionResponse]: """ - Retrieve a list of alert objects. + Retrieve a list of alert objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AlertCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/alert-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Alert] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[AlertsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of alert objects. + Retrieve a list of alert objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Alert] = None, request_configuration: Optional[AlertsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Alert] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AlertsRequestBuilderGetQueryParameters(): """ - Retrieve a list of alert objects. + Retrieve a list of alert objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/alerts/count/count_request_builder.py b/msgraph/generated/security/alerts/count/count_request_builder.py index 3c6c0b71e4e..303d95771f2 100644 --- a/msgraph/generated/security/alerts/count/count_request_builder.py +++ b/msgraph/generated/security/alerts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/alerts/item/alert_item_request_builder.py b/msgraph/generated/security/alerts/item/alert_item_request_builder.py index 030a68fbecd..32ad00b6aa9 100644 --- a/msgraph/generated/security/alerts/item/alert_item_request_builder.py +++ b/msgraph/generated/security/alerts/item/alert_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AlertItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Alert]: """ - Retrieve the properties and relationships of an alert object. + Retrieve the properties and relationships of an alert object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Alert] Find more info here: https://learn.microsoft.com/graph/api/alert-get?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[AlertItemRequestBuilderGetReq async def patch(self,body: Optional[Alert] = None, request_configuration: Optional[AlertItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Alert]: """ - Update an editable alert property within any integrated solution to keep alert status and assignments in sync across solutions. This method updates any solution that has a record of the referenced alert ID. + Update an editable alert property within any integrated solution to keep alert status and assignments in sync across solutions. This method updates any solution that has a record of the referenced alert ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Alert] @@ -75,24 +75,24 @@ async def patch(self,body: Optional[Alert] = None, request_configuration: Option def to_get_request_information(self,request_configuration: Optional[AlertItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an alert object. + Retrieve the properties and relationships of an alert object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Alert] = None, request_configuration: Optional[AlertItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an editable alert property within any integrated solution to keep alert status and assignments in sync across solutions. This method updates any solution that has a record of the referenced alert ID. + Update an editable alert property within any integrated solution to keep alert status and assignments in sync across solutions. This method updates any solution that has a record of the referenced alert ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[Alert] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -123,7 +123,7 @@ def with_url(self,raw_url: Optional[str] = None) -> AlertItemRequestBuilder: @dataclass class AlertItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an alert object. + Retrieve the properties and relationships of an alert object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/alerts_v2/alerts_v2_request_builder.py b/msgraph/generated/security/alerts_v2/alerts_v2_request_builder.py index a54e5da740b..f09d04dee26 100644 --- a/msgraph/generated/security/alerts_v2/alerts_v2_request_builder.py +++ b/msgraph/generated/security/alerts_v2/alerts_v2_request_builder.py @@ -45,7 +45,7 @@ def by_alert_id(self,alert_id: str) -> AlertItemRequestBuilder: async def get(self,request_configuration: Optional[Alerts_v2RequestBuilderGetRequestConfiguration] = None) -> Optional[AlertCollectionResponse]: """ - Get a list of alert resources that have been created to track suspicious activities in an organization. This operation lets you filter and sort through alerts to create an informed cyber security response. It exposes a collection of alerts that were flagged in your network, within the time range you specified in your environment retention policy. The most recent alerts are displayed at the top of the list. + Get a list of alert resources that have been created to track suspicious activities in an organization. This operation lets you filter and sort through alerts to create an informed cyber security response. It exposes a collection of alerts that were flagged in your network, within the time range you specified in your environment retention policy. The most recent alerts are displayed at the top of the list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AlertCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-list-alerts_v2?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Alert] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[Alerts_v2RequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of alert resources that have been created to track suspicious activities in an organization. This operation lets you filter and sort through alerts to create an informed cyber security response. It exposes a collection of alerts that were flagged in your network, within the time range you specified in your environment retention policy. The most recent alerts are displayed at the top of the list. + Get a list of alert resources that have been created to track suspicious activities in an organization. This operation lets you filter and sort through alerts to create an informed cyber security response. It exposes a collection of alerts that were flagged in your network, within the time range you specified in your environment retention policy. The most recent alerts are displayed at the top of the list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Alert] = None, request_configuration: Optional[Alerts_v2RequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Alert] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class Alerts_v2RequestBuilderGetQueryParameters(): """ - Get a list of alert resources that have been created to track suspicious activities in an organization. This operation lets you filter and sort through alerts to create an informed cyber security response. It exposes a collection of alerts that were flagged in your network, within the time range you specified in your environment retention policy. The most recent alerts are displayed at the top of the list. + Get a list of alert resources that have been created to track suspicious activities in an organization. This operation lets you filter and sort through alerts to create an informed cyber security response. It exposes a collection of alerts that were flagged in your network, within the time range you specified in your environment retention policy. The most recent alerts are displayed at the top of the list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/alerts_v2/count/count_request_builder.py b/msgraph/generated/security/alerts_v2/count/count_request_builder.py index 471f2fa04b8..9512e2067aa 100644 --- a/msgraph/generated/security/alerts_v2/count/count_request_builder.py +++ b/msgraph/generated/security/alerts_v2/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/alerts_v2/item/alert_item_request_builder.py b/msgraph/generated/security/alerts_v2/item/alert_item_request_builder.py index 90f364dbb5a..665e498c279 100644 --- a/msgraph/generated/security/alerts_v2/item/alert_item_request_builder.py +++ b/msgraph/generated/security/alerts_v2/item/alert_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[AlertItemRequestBuilderDel async def get(self,request_configuration: Optional[AlertItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Alert]: """ - Get the properties and relationships of an alert in an organization based on the specified alert id property. + Get the properties and relationships of an alert in an organization based on the specified alert id property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Alert] Find more info here: https://learn.microsoft.com/graph/api/security-alert-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[AlertItemRequestBuilderGetReq async def patch(self,body: Optional[Alert] = None, request_configuration: Optional[AlertItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Alert]: """ - Update the properties of an alert object in an organization based on the specified alert id property. + Update the properties of an alert object in an organization based on the specified alert id property. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Alert] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[AlertItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AlertItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of an alert in an organization based on the specified alert id property. + Get the properties and relationships of an alert in an organization based on the specified alert id property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Alert] = None, request_configuration: Optional[AlertItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an alert object in an organization based on the specified alert id property. + Update the properties of an alert object in an organization based on the specified alert id property. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Alert] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class AlertItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class AlertItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of an alert in an organization based on the specified alert id property. + Get the properties and relationships of an alert in an organization based on the specified alert id property. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/alerts_v2/item/comments/comments_request_builder.py b/msgraph/generated/security/alerts_v2/item/comments/comments_request_builder.py index e621449f9cf..335058d7774 100644 --- a/msgraph/generated/security/alerts_v2/item/comments/comments_request_builder.py +++ b/msgraph/generated/security/alerts_v2/item/comments/comments_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[List[AlertComment]] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/alerts_v2/item/comments/count/count_request_builder.py b/msgraph/generated/security/alerts_v2/item/comments/count/count_request_builder.py index a513a67a7c3..ba70f49f105 100644 --- a/msgraph/generated/security/alerts_v2/item/comments/count/count_request_builder.py +++ b/msgraph/generated/security/alerts_v2/item/comments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/attack_simulation/attack_simulation_request_builder.py b/msgraph/generated/security/attack_simulation/attack_simulation_request_builder.py index 69c6973667a..e124bc446fa 100644 --- a/msgraph/generated/security/attack_simulation/attack_simulation_request_builder.py +++ b/msgraph/generated/security/attack_simulation/attack_simulation_request_builder.py @@ -12,8 +12,14 @@ if TYPE_CHECKING: from ...models.attack_simulation_root import AttackSimulationRoot from ...models.o_data_errors.o_data_error import ODataError - from .simulation_automations.simulation_automations_request_builder import SimulationAutomationsRequestBuilder + from .end_user_notifications.end_user_notifications_request_builder import EndUserNotificationsRequestBuilder + from .landing_pages.landing_pages_request_builder import LandingPagesRequestBuilder + from .login_pages.login_pages_request_builder import LoginPagesRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .payloads.payloads_request_builder import PayloadsRequestBuilder from .simulations.simulations_request_builder import SimulationsRequestBuilder + from .simulation_automations.simulation_automations_request_builder import SimulationAutomationsRequestBuilder + from .trainings.trainings_request_builder import TrainingsRequestBuilder class AttackSimulationRequestBuilder(BaseRequestBuilder): """ @@ -99,12 +105,12 @@ def to_delete_request_information(self,request_configuration: Optional[AttackSim Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttackSimulationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +120,14 @@ def to_get_request_information(self,request_configuration: Optional[AttackSimula Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttackSimulationRoot] = None, request_configuration: Optional[AttackSimulationRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +140,13 @@ def to_patch_request_information(self,body: Optional[AttackSimulationRoot] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -154,6 +160,51 @@ def with_url(self,raw_url: Optional[str] = None) -> AttackSimulationRequestBuild raise TypeError("raw_url cannot be null.") return AttackSimulationRequestBuilder(self.request_adapter, raw_url) + @property + def end_user_notifications(self) -> EndUserNotificationsRequestBuilder: + """ + Provides operations to manage the endUserNotifications property of the microsoft.graph.attackSimulationRoot entity. + """ + from .end_user_notifications.end_user_notifications_request_builder import EndUserNotificationsRequestBuilder + + return EndUserNotificationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def landing_pages(self) -> LandingPagesRequestBuilder: + """ + Provides operations to manage the landingPages property of the microsoft.graph.attackSimulationRoot entity. + """ + from .landing_pages.landing_pages_request_builder import LandingPagesRequestBuilder + + return LandingPagesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def login_pages(self) -> LoginPagesRequestBuilder: + """ + Provides operations to manage the loginPages property of the microsoft.graph.attackSimulationRoot entity. + """ + from .login_pages.login_pages_request_builder import LoginPagesRequestBuilder + + return LoginPagesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.attackSimulationRoot entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def payloads(self) -> PayloadsRequestBuilder: + """ + Provides operations to manage the payloads property of the microsoft.graph.attackSimulationRoot entity. + """ + from .payloads.payloads_request_builder import PayloadsRequestBuilder + + return PayloadsRequestBuilder(self.request_adapter, self.path_parameters) + @property def simulation_automations(self) -> SimulationAutomationsRequestBuilder: """ @@ -172,6 +223,15 @@ def simulations(self) -> SimulationsRequestBuilder: return SimulationsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def trainings(self) -> TrainingsRequestBuilder: + """ + Provides operations to manage the trainings property of the microsoft.graph.attackSimulationRoot entity. + """ + from .trainings.trainings_request_builder import TrainingsRequestBuilder + + return TrainingsRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/security/attack_simulation/end_user_notifications/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/end_user_notifications/count/count_request_builder.py new file mode 100644 index 00000000000..37378ece9be --- /dev/null +++ b/msgraph/generated/security/attack_simulation/end_user_notifications/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/endUserNotifications/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/end_user_notifications/end_user_notifications_request_builder.py b/msgraph/generated/security/attack_simulation/end_user_notifications/end_user_notifications_request_builder.py new file mode 100644 index 00000000000..75696c0109e --- /dev/null +++ b/msgraph/generated/security/attack_simulation/end_user_notifications/end_user_notifications_request_builder.py @@ -0,0 +1,226 @@ +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.end_user_notification import EndUserNotification + from ....models.end_user_notification_collection_response import EndUserNotificationCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.end_user_notification_item_request_builder import EndUserNotificationItemRequestBuilder + +class EndUserNotificationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the endUserNotifications property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new EndUserNotificationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/endUserNotifications{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_end_user_notification_id(self,end_user_notification_id: str) -> EndUserNotificationItemRequestBuilder: + """ + Provides operations to manage the endUserNotifications property of the microsoft.graph.attackSimulationRoot entity. + param end_user_notification_id: The unique identifier of endUserNotification + Returns: EndUserNotificationItemRequestBuilder + """ + if not end_user_notification_id: + raise TypeError("end_user_notification_id cannot be null.") + from .item.end_user_notification_item_request_builder import EndUserNotificationItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["endUserNotification%2Did"] = end_user_notification_id + return EndUserNotificationItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[EndUserNotificationsRequestBuilderGetRequestConfiguration] = None) -> Optional[EndUserNotificationCollectionResponse]: + """ + Get endUserNotifications from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotificationCollectionResponse] + """ + 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.end_user_notification_collection_response import EndUserNotificationCollectionResponse + + return await self.request_adapter.send_async(request_info, EndUserNotificationCollectionResponse, error_mapping) + + async def post(self,body: Optional[EndUserNotification] = None, request_configuration: Optional[EndUserNotificationsRequestBuilderPostRequestConfiguration] = None) -> Optional[EndUserNotification]: + """ + Create new navigation property to endUserNotifications for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotification] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.end_user_notification import EndUserNotification + + return await self.request_adapter.send_async(request_info, EndUserNotification, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[EndUserNotificationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get endUserNotifications from security + 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(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[EndUserNotification] = None, request_configuration: Optional[EndUserNotificationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to endUserNotifications for security + param body: The request body + param request_configuration: Configuration for 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(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) -> EndUserNotificationsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EndUserNotificationsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EndUserNotificationsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class EndUserNotificationsRequestBuilderGetQueryParameters(): + """ + Get endUserNotifications from security + """ + 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 EndUserNotificationsRequestBuilderGetRequestConfiguration(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[EndUserNotificationsRequestBuilder.EndUserNotificationsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EndUserNotificationsRequestBuilderPostRequestConfiguration(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/security/attack_simulation/end_user_notifications/item/details/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/count/count_request_builder.py new file mode 100644 index 00000000000..fe8737a3829 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/endUserNotifications/{endUserNotification%2Did}/details/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/details_request_builder.py b/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/details_request_builder.py new file mode 100644 index 00000000000..34f86ac4e67 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/details_request_builder.py @@ -0,0 +1,226 @@ +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.end_user_notification_detail import EndUserNotificationDetail + from ......models.end_user_notification_detail_collection_response import EndUserNotificationDetailCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.end_user_notification_detail_item_request_builder import EndUserNotificationDetailItemRequestBuilder + +class DetailsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the details property of the microsoft.graph.endUserNotification entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new DetailsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/endUserNotifications/{endUserNotification%2Did}/details{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_end_user_notification_detail_id(self,end_user_notification_detail_id: str) -> EndUserNotificationDetailItemRequestBuilder: + """ + Provides operations to manage the details property of the microsoft.graph.endUserNotification entity. + param end_user_notification_detail_id: The unique identifier of endUserNotificationDetail + Returns: EndUserNotificationDetailItemRequestBuilder + """ + if not end_user_notification_detail_id: + raise TypeError("end_user_notification_detail_id cannot be null.") + from .item.end_user_notification_detail_item_request_builder import EndUserNotificationDetailItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["endUserNotificationDetail%2Did"] = end_user_notification_detail_id + return EndUserNotificationDetailItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[EndUserNotificationDetailCollectionResponse]: + """ + Get details from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotificationDetailCollectionResponse] + """ + 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.end_user_notification_detail_collection_response import EndUserNotificationDetailCollectionResponse + + return await self.request_adapter.send_async(request_info, EndUserNotificationDetailCollectionResponse, error_mapping) + + async def post(self,body: Optional[EndUserNotificationDetail] = None, request_configuration: Optional[DetailsRequestBuilderPostRequestConfiguration] = None) -> Optional[EndUserNotificationDetail]: + """ + Create new navigation property to details for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotificationDetail] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.end_user_notification_detail import EndUserNotificationDetail + + return await self.request_adapter.send_async(request_info, EndUserNotificationDetail, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get details from security + 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(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[EndUserNotificationDetail] = None, request_configuration: Optional[DetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to details for security + param body: The request body + param request_configuration: Configuration for 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(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) -> DetailsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DetailsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DetailsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DetailsRequestBuilderGetQueryParameters(): + """ + Get details from security + """ + 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 DetailsRequestBuilderGetRequestConfiguration(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[DetailsRequestBuilder.DetailsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DetailsRequestBuilderPostRequestConfiguration(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/security/attack_simulation/end_user_notifications/item/details/item/end_user_notification_detail_item_request_builder.py b/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/item/end_user_notification_detail_item_request_builder.py new file mode 100644 index 00000000000..ddc0a5e17ad --- /dev/null +++ b/msgraph/generated/security/attack_simulation/end_user_notifications/item/details/item/end_user_notification_detail_item_request_builder.py @@ -0,0 +1,214 @@ +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.end_user_notification_detail import EndUserNotificationDetail + from .......models.o_data_errors.o_data_error import ODataError + +class EndUserNotificationDetailItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the details property of the microsoft.graph.endUserNotification entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new EndUserNotificationDetailItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/endUserNotifications/{endUserNotification%2Did}/details/{endUserNotificationDetail%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[EndUserNotificationDetailItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property details for security + 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[EndUserNotificationDetailItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EndUserNotificationDetail]: + """ + Get details from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotificationDetail] + """ + 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.end_user_notification_detail import EndUserNotificationDetail + + return await self.request_adapter.send_async(request_info, EndUserNotificationDetail, error_mapping) + + async def patch(self,body: Optional[EndUserNotificationDetail] = None, request_configuration: Optional[EndUserNotificationDetailItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EndUserNotificationDetail]: + """ + Update the navigation property details in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotificationDetail] + """ + 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.end_user_notification_detail import EndUserNotificationDetail + + return await self.request_adapter.send_async(request_info, EndUserNotificationDetail, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[EndUserNotificationDetailItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property details for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[EndUserNotificationDetailItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get details from security + 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(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[EndUserNotificationDetail] = None, request_configuration: Optional[EndUserNotificationDetailItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property details in security + param body: The request body + param request_configuration: Configuration for 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(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) -> EndUserNotificationDetailItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EndUserNotificationDetailItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EndUserNotificationDetailItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EndUserNotificationDetailItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class EndUserNotificationDetailItemRequestBuilderGetQueryParameters(): + """ + Get details from security + """ + 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 EndUserNotificationDetailItemRequestBuilderGetRequestConfiguration(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[EndUserNotificationDetailItemRequestBuilder.EndUserNotificationDetailItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EndUserNotificationDetailItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/end_user_notifications/item/end_user_notification_item_request_builder.py b/msgraph/generated/security/attack_simulation/end_user_notifications/item/end_user_notification_item_request_builder.py new file mode 100644 index 00000000000..11890a5cae2 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/end_user_notifications/item/end_user_notification_item_request_builder.py @@ -0,0 +1,224 @@ +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.end_user_notification import EndUserNotification + from .....models.o_data_errors.o_data_error import ODataError + from .details.details_request_builder import DetailsRequestBuilder + +class EndUserNotificationItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the endUserNotifications property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new EndUserNotificationItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/endUserNotifications/{endUserNotification%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[EndUserNotificationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property endUserNotifications for security + 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[EndUserNotificationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EndUserNotification]: + """ + Get endUserNotifications from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotification] + """ + 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.end_user_notification import EndUserNotification + + return await self.request_adapter.send_async(request_info, EndUserNotification, error_mapping) + + async def patch(self,body: Optional[EndUserNotification] = None, request_configuration: Optional[EndUserNotificationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EndUserNotification]: + """ + Update the navigation property endUserNotifications in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[EndUserNotification] + """ + 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.end_user_notification import EndUserNotification + + return await self.request_adapter.send_async(request_info, EndUserNotification, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[EndUserNotificationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property endUserNotifications for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[EndUserNotificationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get endUserNotifications from security + 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(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[EndUserNotification] = None, request_configuration: Optional[EndUserNotificationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property endUserNotifications in security + param body: The request body + param request_configuration: Configuration for 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(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) -> EndUserNotificationItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EndUserNotificationItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EndUserNotificationItemRequestBuilder(self.request_adapter, raw_url) + + @property + def details(self) -> DetailsRequestBuilder: + """ + Provides operations to manage the details property of the microsoft.graph.endUserNotification entity. + """ + from .details.details_request_builder import DetailsRequestBuilder + + return DetailsRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EndUserNotificationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class EndUserNotificationItemRequestBuilderGetQueryParameters(): + """ + Get endUserNotifications from security + """ + 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 EndUserNotificationItemRequestBuilderGetRequestConfiguration(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[EndUserNotificationItemRequestBuilder.EndUserNotificationItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class EndUserNotificationItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/landing_pages/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/landing_pages/count/count_request_builder.py new file mode 100644 index 00000000000..2d15c0683c2 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/landing_pages/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/landingPages/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/landing_pages/item/details/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/landing_pages/item/details/count/count_request_builder.py new file mode 100644 index 00000000000..44dad1ba25e --- /dev/null +++ b/msgraph/generated/security/attack_simulation/landing_pages/item/details/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/landingPages/{landingPage%2Did}/details/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/landing_pages/item/details/details_request_builder.py b/msgraph/generated/security/attack_simulation/landing_pages/item/details/details_request_builder.py new file mode 100644 index 00000000000..c700d6ae836 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/landing_pages/item/details/details_request_builder.py @@ -0,0 +1,226 @@ +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.landing_page_detail import LandingPageDetail + from ......models.landing_page_detail_collection_response import LandingPageDetailCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.landing_page_detail_item_request_builder import LandingPageDetailItemRequestBuilder + +class DetailsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the details property of the microsoft.graph.landingPage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new DetailsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/landingPages/{landingPage%2Did}/details{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_landing_page_detail_id(self,landing_page_detail_id: str) -> LandingPageDetailItemRequestBuilder: + """ + Provides operations to manage the details property of the microsoft.graph.landingPage entity. + param landing_page_detail_id: The unique identifier of landingPageDetail + Returns: LandingPageDetailItemRequestBuilder + """ + if not landing_page_detail_id: + raise TypeError("landing_page_detail_id cannot be null.") + from .item.landing_page_detail_item_request_builder import LandingPageDetailItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["landingPageDetail%2Did"] = landing_page_detail_id + return LandingPageDetailItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[LandingPageDetailCollectionResponse]: + """ + Get details from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPageDetailCollectionResponse] + """ + 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.landing_page_detail_collection_response import LandingPageDetailCollectionResponse + + return await self.request_adapter.send_async(request_info, LandingPageDetailCollectionResponse, error_mapping) + + async def post(self,body: Optional[LandingPageDetail] = None, request_configuration: Optional[DetailsRequestBuilderPostRequestConfiguration] = None) -> Optional[LandingPageDetail]: + """ + Create new navigation property to details for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPageDetail] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.landing_page_detail import LandingPageDetail + + return await self.request_adapter.send_async(request_info, LandingPageDetail, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get details from security + 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(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[LandingPageDetail] = None, request_configuration: Optional[DetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to details for security + param body: The request body + param request_configuration: Configuration for 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(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) -> DetailsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DetailsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DetailsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DetailsRequestBuilderGetQueryParameters(): + """ + Get details from security + """ + 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 DetailsRequestBuilderGetRequestConfiguration(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[DetailsRequestBuilder.DetailsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DetailsRequestBuilderPostRequestConfiguration(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/security/attack_simulation/landing_pages/item/details/item/landing_page_detail_item_request_builder.py b/msgraph/generated/security/attack_simulation/landing_pages/item/details/item/landing_page_detail_item_request_builder.py new file mode 100644 index 00000000000..9432a18c19e --- /dev/null +++ b/msgraph/generated/security/attack_simulation/landing_pages/item/details/item/landing_page_detail_item_request_builder.py @@ -0,0 +1,214 @@ +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.landing_page_detail import LandingPageDetail + from .......models.o_data_errors.o_data_error import ODataError + +class LandingPageDetailItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the details property of the microsoft.graph.landingPage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LandingPageDetailItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/landingPages/{landingPage%2Did}/details/{landingPageDetail%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LandingPageDetailItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property details for security + 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[LandingPageDetailItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LandingPageDetail]: + """ + Get details from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPageDetail] + """ + 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.landing_page_detail import LandingPageDetail + + return await self.request_adapter.send_async(request_info, LandingPageDetail, error_mapping) + + async def patch(self,body: Optional[LandingPageDetail] = None, request_configuration: Optional[LandingPageDetailItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LandingPageDetail]: + """ + Update the navigation property details in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPageDetail] + """ + 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.landing_page_detail import LandingPageDetail + + return await self.request_adapter.send_async(request_info, LandingPageDetail, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[LandingPageDetailItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property details for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[LandingPageDetailItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get details from security + 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(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[LandingPageDetail] = None, request_configuration: Optional[LandingPageDetailItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property details in security + param body: The request body + param request_configuration: Configuration for 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(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) -> LandingPageDetailItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LandingPageDetailItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LandingPageDetailItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LandingPageDetailItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LandingPageDetailItemRequestBuilderGetQueryParameters(): + """ + Get details from security + """ + 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 LandingPageDetailItemRequestBuilderGetRequestConfiguration(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[LandingPageDetailItemRequestBuilder.LandingPageDetailItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LandingPageDetailItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/landing_pages/item/landing_page_item_request_builder.py b/msgraph/generated/security/attack_simulation/landing_pages/item/landing_page_item_request_builder.py new file mode 100644 index 00000000000..cc79f5bc010 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/landing_pages/item/landing_page_item_request_builder.py @@ -0,0 +1,224 @@ +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.landing_page import LandingPage + from .....models.o_data_errors.o_data_error import ODataError + from .details.details_request_builder import DetailsRequestBuilder + +class LandingPageItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the landingPages property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LandingPageItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/landingPages/{landingPage%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LandingPageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property landingPages for security + 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[LandingPageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LandingPage]: + """ + Get landingPages from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPage] + """ + 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.landing_page import LandingPage + + return await self.request_adapter.send_async(request_info, LandingPage, error_mapping) + + async def patch(self,body: Optional[LandingPage] = None, request_configuration: Optional[LandingPageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LandingPage]: + """ + Update the navigation property landingPages in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPage] + """ + 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.landing_page import LandingPage + + return await self.request_adapter.send_async(request_info, LandingPage, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[LandingPageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property landingPages for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[LandingPageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get landingPages from security + 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(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[LandingPage] = None, request_configuration: Optional[LandingPageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property landingPages in security + param body: The request body + param request_configuration: Configuration for 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(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) -> LandingPageItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LandingPageItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LandingPageItemRequestBuilder(self.request_adapter, raw_url) + + @property + def details(self) -> DetailsRequestBuilder: + """ + Provides operations to manage the details property of the microsoft.graph.landingPage entity. + """ + from .details.details_request_builder import DetailsRequestBuilder + + return DetailsRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LandingPageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LandingPageItemRequestBuilderGetQueryParameters(): + """ + Get landingPages from security + """ + 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 LandingPageItemRequestBuilderGetRequestConfiguration(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[LandingPageItemRequestBuilder.LandingPageItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LandingPageItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/landing_pages/landing_pages_request_builder.py b/msgraph/generated/security/attack_simulation/landing_pages/landing_pages_request_builder.py new file mode 100644 index 00000000000..6fcaa7444d9 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/landing_pages/landing_pages_request_builder.py @@ -0,0 +1,226 @@ +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.landing_page import LandingPage + from ....models.landing_page_collection_response import LandingPageCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.landing_page_item_request_builder import LandingPageItemRequestBuilder + +class LandingPagesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the landingPages property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LandingPagesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/landingPages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_landing_page_id(self,landing_page_id: str) -> LandingPageItemRequestBuilder: + """ + Provides operations to manage the landingPages property of the microsoft.graph.attackSimulationRoot entity. + param landing_page_id: The unique identifier of landingPage + Returns: LandingPageItemRequestBuilder + """ + if not landing_page_id: + raise TypeError("landing_page_id cannot be null.") + from .item.landing_page_item_request_builder import LandingPageItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["landingPage%2Did"] = landing_page_id + return LandingPageItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[LandingPagesRequestBuilderGetRequestConfiguration] = None) -> Optional[LandingPageCollectionResponse]: + """ + Get landingPages from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPageCollectionResponse] + """ + 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.landing_page_collection_response import LandingPageCollectionResponse + + return await self.request_adapter.send_async(request_info, LandingPageCollectionResponse, error_mapping) + + async def post(self,body: Optional[LandingPage] = None, request_configuration: Optional[LandingPagesRequestBuilderPostRequestConfiguration] = None) -> Optional[LandingPage]: + """ + Create new navigation property to landingPages for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPage] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.landing_page import LandingPage + + return await self.request_adapter.send_async(request_info, LandingPage, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[LandingPagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get landingPages from security + 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(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[LandingPage] = None, request_configuration: Optional[LandingPagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to landingPages for security + param body: The request body + param request_configuration: Configuration for 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(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) -> LandingPagesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LandingPagesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LandingPagesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LandingPagesRequestBuilderGetQueryParameters(): + """ + Get landingPages from security + """ + 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 LandingPagesRequestBuilderGetRequestConfiguration(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[LandingPagesRequestBuilder.LandingPagesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LandingPagesRequestBuilderPostRequestConfiguration(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/security/attack_simulation/login_pages/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/login_pages/count/count_request_builder.py new file mode 100644 index 00000000000..03f08b4144c --- /dev/null +++ b/msgraph/generated/security/attack_simulation/login_pages/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/loginPages/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/login_pages/item/login_page_item_request_builder.py b/msgraph/generated/security/attack_simulation/login_pages/item/login_page_item_request_builder.py new file mode 100644 index 00000000000..aee71bce2fa --- /dev/null +++ b/msgraph/generated/security/attack_simulation/login_pages/item/login_page_item_request_builder.py @@ -0,0 +1,214 @@ +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.login_page import LoginPage + from .....models.o_data_errors.o_data_error import ODataError + +class LoginPageItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the loginPages property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LoginPageItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/loginPages/{loginPage%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LoginPageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property loginPages for security + 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[LoginPageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LoginPage]: + """ + Get loginPages from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LoginPage] + """ + 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.login_page import LoginPage + + return await self.request_adapter.send_async(request_info, LoginPage, error_mapping) + + async def patch(self,body: Optional[LoginPage] = None, request_configuration: Optional[LoginPageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LoginPage]: + """ + Update the navigation property loginPages in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LoginPage] + """ + 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.login_page import LoginPage + + return await self.request_adapter.send_async(request_info, LoginPage, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[LoginPageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property loginPages for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[LoginPageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get loginPages from security + 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(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[LoginPage] = None, request_configuration: Optional[LoginPageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property loginPages in security + param body: The request body + param request_configuration: Configuration for 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(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) -> LoginPageItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LoginPageItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LoginPageItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LoginPageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LoginPageItemRequestBuilderGetQueryParameters(): + """ + Get loginPages from security + """ + 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 LoginPageItemRequestBuilderGetRequestConfiguration(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[LoginPageItemRequestBuilder.LoginPageItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LoginPageItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/login_pages/login_pages_request_builder.py b/msgraph/generated/security/attack_simulation/login_pages/login_pages_request_builder.py new file mode 100644 index 00000000000..5ecca21e4ac --- /dev/null +++ b/msgraph/generated/security/attack_simulation/login_pages/login_pages_request_builder.py @@ -0,0 +1,226 @@ +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.login_page import LoginPage + from ....models.login_page_collection_response import LoginPageCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.login_page_item_request_builder import LoginPageItemRequestBuilder + +class LoginPagesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the loginPages property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LoginPagesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/loginPages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_login_page_id(self,login_page_id: str) -> LoginPageItemRequestBuilder: + """ + Provides operations to manage the loginPages property of the microsoft.graph.attackSimulationRoot entity. + param login_page_id: The unique identifier of loginPage + Returns: LoginPageItemRequestBuilder + """ + if not login_page_id: + raise TypeError("login_page_id cannot be null.") + from .item.login_page_item_request_builder import LoginPageItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["loginPage%2Did"] = login_page_id + return LoginPageItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[LoginPagesRequestBuilderGetRequestConfiguration] = None) -> Optional[LoginPageCollectionResponse]: + """ + Get loginPages from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LoginPageCollectionResponse] + """ + 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.login_page_collection_response import LoginPageCollectionResponse + + return await self.request_adapter.send_async(request_info, LoginPageCollectionResponse, error_mapping) + + async def post(self,body: Optional[LoginPage] = None, request_configuration: Optional[LoginPagesRequestBuilderPostRequestConfiguration] = None) -> Optional[LoginPage]: + """ + Create new navigation property to loginPages for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LoginPage] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.login_page import LoginPage + + return await self.request_adapter.send_async(request_info, LoginPage, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[LoginPagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get loginPages from security + 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(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[LoginPage] = None, request_configuration: Optional[LoginPagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to loginPages for security + param body: The request body + param request_configuration: Configuration for 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(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) -> LoginPagesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LoginPagesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LoginPagesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LoginPagesRequestBuilderGetQueryParameters(): + """ + Get loginPages from security + """ + 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 LoginPagesRequestBuilderGetRequestConfiguration(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[LoginPagesRequestBuilder.LoginPagesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LoginPagesRequestBuilderPostRequestConfiguration(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/security/attack_simulation/operations/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/operations/count/count_request_builder.py new file mode 100644 index 00000000000..d05a6ec17c2 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/operations/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/operations/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/operations/item/attack_simulation_operation_item_request_builder.py b/msgraph/generated/security/attack_simulation/operations/item/attack_simulation_operation_item_request_builder.py new file mode 100644 index 00000000000..d08f3be0f01 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/operations/item/attack_simulation_operation_item_request_builder.py @@ -0,0 +1,214 @@ +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.attack_simulation_operation import AttackSimulationOperation + from .....models.o_data_errors.o_data_error import ODataError + +class AttackSimulationOperationItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new AttackSimulationOperationItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/operations/{attackSimulationOperation%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AttackSimulationOperationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property operations for security + 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[AttackSimulationOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AttackSimulationOperation]: + """ + Get operations from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AttackSimulationOperation] + """ + 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.attack_simulation_operation import AttackSimulationOperation + + return await self.request_adapter.send_async(request_info, AttackSimulationOperation, error_mapping) + + async def patch(self,body: Optional[AttackSimulationOperation] = None, request_configuration: Optional[AttackSimulationOperationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AttackSimulationOperation]: + """ + Update the navigation property operations in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AttackSimulationOperation] + """ + 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.attack_simulation_operation import AttackSimulationOperation + + return await self.request_adapter.send_async(request_info, AttackSimulationOperation, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[AttackSimulationOperationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property operations for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[AttackSimulationOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get operations from security + 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(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[AttackSimulationOperation] = None, request_configuration: Optional[AttackSimulationOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property operations in security + param body: The request body + param request_configuration: Configuration for 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(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) -> AttackSimulationOperationItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AttackSimulationOperationItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AttackSimulationOperationItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AttackSimulationOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AttackSimulationOperationItemRequestBuilderGetQueryParameters(): + """ + Get operations from security + """ + 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 AttackSimulationOperationItemRequestBuilderGetRequestConfiguration(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[AttackSimulationOperationItemRequestBuilder.AttackSimulationOperationItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AttackSimulationOperationItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/operations/operations_request_builder.py b/msgraph/generated/security/attack_simulation/operations/operations_request_builder.py new file mode 100644 index 00000000000..c96a3381753 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/operations/operations_request_builder.py @@ -0,0 +1,226 @@ +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.attack_simulation_operation import AttackSimulationOperation + from ....models.attack_simulation_operation_collection_response import AttackSimulationOperationCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.attack_simulation_operation_item_request_builder import AttackSimulationOperationItemRequestBuilder + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.attackSimulationRoot 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}/security/attackSimulation/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_attack_simulation_operation_id(self,attack_simulation_operation_id: str) -> AttackSimulationOperationItemRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.attackSimulationRoot entity. + param attack_simulation_operation_id: The unique identifier of attackSimulationOperation + Returns: AttackSimulationOperationItemRequestBuilder + """ + if not attack_simulation_operation_id: + raise TypeError("attack_simulation_operation_id cannot be null.") + from .item.attack_simulation_operation_item_request_builder import AttackSimulationOperationItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["attackSimulationOperation%2Did"] = attack_simulation_operation_id + return AttackSimulationOperationItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttackSimulationOperationCollectionResponse]: + """ + Get operations from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AttackSimulationOperationCollectionResponse] + """ + 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.attack_simulation_operation_collection_response import AttackSimulationOperationCollectionResponse + + return await self.request_adapter.send_async(request_info, AttackSimulationOperationCollectionResponse, error_mapping) + + async def post(self,body: Optional[AttackSimulationOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> Optional[AttackSimulationOperation]: + """ + Create new navigation property to operations for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AttackSimulationOperation] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.attack_simulation_operation import AttackSimulationOperation + + return await self.request_adapter.send_async(request_info, AttackSimulationOperation, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get operations from security + 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(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[AttackSimulationOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to operations for security + param body: The request body + param request_configuration: Configuration for 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(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) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class OperationsRequestBuilderGetQueryParameters(): + """ + Get operations from security + """ + 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/security/attack_simulation/payloads/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/payloads/count/count_request_builder.py new file mode 100644 index 00000000000..7d7c5030bdc --- /dev/null +++ b/msgraph/generated/security/attack_simulation/payloads/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/payloads/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/payloads/item/payload_item_request_builder.py b/msgraph/generated/security/attack_simulation/payloads/item/payload_item_request_builder.py new file mode 100644 index 00000000000..f440be38347 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/payloads/item/payload_item_request_builder.py @@ -0,0 +1,214 @@ +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.payload import Payload + +class PayloadItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the payloads property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PayloadItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/payloads/{payload%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[PayloadItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property payloads for security + 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[PayloadItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Payload]: + """ + Get payloads from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Payload] + """ + 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.payload import Payload + + return await self.request_adapter.send_async(request_info, Payload, error_mapping) + + async def patch(self,body: Optional[Payload] = None, request_configuration: Optional[PayloadItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Payload]: + """ + Update the navigation property payloads in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Payload] + """ + 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.payload import Payload + + return await self.request_adapter.send_async(request_info, Payload, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[PayloadItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property payloads for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[PayloadItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get payloads from security + 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(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[Payload] = None, request_configuration: Optional[PayloadItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property payloads in security + param body: The request body + param request_configuration: Configuration for 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(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) -> PayloadItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PayloadItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PayloadItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PayloadItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class PayloadItemRequestBuilderGetQueryParameters(): + """ + Get payloads from security + """ + 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 PayloadItemRequestBuilderGetRequestConfiguration(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[PayloadItemRequestBuilder.PayloadItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PayloadItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/payloads/payloads_request_builder.py b/msgraph/generated/security/attack_simulation/payloads/payloads_request_builder.py new file mode 100644 index 00000000000..f8d094e2446 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/payloads/payloads_request_builder.py @@ -0,0 +1,226 @@ +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.payload import Payload + from ....models.payload_collection_response import PayloadCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.payload_item_request_builder import PayloadItemRequestBuilder + +class PayloadsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the payloads property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PayloadsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/payloads{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_payload_id(self,payload_id: str) -> PayloadItemRequestBuilder: + """ + Provides operations to manage the payloads property of the microsoft.graph.attackSimulationRoot entity. + param payload_id: The unique identifier of payload + Returns: PayloadItemRequestBuilder + """ + if not payload_id: + raise TypeError("payload_id cannot be null.") + from .item.payload_item_request_builder import PayloadItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["payload%2Did"] = payload_id + return PayloadItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[PayloadsRequestBuilderGetRequestConfiguration] = None) -> Optional[PayloadCollectionResponse]: + """ + Get payloads from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PayloadCollectionResponse] + """ + 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.payload_collection_response import PayloadCollectionResponse + + return await self.request_adapter.send_async(request_info, PayloadCollectionResponse, error_mapping) + + async def post(self,body: Optional[Payload] = None, request_configuration: Optional[PayloadsRequestBuilderPostRequestConfiguration] = None) -> Optional[Payload]: + """ + Create new navigation property to payloads for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Payload] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.payload import Payload + + return await self.request_adapter.send_async(request_info, Payload, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PayloadsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get payloads from security + 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(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[Payload] = None, request_configuration: Optional[PayloadsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to payloads for security + param body: The request body + param request_configuration: Configuration for 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(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) -> PayloadsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PayloadsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PayloadsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PayloadsRequestBuilderGetQueryParameters(): + """ + Get payloads from security + """ + 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 PayloadsRequestBuilderGetRequestConfiguration(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[PayloadsRequestBuilder.PayloadsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PayloadsRequestBuilderPostRequestConfiguration(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/security/attack_simulation/simulation_automations/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/simulation_automations/count/count_request_builder.py index a931690de9e..4da8f11749b 100644 --- a/msgraph/generated/security/attack_simulation/simulation_automations/count/count_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulation_automations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/count/count_request_builder.py index afec3296a1b..b121d5071bc 100644 --- a/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/count/count_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/item/simulation_automation_run_item_request_builder.py b/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/item/simulation_automation_run_item_request_builder.py index c22af7dbe78..c0625bf3c53 100644 --- a/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/item/simulation_automation_run_item_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/item/simulation_automation_run_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Simulatio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SimulationAutomationRunItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[SimulationAu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SimulationAutomationRun] = None, request_configuration: Optional[SimulationAutomationRunItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[SimulationAutomationRun] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/runs_request_builder.py b/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/runs_request_builder.py index a6ee608b651..ac77e3514f6 100644 --- a/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/runs_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulation_automations/item/runs/runs_request_builder.py @@ -45,7 +45,7 @@ def by_simulation_automation_run_id(self,simulation_automation_run_id: str) -> S async def get(self,request_configuration: Optional[RunsRequestBuilderGetRequestConfiguration] = None) -> Optional[SimulationAutomationRunCollectionResponse]: """ - Get a list of the attack simulation automation runs for a tenant. + Get a list of the attack simulation automation runs for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SimulationAutomationRunCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/simulationautomation-list-runs?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SimulationAutomationRun] = None, request_conf def to_get_request_information(self,request_configuration: Optional[RunsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the attack simulation automation runs for a tenant. + Get a list of the attack simulation automation runs for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SimulationAutomationRun] = None, request_configuration: Optional[RunsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SimulationAutomationRun] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RunsRequestBuilderGetQueryParameters(): """ - Get a list of the attack simulation automation runs for a tenant. + Get a list of the attack simulation automation runs for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/attack_simulation/simulation_automations/item/simulation_automation_item_request_builder.py b/msgraph/generated/security/attack_simulation/simulation_automations/item/simulation_automation_item_request_builder.py index 8178f913e22..1d0f57a1a25 100644 --- a/msgraph/generated/security/attack_simulation/simulation_automations/item/simulation_automation_item_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulation_automations/item/simulation_automation_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SimulationAutomationItemRe async def get(self,request_configuration: Optional[SimulationAutomationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SimulationAutomation]: """ - Get an attack simulation automation for a tenant. + Get an attack simulation automation for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SimulationAutomation] Find more info here: https://learn.microsoft.com/graph/api/simulationautomation-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[Simulatio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SimulationAutomationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an attack simulation automation for a tenant. + Get an attack simulation automation for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SimulationAutomation] = None, request_configuration: Optional[SimulationAutomationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[SimulationAutomation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class SimulationAutomationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class SimulationAutomationItemRequestBuilderGetQueryParameters(): """ - Get an attack simulation automation for a tenant. + Get an attack simulation automation for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/attack_simulation/simulation_automations/simulation_automations_request_builder.py b/msgraph/generated/security/attack_simulation/simulation_automations/simulation_automations_request_builder.py index fb7c01ae124..4fb94b031f3 100644 --- a/msgraph/generated/security/attack_simulation/simulation_automations/simulation_automations_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulation_automations/simulation_automations_request_builder.py @@ -45,7 +45,7 @@ def by_simulation_automation_id(self,simulation_automation_id: str) -> Simulatio async def get(self,request_configuration: Optional[SimulationAutomationsRequestBuilderGetRequestConfiguration] = None) -> Optional[SimulationAutomationCollectionResponse]: """ - Get a list of attack simulation automations for a tenant. + Get a list of attack simulation automations for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SimulationAutomationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/attacksimulationroot-list-simulationautomations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SimulationAutomation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[SimulationAutomationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of attack simulation automations for a tenant. + Get a list of attack simulation automations for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SimulationAutomation] = None, request_configuration: Optional[SimulationAutomationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SimulationAutomation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SimulationAutomationsRequestBuilderGetQueryParameters(): """ - Get a list of attack simulation automations for a tenant. + Get a list of attack simulation automations for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/attack_simulation/simulations/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/simulations/count/count_request_builder.py index 1b898a8b6f8..806de6e9272 100644 --- a/msgraph/generated/security/attack_simulation/simulations/count/count_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/attack_simulation/simulations/item/landing_page/landing_page_request_builder.py b/msgraph/generated/security/attack_simulation/simulations/item/landing_page/landing_page_request_builder.py new file mode 100644 index 00000000000..f531c2dc420 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/simulations/item/landing_page/landing_page_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.landing_page import LandingPage + from ......models.o_data_errors.o_data_error import ODataError + +class LandingPageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the landingPage property of the microsoft.graph.simulation entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LandingPageRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/simulations/{simulation%2Did}/landingPage{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LandingPageRequestBuilderGetRequestConfiguration] = None) -> Optional[LandingPage]: + """ + Get landingPage from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LandingPage] + """ + 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.landing_page import LandingPage + + return await self.request_adapter.send_async(request_info, LandingPage, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[LandingPageRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get landingPage from security + 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(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) -> LandingPageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LandingPageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LandingPageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LandingPageRequestBuilderGetQueryParameters(): + """ + Get landingPage from security + """ + 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 LandingPageRequestBuilderGetRequestConfiguration(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[LandingPageRequestBuilder.LandingPageRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/simulations/item/login_page/login_page_request_builder.py b/msgraph/generated/security/attack_simulation/simulations/item/login_page/login_page_request_builder.py new file mode 100644 index 00000000000..c76209bfbab --- /dev/null +++ b/msgraph/generated/security/attack_simulation/simulations/item/login_page/login_page_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.login_page import LoginPage + from ......models.o_data_errors.o_data_error import ODataError + +class LoginPageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the loginPage property of the microsoft.graph.simulation entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LoginPageRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/simulations/{simulation%2Did}/loginPage{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LoginPageRequestBuilderGetRequestConfiguration] = None) -> Optional[LoginPage]: + """ + Get loginPage from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LoginPage] + """ + 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.login_page import LoginPage + + return await self.request_adapter.send_async(request_info, LoginPage, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[LoginPageRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get loginPage from security + 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(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) -> LoginPageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LoginPageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LoginPageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LoginPageRequestBuilderGetQueryParameters(): + """ + Get loginPage from security + """ + 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 LoginPageRequestBuilderGetRequestConfiguration(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[LoginPageRequestBuilder.LoginPageRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/simulations/item/payload/payload_request_builder.py b/msgraph/generated/security/attack_simulation/simulations/item/payload/payload_request_builder.py new file mode 100644 index 00000000000..3851e248483 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/simulations/item/payload/payload_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.payload import Payload + +class PayloadRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the payload property of the microsoft.graph.simulation entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new PayloadRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/simulations/{simulation%2Did}/payload{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PayloadRequestBuilderGetRequestConfiguration] = None) -> Optional[Payload]: + """ + Get payload from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Payload] + """ + 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.payload import Payload + + return await self.request_adapter.send_async(request_info, Payload, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[PayloadRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get payload from security + 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(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) -> PayloadRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PayloadRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PayloadRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PayloadRequestBuilderGetQueryParameters(): + """ + Get payload from security + """ + 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 PayloadRequestBuilderGetRequestConfiguration(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[PayloadRequestBuilder.PayloadRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/simulations/item/simulation_item_request_builder.py b/msgraph/generated/security/attack_simulation/simulations/item/simulation_item_request_builder.py index e108508a2a7..0ce8f745b73 100644 --- a/msgraph/generated/security/attack_simulation/simulations/item/simulation_item_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulations/item/simulation_item_request_builder.py @@ -12,6 +12,9 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.simulation import Simulation + from .landing_page.landing_page_request_builder import LandingPageRequestBuilder + from .login_page.login_page_request_builder import LoginPageRequestBuilder + from .payload.payload_request_builder import PayloadRequestBuilder class SimulationItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +50,7 @@ async def delete(self,request_configuration: Optional[SimulationItemRequestBuild async def get(self,request_configuration: Optional[SimulationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Simulation]: """ - Get an attack simulation campaign for a tenant. + Get an attack simulation campaign for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Simulation] Find more info here: https://learn.microsoft.com/graph/api/simulation-get?view=graph-rest-1.0 @@ -98,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[Simulatio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SimulationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an attack simulation campaign for a tenant. + Get an attack simulation campaign for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Simulation] = None, request_configuration: Optional[SimulationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Simulation] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -153,6 +156,33 @@ def with_url(self,raw_url: Optional[str] = None) -> SimulationItemRequestBuilder raise TypeError("raw_url cannot be null.") return SimulationItemRequestBuilder(self.request_adapter, raw_url) + @property + def landing_page(self) -> LandingPageRequestBuilder: + """ + Provides operations to manage the landingPage property of the microsoft.graph.simulation entity. + """ + from .landing_page.landing_page_request_builder import LandingPageRequestBuilder + + return LandingPageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def login_page(self) -> LoginPageRequestBuilder: + """ + Provides operations to manage the loginPage property of the microsoft.graph.simulation entity. + """ + from .login_page.login_page_request_builder import LoginPageRequestBuilder + + return LoginPageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def payload(self) -> PayloadRequestBuilder: + """ + Provides operations to manage the payload property of the microsoft.graph.simulation entity. + """ + from .payload.payload_request_builder import PayloadRequestBuilder + + return PayloadRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass @@ -166,7 +196,7 @@ class SimulationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class SimulationItemRequestBuilderGetQueryParameters(): """ - Get an attack simulation campaign for a tenant. + Get an attack simulation campaign for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/attack_simulation/simulations/simulations_request_builder.py b/msgraph/generated/security/attack_simulation/simulations/simulations_request_builder.py index 868ba06304c..a541fd589a9 100644 --- a/msgraph/generated/security/attack_simulation/simulations/simulations_request_builder.py +++ b/msgraph/generated/security/attack_simulation/simulations/simulations_request_builder.py @@ -45,7 +45,7 @@ def by_simulation_id(self,simulation_id: str) -> SimulationItemRequestBuilder: async def get(self,request_configuration: Optional[SimulationsRequestBuilderGetRequestConfiguration] = None) -> Optional[SimulationCollectionResponse]: """ - Get a list of attack simulation campaigns for a tenant. + Get a list of attack simulation campaigns for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SimulationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/attacksimulationroot-list-simulations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Simulation] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[SimulationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of attack simulation campaigns for a tenant. + Get a list of attack simulation campaigns for a tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Simulation] = None, request_configuration: Optional[SimulationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Simulation] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SimulationsRequestBuilderGetQueryParameters(): """ - Get a list of attack simulation campaigns for a tenant. + Get a list of attack simulation campaigns for a tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/attack_simulation/trainings/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/trainings/count/count_request_builder.py new file mode 100644 index 00000000000..1626f1eeaf3 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/trainings/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/trainings/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/trainings/item/language_details/count/count_request_builder.py b/msgraph/generated/security/attack_simulation/trainings/item/language_details/count/count_request_builder.py new file mode 100644 index 00000000000..da92b35d08c --- /dev/null +++ b/msgraph/generated/security/attack_simulation/trainings/item/language_details/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/trainings/{training%2Did}/languageDetails/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/attack_simulation/trainings/item/language_details/item/training_language_detail_item_request_builder.py b/msgraph/generated/security/attack_simulation/trainings/item/language_details/item/training_language_detail_item_request_builder.py new file mode 100644 index 00000000000..56377646a7d --- /dev/null +++ b/msgraph/generated/security/attack_simulation/trainings/item/language_details/item/training_language_detail_item_request_builder.py @@ -0,0 +1,214 @@ +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.training_language_detail import TrainingLanguageDetail + +class TrainingLanguageDetailItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the languageDetails property of the microsoft.graph.training entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TrainingLanguageDetailItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/trainings/{training%2Did}/languageDetails/{trainingLanguageDetail%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TrainingLanguageDetailItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property languageDetails for security + 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[TrainingLanguageDetailItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TrainingLanguageDetail]: + """ + Get languageDetails from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[TrainingLanguageDetail] + """ + 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.training_language_detail import TrainingLanguageDetail + + return await self.request_adapter.send_async(request_info, TrainingLanguageDetail, error_mapping) + + async def patch(self,body: Optional[TrainingLanguageDetail] = None, request_configuration: Optional[TrainingLanguageDetailItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TrainingLanguageDetail]: + """ + Update the navigation property languageDetails in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[TrainingLanguageDetail] + """ + 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.training_language_detail import TrainingLanguageDetail + + return await self.request_adapter.send_async(request_info, TrainingLanguageDetail, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[TrainingLanguageDetailItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property languageDetails for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[TrainingLanguageDetailItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get languageDetails from security + 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(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[TrainingLanguageDetail] = None, request_configuration: Optional[TrainingLanguageDetailItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property languageDetails in security + param body: The request body + param request_configuration: Configuration for 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(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) -> TrainingLanguageDetailItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TrainingLanguageDetailItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TrainingLanguageDetailItemRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TrainingLanguageDetailItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TrainingLanguageDetailItemRequestBuilderGetQueryParameters(): + """ + Get languageDetails from security + """ + 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 TrainingLanguageDetailItemRequestBuilderGetRequestConfiguration(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[TrainingLanguageDetailItemRequestBuilder.TrainingLanguageDetailItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TrainingLanguageDetailItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/trainings/item/language_details/language_details_request_builder.py b/msgraph/generated/security/attack_simulation/trainings/item/language_details/language_details_request_builder.py new file mode 100644 index 00000000000..ea30f23e13b --- /dev/null +++ b/msgraph/generated/security/attack_simulation/trainings/item/language_details/language_details_request_builder.py @@ -0,0 +1,226 @@ +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.training_language_detail import TrainingLanguageDetail + from ......models.training_language_detail_collection_response import TrainingLanguageDetailCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.training_language_detail_item_request_builder import TrainingLanguageDetailItemRequestBuilder + +class LanguageDetailsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the languageDetails property of the microsoft.graph.training entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new LanguageDetailsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/trainings/{training%2Did}/languageDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_training_language_detail_id(self,training_language_detail_id: str) -> TrainingLanguageDetailItemRequestBuilder: + """ + Provides operations to manage the languageDetails property of the microsoft.graph.training entity. + param training_language_detail_id: The unique identifier of trainingLanguageDetail + Returns: TrainingLanguageDetailItemRequestBuilder + """ + if not training_language_detail_id: + raise TypeError("training_language_detail_id cannot be null.") + from .item.training_language_detail_item_request_builder import TrainingLanguageDetailItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["trainingLanguageDetail%2Did"] = training_language_detail_id + return TrainingLanguageDetailItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[LanguageDetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[TrainingLanguageDetailCollectionResponse]: + """ + Get languageDetails from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[TrainingLanguageDetailCollectionResponse] + """ + 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.training_language_detail_collection_response import TrainingLanguageDetailCollectionResponse + + return await self.request_adapter.send_async(request_info, TrainingLanguageDetailCollectionResponse, error_mapping) + + async def post(self,body: Optional[TrainingLanguageDetail] = None, request_configuration: Optional[LanguageDetailsRequestBuilderPostRequestConfiguration] = None) -> Optional[TrainingLanguageDetail]: + """ + Create new navigation property to languageDetails for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[TrainingLanguageDetail] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.training_language_detail import TrainingLanguageDetail + + return await self.request_adapter.send_async(request_info, TrainingLanguageDetail, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[LanguageDetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get languageDetails from security + 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(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[TrainingLanguageDetail] = None, request_configuration: Optional[LanguageDetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to languageDetails for security + param body: The request body + param request_configuration: Configuration for 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(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) -> LanguageDetailsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LanguageDetailsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LanguageDetailsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LanguageDetailsRequestBuilderGetQueryParameters(): + """ + Get languageDetails from security + """ + 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 LanguageDetailsRequestBuilderGetRequestConfiguration(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[LanguageDetailsRequestBuilder.LanguageDetailsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LanguageDetailsRequestBuilderPostRequestConfiguration(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/security/attack_simulation/trainings/item/training_item_request_builder.py b/msgraph/generated/security/attack_simulation/trainings/item/training_item_request_builder.py new file mode 100644 index 00000000000..917ea22a005 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/trainings/item/training_item_request_builder.py @@ -0,0 +1,224 @@ +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.training import Training + from .language_details.language_details_request_builder import LanguageDetailsRequestBuilder + +class TrainingItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the trainings property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TrainingItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/trainings/{training%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TrainingItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property trainings for security + 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[TrainingItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Training]: + """ + Get trainings from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Training] + """ + 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.training import Training + + return await self.request_adapter.send_async(request_info, Training, error_mapping) + + async def patch(self,body: Optional[Training] = None, request_configuration: Optional[TrainingItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Training]: + """ + Update the navigation property trainings in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Training] + """ + 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.training import Training + + return await self.request_adapter.send_async(request_info, Training, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[TrainingItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property trainings for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[TrainingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get trainings from security + 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(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[Training] = None, request_configuration: Optional[TrainingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property trainings in security + param body: The request body + param request_configuration: Configuration for 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(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) -> TrainingItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TrainingItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TrainingItemRequestBuilder(self.request_adapter, raw_url) + + @property + def language_details(self) -> LanguageDetailsRequestBuilder: + """ + Provides operations to manage the languageDetails property of the microsoft.graph.training entity. + """ + from .language_details.language_details_request_builder import LanguageDetailsRequestBuilder + + return LanguageDetailsRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TrainingItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TrainingItemRequestBuilderGetQueryParameters(): + """ + Get trainings from security + """ + 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 TrainingItemRequestBuilderGetRequestConfiguration(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[TrainingItemRequestBuilder.TrainingItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TrainingItemRequestBuilderPatchRequestConfiguration(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/security/attack_simulation/trainings/trainings_request_builder.py b/msgraph/generated/security/attack_simulation/trainings/trainings_request_builder.py new file mode 100644 index 00000000000..3b7c64296f0 --- /dev/null +++ b/msgraph/generated/security/attack_simulation/trainings/trainings_request_builder.py @@ -0,0 +1,226 @@ +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.training import Training + from ....models.training_collection_response import TrainingCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.training_item_request_builder import TrainingItemRequestBuilder + +class TrainingsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the trainings property of the microsoft.graph.attackSimulationRoot entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TrainingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/attackSimulation/trainings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_training_id(self,training_id: str) -> TrainingItemRequestBuilder: + """ + Provides operations to manage the trainings property of the microsoft.graph.attackSimulationRoot entity. + param training_id: The unique identifier of training + Returns: TrainingItemRequestBuilder + """ + if not training_id: + raise TypeError("training_id cannot be null.") + from .item.training_item_request_builder import TrainingItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["training%2Did"] = training_id + return TrainingItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[TrainingsRequestBuilderGetRequestConfiguration] = None) -> Optional[TrainingCollectionResponse]: + """ + Get trainings from security + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[TrainingCollectionResponse] + """ + 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.training_collection_response import TrainingCollectionResponse + + return await self.request_adapter.send_async(request_info, TrainingCollectionResponse, error_mapping) + + async def post(self,body: Optional[Training] = None, request_configuration: Optional[TrainingsRequestBuilderPostRequestConfiguration] = None) -> Optional[Training]: + """ + Create new navigation property to trainings for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Training] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.training import Training + + return await self.request_adapter.send_async(request_info, Training, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TrainingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get trainings from security + 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(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[Training] = None, request_configuration: Optional[TrainingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to trainings for security + param body: The request body + param request_configuration: Configuration for 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(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) -> TrainingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TrainingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TrainingsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TrainingsRequestBuilderGetQueryParameters(): + """ + Get trainings from security + """ + 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 TrainingsRequestBuilderGetRequestConfiguration(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[TrainingsRequestBuilder.TrainingsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TrainingsRequestBuilderPostRequestConfiguration(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/security/cases/cases_request_builder.py b/msgraph/generated/security/cases/cases_request_builder.py index cb73bb4ab6c..3e4c3e5c399 100644 --- a/msgraph/generated/security/cases/cases_request_builder.py +++ b/msgraph/generated/security/cases/cases_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[CasesRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CasesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[CasesRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CasesRoot] = None, request_configuration: Optional[CasesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[CasesRoot] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/count/count_request_builder.py index 2f00f8ee642..efaac4d6cfa 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/ediscovery_cases_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/ediscovery_cases_request_builder.py index 3f1c96130b8..42670cec0b9 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/ediscovery_cases_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/ediscovery_cases_request_builder.py @@ -45,7 +45,7 @@ def by_ediscovery_case_id(self,ediscovery_case_id: str) -> EdiscoveryCaseItemReq async def get(self,request_configuration: Optional[EdiscoveryCasesRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryCaseCollectionResponse]: """ - Get a list of the ediscoveryCase objects and their properties. + Get a list of the ediscoveryCase objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCaseCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-casesroot-list-ediscoverycases?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[EdiscoveryCasesRequestBuilder async def post(self,body: Optional[EdiscoveryCase] = None, request_configuration: Optional[EdiscoveryCasesRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoveryCase]: """ - Create a new ediscoveryCase object. + Create a new ediscoveryCase object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCase] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EdiscoveryCase] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[EdiscoveryCasesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the ediscoveryCase objects and their properties. + Get a list of the ediscoveryCase objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryCase] = None, request_configuration: Optional[EdiscoveryCasesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoveryCase object. + Create a new ediscoveryCase object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EdiscoveryCase] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class EdiscoveryCasesRequestBuilderGetQueryParameters(): """ - Get a list of the ediscoveryCase objects and their properties. + Get a list of the ediscoveryCase objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/count/count_request_builder.py index ae27c3cf40b..b87c44487ce 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/custodians_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/custodians_request_builder.py index 76c5c678d1a..efe05adb872 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/custodians_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/custodians_request_builder.py @@ -47,7 +47,7 @@ def by_ediscovery_custodian_id(self,ediscovery_custodian_id: str) -> EdiscoveryC async def get(self,request_configuration: Optional[CustodiansRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryCustodianCollectionResponse]: """ - Get a list of the custodian objects and their properties. + Get a list of the custodian objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCustodianCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycase-list-custodians?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[CustodiansRequestBuilderGetRe async def post(self,body: Optional[EdiscoveryCustodian] = None, request_configuration: Optional[CustodiansRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoveryCustodian]: """ - Create a new ediscoveryCustodian object.After the custodian object is created, you will need to create the custodian's userSource to reference their mailbox and OneDrive for Business site. + Create a new ediscoveryCustodian object.After the custodian object is created, you will need to create the custodian's userSource to reference their mailbox and OneDrive for Business site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCustodian] @@ -94,24 +94,24 @@ async def post(self,body: Optional[EdiscoveryCustodian] = None, request_configur def to_get_request_information(self,request_configuration: Optional[CustodiansRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the custodian objects and their properties. + Get a list of the custodian objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryCustodian] = None, request_configuration: Optional[CustodiansRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoveryCustodian object.After the custodian object is created, you will need to create the custodian's userSource to reference their mailbox and OneDrive for Business site. + Create a new ediscoveryCustodian object.After the custodian object is created, you will need to create the custodian's userSource to reference their mailbox and OneDrive for Business site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[EdiscoveryCustodian] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -169,7 +169,7 @@ def microsoft_graph_security_remove_hold(self) -> MicrosoftGraphSecurityRemoveHo @dataclass class CustodiansRequestBuilderGetQueryParameters(): """ - Get a list of the custodian objects and their properties. + Get a list of the custodian objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/ediscovery_custodian_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/ediscovery_custodian_item_request_builder.py index 78a92920af6..0a186227e27 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/ediscovery_custodian_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/ediscovery_custodian_item_request_builder.py @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[EdiscoveryCustodianItemReq async def get(self,request_configuration: Optional[EdiscoveryCustodianItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryCustodian]: """ - Read the properties and relationships of an ediscoveryCustodian object. + Read the properties and relationships of an ediscoveryCustodian object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCustodian] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycustodian-get?view=graph-rest-1.0 @@ -107,29 +107,29 @@ def to_delete_request_information(self,request_configuration: Optional[Ediscover Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryCustodianItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoveryCustodian object. + Read the properties and relationships of an ediscoveryCustodian object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryCustodian] = None, request_configuration: Optional[EdiscoveryCustodianItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryCustodian] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -256,7 +256,7 @@ class EdiscoveryCustodianItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EdiscoveryCustodianItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoveryCustodian object. + Read the properties and relationships of an ediscoveryCustodian object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/last_index_operation/last_index_operation_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/last_index_operation/last_index_operation_request_builder.py index 2c9bed38262..f49947dfc35 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/last_index_operation/last_index_operation_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/last_index_operation/last_index_operation_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LastIndexOperationRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryIndexOperation]: """ - Get a list of the ediscoveryIndexOperations associated with an ediscoveryCustodian. + Get a list of the ediscoveryIndexOperations associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryIndexOperation] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycustodian-list-lastindexoperation?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[LastIndexOperationRequestBuil def to_get_request_information(self,request_configuration: Optional[LastIndexOperationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the ediscoveryIndexOperations associated with an ediscoveryCustodian. + Get a list of the ediscoveryIndexOperations associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastIndexOperationRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> LastIndexOperationRequestBui @dataclass class LastIndexOperationRequestBuilderGetQueryParameters(): """ - Get a list of the ediscoveryIndexOperations associated with an ediscoveryCustodian. + Get a list of the ediscoveryIndexOperations associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_activate/microsoft_graph_security_activate_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_activate/microsoft_graph_security_activate_request_builder.py index 71f73b8b68b..6e18aaa65ae 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_activate/microsoft_graph_security_activate_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_activate/microsoft_graph_security_activate_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityActivateRequestBuilderPostRequestConfiguration] = None) -> None: """ - Activate a custodian that has been released from a case to make them part of the case again. For details, see Manage custodians in an eDiscovery (Premium) case. + Activate a custodian that has been released from a case to make them part of the case again. For details, see Manage custodians in an eDiscovery (Premium) case. This API is available in the following national cloud deployments. 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/security-ediscoverycustodian-activate?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityActiva def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityActivateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Activate a custodian that has been released from a case to make them part of the case again. For details, see Manage custodians in an eDiscovery (Premium) case. + Activate a custodian that has been released from a case to make them part of the case again. For details, see Manage custodians in an eDiscovery (Premium) case. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityActivateRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py index 6d0d5f026b5..97328d0b40c 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start the process of applying hold on eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. + Start the process of applying hold on eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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/security-ediscoverycustodian-applyhold?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityApplyH def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start the process of applying hold on eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. + Start the process of applying hold on eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityApplyHoldRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py index 28d2f0fade5..91f19de25c1 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration] = None) -> None: """ - Release a custodian from a case. For details, see Release a custodian from a case. + Release a custodian from a case. For details, see Release a custodian from a case. This API is available in the following national cloud deployments. 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/security-ediscoverycustodian-release?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityReleas def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Release a custodian from a case. For details, see Release a custodian from a case. + Release a custodian from a case. For details, see Release a custodian from a case. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityReleaseRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py index 183620d9bb0..11c668524a5 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start the process of removing hold from eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. + Start the process of removing hold from eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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/security-ediscoverycustodian-removehold?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityRemove def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start the process of removing hold from eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. + Start the process of removing hold from eDiscovery custodians. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that will return an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityRemoveHoldRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py index 600c7e75ba6..ed0e28298e4 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration] = None) -> None: """ - Trigger an indexOperation to make a custodian and associated sources searchable. + Trigger an indexOperation to make a custodian and associated sources searchable. This API is available in the following national cloud deployments. 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/security-ediscoverycustodian-updateindex?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityUpdate def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Trigger an indexOperation to make a custodian and associated sources searchable. + Trigger an indexOperation to make a custodian and associated sources searchable. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityUpdateIndexRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/count/count_request_builder.py index 3d8fb521b24..8f7fdab7fec 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site/site_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site/site_request_builder.py index 3dced910c9f..2aa26749e16 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site/site_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site/site_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SiteRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site_source_item_request_builder.py index 9763b340b08..c8e4734cb8b 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/item/site_source_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[SiteSourc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SiteSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteSourceIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SiteSource] = None, request_configuration: Optional[SiteSourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SiteSource] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/site_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/site_sources_request_builder.py index 6e00634ff6e..c2610511614 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/site_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/site_sources/site_sources_request_builder.py @@ -45,7 +45,7 @@ def by_site_source_id(self,site_source_id: str) -> SiteSourceItemRequestBuilder: async def get(self,request_configuration: Optional[SiteSourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteSourceCollectionResponse]: """ - Get a list of the siteSource objects associated with an ediscoveryCustodian. + Get a list of the siteSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SiteSourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycustodian-list-sitesources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SiteSourcesRequestBuilderGetR async def post(self,body: Optional[SiteSource] = None, request_configuration: Optional[SiteSourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[SiteSource]: """ - Create a new siteSource object associated with an eDiscovery custodian. + Create a new siteSource object associated with an eDiscovery custodian. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SiteSource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SiteSource] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[SiteSourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the siteSource objects associated with an ediscoveryCustodian. + Get a list of the siteSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SiteSource] = None, request_configuration: Optional[SiteSourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new siteSource object associated with an eDiscovery custodian. + Create a new siteSource object associated with an eDiscovery custodian. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SiteSource] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SiteSourcesRequestBuilderGetQueryParameters(): """ - Get a list of the siteSource objects associated with an ediscoveryCustodian. + Get a list of the siteSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/count/count_request_builder.py index 2f23d557588..2eeec394e5d 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/group_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/group_request_builder.py index eae4f3eee3a..88a6015bc91 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/group_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/group_request_builder.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ..........models.group import Group from ..........models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GroupRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GroupRequestBuilder: @@ -74,6 +75,15 @@ def with_url(self,raw_url: Optional[str] = None) -> GroupRequestBuilder: raise TypeError("raw_url cannot be null.") return GroupRequestBuilder(self.request_adapter, raw_url) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GroupRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..1e83a72717d --- /dev/null +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..e6dfac8cf93 --- /dev/null +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /security/cases/ediscoveryCases/{ediscoveryCase-id}/custodians/{ediscoveryCustodian-id}/unifiedGroupSources/{unifiedGroupSource-id}/group/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/unified_group_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/unified_group_source_item_request_builder.py index eabf2beae2c..ab1ca356937 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/unified_group_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/item/unified_group_source_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UnifiedGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UnifiedGroupSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UnifiedGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedGroupSource] = None, request_configuration: Optional[UnifiedGroupSourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UnifiedGroupSource] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/unified_group_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/unified_group_sources_request_builder.py index 8ea6ca26923..ea4cbec3318 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/unified_group_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/unified_group_sources/unified_group_sources_request_builder.py @@ -45,7 +45,7 @@ def by_unified_group_source_id(self,unified_group_source_id: str) -> UnifiedGrou async def get(self,request_configuration: Optional[UnifiedGroupSourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[UnifiedGroupSourceCollectionResponse]: """ - Get a list of the unifiedGroupSource objects associated with an ediscoveryCustodian. + Get a list of the unifiedGroupSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedGroupSourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycustodian-list-unifiedgroupsources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[UnifiedGroupSourcesRequestBui async def post(self,body: Optional[UnifiedGroupSource] = None, request_configuration: Optional[UnifiedGroupSourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[UnifiedGroupSource]: """ - Create a new unifiedGroupSource object associated with an eDiscovery custodian. + Create a new unifiedGroupSource object associated with an eDiscovery custodian. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UnifiedGroupSource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UnifiedGroupSource] = None, request_configura def to_get_request_information(self,request_configuration: Optional[UnifiedGroupSourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the unifiedGroupSource objects associated with an ediscoveryCustodian. + Get a list of the unifiedGroupSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UnifiedGroupSource] = None, request_configuration: Optional[UnifiedGroupSourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new unifiedGroupSource object associated with an eDiscovery custodian. + Create a new unifiedGroupSource object associated with an eDiscovery custodian. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UnifiedGroupSource] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UnifiedGroupSourcesRequestBuilderGetQueryParameters(): """ - Get a list of the unifiedGroupSource objects associated with an ediscoveryCustodian. + Get a list of the unifiedGroupSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/count/count_request_builder.py index 400f29e2921..9166c0d093d 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/item/user_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/item/user_source_item_request_builder.py index 4c2f5a2bbf3..934598d8bcd 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/item/user_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/item/user_source_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[UserSourc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[UserSourceIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserSource] = None, request_configuration: Optional[UserSourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[UserSource] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/user_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/user_sources_request_builder.py index d1675d9e050..056f66258e7 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/user_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/user_sources/user_sources_request_builder.py @@ -45,7 +45,7 @@ def by_user_source_id(self,user_source_id: str) -> UserSourceItemRequestBuilder: async def get(self,request_configuration: Optional[UserSourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserSourceCollectionResponse]: """ - Get a list of the userSource objects associated with an ediscoveryCustodian. + Get a list of the userSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserSourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycustodian-list-usersources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[UserSourcesRequestBuilderGetR async def post(self,body: Optional[UserSource] = None, request_configuration: Optional[UserSourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[UserSource]: """ - Create a new userSource object associated with an eDiscovery custodian. + Create a new userSource object associated with an eDiscovery custodian. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserSource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UserSource] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[UserSourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the userSource objects associated with an ediscoveryCustodian. + Get a list of the userSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserSource] = None, request_configuration: Optional[UserSourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new userSource object associated with an eDiscovery custodian. + Create a new userSource object associated with an eDiscovery custodian. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UserSource] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UserSourcesRequestBuilderGetQueryParameters(): """ - Get a list of the userSource objects associated with an ediscoveryCustodian. + Get a list of the userSource objects associated with an ediscoveryCustodian. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py index 052fd055f47..f972d58eca2 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyHoldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py index 7ecd1446133..411ed7482a3 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/custodians/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[RemoveHoldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/ediscovery_case_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/ediscovery_case_item_request_builder.py index 1a0ee7a3749..505870ad422 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/ediscovery_case_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/ediscovery_case_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EdiscoveryCaseItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an ediscoveryCase object. + Delete an ediscoveryCase object. This API is available in the following national cloud deployments. 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/security-casesroot-delete-ediscoverycases?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[EdiscoveryCaseItemRequestB async def get(self,request_configuration: Optional[EdiscoveryCaseItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryCase]: """ - Read the properties and relationships of an ediscoveryCase object. + Read the properties and relationships of an ediscoveryCase object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCase] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycase-get?view=graph-rest-1.0 @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[EdiscoveryCaseItemRequestBuil async def patch(self,body: Optional[EdiscoveryCase] = None, request_configuration: Optional[EdiscoveryCaseItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EdiscoveryCase]: """ - Update the properties of an ediscoveryCase object. + Update the properties of an ediscoveryCase object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCase] @@ -104,39 +104,39 @@ async def patch(self,body: Optional[EdiscoveryCase] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[EdiscoveryCaseItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an ediscoveryCase object. + Delete an ediscoveryCase object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryCaseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoveryCase object. + Read the properties and relationships of an ediscoveryCase object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryCase] = None, request_configuration: Optional[EdiscoveryCaseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an ediscoveryCase object. + Update the properties of an ediscoveryCase object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryCase] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -258,7 +258,7 @@ class EdiscoveryCaseItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class EdiscoveryCaseItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoveryCase object. + Read the properties and relationships of an ediscoveryCase object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_close/microsoft_graph_security_close_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_close/microsoft_graph_security_close_request_builder.py index 8aaa489ebd7..a85e78f1ac8 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_close/microsoft_graph_security_close_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_close/microsoft_graph_security_close_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityCloseRequestBuilderPostRequestConfiguration] = None) -> None: """ - Close an eDiscovery case. For details, see Close a case. + Close an eDiscovery case. For details, see Close a case. This API is available in the following national cloud deployments. 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/security-ediscoverycase-close?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityCloseR def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityCloseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Close an eDiscovery case. For details, see Close a case. + Close an eDiscovery case. For details, see Close a case. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityCloseRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_reopen/microsoft_graph_security_reopen_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_reopen/microsoft_graph_security_reopen_request_builder.py index 04d8722648c..86ca0036d07 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_reopen/microsoft_graph_security_reopen_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/microsoft_graph_security_reopen/microsoft_graph_security_reopen_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityReopenRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reopen an eDiscovery case that was closed. For details, see Reopen a closed case. + Reopen an eDiscovery case that was closed. For details, see Reopen a closed case. This API is available in the following national cloud deployments. 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/security-ediscoverycase-reopen?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityReopen def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityReopenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reopen an eDiscovery case that was closed. For details, see Reopen a closed case. + Reopen an eDiscovery case that was closed. For details, see Reopen a closed case. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityReopenRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/count/count_request_builder.py index 59e0ee6ff90..e9c57ba770a 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/data_source/data_source_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/data_source/data_source_request_builder.py index a1e7cd7e345..9ee4aea3f1a 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/data_source/data_source_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/data_source/data_source_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DataSourc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DataSourceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DataSourceRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DataSource] = None, request_configuration: Optional[DataSourceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DataSource] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py index ad1252ce150..62104458b41 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[Ediscover Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryNoncustodialDataSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[EdiscoveryNo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryNoncustodialDataSource] = None, request_configuration: Optional[EdiscoveryNoncustodialDataSourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryNoncustodialDataS if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/last_index_operation/last_index_operation_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/last_index_operation/last_index_operation_request_builder.py index 6760b0ef411..ba397b0f976 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/last_index_operation/last_index_operation_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/last_index_operation/last_index_operation_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[LastIndexOpe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastIndexOperationRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py index ccda798748b..7f5fefdf579 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start the process of applying hold on eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. + Start the process of applying hold on eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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/security-ediscoverynoncustodialdatasource-applyhold?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityApplyH def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start the process of applying hold on eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. + Start the process of applying hold on eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityApplyHoldRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py index 0e0bc9aeb9f..1bbad7da1c6 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_release/microsoft_graph_security_release_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration] = None) -> None: """ - Release the non-custodial data source from the case. + Release the non-custodial data source from the case. This API is available in the following national cloud deployments. 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/security-ediscoverynoncustodialdatasource-release?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityReleas def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Release the non-custodial data source from the case. + Release the non-custodial data source from the case. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityReleaseRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py index 7567738265b..99182027c49 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start the process of removing hold from eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. + Start the process of removing hold from eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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/security-ediscoverynoncustodialdatasource-removehold?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityRemove def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start the process of removing hold from eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. + Start the process of removing hold from eDiscovery non-custodial data sources. After the operation is created, you can get the status by retrieving the Location parameter from the response headers. The location provides a URL that returns an eDiscoveryHoldOperation object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityRemoveHoldRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py index 809252a5430..b6171345eca 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/item/microsoft_graph_security_update_index/microsoft_graph_security_update_index_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration] = None) -> None: """ - Trigger an indexOperation to make a non-custodial data source and its associated data source searchable. + Trigger an indexOperation to make a non-custodial data source and its associated data source searchable. This API is available in the following national cloud deployments. 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/security-ediscoverynoncustodialdatasource-updateindex?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityUpdate def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Trigger an indexOperation to make a non-custodial data source and its associated data source searchable. + Trigger an indexOperation to make a non-custodial data source and its associated data source searchable. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityUpdateIndexRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py index 726c2e6a491..d2d05cf1e5c 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ApplyHoldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py index 01399cf8955..567ffea8ef6 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/microsoft_graph_security_remove_hold/microsoft_graph_security_remove_hold_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[RemoveHoldPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/noncustodial_data_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/noncustodial_data_sources_request_builder.py index b8064aa595c..c78cf702555 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/noncustodial_data_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/noncustodial_data_sources/noncustodial_data_sources_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[NoncustodialDataSourcesReques async def post(self,body: Optional[EdiscoveryNoncustodialDataSource] = None, request_configuration: Optional[NoncustodialDataSourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoveryNoncustodialDataSource]: """ - Create a new ediscoveryNoncustodialDataSource object. + Create a new ediscoveryNoncustodialDataSource object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryNoncustodialDataSource] @@ -98,19 +98,19 @@ def to_get_request_information(self,request_configuration: Optional[Noncustodial Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryNoncustodialDataSource] = None, request_configuration: Optional[NoncustodialDataSourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoveryNoncustodialDataSource object. + Create a new ediscoveryNoncustodialDataSource object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EdiscoveryNoncustodialDataSo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/operations/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/operations/count/count_request_builder.py index fafd028ea1c..ed272e50f5b 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/operations/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/operations/item/case_operation_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/operations/item/case_operation_item_request_builder.py index f7e2fecb6e4..b61a31f812e 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/operations/item/case_operation_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/operations/item/case_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[CaseOperationItemRequestBu async def get(self,request_configuration: Optional[CaseOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CaseOperation]: """ - Read the properties and relationships of a caseOperation object. + Read the properties and relationships of a caseOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CaseOperation] Find more info here: https://learn.microsoft.com/graph/api/security-caseoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[CaseOpera Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CaseOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a caseOperation object. + Read the properties and relationships of a caseOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CaseOperation] = None, request_configuration: Optional[CaseOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[CaseOperation] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class CaseOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class CaseOperationItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a caseOperation object. + Read the properties and relationships of a caseOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/operations/operations_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/operations/operations_request_builder.py index 8c049865396..ba74f22cfcf 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/operations/operations_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_case_operation_id(self,case_operation_id: str) -> CaseOperationItemReques async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[CaseOperationCollectionResponse]: """ - Get a list of the caseOperation objects and their properties. + Get a list of the caseOperation objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CaseOperationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycase-list-operations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[CaseOperation] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the caseOperation objects and their properties. + Get a list of the caseOperation objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CaseOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[CaseOperation] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get a list of the caseOperation objects and their properties. + Get a list of the caseOperation objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/count/count_request_builder.py index 12c06a11df9..b0ee977fd2f 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/ediscovery_review_set_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/ediscovery_review_set_item_request_builder.py index 711684b1323..88257a7be44 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/ediscovery_review_set_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/ediscovery_review_set_item_request_builder.py @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[EdiscoveryReviewSetItemReq async def get(self,request_configuration: Optional[EdiscoveryReviewSetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryReviewSet]: """ - Read the properties and relationships of an ediscoveryReviewSet object. + Read the properties and relationships of an ediscoveryReviewSet object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSet] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoveryreviewset-get?view=graph-rest-1.0 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[Ediscover Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryReviewSetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoveryReviewSet object. + Read the properties and relationships of an ediscoveryReviewSet object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryReviewSet] = None, request_configuration: Optional[EdiscoveryReviewSetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryReviewSet] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class EdiscoveryReviewSetItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EdiscoveryReviewSetItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoveryReviewSet object. + Read the properties and relationships of an ediscoveryReviewSet object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_add_to_review_set/microsoft_graph_security_add_to_review_set_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_add_to_review_set/microsoft_graph_security_add_to_review_set_request_builder.py index 6d1641e8611..561bddbce46 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_add_to_review_set/microsoft_graph_security_add_to_review_set_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_add_to_review_set/microsoft_graph_security_add_to_review_set_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddToReviewSetPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityAddToReviewSetRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start the process of adding a collection from Microsoft 365 services to a review set. After the operation is created, you can get the status of the operation by retrieving the Location parameter from the response headers. The location provides a URL that will return a Add to review set operation. + Start the process of adding a collection from Microsoft 365 services to a review set. After the operation is created, you can get the status of the operation by retrieving the Location parameter from the response headers. The location provides a URL that will return a Add to review set operation. This API is available in the following national cloud deployments. 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[AddToReviewSetPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[AddToReviewSetPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityAddToReviewSetRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start the process of adding a collection from Microsoft 365 services to a review set. After the operation is created, you can get the status of the operation by retrieving the Location parameter from the response headers. The location provides a URL that will return a Add to review set operation. + Start the process of adding a collection from Microsoft 365 services to a review set. After the operation is created, you can get the status of the operation by retrieving the Location parameter from the response headers. The location provides a URL that will return a Add to review set operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AddToReviewSetPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py index 501881db53b..c70d2aad2a8 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ExportPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityExportRequestBuilderPostRequestConfiguration] = None) -> None: """ - Initiate an export from a ediscoveryReviewSet. For details, see Export documents from a review set in eDiscovery (Premium). + Initiate an export from a ediscoveryReviewSet. For details, see Export documents from a review set in eDiscovery (Premium). This API is available in the following national cloud deployments. 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[ExportPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ExportPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityExportRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Initiate an export from a ediscoveryReviewSet. For details, see Export documents from a review set in eDiscovery (Premium). + Initiate an export from a ediscoveryReviewSet. For details, see Export documents from a review set in eDiscovery (Premium). This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ExportPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/count/count_request_builder.py index 3f75262e3c2..07f7978669b 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/ediscovery_review_set_query_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/ediscovery_review_set_query_item_request_builder.py index 7ae0e3256fa..7b671b06b06 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/ediscovery_review_set_query_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/ediscovery_review_set_query_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EdiscoveryReviewSetQueryItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an ediscoveryReviewSetQuery object. + Delete an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. 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/security-ediscoveryreviewset-delete-queries?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[EdiscoveryReviewSetQueryIt async def get(self,request_configuration: Optional[EdiscoveryReviewSetQueryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryReviewSetQuery]: """ - Read the properties and relationships of an ediscoveryReviewSetQuery object. + Read the properties and relationships of an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSetQuery] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoveryreviewsetquery-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[EdiscoveryReviewSetQueryItemR async def patch(self,body: Optional[EdiscoveryReviewSetQuery] = None, request_configuration: Optional[EdiscoveryReviewSetQueryItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EdiscoveryReviewSetQuery]: """ - Update the properties of an ediscoveryReviewSetQuery object. + Update the properties of an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSetQuery] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[EdiscoveryReviewSetQuery] = None, request_co def to_delete_request_information(self,request_configuration: Optional[EdiscoveryReviewSetQueryItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an ediscoveryReviewSetQuery object. + Delete an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryReviewSetQueryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoveryReviewSetQuery object. + Read the properties and relationships of an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryReviewSetQuery] = None, request_configuration: Optional[EdiscoveryReviewSetQueryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an ediscoveryReviewSetQuery object. + Update the properties of an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryReviewSetQuery] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class EdiscoveryReviewSetQueryItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class EdiscoveryReviewSetQueryItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoveryReviewSetQuery object. + Read the properties and relationships of an ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_apply_tags/microsoft_graph_security_apply_tags_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_apply_tags/microsoft_graph_security_apply_tags_request_builder.py index 567fe90164c..ceb35d43b64 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_apply_tags/microsoft_graph_security_apply_tags_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_apply_tags/microsoft_graph_security_apply_tags_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ApplyTagsPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityApplyTagsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Apply tags to files in an eDiscovery review set. For details, see Tag documents in a review set in eDiscovery. + Apply tags to files in an eDiscovery review set. For details, see Tag documents in a review set in eDiscovery. This API is available in the following national cloud deployments. 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[ApplyTagsPostRequestBody] = None, request_con def to_post_request_information(self,body: Optional[ApplyTagsPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityApplyTagsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Apply tags to files in an eDiscovery review set. For details, see Tag documents in a review set in eDiscovery. + Apply tags to files in an eDiscovery review set. For details, see Tag documents in a review set in eDiscovery. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ApplyTagsPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py index 16555854a9a..bdb422ceae6 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/item/microsoft_graph_security_export/microsoft_graph_security_export_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ExportPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityExportRequestBuilderPostRequestConfiguration] = None) -> None: """ - Initiate an export from a ediscoveryReviewSetQuery. For details, see Export documents from a review set in eDiscovery (Premium). + Initiate an export from a ediscoveryReviewSetQuery. For details, see Export documents from a review set in eDiscovery (Premium). This API is available in the following national cloud deployments. 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[ExportPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[ExportPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityExportRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Initiate an export from a ediscoveryReviewSetQuery. For details, see Export documents from a review set in eDiscovery (Premium). + Initiate an export from a ediscoveryReviewSetQuery. For details, see Export documents from a review set in eDiscovery (Premium). This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ExportPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/queries_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/queries_request_builder.py index 9d52fc1cd14..73eea067976 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/queries_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/item/queries/queries_request_builder.py @@ -45,7 +45,7 @@ def by_ediscovery_review_set_query_id(self,ediscovery_review_set_query_id: str) async def get(self,request_configuration: Optional[QueriesRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryReviewSetQueryCollectionResponse]: """ - Get the list of queries associated with an eDiscovery review set. + Get the list of queries associated with an eDiscovery review set. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSetQueryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoveryreviewset-list-queries?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[QueriesRequestBuilderGetReque async def post(self,body: Optional[EdiscoveryReviewSetQuery] = None, request_configuration: Optional[QueriesRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoveryReviewSetQuery]: """ - Create a new ediscoveryReviewSetQuery object. + Create a new ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSetQuery] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EdiscoveryReviewSetQuery] = None, request_con def to_get_request_information(self,request_configuration: Optional[QueriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of queries associated with an eDiscovery review set. + Get the list of queries associated with an eDiscovery review set. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryReviewSetQuery] = None, request_configuration: Optional[QueriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoveryReviewSetQuery object. + Create a new ediscoveryReviewSetQuery object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EdiscoveryReviewSetQuery] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class QueriesRequestBuilderGetQueryParameters(): """ - Get the list of queries associated with an eDiscovery review set. + Get the list of queries associated with an eDiscovery review set. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/review_sets_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/review_sets_request_builder.py index ff92ab624e2..b19fa14db57 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/review_sets_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/review_sets/review_sets_request_builder.py @@ -45,7 +45,7 @@ def by_ediscovery_review_set_id(self,ediscovery_review_set_id: str) -> Ediscover async def get(self,request_configuration: Optional[ReviewSetsRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryReviewSetCollectionResponse]: """ - Get a list of ediscoveryReviewSet objects associated with an eDiscovery case. + Get a list of ediscoveryReviewSet objects associated with an eDiscovery case. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycase-list-reviewsets?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ReviewSetsRequestBuilderGetRe async def post(self,body: Optional[EdiscoveryReviewSet] = None, request_configuration: Optional[ReviewSetsRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoveryReviewSet]: """ - Create a new ediscoveryReviewSet object. + Create a new ediscoveryReviewSet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewSet] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EdiscoveryReviewSet] = None, request_configur def to_get_request_information(self,request_configuration: Optional[ReviewSetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of ediscoveryReviewSet objects associated with an eDiscovery case. + Get a list of ediscoveryReviewSet objects associated with an eDiscovery case. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryReviewSet] = None, request_configuration: Optional[ReviewSetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoveryReviewSet object. + Create a new ediscoveryReviewSet object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EdiscoveryReviewSet] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ReviewSetsRequestBuilderGetQueryParameters(): """ - Get a list of ediscoveryReviewSet objects associated with an eDiscovery case. + Get a list of ediscoveryReviewSet objects associated with an eDiscovery case. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/count/count_request_builder.py index c7d0bd8a307..126fc9c6268 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/add_to_review_set_operation/add_to_review_set_operation_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/add_to_review_set_operation/add_to_review_set_operation_request_builder.py index 08b3ad26f96..f3a916fff16 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/add_to_review_set_operation/add_to_review_set_operation_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/add_to_review_set_operation/add_to_review_set_operation_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AddToReviewS Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AddToReviewSetOperationRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/additional_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/additional_sources_request_builder.py index 608cf71c72a..8f78b3fec21 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/additional_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/additional_sources_request_builder.py @@ -45,7 +45,7 @@ def by_data_source_id(self,data_source_id: str) -> DataSourceItemRequestBuilder: async def get(self,request_configuration: Optional[AdditionalSourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[DataSourceCollectionResponse]: """ - Get the list of additional sources associated with an eDiscovery search. + Get the list of additional sources associated with an eDiscovery search. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DataSourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverysearch-list-additionalsources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AdditionalSourcesRequestBuild async def post(self,body: Optional[DataSource] = None, request_configuration: Optional[AdditionalSourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[DataSource]: """ - Create a new additional source associated with an eDiscovery search. + Create a new additional source associated with an eDiscovery search. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DataSource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DataSource] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AdditionalSourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of additional sources associated with an eDiscovery search. + Get the list of additional sources associated with an eDiscovery search. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DataSource] = None, request_configuration: Optional[AdditionalSourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new additional source associated with an eDiscovery search. + Create a new additional source associated with an eDiscovery search. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DataSource] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AdditionalSourcesRequestBuilderGetQueryParameters(): """ - Get the list of additional sources associated with an eDiscovery search. + Get the list of additional sources associated with an eDiscovery search. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/count/count_request_builder.py index 83381e74bbe..e3a55af7d56 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/item/data_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/item/data_source_item_request_builder.py index 4f28474f8c0..ecd85d3a879 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/item/data_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/additional_sources/item/data_source_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DataSourc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DataSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DataSourceIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DataSource] = None, request_configuration: Optional[DataSourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DataSource] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/count/count_request_builder.py index ccecc6b6fc3..3fa2ca3051c 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/custodian_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/custodian_sources_request_builder.py index 68bb7c5a9a4..759a7d15299 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/custodian_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/custodian_sources_request_builder.py @@ -44,7 +44,7 @@ def by_data_source_id(self,data_source_id: str) -> DataSourceItemRequestBuilder: async def get(self,request_configuration: Optional[CustodianSourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[DataSourceCollectionResponse]: """ - Get the list of custodial data sources associated with an eDiscovery search. + Get the list of custodial data sources associated with an eDiscovery search. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DataSourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverysearch-list-custodiansources?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[CustodianSourcesRequestBuilde def to_get_request_information(self,request_configuration: Optional[CustodianSourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of custodial data sources associated with an eDiscovery search. + Get the list of custodial data sources associated with an eDiscovery search. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CustodianSourcesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustodianSourcesRequestBuilderGetQueryParameters(): """ - Get the list of custodial data sources associated with an eDiscovery search. + Get the list of custodial data sources associated with an eDiscovery search. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/item/data_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/item/data_source_item_request_builder.py index 6d77a62acf5..dd237508b2a 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/item/data_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/custodian_sources/item/data_source_item_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[DataSourc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DataSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[DataSourceIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DataSourceItemRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/ediscovery_search_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/ediscovery_search_item_request_builder.py index f5a7aa0fbea..baf8edf910f 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/ediscovery_search_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/ediscovery_search_item_request_builder.py @@ -35,7 +35,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EdiscoverySearchItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an ediscoverySearch object. + Delete an ediscoverySearch object. This API is available in the following national cloud deployments. 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/security-ediscoverycase-delete-searches?view=graph-rest-1.0 @@ -55,7 +55,7 @@ async def delete(self,request_configuration: Optional[EdiscoverySearchItemReques async def get(self,request_configuration: Optional[EdiscoverySearchItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoverySearch]: """ - Read the properties and relationships of an ediscoverySearch object. + Read the properties and relationships of an ediscoverySearch object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoverySearch] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverysearch-get?view=graph-rest-1.0 @@ -77,7 +77,7 @@ async def get(self,request_configuration: Optional[EdiscoverySearchItemRequestBu async def patch(self,body: Optional[EdiscoverySearch] = None, request_configuration: Optional[EdiscoverySearchItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EdiscoverySearch]: """ - Update the properties of an ediscoverySearch object. + Update the properties of an ediscoverySearch object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoverySearch] @@ -102,39 +102,39 @@ async def patch(self,body: Optional[EdiscoverySearch] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[EdiscoverySearchItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an ediscoverySearch object. + Delete an ediscoverySearch object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoverySearchItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoverySearch object. + Read the properties and relationships of an ediscoverySearch object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoverySearch] = None, request_configuration: Optional[EdiscoverySearchItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an ediscoverySearch object. + Update the properties of an ediscoverySearch object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[EdiscoverySearch] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -163,22 +163,22 @@ def with_url(self,raw_url: Optional[str] = None) -> EdiscoverySearchItemRequestB return EdiscoverySearchItemRequestBuilder(self.request_adapter, raw_url) @property - def additional_sources(self) -> AdditionalSourcesRequestBuilder: + def add_to_review_set_operation(self) -> AddToReviewSetOperationRequestBuilder: """ - Provides operations to manage the additionalSources property of the microsoft.graph.security.ediscoverySearch entity. + Provides operations to manage the addToReviewSetOperation property of the microsoft.graph.security.ediscoverySearch entity. """ - from .additional_sources.additional_sources_request_builder import AdditionalSourcesRequestBuilder + from .add_to_review_set_operation.add_to_review_set_operation_request_builder import AddToReviewSetOperationRequestBuilder - return AdditionalSourcesRequestBuilder(self.request_adapter, self.path_parameters) + return AddToReviewSetOperationRequestBuilder(self.request_adapter, self.path_parameters) @property - def add_to_review_set_operation(self) -> AddToReviewSetOperationRequestBuilder: + def additional_sources(self) -> AdditionalSourcesRequestBuilder: """ - Provides operations to manage the addToReviewSetOperation property of the microsoft.graph.security.ediscoverySearch entity. + Provides operations to manage the additionalSources property of the microsoft.graph.security.ediscoverySearch entity. """ - from .add_to_review_set_operation.add_to_review_set_operation_request_builder import AddToReviewSetOperationRequestBuilder + from .additional_sources.additional_sources_request_builder import AdditionalSourcesRequestBuilder - return AddToReviewSetOperationRequestBuilder(self.request_adapter, self.path_parameters) + return AdditionalSourcesRequestBuilder(self.request_adapter, self.path_parameters) @property def custodian_sources(self) -> CustodianSourcesRequestBuilder: @@ -238,7 +238,7 @@ class EdiscoverySearchItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class EdiscoverySearchItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoverySearch object. + Read the properties and relationships of an ediscoverySearch object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/last_estimate_statistics_operation/last_estimate_statistics_operation_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/last_estimate_statistics_operation/last_estimate_statistics_operation_request_builder.py index b7a3581229a..8c6a761d5d3 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/last_estimate_statistics_operation/last_estimate_statistics_operation_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/last_estimate_statistics_operation/last_estimate_statistics_operation_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LastEstimateStatisticsOperationRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryEstimateOperation]: """ - Get the last ediscoveryEstimateOperation objects and their properties. + Get the last ediscoveryEstimateOperation objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryEstimateOperation] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverysearch-list-lastestimatestatisticsoperation?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[LastEstimateStatisticsOperati def to_get_request_information(self,request_configuration: Optional[LastEstimateStatisticsOperationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the last ediscoveryEstimateOperation objects and their properties. + Get the last ediscoveryEstimateOperation objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastEstimateStatisticsOperationRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> LastEstimateStatisticsOperat @dataclass class LastEstimateStatisticsOperationRequestBuilderGetQueryParameters(): """ - Get the last ediscoveryEstimateOperation objects and their properties. + Get the last ediscoveryEstimateOperation objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_estimate_statistics/microsoft_graph_security_estimate_statistics_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_estimate_statistics/microsoft_graph_security_estimate_statistics_request_builder.py index db1008c93af..da820ae1c65 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_estimate_statistics/microsoft_graph_security_estimate_statistics_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_estimate_statistics/microsoft_graph_security_estimate_statistics_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityEstimateStatisticsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Run an estimate of the number of emails and documents in the eDiscovery search. To learn more about searches in eDiscovery, see Collect data for a case in eDiscovery (Premium). + Run an estimate of the number of emails and documents in the eDiscovery search. To learn more about searches in eDiscovery, see Collect data for a case in eDiscovery (Premium). This API is available in the following national cloud deployments. 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/security-ediscoverysearch-estimatestatistics?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityEstima def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityEstimateStatisticsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Run an estimate of the number of emails and documents in the eDiscovery search. To learn more about searches in eDiscovery, see Collect data for a case in eDiscovery (Premium). + Run an estimate of the number of emails and documents in the eDiscovery search. To learn more about searches in eDiscovery, see Collect data for a case in eDiscovery (Premium). This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityEstimateStatisticsRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_purge_data/microsoft_graph_security_purge_data_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_purge_data/microsoft_graph_security_purge_data_request_builder.py index b46100720e1..8b42a871dee 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_purge_data/microsoft_graph_security_purge_data_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/microsoft_graph_security_purge_data/microsoft_graph_security_purge_data_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[PurgeDataPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityPurgeDataRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete Microsoft Teams messages contained in an eDiscovery search. You can collect and purge the following categories of Teams content:- Teams 1:1 chats - Chat messages, posts, and attachments shared in a Teams conversation between two people. Teams 1:1 chats are also called *conversations*.- Teams group chats - Chat messages, posts, and attachments shared in a Teams conversation between three or more people. Also called *1:N* chats or *group conversations*.- Teams channels - Chat messages, posts, replies, and attachments shared in a standard Teams channel.- Private channels - Message posts, replies, and attachments shared in a private Teams channel.- Shared channels - Message posts, replies, and attachments shared in a shared Teams channel. For more information about purging Teams messages, see:- eDiscovery solution series: Data spillage scenario - Search and purge- eDiscovery (Premium) workflow for content in Microsoft Teams + Delete Microsoft Teams messages contained in an eDiscovery search. You can collect and purge the following categories of Teams content:- Teams 1:1 chats - Chat messages, posts, and attachments shared in a Teams conversation between two people. Teams 1:1 chats are also called *conversations*.- Teams group chats - Chat messages, posts, and attachments shared in a Teams conversation between three or more people. Also called *1:N* chats or *group conversations*.- Teams channels - Chat messages, posts, replies, and attachments shared in a standard Teams channel.- Private channels - Message posts, replies, and attachments shared in a private Teams channel.- Shared channels - Message posts, replies, and attachments shared in a shared Teams channel. For more information about purging Teams messages, see:- eDiscovery solution series: Data spillage scenario - Search and purge- eDiscovery (Premium) workflow for content in Microsoft Teams This API is available in the following national cloud deployments. 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[PurgeDataPostRequestBody] = None, request_con def to_post_request_information(self,body: Optional[PurgeDataPostRequestBody] = None, request_configuration: Optional[MicrosoftGraphSecurityPurgeDataRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete Microsoft Teams messages contained in an eDiscovery search. You can collect and purge the following categories of Teams content:- Teams 1:1 chats - Chat messages, posts, and attachments shared in a Teams conversation between two people. Teams 1:1 chats are also called *conversations*.- Teams group chats - Chat messages, posts, and attachments shared in a Teams conversation between three or more people. Also called *1:N* chats or *group conversations*.- Teams channels - Chat messages, posts, replies, and attachments shared in a standard Teams channel.- Private channels - Message posts, replies, and attachments shared in a private Teams channel.- Shared channels - Message posts, replies, and attachments shared in a shared Teams channel. For more information about purging Teams messages, see:- eDiscovery solution series: Data spillage scenario - Search and purge- eDiscovery (Premium) workflow for content in Microsoft Teams + Delete Microsoft Teams messages contained in an eDiscovery search. You can collect and purge the following categories of Teams content:- Teams 1:1 chats - Chat messages, posts, and attachments shared in a Teams conversation between two people. Teams 1:1 chats are also called *conversations*.- Teams group chats - Chat messages, posts, and attachments shared in a Teams conversation between three or more people. Also called *1:N* chats or *group conversations*.- Teams channels - Chat messages, posts, replies, and attachments shared in a standard Teams channel.- Private channels - Message posts, replies, and attachments shared in a private Teams channel.- Shared channels - Message posts, replies, and attachments shared in a shared Teams channel. For more information about purging Teams messages, see:- eDiscovery solution series: Data spillage scenario - Search and purge- eDiscovery (Premium) workflow for content in Microsoft Teams This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[PurgeDataPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/count/count_request_builder.py index 1f393666e1e..ef1fb6e1110 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py index 5188b656872..0549b4f2096 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/item/ediscovery_noncustodial_data_source_item_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[Ediscover Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryNoncustodialDataSourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[EdiscoveryNo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EdiscoveryNoncustodialDataSourceItemRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/noncustodial_sources_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/noncustodial_sources_request_builder.py index 6775ded5e1a..05a46d543e3 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/noncustodial_sources_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/item/noncustodial_sources/noncustodial_sources_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[Noncustodial Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> NoncustodialSourcesRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/searches/searches_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/searches/searches_request_builder.py index b433aa3724b..252c709305d 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/searches/searches_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/searches/searches_request_builder.py @@ -45,7 +45,7 @@ def by_ediscovery_search_id(self,ediscovery_search_id: str) -> EdiscoverySearchI async def get(self,request_configuration: Optional[SearchesRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoverySearchCollectionResponse]: """ - Get the list of ediscoverySearch resources from an eDiscoveryCase object. + Get the list of ediscoverySearch resources from an eDiscoveryCase object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoverySearchCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycase-list-searches?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SearchesRequestBuilderGetRequ async def post(self,body: Optional[EdiscoverySearch] = None, request_configuration: Optional[SearchesRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoverySearch]: """ - Create a new ediscoverySearch object. + Create a new ediscoverySearch object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoverySearch] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EdiscoverySearch] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[SearchesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of ediscoverySearch resources from an eDiscoveryCase object. + Get the list of ediscoverySearch resources from an eDiscoveryCase object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoverySearch] = None, request_configuration: Optional[SearchesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoverySearch object. + Create a new ediscoverySearch object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EdiscoverySearch] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SearchesRequestBuilderGetQueryParameters(): """ - Get the list of ediscoverySearch resources from an eDiscoveryCase object. + Get the list of ediscoverySearch resources from an eDiscoveryCase object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/settings/microsoft_graph_security_reset_to_default/microsoft_graph_security_reset_to_default_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/settings/microsoft_graph_security_reset_to_default/microsoft_graph_security_reset_to_default_request_builder.py index 5f7e30237b8..f316131b504 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/settings/microsoft_graph_security_reset_to_default/microsoft_graph_security_reset_to_default_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/settings/microsoft_graph_security_reset_to_default/microsoft_graph_security_reset_to_default_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[MicrosoftGraphSecurityResetToDefaultRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reset a caseSettings object to the default values. + Reset a caseSettings object to the default values. This API is available in the following national cloud deployments. 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/security-ediscoverycasesettings-resettodefault?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[MicrosoftGraphSecurityResetT def to_post_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityResetToDefaultRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reset a caseSettings object to the default values. + Reset a caseSettings object to the default values. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> MicrosoftGraphSecurityResetToDefaultRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/settings/settings_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/settings/settings_request_builder.py index 1f50179d4e7..70354ec52de 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/settings/settings_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/settings/settings_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SettingsRequestBuilderDele async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryCaseSettings]: """ - Read the properties and relationships of an ediscoveryCaseSettings object. + Read the properties and relationships of an ediscoveryCaseSettings object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCaseSettings] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycasesettings-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequ async def patch(self,body: Optional[EdiscoveryCaseSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[EdiscoveryCaseSettings]: """ - Update the properties of an ediscoveryCaseSettings object. + Update the properties of an ediscoveryCaseSettings object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryCaseSettings] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[SettingsR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoveryCaseSettings object. + Read the properties and relationships of an ediscoveryCaseSettings object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryCaseSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an ediscoveryCaseSettings object. + Update the properties of an ediscoveryCaseSettings object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryCaseSettings] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class SettingsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class SettingsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoveryCaseSettings object. + Read the properties and relationships of an ediscoveryCaseSettings object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/count/count_request_builder.py index 7cddddfb902..b0e164e4966 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/child_tags_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/child_tags_request_builder.py index 58651abc3d7..7bf2e59da35 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/child_tags_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/child_tags_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildTagsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChildTagsRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/count/count_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/count/count_request_builder.py index a9475f2790a..ad15d35944e 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/count/count_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/item/ediscovery_review_tag_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/item/ediscovery_review_tag_item_request_builder.py index 7d1354497a1..87753b80835 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/item/ediscovery_review_tag_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/child_tags/item/ediscovery_review_tag_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[EdiscoveryRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EdiscoveryReviewTagItemRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/ediscovery_review_tag_item_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/ediscovery_review_tag_item_request_builder.py index 776ab7defdf..461eae5a028 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/ediscovery_review_tag_item_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/ediscovery_review_tag_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EdiscoveryReviewTagItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an ediscoveryReviewTag object. + Remove an ediscoveryReviewTag object. This API is available in the following national cloud deployments. 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/security-ediscoverycase-delete-tags?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[EdiscoveryReviewTagItemReq async def get(self,request_configuration: Optional[EdiscoveryReviewTagItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryReviewTag]: """ - Read the properties and relationships of an ediscoveryReviewTag object. + Read the properties and relationships of an ediscoveryReviewTag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewTag] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoveryreviewtag-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[EdiscoveryReviewTagItemReques async def patch(self,body: Optional[EdiscoveryReviewTag] = None, request_configuration: Optional[EdiscoveryReviewTagItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EdiscoveryReviewTag]: """ - Update the properties of an ediscoveryReviewTag object. + Update the properties of an ediscoveryReviewTag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewTag] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[EdiscoveryReviewTag] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[EdiscoveryReviewTagItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an ediscoveryReviewTag object. + Remove an ediscoveryReviewTag object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EdiscoveryReviewTagItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an ediscoveryReviewTag object. + Read the properties and relationships of an ediscoveryReviewTag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryReviewTag] = None, request_configuration: Optional[EdiscoveryReviewTagItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an ediscoveryReviewTag object. + Update the properties of an ediscoveryReviewTag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[EdiscoveryReviewTag] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class EdiscoveryReviewTagItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class EdiscoveryReviewTagItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an ediscoveryReviewTag object. + Read the properties and relationships of an ediscoveryReviewTag object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/parent/parent_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/parent/parent_request_builder.py index 135c5773e32..4c1b5095c93 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/parent/parent_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/item/parent/parent_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/as_hierarchy_response.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/as_hierarchy_get_response.py similarity index 92% rename from msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/as_hierarchy_response.py rename to msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/as_hierarchy_get_response.py index 4011302b99a..6ce0b73254c 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/as_hierarchy_response.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/as_hierarchy_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AsHierarchyResponse(BaseCollectionPaginationCountResponse): +class AsHierarchyGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[EdiscoveryReviewTag]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AsHierarchyResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AsHierarchyGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AsHierarchyResponse + Returns: AsHierarchyGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AsHierarchyResponse() + return AsHierarchyGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/microsoft_graph_security_as_hierarchy_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/microsoft_graph_security_as_hierarchy_request_builder.py index 554b4fed6d8..95deee6f6f5 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/microsoft_graph_security_as_hierarchy_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/microsoft_graph_security_as_hierarchy/microsoft_graph_security_as_hierarchy_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .as_hierarchy_response import AsHierarchyResponse + from .as_hierarchy_get_response import AsHierarchyGetResponse class MicrosoftGraphSecurityAsHierarchyRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/tags/microsoft.graph.security.asHierarchy(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[MicrosoftGraphSecurityAsHierarchyRequestBuilderGetRequestConfiguration] = None) -> Optional[AsHierarchyResponse]: + async def get(self,request_configuration: Optional[MicrosoftGraphSecurityAsHierarchyRequestBuilderGetRequestConfiguration] = None) -> Optional[AsHierarchyGetResponse]: """ Invoke function asHierarchy param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AsHierarchyResponse] + Returns: Optional[AsHierarchyGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[MicrosoftGraphSecurityAsHiera } if not self.request_adapter: raise Exception("Http core is null") - from .as_hierarchy_response import AsHierarchyResponse + from .as_hierarchy_get_response import AsHierarchyGetResponse - return await self.request_adapter.send_async(request_info, AsHierarchyResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AsHierarchyGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[MicrosoftGraphSecurityAsHierarchyRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[MicrosoftGra Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MicrosoftGraphSecurityAsHierarchyRequestBuilder: diff --git a/msgraph/generated/security/cases/ediscovery_cases/item/tags/tags_request_builder.py b/msgraph/generated/security/cases/ediscovery_cases/item/tags/tags_request_builder.py index afc850fb590..ba371857d95 100644 --- a/msgraph/generated/security/cases/ediscovery_cases/item/tags/tags_request_builder.py +++ b/msgraph/generated/security/cases/ediscovery_cases/item/tags/tags_request_builder.py @@ -46,7 +46,7 @@ def by_ediscovery_review_tag_id(self,ediscovery_review_tag_id: str) -> Ediscover async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> Optional[EdiscoveryReviewTagCollectionResponse]: """ - Get a list of eDiscoveryReviewTag objects and their properties. + Get a list of eDiscoveryReviewTag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewTagCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-ediscoverycase-list-tags?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestC async def post(self,body: Optional[EdiscoveryReviewTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> Optional[EdiscoveryReviewTag]: """ - Create a new ediscoveryReviewTag object. + Create a new ediscoveryReviewTag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EdiscoveryReviewTag] @@ -93,24 +93,24 @@ async def post(self,body: Optional[EdiscoveryReviewTag] = None, request_configur def to_get_request_information(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of eDiscoveryReviewTag objects and their properties. + Get a list of eDiscoveryReviewTag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EdiscoveryReviewTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new ediscoveryReviewTag object. + Create a new ediscoveryReviewTag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[EdiscoveryReviewTag] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def microsoft_graph_security_as_hierarchy(self) -> MicrosoftGraphSecurityAsHiera @dataclass class TagsRequestBuilderGetQueryParameters(): """ - Get a list of eDiscoveryReviewTag objects and their properties. + Get a list of eDiscoveryReviewTag objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/incidents/count/count_request_builder.py b/msgraph/generated/security/incidents/count/count_request_builder.py index 48911efeb8c..2109a4d1d65 100644 --- a/msgraph/generated/security/incidents/count/count_request_builder.py +++ b/msgraph/generated/security/incidents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/incidents/incidents_request_builder.py b/msgraph/generated/security/incidents/incidents_request_builder.py index 5e123b4c214..d66ca918008 100644 --- a/msgraph/generated/security/incidents/incidents_request_builder.py +++ b/msgraph/generated/security/incidents/incidents_request_builder.py @@ -45,7 +45,7 @@ def by_incident_id(self,incident_id: str) -> IncidentItemRequestBuilder: async def get(self,request_configuration: Optional[IncidentsRequestBuilderGetRequestConfiguration] = None) -> Optional[IncidentCollectionResponse]: """ - Get a list of incident objects that Microsoft 365 Defender has created to track attacks in an organization. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This operation allows you to filter and sort through incidents to create an informed cyber security response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environment retention policy. The most recent incidents are displayed at the top of the list. + Get a list of incident objects that Microsoft 365 Defender has created to track attacks in an organization. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This operation allows you to filter and sort through incidents to create an informed cyber security response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environment retention policy. The most recent incidents are displayed at the top of the list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IncidentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-list-incidents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Incident] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[IncidentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of incident objects that Microsoft 365 Defender has created to track attacks in an organization. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This operation allows you to filter and sort through incidents to create an informed cyber security response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environment retention policy. The most recent incidents are displayed at the top of the list. + Get a list of incident objects that Microsoft 365 Defender has created to track attacks in an organization. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This operation allows you to filter and sort through incidents to create an informed cyber security response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environment retention policy. The most recent incidents are displayed at the top of the list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Incident] = None, request_configuration: Optional[IncidentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Incident] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IncidentsRequestBuilderGetQueryParameters(): """ - Get a list of incident objects that Microsoft 365 Defender has created to track attacks in an organization. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This operation allows you to filter and sort through incidents to create an informed cyber security response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environment retention policy. The most recent incidents are displayed at the top of the list. + Get a list of incident objects that Microsoft 365 Defender has created to track attacks in an organization. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This operation allows you to filter and sort through incidents to create an informed cyber security response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environment retention policy. The most recent incidents are displayed at the top of the list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/incidents/item/alerts/alerts_request_builder.py b/msgraph/generated/security/incidents/item/alerts/alerts_request_builder.py index ef7ea51829c..6a876beecf7 100644 --- a/msgraph/generated/security/incidents/item/alerts/alerts_request_builder.py +++ b/msgraph/generated/security/incidents/item/alerts/alerts_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AlertsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AlertsRequestBuilder: diff --git a/msgraph/generated/security/incidents/item/alerts/count/count_request_builder.py b/msgraph/generated/security/incidents/item/alerts/count/count_request_builder.py index 9215aaf22e3..1e5a0ad258d 100644 --- a/msgraph/generated/security/incidents/item/alerts/count/count_request_builder.py +++ b/msgraph/generated/security/incidents/item/alerts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/incidents/item/alerts/item/alert_item_request_builder.py b/msgraph/generated/security/incidents/item/alerts/item/alert_item_request_builder.py index 37b4f6d1506..e02e4d34039 100644 --- a/msgraph/generated/security/incidents/item/alerts/item/alert_item_request_builder.py +++ b/msgraph/generated/security/incidents/item/alerts/item/alert_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[AlertItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AlertItemRequestBuilder: diff --git a/msgraph/generated/security/incidents/item/alerts/item/comments/comments_request_builder.py b/msgraph/generated/security/incidents/item/alerts/item/comments/comments_request_builder.py index f97a084a0b7..9989ad3aca9 100644 --- a/msgraph/generated/security/incidents/item/alerts/item/comments/comments_request_builder.py +++ b/msgraph/generated/security/incidents/item/alerts/item/comments/comments_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[List[AlertComment]] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/incidents/item/alerts/item/comments/count/count_request_builder.py b/msgraph/generated/security/incidents/item/alerts/item/comments/count/count_request_builder.py index 29c752cddf7..58cf2dea29c 100644 --- a/msgraph/generated/security/incidents/item/alerts/item/comments/count/count_request_builder.py +++ b/msgraph/generated/security/incidents/item/alerts/item/comments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/incidents/item/incident_item_request_builder.py b/msgraph/generated/security/incidents/item/incident_item_request_builder.py index 75e4ec4d02b..1949efe75fd 100644 --- a/msgraph/generated/security/incidents/item/incident_item_request_builder.py +++ b/msgraph/generated/security/incidents/item/incident_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IncidentItemRequestBuilder async def get(self,request_configuration: Optional[IncidentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Incident]: """ - Retrieve the properties and relationships of an incident object. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. + Retrieve the properties and relationships of an incident object. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Incident] Find more info here: https://learn.microsoft.com/graph/api/security-incident-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[IncidentItemRequestBuilderGet async def patch(self,body: Optional[Incident] = None, request_configuration: Optional[IncidentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Incident]: """ - Update the properties of an incident object. + Update the properties of an incident object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Incident] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[IncidentI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IncidentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an incident object. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. + Retrieve the properties and relationships of an incident object. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Incident] = None, request_configuration: Optional[IncidentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an incident object. + Update the properties of an incident object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Incident] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class IncidentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class IncidentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an incident object. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. + Retrieve the properties and relationships of an incident object. Attacks are typically inflicted on different types of entities, such as devices, users, and mailboxes, resulting in multiple alert objects. Microsoft 365 Defender correlates alerts with the same attack techniques or the same attacker into an incident. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py b/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py index 466b4af05d4..30278ed6fb2 100644 --- a/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py +++ b/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[RunHuntingQueryPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/secure_score_control_profiles/count/count_request_builder.py b/msgraph/generated/security/secure_score_control_profiles/count/count_request_builder.py index ed5e7a50c37..a60245445af 100644 --- a/msgraph/generated/security/secure_score_control_profiles/count/count_request_builder.py +++ b/msgraph/generated/security/secure_score_control_profiles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/secure_score_control_profiles/item/secure_score_control_profile_item_request_builder.py b/msgraph/generated/security/secure_score_control_profiles/item/secure_score_control_profile_item_request_builder.py index bf4022be165..91e59cdc01a 100644 --- a/msgraph/generated/security/secure_score_control_profiles/item/secure_score_control_profile_item_request_builder.py +++ b/msgraph/generated/security/secure_score_control_profiles/item/secure_score_control_profile_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SecureScoreControlProfileI async def get(self,request_configuration: Optional[SecureScoreControlProfileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SecureScoreControlProfile]: """ - Retrieve the properties and relationships of an securescorecontrolprofile object. + Retrieve the properties and relationships of an securescorecontrolprofile object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SecureScoreControlProfile] Find more info here: https://learn.microsoft.com/graph/api/securescorecontrolprofile-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[SecureScoreControlProfileItem async def patch(self,body: Optional[SecureScoreControlProfile] = None, request_configuration: Optional[SecureScoreControlProfileItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[SecureScoreControlProfile]: """ - Update an editable secureScoreControlProfile object within any integrated solution to change various properties, such as assignedTo or tenantNote. + Update an editable secureScoreControlProfile object within any integrated solution to change various properties, such as assignedTo or tenantNote. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SecureScoreControlProfile] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[SecureSco Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SecureScoreControlProfileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an securescorecontrolprofile object. + Retrieve the properties and relationships of an securescorecontrolprofile object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SecureScoreControlProfile] = None, request_configuration: Optional[SecureScoreControlProfileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an editable secureScoreControlProfile object within any integrated solution to change various properties, such as assignedTo or tenantNote. + Update an editable secureScoreControlProfile object within any integrated solution to change various properties, such as assignedTo or tenantNote. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[SecureScoreControlProfile] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class SecureScoreControlProfileItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SecureScoreControlProfileItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an securescorecontrolprofile object. + Retrieve the properties and relationships of an securescorecontrolprofile object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/secure_score_control_profiles/secure_score_control_profiles_request_builder.py b/msgraph/generated/security/secure_score_control_profiles/secure_score_control_profiles_request_builder.py index cbe0c76209f..61dbb5fdc2f 100644 --- a/msgraph/generated/security/secure_score_control_profiles/secure_score_control_profiles_request_builder.py +++ b/msgraph/generated/security/secure_score_control_profiles/secure_score_control_profiles_request_builder.py @@ -45,7 +45,7 @@ def by_secure_score_control_profile_id(self,secure_score_control_profile_id: str async def get(self,request_configuration: Optional[SecureScoreControlProfilesRequestBuilderGetRequestConfiguration] = None) -> Optional[SecureScoreControlProfileCollectionResponse]: """ - Retrieve the properties and relationships of a secureScoreControlProfiles object. + Retrieve the properties and relationships of a secureScoreControlProfiles object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SecureScoreControlProfileCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-list-securescorecontrolprofiles?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SecureScoreControlProfile] = None, request_co def to_get_request_information(self,request_configuration: Optional[SecureScoreControlProfilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a secureScoreControlProfiles object. + Retrieve the properties and relationships of a secureScoreControlProfiles object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SecureScoreControlProfile] = None, request_configuration: Optional[SecureScoreControlProfilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SecureScoreControlProfile] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SecureScoreControlProfilesRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a secureScoreControlProfiles object. + Retrieve the properties and relationships of a secureScoreControlProfiles object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/secure_scores/count/count_request_builder.py b/msgraph/generated/security/secure_scores/count/count_request_builder.py index cfcfb50c994..17d6be412e5 100644 --- a/msgraph/generated/security/secure_scores/count/count_request_builder.py +++ b/msgraph/generated/security/secure_scores/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/secure_scores/item/secure_score_item_request_builder.py b/msgraph/generated/security/secure_scores/item/secure_score_item_request_builder.py index 0b6fa80f2b3..b5f8244810e 100644 --- a/msgraph/generated/security/secure_scores/item/secure_score_item_request_builder.py +++ b/msgraph/generated/security/secure_scores/item/secure_score_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SecureScoreItemRequestBuil async def get(self,request_configuration: Optional[SecureScoreItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SecureScore]: """ - Retrieve the properties and relationships of a secureScore object. + Retrieve the properties and relationships of a secureScore object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SecureScore] Find more info here: https://learn.microsoft.com/graph/api/securescore-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[SecureSco Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SecureScoreItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a secureScore object. + Retrieve the properties and relationships of a secureScore object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SecureScore] = None, request_configuration: Optional[SecureScoreItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SecureScore] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class SecureScoreItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class SecureScoreItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a secureScore object. + Retrieve the properties and relationships of a secureScore object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/secure_scores/secure_scores_request_builder.py b/msgraph/generated/security/secure_scores/secure_scores_request_builder.py index 4e059f70cab..8a89c566eee 100644 --- a/msgraph/generated/security/secure_scores/secure_scores_request_builder.py +++ b/msgraph/generated/security/secure_scores/secure_scores_request_builder.py @@ -45,7 +45,7 @@ def by_secure_score_id(self,secure_score_id: str) -> SecureScoreItemRequestBuild async def get(self,request_configuration: Optional[SecureScoresRequestBuilderGetRequestConfiguration] = None) -> Optional[SecureScoreCollectionResponse]: """ - Retrieve a list of secureScore objects. + Retrieve a list of secureScore objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SecureScoreCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-list-securescores?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SecureScore] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[SecureScoresRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of secureScore objects. + Retrieve a list of secureScore objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SecureScore] = None, request_configuration: Optional[SecureScoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SecureScore] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SecureScoresRequestBuilderGetQueryParameters(): """ - Retrieve a list of secureScore objects. + Retrieve a list of secureScore objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/security_request_builder.py b/msgraph/generated/security/security_request_builder.py index 703f4a9d176..fa3eacc8415 100644 --- a/msgraph/generated/security/security_request_builder.py +++ b/msgraph/generated/security/security_request_builder.py @@ -18,8 +18,8 @@ from .cases.cases_request_builder import CasesRequestBuilder from .incidents.incidents_request_builder import IncidentsRequestBuilder from .microsoft_graph_security_run_hunting_query.microsoft_graph_security_run_hunting_query_request_builder import MicrosoftGraphSecurityRunHuntingQueryRequestBuilder - from .secure_score_control_profiles.secure_score_control_profiles_request_builder import SecureScoreControlProfilesRequestBuilder from .secure_scores.secure_scores_request_builder import SecureScoresRequestBuilder + from .secure_score_control_profiles.secure_score_control_profiles_request_builder import SecureScoreControlProfilesRequestBuilder from .subject_rights_requests.subject_rights_requests_request_builder import SubjectRightsRequestsRequestBuilder from .threat_intelligence.threat_intelligence_request_builder import ThreatIntelligenceRequestBuilder from .triggers.triggers_request_builder import TriggersRequestBuilder @@ -90,14 +90,14 @@ def to_get_request_information(self,request_configuration: Optional[SecurityRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Security] = None, request_configuration: Optional[SecurityRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -110,13 +110,13 @@ def to_patch_request_information(self,body: Optional[Security] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -221,22 +221,22 @@ def threat_intelligence(self) -> ThreatIntelligenceRequestBuilder: return ThreatIntelligenceRequestBuilder(self.request_adapter, self.path_parameters) @property - def triggers(self) -> TriggersRequestBuilder: + def trigger_types(self) -> TriggerTypesRequestBuilder: """ - Provides operations to manage the triggers property of the microsoft.graph.security entity. + Provides operations to manage the triggerTypes property of the microsoft.graph.security entity. """ - from .triggers.triggers_request_builder import TriggersRequestBuilder + from .trigger_types.trigger_types_request_builder import TriggerTypesRequestBuilder - return TriggersRequestBuilder(self.request_adapter, self.path_parameters) + return TriggerTypesRequestBuilder(self.request_adapter, self.path_parameters) @property - def trigger_types(self) -> TriggerTypesRequestBuilder: + def triggers(self) -> TriggersRequestBuilder: """ - Provides operations to manage the triggerTypes property of the microsoft.graph.security entity. + Provides operations to manage the triggers property of the microsoft.graph.security entity. """ - from .trigger_types.trigger_types_request_builder import TriggerTypesRequestBuilder + from .triggers.triggers_request_builder import TriggersRequestBuilder - return TriggerTypesRequestBuilder(self.request_adapter, self.path_parameters) + return TriggersRequestBuilder(self.request_adapter, self.path_parameters) @dataclass class SecurityRequestBuilderGetQueryParameters(): diff --git a/msgraph/generated/security/subject_rights_requests/count/count_request_builder.py b/msgraph/generated/security/subject_rights_requests/count/count_request_builder.py index 64747872a3a..b8bb581d247 100644 --- a/msgraph/generated/security/subject_rights_requests/count/count_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/item/approvers/approvers_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/approvers/approvers_request_builder.py index 3750b74bad8..da11aa7d0b5 100644 --- a/msgraph/generated/security/subject_rights_requests/item/approvers/approvers_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/approvers/approvers_request_builder.py @@ -44,7 +44,7 @@ def by_user_id(self,user_id: str) -> UserItemRequestBuilder: async def get(self,request_configuration: Optional[ApproversRequestBuilderGetRequestConfiguration] = None) -> Optional[UserCollectionResponse]: """ - Get approvers from security + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[ApproversRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[ApproversRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get approvers from security + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ApproversRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ApproversRequestBuilderGetQueryParameters(): """ - Get approvers from security + Collection of users who can approve the request. Currently only supported for requests of type delete. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/subject_rights_requests/item/approvers/count/count_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/approvers/count/count_request_builder.py index ee5b0105eef..c077e2a9c6e 100644 --- a/msgraph/generated/security/subject_rights_requests/item/approvers/count/count_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/approvers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py index 98b2b5cdcb2..87ad5b4bc0e 100644 --- a/msgraph/generated/security/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/approvers/item/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..bc1de01eb4f --- /dev/null +++ b/msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..a59df983c15 --- /dev/null +++ b/msgraph/generated/security/subject_rights_requests/item/approvers/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /security/subjectRightsRequests/{subjectRightsRequest-id}/approvers/{user-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/subject_rights_requests/item/approvers/item/user_item_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/approvers/item/user_item_request_builder.py index 2ca5a169400..20dcc6763b1 100644 --- a/msgraph/generated/security/subject_rights_requests/item/approvers/item/user_item_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/approvers/item/user_item_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserItemRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Get approvers from security + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get approvers from security + Collection of users who can approve the request. Currently only supported for requests of type delete. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserItemRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class UserItemRequestBuilderGetQueryParameters(): """ - Get approvers from security + Collection of users who can approve the request. Currently only supported for requests of type delete. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/subject_rights_requests/item/collaborators/collaborators_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/collaborators/collaborators_request_builder.py index c4125d5ba61..4a25c2de927 100644 --- a/msgraph/generated/security/subject_rights_requests/item/collaborators/collaborators_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/collaborators/collaborators_request_builder.py @@ -44,7 +44,7 @@ def by_user_id(self,user_id: str) -> UserItemRequestBuilder: async def get(self,request_configuration: Optional[CollaboratorsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserCollectionResponse]: """ - Get collaborators from security + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserCollectionResponse] """ @@ -65,19 +65,19 @@ async def get(self,request_configuration: Optional[CollaboratorsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[CollaboratorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get collaborators from security + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CollaboratorsRequestBuilder: @@ -102,7 +102,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CollaboratorsRequestBuilderGetQueryParameters(): """ - Get collaborators from security + Collection of users who can collaborate on the request. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/subject_rights_requests/item/collaborators/count/count_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/collaborators/count/count_request_builder.py index 5997986d709..9bd253397f1 100644 --- a/msgraph/generated/security/subject_rights_requests/item/collaborators/count/count_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/collaborators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py index a378160353b..3008b58cc2a 100644 --- a/msgraph/generated/security/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..0e2ce7e0316 --- /dev/null +++ b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..5a7d92b85af --- /dev/null +++ b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /security/subjectRightsRequests/{subjectRightsRequest-id}/collaborators/{user-id}/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/subject_rights_requests/item/collaborators/item/user_item_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/user_item_request_builder.py index 72bbbfcb91b..016f87e0d30 100644 --- a/msgraph/generated/security/subject_rights_requests/item/collaborators/item/user_item_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/collaborators/item/user_item_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class UserItemRequestBuilder(BaseRequestBuilder): """ @@ -29,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Get collaborators from security + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] """ @@ -50,19 +51,19 @@ async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get collaborators from security + Collection of users who can collaborate on the request. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UserItemRequestBuilder: @@ -84,10 +85,19 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class UserItemRequestBuilderGetQueryParameters(): """ - Get collaborators from security + Collection of users who can collaborate on the request. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py index 57dd5a45600..74630ea7973 100644 --- a/msgraph/generated/security/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/get_final_attachment/get_final_attachment_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetFinalAtta Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetFinalAttachmentRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py index 7d025d20dd6..9700b3a4219 100644 --- a/msgraph/generated/security/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/get_final_report/get_final_report_request_builder.py @@ -51,12 +51,12 @@ def to_get_request_information(self,request_configuration: Optional[GetFinalRepo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> GetFinalReportRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/item/notes/count/count_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/notes/count/count_request_builder.py index d73e9912bc7..5a78d2f02d8 100644 --- a/msgraph/generated/security/subject_rights_requests/item/notes/count/count_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/notes/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py index facb38a05f6..9468760a9f7 100644 --- a/msgraph/generated/security/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/notes/item/authored_note_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[AuthoredN Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthoredNoteItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AuthoredNote Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthoredNote] = None, request_configuration: Optional[AuthoredNoteItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AuthoredNote] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/subject_rights_requests/item/notes/notes_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/notes/notes_request_builder.py index 30bf60daf6a..7455134f7e0 100644 --- a/msgraph/generated/security/subject_rights_requests/item/notes/notes_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/notes/notes_request_builder.py @@ -45,7 +45,7 @@ def by_authored_note_id(self,authored_note_id: str) -> AuthoredNoteItemRequestBu async def get(self,request_configuration: Optional[NotesRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthoredNoteCollectionResponse]: """ - Get the list of authored notes assoicated with a subject rights request. + Get the list of authored notes assoicated with a subject rights request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthoredNoteCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/subjectrightsrequest-list-notes?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[NotesRequestBuilderGetRequest async def post(self,body: Optional[AuthoredNote] = None, request_configuration: Optional[NotesRequestBuilderPostRequestConfiguration] = None) -> Optional[AuthoredNote]: """ - Create a new authoredNote object. + Create a new authoredNote object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthoredNote] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AuthoredNote] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[NotesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of authored notes assoicated with a subject rights request. + Get the list of authored notes assoicated with a subject rights request. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthoredNote] = None, request_configuration: Optional[NotesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new authoredNote object. + Create a new authoredNote object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AuthoredNote] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class NotesRequestBuilderGetQueryParameters(): """ - Get the list of authored notes assoicated with a subject rights request. + Get the list of authored notes assoicated with a subject rights request. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/subject_rights_requests/item/subject_rights_request_item_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/subject_rights_request_item_request_builder.py index 1547d64e030..819117c0075 100644 --- a/msgraph/generated/security/subject_rights_requests/item/subject_rights_request_item_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/subject_rights_request_item_request_builder.py @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[SubjectRi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubjectRightsRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[SubjectRight Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SubjectRightsRequest] = None, request_configuration: Optional[SubjectRightsRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[SubjectRightsRequest] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/subject_rights_requests/item/team/team_request_builder.py b/msgraph/generated/security/subject_rights_requests/item/team/team_request_builder.py index 635ccc3b060..b2c0b01de8b 100644 --- a/msgraph/generated/security/subject_rights_requests/item/team/team_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/security/subject_rights_requests/subject_rights_requests_request_builder.py b/msgraph/generated/security/subject_rights_requests/subject_rights_requests_request_builder.py index ce7b6725373..d6cdfbc76a6 100644 --- a/msgraph/generated/security/subject_rights_requests/subject_rights_requests_request_builder.py +++ b/msgraph/generated/security/subject_rights_requests/subject_rights_requests_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[SubjectRight Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SubjectRightsRequest] = None, request_configuration: Optional[SubjectRightsRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[SubjectRightsRequest] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/threat_intelligence/article_indicators/article_indicators_request_builder.py b/msgraph/generated/security/threat_intelligence/article_indicators/article_indicators_request_builder.py index 9e60455884d..59c6a0cdef9 100644 --- a/msgraph/generated/security/threat_intelligence/article_indicators/article_indicators_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/article_indicators/article_indicators_request_builder.py @@ -45,7 +45,7 @@ def by_article_indicator_id(self,article_indicator_id: str) -> ArticleIndicatorI async def get(self,request_configuration: Optional[ArticleIndicatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ArticleIndicatorCollectionResponse]: """ - Read the properties and relationships of an articleIndicator object. + Read the properties and relationships of an articleIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ArticleIndicatorCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[ArticleIndicator] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ArticleIndicatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an articleIndicator object. + Read the properties and relationships of an articleIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ArticleIndicator] = None, request_configuration: Optional[ArticleIndicatorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ArticleIndicator] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ArticleIndicatorsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an articleIndicator object. + Read the properties and relationships of an articleIndicator object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/article_indicators/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/article_indicators/count/count_request_builder.py index e2c23fd8ed4..864de151a15 100644 --- a/msgraph/generated/security/threat_intelligence/article_indicators/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/article_indicators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/article_indicators/item/article_indicator_item_request_builder.py b/msgraph/generated/security/threat_intelligence/article_indicators/item/article_indicator_item_request_builder.py index f7feafa4989..b5bd572ab3e 100644 --- a/msgraph/generated/security/threat_intelligence/article_indicators/item/article_indicator_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/article_indicators/item/article_indicator_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ArticleIndicatorItemReques async def get(self,request_configuration: Optional[ArticleIndicatorItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ArticleIndicator]: """ - Read the properties and relationships of an articleIndicator object. + Read the properties and relationships of an articleIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ArticleIndicator] Find more info here: https://learn.microsoft.com/graph/api/security-articleindicator-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ArticleIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ArticleIndicatorItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an articleIndicator object. + Read the properties and relationships of an articleIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ArticleIndicator] = None, request_configuration: Optional[ArticleIndicatorItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ArticleIndicator] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ArticleIndicatorItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ArticleIndicatorItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an articleIndicator object. + Read the properties and relationships of an articleIndicator object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/article_indicators/item/artifact/artifact_request_builder.py b/msgraph/generated/security/threat_intelligence/article_indicators/item/artifact/artifact_request_builder.py index 74a4c359212..6ea14595d47 100644 --- a/msgraph/generated/security/threat_intelligence/article_indicators/item/artifact/artifact_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/article_indicators/item/artifact/artifact_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ArtifactRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ArtifactRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/articles/articles_request_builder.py b/msgraph/generated/security/threat_intelligence/articles/articles_request_builder.py index 0700a53f55f..73e224faa02 100644 --- a/msgraph/generated/security/threat_intelligence/articles/articles_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/articles/articles_request_builder.py @@ -45,10 +45,10 @@ def by_article_id(self,article_id: str) -> ArticleItemRequestBuilder: async def get(self,request_configuration: Optional[ArticlesRequestBuilderGetRequestConfiguration] = None) -> Optional[ArticleCollectionResponse]: """ - Get a list of article objects, including their properties and relationships. + Get a list of article objects, including their properties and relationships. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ArticleCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/security-article-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/security-threatintelligence-list-articles?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -91,19 +91,19 @@ async def post(self,body: Optional[Article] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ArticlesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of article objects, including their properties and relationships. + Get a list of article objects, including their properties and relationships. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Article] = None, request_configuration: Optional[ArticlesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Article] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ArticlesRequestBuilderGetQueryParameters(): """ - Get a list of article objects, including their properties and relationships. + Get a list of article objects, including their properties and relationships. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/articles/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/articles/count/count_request_builder.py index 2754ab0057c..51f11ef5514 100644 --- a/msgraph/generated/security/threat_intelligence/articles/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/articles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/articles/item/article_item_request_builder.py b/msgraph/generated/security/threat_intelligence/articles/item/article_item_request_builder.py index 42f66d23b9d..1a14faa516a 100644 --- a/msgraph/generated/security/threat_intelligence/articles/item/article_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/articles/item/article_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ArticleItemRequestBuilderD async def get(self,request_configuration: Optional[ArticleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Article]: """ - Read the properties and relationships of an article object. + Read the properties and relationships of an article object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Article] Find more info here: https://learn.microsoft.com/graph/api/security-article-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ArticleIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ArticleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an article object. + Read the properties and relationships of an article object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Article] = None, request_configuration: Optional[ArticleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Article] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ArticleItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class ArticleItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an article object. + Read the properties and relationships of an article object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/articles/item/indicators/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/articles/item/indicators/count/count_request_builder.py index 401ac541ee1..d55c05117c9 100644 --- a/msgraph/generated/security/threat_intelligence/articles/item/indicators/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/articles/item/indicators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/articles/item/indicators/indicators_request_builder.py b/msgraph/generated/security/threat_intelligence/articles/item/indicators/indicators_request_builder.py index db642e315e7..6b933470a47 100644 --- a/msgraph/generated/security/threat_intelligence/articles/item/indicators/indicators_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/articles/item/indicators/indicators_request_builder.py @@ -44,7 +44,7 @@ def by_article_indicator_id(self,article_indicator_id: str) -> ArticleIndicatorI async def get(self,request_configuration: Optional[IndicatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ArticleIndicatorCollectionResponse]: """ - Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. + Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ArticleIndicatorCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-article-list-indicators?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[IndicatorsRequestBuilderGetRe def to_get_request_information(self,request_configuration: Optional[IndicatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. + Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IndicatorsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IndicatorsRequestBuilderGetQueryParameters(): """ - Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. + Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/articles/item/indicators/item/article_indicator_item_request_builder.py b/msgraph/generated/security/threat_intelligence/articles/item/indicators/item/article_indicator_item_request_builder.py index ad689905c0d..8a3131f8f3e 100644 --- a/msgraph/generated/security/threat_intelligence/articles/item/indicators/item/article_indicator_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/articles/item/indicators/item/article_indicator_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ArticleIndic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ArticleIndicatorItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_components/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/host_components/count/count_request_builder.py index 8ce3a4ffa64..fa2bb52a8b0 100644 --- a/msgraph/generated/security/threat_intelligence/host_components/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_components/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_components/host_components_request_builder.py b/msgraph/generated/security/threat_intelligence/host_components/host_components_request_builder.py index b5c44f4fd47..e46aa91f47f 100644 --- a/msgraph/generated/security/threat_intelligence/host_components/host_components_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_components/host_components_request_builder.py @@ -45,7 +45,7 @@ def by_host_component_id(self,host_component_id: str) -> HostComponentItemReques async def get(self,request_configuration: Optional[HostComponentsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostComponentCollectionResponse]: """ - Read the properties and relationships of a hostComponent object. + Read the properties and relationships of a hostComponent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostComponentCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[HostComponent] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[HostComponentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a hostComponent object. + Read the properties and relationships of a hostComponent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostComponent] = None, request_configuration: Optional[HostComponentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[HostComponent] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostComponentsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a hostComponent object. + Read the properties and relationships of a hostComponent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/host_components/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/host_components/item/host/host_request_builder.py index 54bfe2d55f7..973684dad7b 100644 --- a/msgraph/generated/security/threat_intelligence/host_components/item/host/host_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_components/item/host/host_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HostRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HostRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_components/item/host_component_item_request_builder.py b/msgraph/generated/security/threat_intelligence/host_components/item/host_component_item_request_builder.py index 41237284f5e..0988e6b02f4 100644 --- a/msgraph/generated/security/threat_intelligence/host_components/item/host_component_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_components/item/host_component_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[HostComponentItemRequestBu async def get(self,request_configuration: Optional[HostComponentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostComponent]: """ - Read the properties and relationships of a hostComponent object. + Read the properties and relationships of a hostComponent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostComponent] Find more info here: https://learn.microsoft.com/graph/api/security-hostcomponent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[HostCompo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[HostComponentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a hostComponent object. + Read the properties and relationships of a hostComponent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostComponent] = None, request_configuration: Optional[HostComponentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[HostComponent] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class HostComponentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class HostComponentItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a hostComponent object. + Read the properties and relationships of a hostComponent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/host_cookies/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/host_cookies/count/count_request_builder.py index ebb99ebe202..98ef3251ad8 100644 --- a/msgraph/generated/security/threat_intelligence/host_cookies/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_cookies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_cookies/host_cookies_request_builder.py b/msgraph/generated/security/threat_intelligence/host_cookies/host_cookies_request_builder.py index a33ced2a868..ed7b72a7f14 100644 --- a/msgraph/generated/security/threat_intelligence/host_cookies/host_cookies_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_cookies/host_cookies_request_builder.py @@ -45,7 +45,7 @@ def by_host_cookie_id(self,host_cookie_id: str) -> HostCookieItemRequestBuilder: async def get(self,request_configuration: Optional[HostCookiesRequestBuilderGetRequestConfiguration] = None) -> Optional[HostCookieCollectionResponse]: """ - Read the properties and relationships of a hostCookie object. + Read the properties and relationships of a hostCookie object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostCookieCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[HostCookie] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[HostCookiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a hostCookie object. + Read the properties and relationships of a hostCookie object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostCookie] = None, request_configuration: Optional[HostCookiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[HostCookie] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostCookiesRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a hostCookie object. + Read the properties and relationships of a hostCookie object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/host_cookies/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/host_cookies/item/host/host_request_builder.py index 458983e0731..61f2c004c81 100644 --- a/msgraph/generated/security/threat_intelligence/host_cookies/item/host/host_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_cookies/item/host/host_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HostRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HostRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_cookies/item/host_cookie_item_request_builder.py b/msgraph/generated/security/threat_intelligence/host_cookies/item/host_cookie_item_request_builder.py index 12858357532..92809a4ab87 100644 --- a/msgraph/generated/security/threat_intelligence/host_cookies/item/host_cookie_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_cookies/item/host_cookie_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[HostCookieItemRequestBuild async def get(self,request_configuration: Optional[HostCookieItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostCookie]: """ - Read the properties and relationships of a hostCookie object. + Read the properties and relationships of a hostCookie object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostCookie] Find more info here: https://learn.microsoft.com/graph/api/security-hostcookie-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[HostCooki Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[HostCookieItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a hostCookie object. + Read the properties and relationships of a hostCookie object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostCookie] = None, request_configuration: Optional[HostCookieItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[HostCookie] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class HostCookieItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class HostCookieItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a hostCookie object. + Read the properties and relationships of a hostCookie object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/host_pairs/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/host_pairs/count/count_request_builder.py new file mode 100644 index 00000000000..77fea8a608f --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_pairs/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostPairs/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/host_pairs/host_pairs_request_builder.py b/msgraph/generated/security/threat_intelligence/host_pairs/host_pairs_request_builder.py new file mode 100644 index 00000000000..7e664b815c5 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_pairs/host_pairs_request_builder.py @@ -0,0 +1,226 @@ +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.security.host_pair import HostPair + from ....models.security.host_pair_collection_response import HostPairCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + +class HostPairsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostPairsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostPairs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_pair_id(self,host_pair_id: str) -> HostPairItemRequestBuilder: + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.threatIntelligence entity. + param host_pair_id: The unique identifier of hostPair + Returns: HostPairItemRequestBuilder + """ + if not host_pair_id: + raise TypeError("host_pair_id cannot be null.") + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["hostPair%2Did"] = host_pair_id + return HostPairItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[HostPairsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPairCollectionResponse]: + """ + Read the properties and relationships of a hostPair object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPairCollectionResponse] + """ + 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.security.host_pair_collection_response import HostPairCollectionResponse + + return await self.request_adapter.send_async(request_info, HostPairCollectionResponse, error_mapping) + + async def post(self,body: Optional[HostPair] = None, request_configuration: Optional[HostPairsRequestBuilderPostRequestConfiguration] = None) -> Optional[HostPair]: + """ + Create new navigation property to hostPairs for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPair] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.security.host_pair import HostPair + + return await self.request_adapter.send_async(request_info, HostPair, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostPairsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a hostPair object. This API is available in the following national cloud deployments. + 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(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[HostPair] = None, request_configuration: Optional[HostPairsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to hostPairs for security + param body: The request body + param request_configuration: Configuration for 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(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) -> HostPairsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostPairsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostPairsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class HostPairsRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a hostPair object. This API is available in the following national cloud deployments. + """ + 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 HostPairsRequestBuilderGetRequestConfiguration(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[HostPairsRequestBuilder.HostPairsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HostPairsRequestBuilderPostRequestConfiguration(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/security/threat_intelligence/host_pairs/item/child_host/child_host_request_builder.py b/msgraph/generated/security/threat_intelligence/host_pairs/item/child_host/child_host_request_builder.py new file mode 100644 index 00000000000..b851c9c9b49 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_pairs/item/child_host/child_host_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.security.host import Host + +class ChildHostRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the childHost property of the microsoft.graph.security.hostPair entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ChildHostRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostPairs/{hostPair%2Did}/childHost{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ChildHostRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + Host reached via the parentHost. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ChildHostRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Host reached via the parentHost. + 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(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) -> ChildHostRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChildHostRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChildHostRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ChildHostRequestBuilderGetQueryParameters(): + """ + Host reached via the parentHost. + """ + 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 ChildHostRequestBuilderGetRequestConfiguration(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[ChildHostRequestBuilder.ChildHostRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/host_pairs/item/host_pair_item_request_builder.py b/msgraph/generated/security/threat_intelligence/host_pairs/item/host_pair_item_request_builder.py new file mode 100644 index 00000000000..7b00f329c17 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_pairs/item/host_pair_item_request_builder.py @@ -0,0 +1,235 @@ +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.security.host_pair import HostPair + from .child_host.child_host_request_builder import ChildHostRequestBuilder + from .parent_host.parent_host_request_builder import ParentHostRequestBuilder + +class HostPairItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostPairItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostPairs/{hostPair%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[HostPairItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property hostPairs for security + 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[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPair]: + """ + Read the properties and relationships of a hostPair object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPair] + Find more info here: https://learn.microsoft.com/graph/api/security-hostpair-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.security.host_pair import HostPair + + return await self.request_adapter.send_async(request_info, HostPair, error_mapping) + + async def patch(self,body: Optional[HostPair] = None, request_configuration: Optional[HostPairItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[HostPair]: + """ + Update the navigation property hostPairs in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPair] + """ + 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.security.host_pair import HostPair + + return await self.request_adapter.send_async(request_info, HostPair, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[HostPairItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property hostPairs for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a hostPair object. This API is available in the following national cloud deployments. + 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(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[HostPair] = None, request_configuration: Optional[HostPairItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property hostPairs in security + param body: The request body + param request_configuration: Configuration for 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(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) -> HostPairItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostPairItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostPairItemRequestBuilder(self.request_adapter, raw_url) + + @property + def child_host(self) -> ChildHostRequestBuilder: + """ + Provides operations to manage the childHost property of the microsoft.graph.security.hostPair entity. + """ + from .child_host.child_host_request_builder import ChildHostRequestBuilder + + return ChildHostRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def parent_host(self) -> ParentHostRequestBuilder: + """ + Provides operations to manage the parentHost property of the microsoft.graph.security.hostPair entity. + """ + from .parent_host.parent_host_request_builder import ParentHostRequestBuilder + + return ParentHostRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HostPairItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class HostPairItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a hostPair object. This API is available in the following national cloud deployments. + """ + 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 HostPairItemRequestBuilderGetRequestConfiguration(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[HostPairItemRequestBuilder.HostPairItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HostPairItemRequestBuilderPatchRequestConfiguration(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/security/threat_intelligence/host_pairs/item/parent_host/parent_host_request_builder.py b/msgraph/generated/security/threat_intelligence/host_pairs/item/parent_host/parent_host_request_builder.py new file mode 100644 index 00000000000..0ebfe2e6a41 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_pairs/item/parent_host/parent_host_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.security.host import Host + +class ParentHostRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the parentHost property of the microsoft.graph.security.hostPair entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ParentHostRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostPairs/{hostPair%2Did}/parentHost{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ParentHostRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + Host used to reach the childHost. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ParentHostRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Host used to reach the childHost. + 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(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) -> ParentHostRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ParentHostRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ParentHostRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ParentHostRequestBuilderGetQueryParameters(): + """ + Host used to reach the childHost. + """ + 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 ParentHostRequestBuilderGetRequestConfiguration(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[ParentHostRequestBuilder.ParentHostRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/host_ssl_certificates/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/count/count_request_builder.py new file mode 100644 index 00000000000..59f6f57c525 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostSslCertificates/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/host_ssl_certificates/host_ssl_certificates_request_builder.py b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/host_ssl_certificates_request_builder.py new file mode 100644 index 00000000000..d591844a3c2 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/host_ssl_certificates_request_builder.py @@ -0,0 +1,226 @@ +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.security.host_ssl_certificate import HostSslCertificate + from ....models.security.host_ssl_certificate_collection_response import HostSslCertificateCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_ssl_certificate_item_request_builder import HostSslCertificateItemRequestBuilder + +class HostSslCertificatesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the hostSslCertificates property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostSslCertificatesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostSslCertificates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_ssl_certificate_id(self,host_ssl_certificate_id: str) -> HostSslCertificateItemRequestBuilder: + """ + Provides operations to manage the hostSslCertificates property of the microsoft.graph.security.threatIntelligence entity. + param host_ssl_certificate_id: The unique identifier of hostSslCertificate + Returns: HostSslCertificateItemRequestBuilder + """ + if not host_ssl_certificate_id: + raise TypeError("host_ssl_certificate_id cannot be null.") + from .item.host_ssl_certificate_item_request_builder import HostSslCertificateItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["hostSslCertificate%2Did"] = host_ssl_certificate_id + return HostSslCertificateItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[HostSslCertificatesRequestBuilderGetRequestConfiguration] = None) -> Optional[HostSslCertificateCollectionResponse]: + """ + Get the properties and relationships of a hostSslCertificate object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostSslCertificateCollectionResponse] + """ + 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.security.host_ssl_certificate_collection_response import HostSslCertificateCollectionResponse + + return await self.request_adapter.send_async(request_info, HostSslCertificateCollectionResponse, error_mapping) + + async def post(self,body: Optional[HostSslCertificate] = None, request_configuration: Optional[HostSslCertificatesRequestBuilderPostRequestConfiguration] = None) -> Optional[HostSslCertificate]: + """ + Create new navigation property to hostSslCertificates for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostSslCertificate] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.security.host_ssl_certificate import HostSslCertificate + + return await self.request_adapter.send_async(request_info, HostSslCertificate, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostSslCertificatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the properties and relationships of a hostSslCertificate object. This API is available in the following national cloud deployments. + 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(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[HostSslCertificate] = None, request_configuration: Optional[HostSslCertificatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to hostSslCertificates for security + param body: The request body + param request_configuration: Configuration for 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(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) -> HostSslCertificatesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostSslCertificatesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostSslCertificatesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class HostSslCertificatesRequestBuilderGetQueryParameters(): + """ + Get the properties and relationships of a hostSslCertificate object. This API is available in the following national cloud deployments. + """ + 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 HostSslCertificatesRequestBuilderGetRequestConfiguration(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[HostSslCertificatesRequestBuilder.HostSslCertificatesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HostSslCertificatesRequestBuilderPostRequestConfiguration(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/security/threat_intelligence/host_ssl_certificates/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host/host_request_builder.py new file mode 100644 index 00000000000..17ab98e8177 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host/host_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.security.host import Host + +class HostRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the host property of the microsoft.graph.security.hostSslCertificate entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostSslCertificates/{hostSslCertificate%2Did}/host{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + The host for this hostSslCertificate. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The host for this hostSslCertificate. + 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(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) -> HostRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostRequestBuilderGetQueryParameters(): + """ + The host for this hostSslCertificate. + """ + 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 HostRequestBuilderGetRequestConfiguration(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[HostRequestBuilder.HostRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host_ssl_certificate_item_request_builder.py b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host_ssl_certificate_item_request_builder.py new file mode 100644 index 00000000000..c490c8829fe --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/host_ssl_certificate_item_request_builder.py @@ -0,0 +1,235 @@ +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.security.host_ssl_certificate import HostSslCertificate + from .host.host_request_builder import HostRequestBuilder + from .ssl_certificate.ssl_certificate_request_builder import SslCertificateRequestBuilder + +class HostSslCertificateItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the hostSslCertificates property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostSslCertificateItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostSslCertificates/{hostSslCertificate%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[HostSslCertificateItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property hostSslCertificates for security + 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[HostSslCertificateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostSslCertificate]: + """ + Get the properties and relationships of a hostSslCertificate object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostSslCertificate] + Find more info here: https://learn.microsoft.com/graph/api/security-hostsslcertificate-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.security.host_ssl_certificate import HostSslCertificate + + return await self.request_adapter.send_async(request_info, HostSslCertificate, error_mapping) + + async def patch(self,body: Optional[HostSslCertificate] = None, request_configuration: Optional[HostSslCertificateItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[HostSslCertificate]: + """ + Update the navigation property hostSslCertificates in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostSslCertificate] + """ + 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.security.host_ssl_certificate import HostSslCertificate + + return await self.request_adapter.send_async(request_info, HostSslCertificate, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[HostSslCertificateItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property hostSslCertificates for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[HostSslCertificateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the properties and relationships of a hostSslCertificate object. This API is available in the following national cloud deployments. + 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(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[HostSslCertificate] = None, request_configuration: Optional[HostSslCertificateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property hostSslCertificates in security + param body: The request body + param request_configuration: Configuration for 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(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) -> HostSslCertificateItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostSslCertificateItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostSslCertificateItemRequestBuilder(self.request_adapter, raw_url) + + @property + def host(self) -> HostRequestBuilder: + """ + Provides operations to manage the host property of the microsoft.graph.security.hostSslCertificate entity. + """ + from .host.host_request_builder import HostRequestBuilder + + return HostRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ssl_certificate(self) -> SslCertificateRequestBuilder: + """ + Provides operations to manage the sslCertificate property of the microsoft.graph.security.hostSslCertificate entity. + """ + from .ssl_certificate.ssl_certificate_request_builder import SslCertificateRequestBuilder + + return SslCertificateRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HostSslCertificateItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class HostSslCertificateItemRequestBuilderGetQueryParameters(): + """ + Get the properties and relationships of a hostSslCertificate object. This API is available in the following national cloud deployments. + """ + 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 HostSslCertificateItemRequestBuilderGetRequestConfiguration(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[HostSslCertificateItemRequestBuilder.HostSslCertificateItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HostSslCertificateItemRequestBuilderPatchRequestConfiguration(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/security/threat_intelligence/host_ssl_certificates/item/ssl_certificate/ssl_certificate_request_builder.py b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/ssl_certificate/ssl_certificate_request_builder.py new file mode 100644 index 00000000000..c030be0445e --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/host_ssl_certificates/item/ssl_certificate/ssl_certificate_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.security.ssl_certificate import SslCertificate + +class SslCertificateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sslCertificate property of the microsoft.graph.security.hostSslCertificate entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SslCertificateRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hostSslCertificates/{hostSslCertificate%2Did}/sslCertificate{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SslCertificateRequestBuilderGetRequestConfiguration] = None) -> Optional[SslCertificate]: + """ + The sslCertificate for this hostSslCertificate. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SslCertificate] + """ + 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.security.ssl_certificate import SslCertificate + + return await self.request_adapter.send_async(request_info, SslCertificate, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SslCertificateRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The sslCertificate for this hostSslCertificate. + 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(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) -> SslCertificateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SslCertificateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SslCertificateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SslCertificateRequestBuilderGetQueryParameters(): + """ + The sslCertificate for this hostSslCertificate. + """ + 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 SslCertificateRequestBuilderGetRequestConfiguration(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[SslCertificateRequestBuilder.SslCertificateRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/host_trackers/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/host_trackers/count/count_request_builder.py index afa175b5b33..53c72558fc3 100644 --- a/msgraph/generated/security/threat_intelligence/host_trackers/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_trackers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_trackers/host_trackers_request_builder.py b/msgraph/generated/security/threat_intelligence/host_trackers/host_trackers_request_builder.py index d8302c0b657..f0d7a106332 100644 --- a/msgraph/generated/security/threat_intelligence/host_trackers/host_trackers_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_trackers/host_trackers_request_builder.py @@ -45,7 +45,7 @@ def by_host_tracker_id(self,host_tracker_id: str) -> HostTrackerItemRequestBuild async def get(self,request_configuration: Optional[HostTrackersRequestBuilderGetRequestConfiguration] = None) -> Optional[HostTrackerCollectionResponse]: """ - Read the properties and relationships of a hostTracker object. + Read the properties and relationships of a hostTracker object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostTrackerCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[HostTracker] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[HostTrackersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a hostTracker object. + Read the properties and relationships of a hostTracker object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostTracker] = None, request_configuration: Optional[HostTrackersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[HostTracker] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostTrackersRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a hostTracker object. + Read the properties and relationships of a hostTracker object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/host_trackers/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/host_trackers/item/host/host_request_builder.py index a7391777e06..1bf73b873f5 100644 --- a/msgraph/generated/security/threat_intelligence/host_trackers/item/host/host_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_trackers/item/host/host_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HostRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HostRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/host_trackers/item/host_tracker_item_request_builder.py b/msgraph/generated/security/threat_intelligence/host_trackers/item/host_tracker_item_request_builder.py index b8a6739be29..ae785cd675e 100644 --- a/msgraph/generated/security/threat_intelligence/host_trackers/item/host_tracker_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/host_trackers/item/host_tracker_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[HostTrackerItemRequestBuil async def get(self,request_configuration: Optional[HostTrackerItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostTracker]: """ - Read the properties and relationships of a hostTracker object. + Read the properties and relationships of a hostTracker object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostTracker] Find more info here: https://learn.microsoft.com/graph/api/security-hosttracker-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[HostTrack Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[HostTrackerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a hostTracker object. + Read the properties and relationships of a hostTracker object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostTracker] = None, request_configuration: Optional[HostTrackerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[HostTracker] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class HostTrackerItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class HostTrackerItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a hostTracker object. + Read the properties and relationships of a hostTracker object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/count/count_request_builder.py index 33a9b09875e..1305a03ea33 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/hosts_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/hosts_request_builder.py index 420b7e6d8bb..6664c572dda 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/hosts_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/hosts_request_builder.py @@ -45,7 +45,7 @@ def by_host_id(self,host_id: str) -> HostItemRequestBuilder: async def get(self,request_configuration: Optional[HostsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostCollectionResponse]: """ - Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Host] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[HostsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Host] = None, request_configuration: Optional[HostsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Host] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/child_host_pairs_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/child_host_pairs_request_builder.py new file mode 100644 index 00000000000..de227cf06d9 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/child_host_pairs_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_pair_collection_response import HostPairCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + +class ChildHostPairsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the childHostPairs property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ChildHostPairsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/childHostPairs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_pair_id(self,host_pair_id: str) -> HostPairItemRequestBuilder: + """ + Provides operations to manage the childHostPairs property of the microsoft.graph.security.host entity. + param host_pair_id: The unique identifier of hostPair + Returns: HostPairItemRequestBuilder + """ + if not host_pair_id: + raise TypeError("host_pair_id cannot be null.") + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["hostPair%2Did"] = host_pair_id + return HostPairItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ChildHostPairsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPairCollectionResponse]: + """ + Get the list of hostPair resources associated with a host, where that host is the *parent* and has an outgoing pairing to a *child*. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPairCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-host-list-childhostpairs?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.security.host_pair_collection_response import HostPairCollectionResponse + + return await self.request_adapter.send_async(request_info, HostPairCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ChildHostPairsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the list of hostPair resources associated with a host, where that host is the *parent* and has an outgoing pairing to a *child*. This API is available in the following national cloud deployments. + 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(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) -> ChildHostPairsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChildHostPairsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChildHostPairsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ChildHostPairsRequestBuilderGetQueryParameters(): + """ + Get the list of hostPair resources associated with a host, where that host is the *parent* and has an outgoing pairing to a *child*. This API is available in the following national cloud deployments. + """ + 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 ChildHostPairsRequestBuilderGetRequestConfiguration(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[ChildHostPairsRequestBuilder.ChildHostPairsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/count/count_request_builder.py new file mode 100644 index 00000000000..d69fb204e1c --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/childHostPairs/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/item/host_pair_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/item/host_pair_item_request_builder.py new file mode 100644 index 00000000000..05248862346 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/child_host_pairs/item/host_pair_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_pair import HostPair + +class HostPairItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the childHostPairs property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostPairItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/childHostPairs/{hostPair%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPair]: + """ + The hostPairs that are resources associated with a host, where that host is the parentHost and has an outgoing pairing to a cihldHost. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPair] + """ + 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.security.host_pair import HostPair + + return await self.request_adapter.send_async(request_info, HostPair, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The hostPairs that are resources associated with a host, where that host is the parentHost and has an outgoing pairing to a cihldHost. + 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(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) -> HostPairItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostPairItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostPairItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostPairItemRequestBuilderGetQueryParameters(): + """ + The hostPairs that are resources associated with a host, where that host is the parentHost and has an outgoing pairing to a cihldHost. + """ + 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 HostPairItemRequestBuilderGetRequestConfiguration(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[HostPairItemRequestBuilder.HostPairItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/components/components_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/components/components_request_builder.py index 9dd8a9a51ec..66dd8831b56 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/components/components_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/components/components_request_builder.py @@ -44,7 +44,7 @@ def by_host_component_id(self,host_component_id: str) -> HostComponentItemReques async def get(self,request_configuration: Optional[ComponentsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostComponentCollectionResponse]: """ - Get a list of hostComponent resources. + Get a list of hostComponent resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostComponentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-host-list-components?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[ComponentsRequestBuilderGetRe def to_get_request_information(self,request_configuration: Optional[ComponentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of hostComponent resources. + Get a list of hostComponent resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ComponentsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ComponentsRequestBuilderGetQueryParameters(): """ - Get a list of hostComponent resources. + Get a list of hostComponent resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/components/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/components/count/count_request_builder.py index 75441886f98..ed86e6c89b1 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/components/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/components/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/components/item/host_component_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/components/item/host_component_item_request_builder.py index 331cd0f2e0a..59baade1981 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/components/item/host_component_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/components/item/host_component_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HostComponen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HostComponentItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/cookies/cookies_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/cookies/cookies_request_builder.py index 3e2ea9f3d19..8e74220153b 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/cookies/cookies_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/cookies/cookies_request_builder.py @@ -44,7 +44,7 @@ def by_host_cookie_id(self,host_cookie_id: str) -> HostCookieItemRequestBuilder: async def get(self,request_configuration: Optional[CookiesRequestBuilderGetRequestConfiguration] = None) -> Optional[HostCookieCollectionResponse]: """ - Get a list of hostCookie resources. + Get a list of hostCookie resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostCookieCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-host-list-cookies?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[CookiesRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[CookiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of hostCookie resources. + Get a list of hostCookie resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CookiesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CookiesRequestBuilderGetQueryParameters(): """ - Get a list of hostCookie resources. + Get a list of hostCookie resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/cookies/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/cookies/count/count_request_builder.py index d73ec150c97..d47000da64a 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/cookies/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/cookies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/cookies/item/host_cookie_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/cookies/item/host_cookie_item_request_builder.py index a6bf7d2a5c6..95719ada524 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/cookies/item/host_cookie_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/cookies/item/host_cookie_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HostCookieIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HostCookieItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/host_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/host_item_request_builder.py index fc0b72dc07e..aba42e785e5 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/host_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/host_item_request_builder.py @@ -12,12 +12,18 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.security.host import Host + from .child_host_pairs.child_host_pairs_request_builder import ChildHostPairsRequestBuilder from .components.components_request_builder import ComponentsRequestBuilder from .cookies.cookies_request_builder import CookiesRequestBuilder + from .host_pairs.host_pairs_request_builder import HostPairsRequestBuilder + from .parent_host_pairs.parent_host_pairs_request_builder import ParentHostPairsRequestBuilder from .passive_dns.passive_dns_request_builder import PassiveDnsRequestBuilder from .passive_dns_reverse.passive_dns_reverse_request_builder import PassiveDnsReverseRequestBuilder from .reputation.reputation_request_builder import ReputationRequestBuilder + from .ssl_certificates.ssl_certificates_request_builder import SslCertificatesRequestBuilder + from .subdomains.subdomains_request_builder import SubdomainsRequestBuilder from .trackers.trackers_request_builder import TrackersRequestBuilder + from .whois.whois_request_builder import WhoisRequestBuilder class HostItemRequestBuilder(BaseRequestBuilder): """ @@ -53,7 +59,7 @@ async def delete(self,request_configuration: Optional[HostItemRequestBuilderDele async def get(self,request_configuration: Optional[HostItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: """ - Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Host] Find more info here: https://learn.microsoft.com/graph/api/security-host-get?view=graph-rest-1.0 @@ -104,29 +110,29 @@ def to_delete_request_information(self,request_configuration: Optional[HostItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[HostItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Host] = None, request_configuration: Optional[HostItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +145,13 @@ def to_patch_request_information(self,body: Optional[Host] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,6 +165,15 @@ def with_url(self,raw_url: Optional[str] = None) -> HostItemRequestBuilder: raise TypeError("raw_url cannot be null.") return HostItemRequestBuilder(self.request_adapter, raw_url) + @property + def child_host_pairs(self) -> ChildHostPairsRequestBuilder: + """ + Provides operations to manage the childHostPairs property of the microsoft.graph.security.host entity. + """ + from .child_host_pairs.child_host_pairs_request_builder import ChildHostPairsRequestBuilder + + return ChildHostPairsRequestBuilder(self.request_adapter, self.path_parameters) + @property def components(self) -> ComponentsRequestBuilder: """ @@ -177,6 +192,24 @@ def cookies(self) -> CookiesRequestBuilder: return CookiesRequestBuilder(self.request_adapter, self.path_parameters) + @property + def host_pairs(self) -> HostPairsRequestBuilder: + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.host entity. + """ + from .host_pairs.host_pairs_request_builder import HostPairsRequestBuilder + + return HostPairsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def parent_host_pairs(self) -> ParentHostPairsRequestBuilder: + """ + Provides operations to manage the parentHostPairs property of the microsoft.graph.security.host entity. + """ + from .parent_host_pairs.parent_host_pairs_request_builder import ParentHostPairsRequestBuilder + + return ParentHostPairsRequestBuilder(self.request_adapter, self.path_parameters) + @property def passive_dns(self) -> PassiveDnsRequestBuilder: """ @@ -204,6 +237,24 @@ def reputation(self) -> ReputationRequestBuilder: return ReputationRequestBuilder(self.request_adapter, self.path_parameters) + @property + def ssl_certificates(self) -> SslCertificatesRequestBuilder: + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.host entity. + """ + from .ssl_certificates.ssl_certificates_request_builder import SslCertificatesRequestBuilder + + return SslCertificatesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def subdomains(self) -> SubdomainsRequestBuilder: + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.host entity. + """ + from .subdomains.subdomains_request_builder import SubdomainsRequestBuilder + + return SubdomainsRequestBuilder(self.request_adapter, self.path_parameters) + @property def trackers(self) -> TrackersRequestBuilder: """ @@ -213,6 +264,15 @@ def trackers(self) -> TrackersRequestBuilder: return TrackersRequestBuilder(self.request_adapter, self.path_parameters) + @property + def whois(self) -> WhoisRequestBuilder: + """ + Provides operations to manage the whois property of the microsoft.graph.security.host entity. + """ + from .whois.whois_request_builder import WhoisRequestBuilder + + return WhoisRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass @@ -226,7 +286,7 @@ class HostItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class HostItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/count/count_request_builder.py new file mode 100644 index 00000000000..e564d8b493c --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/hostPairs/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/host_pairs_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/host_pairs_request_builder.py new file mode 100644 index 00000000000..c5f2383695d --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/host_pairs_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_pair_collection_response import HostPairCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + +class HostPairsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostPairsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/hostPairs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_pair_id(self,host_pair_id: str) -> HostPairItemRequestBuilder: + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.host entity. + param host_pair_id: The unique identifier of hostPair + Returns: HostPairItemRequestBuilder + """ + if not host_pair_id: + raise TypeError("host_pair_id cannot be null.") + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["hostPair%2Did"] = host_pair_id + return HostPairItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[HostPairsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPairCollectionResponse]: + """ + Get the list of hostPair resources associated with a host, where that host is *either* the *parent* or the *child*. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPairCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-host-list-hostpairs?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.security.host_pair_collection_response import HostPairCollectionResponse + + return await self.request_adapter.send_async(request_info, HostPairCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostPairsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the list of hostPair resources associated with a host, where that host is *either* the *parent* or the *child*. This API is available in the following national cloud deployments. + 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(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) -> HostPairsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostPairsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostPairsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class HostPairsRequestBuilderGetQueryParameters(): + """ + Get the list of hostPair resources associated with a host, where that host is *either* the *parent* or the *child*. This API is available in the following national cloud deployments. + """ + 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 HostPairsRequestBuilderGetRequestConfiguration(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[HostPairsRequestBuilder.HostPairsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/item/host_pair_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/item/host_pair_item_request_builder.py new file mode 100644 index 00000000000..1521f21c58a --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/host_pairs/item/host_pair_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_pair import HostPair + +class HostPairItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the hostPairs property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostPairItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/hostPairs/{hostPair%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPair]: + """ + The hostPairs that are associated with this host, where this host is either the parentHost or childHost. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPair] + """ + 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.security.host_pair import HostPair + + return await self.request_adapter.send_async(request_info, HostPair, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The hostPairs that are associated with this host, where this host is either the parentHost or childHost. + 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(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) -> HostPairItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostPairItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostPairItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostPairItemRequestBuilderGetQueryParameters(): + """ + The hostPairs that are associated with this host, where this host is either the parentHost or childHost. + """ + 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 HostPairItemRequestBuilderGetRequestConfiguration(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[HostPairItemRequestBuilder.HostPairItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/count/count_request_builder.py new file mode 100644 index 00000000000..9887fc699aa --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/parentHostPairs/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/item/host_pair_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/item/host_pair_item_request_builder.py new file mode 100644 index 00000000000..0d253c9e160 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/item/host_pair_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_pair import HostPair + +class HostPairItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the parentHostPairs property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostPairItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/parentHostPairs/{hostPair%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPair]: + """ + The hostPairs that are associated with a host, where that host is the childHost and has an incoming pairing with a parentHost. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPair] + """ + 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.security.host_pair import HostPair + + return await self.request_adapter.send_async(request_info, HostPair, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostPairItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The hostPairs that are associated with a host, where that host is the childHost and has an incoming pairing with a parentHost. + 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(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) -> HostPairItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostPairItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostPairItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostPairItemRequestBuilderGetQueryParameters(): + """ + The hostPairs that are associated with a host, where that host is the childHost and has an incoming pairing with a parentHost. + """ + 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 HostPairItemRequestBuilderGetRequestConfiguration(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[HostPairItemRequestBuilder.HostPairItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/parent_host_pairs_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/parent_host_pairs_request_builder.py new file mode 100644 index 00000000000..acd63783935 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/parent_host_pairs/parent_host_pairs_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_pair_collection_response import HostPairCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + +class ParentHostPairsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the parentHostPairs property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ParentHostPairsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/parentHostPairs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_pair_id(self,host_pair_id: str) -> HostPairItemRequestBuilder: + """ + Provides operations to manage the parentHostPairs property of the microsoft.graph.security.host entity. + param host_pair_id: The unique identifier of hostPair + Returns: HostPairItemRequestBuilder + """ + if not host_pair_id: + raise TypeError("host_pair_id cannot be null.") + from .item.host_pair_item_request_builder import HostPairItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["hostPair%2Did"] = host_pair_id + return HostPairItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[ParentHostPairsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostPairCollectionResponse]: + """ + Get the list of hostPair resources associated with a host, where that host is the *child* and has an incoming pairing with a *parent*. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostPairCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-host-list-parenthostpairs?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.security.host_pair_collection_response import HostPairCollectionResponse + + return await self.request_adapter.send_async(request_info, HostPairCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ParentHostPairsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the list of hostPair resources associated with a host, where that host is the *child* and has an incoming pairing with a *parent*. This API is available in the following national cloud deployments. + 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(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) -> ParentHostPairsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ParentHostPairsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ParentHostPairsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ParentHostPairsRequestBuilderGetQueryParameters(): + """ + Get the list of hostPair resources associated with a host, where that host is the *child* and has an incoming pairing with a *parent*. This API is available in the following national cloud deployments. + """ + 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 ParentHostPairsRequestBuilderGetRequestConfiguration(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[ParentHostPairsRequestBuilder.ParentHostPairsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/count/count_request_builder.py index fcba0d94383..ced148f7112 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/item/passive_dns_record_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/item/passive_dns_record_item_request_builder.py index 53c4a231033..56968c7cd4a 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/item/passive_dns_record_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/item/passive_dns_record_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PassiveDnsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PassiveDnsRecordItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/passive_dns_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/passive_dns_request_builder.py index 724899a9a4e..f2d54be3d89 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/passive_dns_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns/passive_dns_request_builder.py @@ -44,7 +44,7 @@ def by_passive_dns_record_id(self,passive_dns_record_id: str) -> PassiveDnsRecor async def get(self,request_configuration: Optional[PassiveDnsRequestBuilderGetRequestConfiguration] = None) -> Optional[PassiveDnsRecordCollectionResponse]: """ - Get a list of passiveDnsRecord resources associated to a host. + Get a list of passiveDnsRecord resources associated with a host. This is a forward DNS lookup which queries the IP address of the specified host using its hostname. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PassiveDnsRecordCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-host-list-passivedns?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[PassiveDnsRequestBuilderGetRe def to_get_request_information(self,request_configuration: Optional[PassiveDnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of passiveDnsRecord resources associated to a host. + Get a list of passiveDnsRecord resources associated with a host. This is a forward DNS lookup which queries the IP address of the specified host using its hostname. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PassiveDnsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PassiveDnsRequestBuilderGetQueryParameters(): """ - Get a list of passiveDnsRecord resources associated to a host. + Get a list of passiveDnsRecord resources associated with a host. This is a forward DNS lookup which queries the IP address of the specified host using its hostname. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/count/count_request_builder.py index 6e7f0a0ad7b..25eee1dd333 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/item/passive_dns_record_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/item/passive_dns_record_item_request_builder.py index 2d98a7ddf46..7b7fe109ef3 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/item/passive_dns_record_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/item/passive_dns_record_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PassiveDnsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PassiveDnsRecordItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/passive_dns_reverse_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/passive_dns_reverse_request_builder.py index da276187935..d9361ae0c97 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/passive_dns_reverse_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/passive_dns_reverse/passive_dns_reverse_request_builder.py @@ -44,7 +44,7 @@ def by_passive_dns_record_id(self,passive_dns_record_id: str) -> PassiveDnsRecor async def get(self,request_configuration: Optional[PassiveDnsReverseRequestBuilderGetRequestConfiguration] = None) -> Optional[PassiveDnsRecordCollectionResponse]: """ - Get a list of passiveDnsRecord resources. + Get a collection of passiveDnsRecord resources from a reverse passive DNS retrieval. A reverse DNS lookup queries the hostname of a host using an IP address. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PassiveDnsRecordCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-host-list-passivednsreverse?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[PassiveDnsReverseRequestBuild def to_get_request_information(self,request_configuration: Optional[PassiveDnsReverseRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of passiveDnsRecord resources. + Get a collection of passiveDnsRecord resources from a reverse passive DNS retrieval. A reverse DNS lookup queries the hostname of a host using an IP address. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PassiveDnsReverseRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PassiveDnsReverseRequestBuilderGetQueryParameters(): """ - Get a list of passiveDnsRecord resources. + Get a collection of passiveDnsRecord resources from a reverse passive DNS retrieval. A reverse DNS lookup queries the hostname of a host using an IP address. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/reputation/reputation_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/reputation/reputation_request_builder.py index 1e68021d8c0..db6529a7fd9 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/reputation/reputation_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/reputation/reputation_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ReputationRequestBuilderDe async def get(self,request_configuration: Optional[ReputationRequestBuilderGetRequestConfiguration] = None) -> Optional[HostReputation]: """ - Get the properties and relationships of a hostReputation object. + Get the properties and relationships of a hostReputation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostReputation] Find more info here: https://learn.microsoft.com/graph/api/security-host-get-reputation?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Reputatio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ReputationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a hostReputation object. + Get the properties and relationships of a hostReputation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[HostReputation] = None, request_configuration: Optional[ReputationRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[HostReputation] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ReputationRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguratio @dataclass class ReputationRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a hostReputation object. + Get the properties and relationships of a hostReputation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/count/count_request_builder.py new file mode 100644 index 00000000000..7ca9c3b258e --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/sslCertificates/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/item/host_ssl_certificate_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/item/host_ssl_certificate_item_request_builder.py new file mode 100644 index 00000000000..b6b9874facd --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/item/host_ssl_certificate_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_ssl_certificate import HostSslCertificate + +class HostSslCertificateItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostSslCertificateItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/sslCertificates/{hostSslCertificate%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostSslCertificateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[HostSslCertificate]: + """ + The hostSslCertificates that are associated with this host. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostSslCertificate] + """ + 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.security.host_ssl_certificate import HostSslCertificate + + return await self.request_adapter.send_async(request_info, HostSslCertificate, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostSslCertificateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The hostSslCertificates that are associated with this host. + 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(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) -> HostSslCertificateItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostSslCertificateItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostSslCertificateItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostSslCertificateItemRequestBuilderGetQueryParameters(): + """ + The hostSslCertificates that are associated with this host. + """ + 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 HostSslCertificateItemRequestBuilderGetRequestConfiguration(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[HostSslCertificateItemRequestBuilder.HostSslCertificateItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/ssl_certificates_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/ssl_certificates_request_builder.py new file mode 100644 index 00000000000..fea5eb2b43f --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/ssl_certificates/ssl_certificates_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host_ssl_certificate_collection_response import HostSslCertificateCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_ssl_certificate_item_request_builder import HostSslCertificateItemRequestBuilder + +class SslCertificatesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SslCertificatesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/sslCertificates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_ssl_certificate_id(self,host_ssl_certificate_id: str) -> HostSslCertificateItemRequestBuilder: + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.host entity. + param host_ssl_certificate_id: The unique identifier of hostSslCertificate + Returns: HostSslCertificateItemRequestBuilder + """ + if not host_ssl_certificate_id: + raise TypeError("host_ssl_certificate_id cannot be null.") + from .item.host_ssl_certificate_item_request_builder import HostSslCertificateItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["hostSslCertificate%2Did"] = host_ssl_certificate_id + return HostSslCertificateItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[SslCertificatesRequestBuilderGetRequestConfiguration] = None) -> Optional[HostSslCertificateCollectionResponse]: + """ + Get a list of hostSslCertificate objects from the host navigation property. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostSslCertificateCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-host-list-sslcertificates?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.security.host_ssl_certificate_collection_response import HostSslCertificateCollectionResponse + + return await self.request_adapter.send_async(request_info, HostSslCertificateCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SslCertificatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of hostSslCertificate objects from the host navigation property. This API is available in the following national cloud deployments. + 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(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) -> SslCertificatesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SslCertificatesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SslCertificatesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SslCertificatesRequestBuilderGetQueryParameters(): + """ + Get a list of hostSslCertificate objects from the host navigation property. This API is available in the following national cloud deployments. + """ + 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 SslCertificatesRequestBuilderGetRequestConfiguration(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[SslCertificatesRequestBuilder.SslCertificatesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/count/count_request_builder.py new file mode 100644 index 00000000000..e02f91d8ce2 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/subdomains/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/item/subdomain_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/item/subdomain_item_request_builder.py new file mode 100644 index 00000000000..a0608131a3d --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/item/subdomain_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.subdomain import Subdomain + +class SubdomainItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SubdomainItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/subdomains/{subdomain%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SubdomainItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Subdomain]: + """ + The subdomains that are associated with this host. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subdomain] + """ + 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.security.subdomain import Subdomain + + return await self.request_adapter.send_async(request_info, Subdomain, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SubdomainItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The subdomains that are associated with this host. + 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(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) -> SubdomainItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubdomainItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubdomainItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SubdomainItemRequestBuilderGetQueryParameters(): + """ + The subdomains that are associated with this host. + """ + 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 SubdomainItemRequestBuilderGetRequestConfiguration(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[SubdomainItemRequestBuilder.SubdomainItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/subdomains_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/subdomains_request_builder.py new file mode 100644 index 00000000000..5228cfc2140 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/subdomains/subdomains_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.subdomain_collection_response import SubdomainCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.subdomain_item_request_builder import SubdomainItemRequestBuilder + +class SubdomainsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SubdomainsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/subdomains{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_subdomain_id(self,subdomain_id: str) -> SubdomainItemRequestBuilder: + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.host entity. + param subdomain_id: The unique identifier of subdomain + Returns: SubdomainItemRequestBuilder + """ + if not subdomain_id: + raise TypeError("subdomain_id cannot be null.") + from .item.subdomain_item_request_builder import SubdomainItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["subdomain%2Did"] = subdomain_id + return SubdomainItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[SubdomainsRequestBuilderGetRequestConfiguration] = None) -> Optional[SubdomainCollectionResponse]: + """ + Get the list of subdomain resources associated with a host. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SubdomainCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-host-list-subdomains?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.security.subdomain_collection_response import SubdomainCollectionResponse + + return await self.request_adapter.send_async(request_info, SubdomainCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SubdomainsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the list of subdomain resources associated with a host. This API is available in the following national cloud deployments. + 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(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) -> SubdomainsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubdomainsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubdomainsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SubdomainsRequestBuilderGetQueryParameters(): + """ + Get the list of subdomain resources associated with a host. This API is available in the following national cloud deployments. + """ + 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 SubdomainsRequestBuilderGetRequestConfiguration(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[SubdomainsRequestBuilder.SubdomainsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/trackers/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/trackers/count/count_request_builder.py index 79805fce600..d46e1b6ff53 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/trackers/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/trackers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/trackers/item/host_tracker_item_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/trackers/item/host_tracker_item_request_builder.py index 6d3047a1c96..3beca74d418 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/trackers/item/host_tracker_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/trackers/item/host_tracker_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[HostTrackerI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HostTrackerItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/trackers/trackers_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/trackers/trackers_request_builder.py index dfa6a414c26..c12258cb808 100644 --- a/msgraph/generated/security/threat_intelligence/hosts/item/trackers/trackers_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/hosts/item/trackers/trackers_request_builder.py @@ -44,7 +44,7 @@ def by_host_tracker_id(self,host_tracker_id: str) -> HostTrackerItemRequestBuild async def get(self,request_configuration: Optional[TrackersRequestBuilderGetRequestConfiguration] = None) -> Optional[HostTrackerCollectionResponse]: """ - Get a list of hostTracker resources. + Get a list of hostTracker resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HostTrackerCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-host-list-trackers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[TrackersRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TrackersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of hostTracker resources. + Get a list of hostTracker resources. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TrackersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TrackersRequestBuilderGetQueryParameters(): """ - Get a list of hostTracker resources. + Get a list of hostTracker resources. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/hosts/item/whois/whois_request_builder.py b/msgraph/generated/security/threat_intelligence/hosts/item/whois/whois_request_builder.py new file mode 100644 index 00000000000..04b3626e0f3 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/hosts/item/whois/whois_request_builder.py @@ -0,0 +1,117 @@ +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.security.whois_record import WhoisRecord + +class WhoisRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the whois property of the microsoft.graph.security.host entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new WhoisRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/whois{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[WhoisRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisRecord]: + """ + Get the specified whoisRecord resource. Specify the desired whoisRecord in one of the following two ways:- Identify a host and get its current whoisRecord. - Specify an id value to get the corresponding whoisRecord. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisRecord] + Find more info here: https://learn.microsoft.com/graph/api/security-whoisrecord-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.security.whois_record import WhoisRecord + + return await self.request_adapter.send_async(request_info, WhoisRecord, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[WhoisRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the specified whoisRecord resource. Specify the desired whoisRecord in one of the following two ways:- Identify a host and get its current whoisRecord. - Specify an id value to get the corresponding whoisRecord. This API is available in the following national cloud deployments. + 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(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) -> WhoisRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WhoisRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WhoisRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WhoisRequestBuilderGetQueryParameters(): + """ + Get the specified whoisRecord resource. Specify the desired whoisRecord in one of the following two ways:- Identify a host and get its current whoisRecord. - Specify an id value to get the corresponding whoisRecord. This API is available in the following national cloud deployments. + """ + 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 WhoisRequestBuilderGetRequestConfiguration(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[WhoisRequestBuilder.WhoisRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/intel_profiles/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/intel_profiles/count/count_request_builder.py index b042204384b..48ff281100e 100644 --- a/msgraph/generated/security/threat_intelligence/intel_profiles/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intel_profiles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/intel_profiles/intel_profiles_request_builder.py b/msgraph/generated/security/threat_intelligence/intel_profiles/intel_profiles_request_builder.py index 7cbabdf3278..2995c8f6c71 100644 --- a/msgraph/generated/security/threat_intelligence/intel_profiles/intel_profiles_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intel_profiles/intel_profiles_request_builder.py @@ -45,10 +45,10 @@ def by_intelligence_profile_id(self,intelligence_profile_id: str) -> Intelligenc async def get(self,request_configuration: Optional[IntelProfilesRequestBuilderGetRequestConfiguration] = None) -> Optional[IntelligenceProfileCollectionResponse]: """ - Get a list of the intelligenceProfile objects and their properties. + Get a list of the intelligenceProfile objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IntelligenceProfileCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/security-intelligenceprofile-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/security-threatintelligence-list-intelprofiles?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -91,19 +91,19 @@ async def post(self,body: Optional[IntelligenceProfile] = None, request_configur def to_get_request_information(self,request_configuration: Optional[IntelProfilesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the intelligenceProfile objects and their properties. + Get a list of the intelligenceProfile objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IntelligenceProfile] = None, request_configuration: Optional[IntelProfilesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[IntelligenceProfile] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IntelProfilesRequestBuilderGetQueryParameters(): """ - Get a list of the intelligenceProfile objects and their properties. + Get a list of the intelligenceProfile objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/count/count_request_builder.py index e48cd298354..263bc096780 100644 --- a/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/indicators_request_builder.py b/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/indicators_request_builder.py index 97870e9c3ee..97165f02300 100644 --- a/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/indicators_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/indicators_request_builder.py @@ -44,7 +44,7 @@ def by_intelligence_profile_indicator_id(self,intelligence_profile_indicator_id: async def get(self,request_configuration: Optional[IndicatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[IntelligenceProfileIndicatorCollectionResponse]: """ - Get the intelligenceProfileIndicator resources from the indicators navigation property of an intelligenceProfile. + Get the intelligenceProfileIndicator resources from the indicators navigation property of an intelligenceProfile. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IntelligenceProfileIndicatorCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-intelligenceprofile-list-indicators?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[IndicatorsRequestBuilderGetRe def to_get_request_information(self,request_configuration: Optional[IndicatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the intelligenceProfileIndicator resources from the indicators navigation property of an intelligenceProfile. + Get the intelligenceProfileIndicator resources from the indicators navigation property of an intelligenceProfile. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IndicatorsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IndicatorsRequestBuilderGetQueryParameters(): """ - Get the intelligenceProfileIndicator resources from the indicators navigation property of an intelligenceProfile. + Get the intelligenceProfileIndicator resources from the indicators navigation property of an intelligenceProfile. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/item/intelligence_profile_indicator_item_request_builder.py b/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/item/intelligence_profile_indicator_item_request_builder.py index e9a2c920955..fbab655f34c 100644 --- a/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/item/intelligence_profile_indicator_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intel_profiles/item/indicators/item/intelligence_profile_indicator_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Intelligence Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IntelligenceProfileIndicatorItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/intel_profiles/item/intelligence_profile_item_request_builder.py b/msgraph/generated/security/threat_intelligence/intel_profiles/item/intelligence_profile_item_request_builder.py index 434edab47e3..35b1bbd5690 100644 --- a/msgraph/generated/security/threat_intelligence/intel_profiles/item/intelligence_profile_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intel_profiles/item/intelligence_profile_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IntelligenceProfileItemReq async def get(self,request_configuration: Optional[IntelligenceProfileItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IntelligenceProfile]: """ - Read the properties and relationships of a intelligenceProfile object. + Read the properties and relationships of a intelligenceProfile object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IntelligenceProfile] Find more info here: https://learn.microsoft.com/graph/api/security-intelligenceprofile-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[Intellige Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IntelligenceProfileItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a intelligenceProfile object. + Read the properties and relationships of a intelligenceProfile object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IntelligenceProfile] = None, request_configuration: Optional[IntelligenceProfileItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[IntelligenceProfile] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class IntelligenceProfileItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class IntelligenceProfileItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a intelligenceProfile object. + Read the properties and relationships of a intelligenceProfile object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/count/count_request_builder.py index f4d8d9fa3b9..aeef1f850f8 100644 --- a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/intelligence_profile_indicators_request_builder.py b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/intelligence_profile_indicators_request_builder.py index e52be04bd63..98e9ab4f57d 100644 --- a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/intelligence_profile_indicators_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/intelligence_profile_indicators_request_builder.py @@ -45,7 +45,7 @@ def by_intelligence_profile_indicator_id(self,intelligence_profile_indicator_id: async def get(self,request_configuration: Optional[IntelligenceProfileIndicatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[IntelligenceProfileIndicatorCollectionResponse]: """ - Read the properties and relationships of a intelligenceProfileIndicator object. + Read the properties and relationships of a intelligenceProfileIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IntelligenceProfileIndicatorCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[IntelligenceProfileIndicator] = None, request def to_get_request_information(self,request_configuration: Optional[IntelligenceProfileIndicatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a intelligenceProfileIndicator object. + Read the properties and relationships of a intelligenceProfileIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IntelligenceProfileIndicator] = None, request_configuration: Optional[IntelligenceProfileIndicatorsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[IntelligenceProfileIndicator if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IntelligenceProfileIndicatorsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a intelligenceProfileIndicator object. + Read the properties and relationships of a intelligenceProfileIndicator object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/artifact/artifact_request_builder.py b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/artifact/artifact_request_builder.py index db2063fa9a8..bfbbcc938e7 100644 --- a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/artifact/artifact_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/artifact/artifact_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ArtifactRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ArtifactRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/intelligence_profile_indicator_item_request_builder.py b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/intelligence_profile_indicator_item_request_builder.py index 3fb9cb9b93f..5c740241fe7 100644 --- a/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/intelligence_profile_indicator_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/intelligence_profile_indicators/item/intelligence_profile_indicator_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[IntelligenceProfileIndicat async def get(self,request_configuration: Optional[IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration] = None) -> Optional[IntelligenceProfileIndicator]: """ - Read the properties and relationships of a intelligenceProfileIndicator object. + Read the properties and relationships of a intelligenceProfileIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[IntelligenceProfileIndicator] Find more info here: https://learn.microsoft.com/graph/api/security-intelligenceprofileindicator-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[Intellige Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a intelligenceProfileIndicator object. + Read the properties and relationships of a intelligenceProfileIndicator object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[IntelligenceProfileIndicator] = None, request_configuration: Optional[IntelligenceProfileIndicatorItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[IntelligenceProfileIndicato if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class IntelligenceProfileIndicatorItemRequestBuilderDeleteRequestConfiguration(B @dataclass class IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a intelligenceProfileIndicator object. + Read the properties and relationships of a intelligenceProfileIndicator object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/passive_dns_records/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/passive_dns_records/count/count_request_builder.py index 41700d7ca0b..b4e79bc3b73 100644 --- a/msgraph/generated/security/threat_intelligence/passive_dns_records/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/passive_dns_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/passive_dns_records/item/artifact/artifact_request_builder.py b/msgraph/generated/security/threat_intelligence/passive_dns_records/item/artifact/artifact_request_builder.py index 926f6c3c55e..026c193f558 100644 --- a/msgraph/generated/security/threat_intelligence/passive_dns_records/item/artifact/artifact_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/passive_dns_records/item/artifact/artifact_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ArtifactRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ArtifactRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/passive_dns_records/item/parent_host/parent_host_request_builder.py b/msgraph/generated/security/threat_intelligence/passive_dns_records/item/parent_host/parent_host_request_builder.py index 54e7ed251cc..fe388ae5108 100644 --- a/msgraph/generated/security/threat_intelligence/passive_dns_records/item/parent_host/parent_host_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/passive_dns_records/item/parent_host/parent_host_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentHostRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentHostRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/passive_dns_records/item/passive_dns_record_item_request_builder.py b/msgraph/generated/security/threat_intelligence/passive_dns_records/item/passive_dns_record_item_request_builder.py index 5adbee02a0b..44446674f5c 100644 --- a/msgraph/generated/security/threat_intelligence/passive_dns_records/item/passive_dns_record_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/passive_dns_records/item/passive_dns_record_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PassiveDnsRecordItemReques async def get(self,request_configuration: Optional[PassiveDnsRecordItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PassiveDnsRecord]: """ - Read the properties and relationships of a passiveDnsRecord object. + Read the properties and relationships of a passiveDnsRecord object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PassiveDnsRecord] Find more info here: https://learn.microsoft.com/graph/api/security-passivednsrecord-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[PassiveDn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PassiveDnsRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a passiveDnsRecord object. + Read the properties and relationships of a passiveDnsRecord object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PassiveDnsRecord] = None, request_configuration: Optional[PassiveDnsRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[PassiveDnsRecord] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class PassiveDnsRecordItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class PassiveDnsRecordItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a passiveDnsRecord object. + Read the properties and relationships of a passiveDnsRecord object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/passive_dns_records/passive_dns_records_request_builder.py b/msgraph/generated/security/threat_intelligence/passive_dns_records/passive_dns_records_request_builder.py index b05942c0a0b..6a0a245ea52 100644 --- a/msgraph/generated/security/threat_intelligence/passive_dns_records/passive_dns_records_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/passive_dns_records/passive_dns_records_request_builder.py @@ -45,7 +45,7 @@ def by_passive_dns_record_id(self,passive_dns_record_id: str) -> PassiveDnsRecor async def get(self,request_configuration: Optional[PassiveDnsRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[PassiveDnsRecordCollectionResponse]: """ - Read the properties and relationships of a passiveDnsRecord object. + Read the properties and relationships of a passiveDnsRecord object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PassiveDnsRecordCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[PassiveDnsRecord] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[PassiveDnsRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a passiveDnsRecord object. + Read the properties and relationships of a passiveDnsRecord object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PassiveDnsRecord] = None, request_configuration: Optional[PassiveDnsRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[PassiveDnsRecord] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PassiveDnsRecordsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a passiveDnsRecord object. + Read the properties and relationships of a passiveDnsRecord object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/ssl_certificates/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/ssl_certificates/count/count_request_builder.py new file mode 100644 index 00000000000..cfc20e25cf8 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/ssl_certificates/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/sslCertificates/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/count/count_request_builder.py new file mode 100644 index 00000000000..6edae7d27b2 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/sslCertificates/{sslCertificate%2Did}/relatedHosts/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/item/host_item_request_builder.py b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/item/host_item_request_builder.py new file mode 100644 index 00000000000..324c1a8211f --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/item/host_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.host import Host + +class HostItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the relatedHosts property of the microsoft.graph.security.sslCertificate entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/sslCertificates/{sslCertificate%2Did}/relatedHosts/{host%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + The hosts related with this sslCertificate. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The hosts related with this sslCertificate. + 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(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) -> HostItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostItemRequestBuilderGetQueryParameters(): + """ + The hosts related with this sslCertificate. + """ + 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 HostItemRequestBuilderGetRequestConfiguration(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[HostItemRequestBuilder.HostItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/related_hosts_request_builder.py b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/related_hosts_request_builder.py new file mode 100644 index 00000000000..8580ca5ab7a --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/related_hosts/related_hosts_request_builder.py @@ -0,0 +1,171 @@ +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.security.host_collection_response import HostCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.host_item_request_builder import HostItemRequestBuilder + +class RelatedHostsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the relatedHosts property of the microsoft.graph.security.sslCertificate entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new RelatedHostsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/sslCertificates/{sslCertificate%2Did}/relatedHosts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_host_id(self,host_id: str) -> HostItemRequestBuilder: + """ + Provides operations to manage the relatedHosts property of the microsoft.graph.security.sslCertificate entity. + param host_id: The unique identifier of host + Returns: HostItemRequestBuilder + """ + if not host_id: + raise TypeError("host_id cannot be null.") + from .item.host_item_request_builder import HostItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["host%2Did"] = host_id + return HostItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RelatedHostsRequestBuilderGetRequestConfiguration] = None) -> Optional[HostCollectionResponse]: + """ + The hosts related with this sslCertificate. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[HostCollectionResponse] + """ + 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.security.host_collection_response import HostCollectionResponse + + return await self.request_adapter.send_async(request_info, HostCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RelatedHostsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The hosts related with this sslCertificate. + 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(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) -> RelatedHostsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RelatedHostsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RelatedHostsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class RelatedHostsRequestBuilderGetQueryParameters(): + """ + The hosts related with this sslCertificate. + """ + 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 RelatedHostsRequestBuilderGetRequestConfiguration(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[RelatedHostsRequestBuilder.RelatedHostsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/ssl_certificates/item/ssl_certificate_item_request_builder.py b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/ssl_certificate_item_request_builder.py new file mode 100644 index 00000000000..648588b9e25 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/ssl_certificates/item/ssl_certificate_item_request_builder.py @@ -0,0 +1,225 @@ +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.security.ssl_certificate import SslCertificate + from .related_hosts.related_hosts_request_builder import RelatedHostsRequestBuilder + +class SslCertificateItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SslCertificateItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/sslCertificates/{sslCertificate%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[SslCertificateItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property sslCertificates for security + 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[SslCertificateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SslCertificate]: + """ + Get the properties and relationships of an sslCertificate object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SslCertificate] + Find more info here: https://learn.microsoft.com/graph/api/security-sslcertificate-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.security.ssl_certificate import SslCertificate + + return await self.request_adapter.send_async(request_info, SslCertificate, error_mapping) + + async def patch(self,body: Optional[SslCertificate] = None, request_configuration: Optional[SslCertificateItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[SslCertificate]: + """ + Update the navigation property sslCertificates in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SslCertificate] + """ + 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.security.ssl_certificate import SslCertificate + + return await self.request_adapter.send_async(request_info, SslCertificate, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[SslCertificateItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property sslCertificates for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[SslCertificateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the properties and relationships of an sslCertificate object. This API is available in the following national cloud deployments. + 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(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[SslCertificate] = None, request_configuration: Optional[SslCertificateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property sslCertificates in security + param body: The request body + param request_configuration: Configuration for 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(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) -> SslCertificateItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SslCertificateItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SslCertificateItemRequestBuilder(self.request_adapter, raw_url) + + @property + def related_hosts(self) -> RelatedHostsRequestBuilder: + """ + Provides operations to manage the relatedHosts property of the microsoft.graph.security.sslCertificate entity. + """ + from .related_hosts.related_hosts_request_builder import RelatedHostsRequestBuilder + + return RelatedHostsRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SslCertificateItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class SslCertificateItemRequestBuilderGetQueryParameters(): + """ + Get the properties and relationships of an sslCertificate object. This API is available in the following national cloud deployments. + """ + 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 SslCertificateItemRequestBuilderGetRequestConfiguration(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[SslCertificateItemRequestBuilder.SslCertificateItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SslCertificateItemRequestBuilderPatchRequestConfiguration(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/security/threat_intelligence/ssl_certificates/ssl_certificates_request_builder.py b/msgraph/generated/security/threat_intelligence/ssl_certificates/ssl_certificates_request_builder.py new file mode 100644 index 00000000000..6fd642bac3b --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/ssl_certificates/ssl_certificates_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.ssl_certificate import SslCertificate + from ....models.security.ssl_certificate_collection_response import SslCertificateCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.ssl_certificate_item_request_builder import SslCertificateItemRequestBuilder + +class SslCertificatesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SslCertificatesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/sslCertificates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_ssl_certificate_id(self,ssl_certificate_id: str) -> SslCertificateItemRequestBuilder: + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.threatIntelligence entity. + param ssl_certificate_id: The unique identifier of sslCertificate + Returns: SslCertificateItemRequestBuilder + """ + if not ssl_certificate_id: + raise TypeError("ssl_certificate_id cannot be null.") + from .item.ssl_certificate_item_request_builder import SslCertificateItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["sslCertificate%2Did"] = ssl_certificate_id + return SslCertificateItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[SslCertificatesRequestBuilderGetRequestConfiguration] = None) -> Optional[SslCertificateCollectionResponse]: + """ + Get a list of sslCertificate objects and their properties. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SslCertificateCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-threatintelligence-list-sslcertificates?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.security.ssl_certificate_collection_response import SslCertificateCollectionResponse + + return await self.request_adapter.send_async(request_info, SslCertificateCollectionResponse, error_mapping) + + async def post(self,body: Optional[SslCertificate] = None, request_configuration: Optional[SslCertificatesRequestBuilderPostRequestConfiguration] = None) -> Optional[SslCertificate]: + """ + Create new navigation property to sslCertificates for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SslCertificate] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.security.ssl_certificate import SslCertificate + + return await self.request_adapter.send_async(request_info, SslCertificate, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SslCertificatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of sslCertificate objects and their properties. This API is available in the following national cloud deployments. + 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(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[SslCertificate] = None, request_configuration: Optional[SslCertificatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to sslCertificates for security + param body: The request body + param request_configuration: Configuration for 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(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) -> SslCertificatesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SslCertificatesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SslCertificatesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SslCertificatesRequestBuilderGetQueryParameters(): + """ + Get a list of sslCertificate objects and their properties. This API is available in the following national cloud deployments. + """ + 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 SslCertificatesRequestBuilderGetRequestConfiguration(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[SslCertificatesRequestBuilder.SslCertificatesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SslCertificatesRequestBuilderPostRequestConfiguration(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/security/threat_intelligence/subdomains/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/subdomains/count/count_request_builder.py new file mode 100644 index 00000000000..26aaefc114f --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/subdomains/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/subdomains/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/subdomains/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/subdomains/item/host/host_request_builder.py new file mode 100644 index 00000000000..29b686b5230 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/subdomains/item/host/host_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.security.host import Host + +class HostRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the host property of the microsoft.graph.security.subdomain entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/subdomains/{subdomain%2Did}/host{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + The host of the subdomain. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The host of the subdomain. + 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(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) -> HostRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostRequestBuilderGetQueryParameters(): + """ + The host of the subdomain. + """ + 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 HostRequestBuilderGetRequestConfiguration(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[HostRequestBuilder.HostRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/subdomains/item/subdomain_item_request_builder.py b/msgraph/generated/security/threat_intelligence/subdomains/item/subdomain_item_request_builder.py new file mode 100644 index 00000000000..dc7321123a6 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/subdomains/item/subdomain_item_request_builder.py @@ -0,0 +1,225 @@ +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.security.subdomain import Subdomain + from .host.host_request_builder import HostRequestBuilder + +class SubdomainItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SubdomainItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/subdomains/{subdomain%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[SubdomainItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property subdomains for security + 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[SubdomainItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Subdomain]: + """ + Read the properties and relationships of a subdomain object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subdomain] + Find more info here: https://learn.microsoft.com/graph/api/security-subdomain-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.security.subdomain import Subdomain + + return await self.request_adapter.send_async(request_info, Subdomain, error_mapping) + + async def patch(self,body: Optional[Subdomain] = None, request_configuration: Optional[SubdomainItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Subdomain]: + """ + Update the navigation property subdomains in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subdomain] + """ + 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.security.subdomain import Subdomain + + return await self.request_adapter.send_async(request_info, Subdomain, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[SubdomainItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property subdomains for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[SubdomainItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a subdomain object. This API is available in the following national cloud deployments. + 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(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[Subdomain] = None, request_configuration: Optional[SubdomainItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property subdomains in security + param body: The request body + param request_configuration: Configuration for 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(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) -> SubdomainItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubdomainItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubdomainItemRequestBuilder(self.request_adapter, raw_url) + + @property + def host(self) -> HostRequestBuilder: + """ + Provides operations to manage the host property of the microsoft.graph.security.subdomain entity. + """ + from .host.host_request_builder import HostRequestBuilder + + return HostRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SubdomainItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class SubdomainItemRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a subdomain object. This API is available in the following national cloud deployments. + """ + 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 SubdomainItemRequestBuilderGetRequestConfiguration(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[SubdomainItemRequestBuilder.SubdomainItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SubdomainItemRequestBuilderPatchRequestConfiguration(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/security/threat_intelligence/subdomains/subdomains_request_builder.py b/msgraph/generated/security/threat_intelligence/subdomains/subdomains_request_builder.py new file mode 100644 index 00000000000..3bb6fbf88ca --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/subdomains/subdomains_request_builder.py @@ -0,0 +1,226 @@ +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.security.subdomain import Subdomain + from ....models.security.subdomain_collection_response import SubdomainCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.subdomain_item_request_builder import SubdomainItemRequestBuilder + +class SubdomainsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SubdomainsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/subdomains{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_subdomain_id(self,subdomain_id: str) -> SubdomainItemRequestBuilder: + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.threatIntelligence entity. + param subdomain_id: The unique identifier of subdomain + Returns: SubdomainItemRequestBuilder + """ + if not subdomain_id: + raise TypeError("subdomain_id cannot be null.") + from .item.subdomain_item_request_builder import SubdomainItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["subdomain%2Did"] = subdomain_id + return SubdomainItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[SubdomainsRequestBuilderGetRequestConfiguration] = None) -> Optional[SubdomainCollectionResponse]: + """ + Read the properties and relationships of a subdomain object. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SubdomainCollectionResponse] + """ + 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.security.subdomain_collection_response import SubdomainCollectionResponse + + return await self.request_adapter.send_async(request_info, SubdomainCollectionResponse, error_mapping) + + async def post(self,body: Optional[Subdomain] = None, request_configuration: Optional[SubdomainsRequestBuilderPostRequestConfiguration] = None) -> Optional[Subdomain]: + """ + Create new navigation property to subdomains for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subdomain] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.security.subdomain import Subdomain + + return await self.request_adapter.send_async(request_info, Subdomain, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SubdomainsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a subdomain object. This API is available in the following national cloud deployments. + 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(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[Subdomain] = None, request_configuration: Optional[SubdomainsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to subdomains for security + param body: The request body + param request_configuration: Configuration for 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(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) -> SubdomainsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubdomainsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubdomainsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SubdomainsRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a subdomain object. This API is available in the following national cloud deployments. + """ + 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 SubdomainsRequestBuilderGetRequestConfiguration(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[SubdomainsRequestBuilder.SubdomainsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SubdomainsRequestBuilderPostRequestConfiguration(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/security/threat_intelligence/threat_intelligence_request_builder.py b/msgraph/generated/security/threat_intelligence/threat_intelligence_request_builder.py index b4e99419596..62f1193e8a7 100644 --- a/msgraph/generated/security/threat_intelligence/threat_intelligence_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/threat_intelligence_request_builder.py @@ -12,16 +12,22 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from ...models.security.threat_intelligence import ThreatIntelligence - from .article_indicators.article_indicators_request_builder import ArticleIndicatorsRequestBuilder from .articles.articles_request_builder import ArticlesRequestBuilder + from .article_indicators.article_indicators_request_builder import ArticleIndicatorsRequestBuilder + from .hosts.hosts_request_builder import HostsRequestBuilder from .host_components.host_components_request_builder import HostComponentsRequestBuilder from .host_cookies.host_cookies_request_builder import HostCookiesRequestBuilder - from .hosts.hosts_request_builder import HostsRequestBuilder + from .host_pairs.host_pairs_request_builder import HostPairsRequestBuilder + from .host_ssl_certificates.host_ssl_certificates_request_builder import HostSslCertificatesRequestBuilder from .host_trackers.host_trackers_request_builder import HostTrackersRequestBuilder from .intelligence_profile_indicators.intelligence_profile_indicators_request_builder import IntelligenceProfileIndicatorsRequestBuilder from .intel_profiles.intel_profiles_request_builder import IntelProfilesRequestBuilder from .passive_dns_records.passive_dns_records_request_builder import PassiveDnsRecordsRequestBuilder + from .ssl_certificates.ssl_certificates_request_builder import SslCertificatesRequestBuilder + from .subdomains.subdomains_request_builder import SubdomainsRequestBuilder from .vulnerabilities.vulnerabilities_request_builder import VulnerabilitiesRequestBuilder + from .whois_history_records.whois_history_records_request_builder import WhoisHistoryRecordsRequestBuilder + from .whois_records.whois_records_request_builder import WhoisRecordsRequestBuilder class ThreatIntelligenceRequestBuilder(BaseRequestBuilder): """ @@ -107,12 +113,12 @@ def to_delete_request_information(self,request_configuration: Optional[ThreatInt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ThreatIntelligenceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -122,14 +128,14 @@ def to_get_request_information(self,request_configuration: Optional[ThreatIntell Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ThreatIntelligence] = None, request_configuration: Optional[ThreatIntelligenceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +148,13 @@ def to_patch_request_information(self,body: Optional[ThreatIntelligence] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -199,13 +205,22 @@ def host_cookies(self) -> HostCookiesRequestBuilder: return HostCookiesRequestBuilder(self.request_adapter, self.path_parameters) @property - def hosts(self) -> HostsRequestBuilder: + def host_pairs(self) -> HostPairsRequestBuilder: """ - Provides operations to manage the hosts property of the microsoft.graph.security.threatIntelligence entity. + Provides operations to manage the hostPairs property of the microsoft.graph.security.threatIntelligence entity. """ - from .hosts.hosts_request_builder import HostsRequestBuilder + from .host_pairs.host_pairs_request_builder import HostPairsRequestBuilder - return HostsRequestBuilder(self.request_adapter, self.path_parameters) + return HostPairsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def host_ssl_certificates(self) -> HostSslCertificatesRequestBuilder: + """ + Provides operations to manage the hostSslCertificates property of the microsoft.graph.security.threatIntelligence entity. + """ + from .host_ssl_certificates.host_ssl_certificates_request_builder import HostSslCertificatesRequestBuilder + + return HostSslCertificatesRequestBuilder(self.request_adapter, self.path_parameters) @property def host_trackers(self) -> HostTrackersRequestBuilder: @@ -217,13 +232,13 @@ def host_trackers(self) -> HostTrackersRequestBuilder: return HostTrackersRequestBuilder(self.request_adapter, self.path_parameters) @property - def intelligence_profile_indicators(self) -> IntelligenceProfileIndicatorsRequestBuilder: + def hosts(self) -> HostsRequestBuilder: """ - Provides operations to manage the intelligenceProfileIndicators property of the microsoft.graph.security.threatIntelligence entity. + Provides operations to manage the hosts property of the microsoft.graph.security.threatIntelligence entity. """ - from .intelligence_profile_indicators.intelligence_profile_indicators_request_builder import IntelligenceProfileIndicatorsRequestBuilder + from .hosts.hosts_request_builder import HostsRequestBuilder - return IntelligenceProfileIndicatorsRequestBuilder(self.request_adapter, self.path_parameters) + return HostsRequestBuilder(self.request_adapter, self.path_parameters) @property def intel_profiles(self) -> IntelProfilesRequestBuilder: @@ -234,6 +249,15 @@ def intel_profiles(self) -> IntelProfilesRequestBuilder: return IntelProfilesRequestBuilder(self.request_adapter, self.path_parameters) + @property + def intelligence_profile_indicators(self) -> IntelligenceProfileIndicatorsRequestBuilder: + """ + Provides operations to manage the intelligenceProfileIndicators property of the microsoft.graph.security.threatIntelligence entity. + """ + from .intelligence_profile_indicators.intelligence_profile_indicators_request_builder import IntelligenceProfileIndicatorsRequestBuilder + + return IntelligenceProfileIndicatorsRequestBuilder(self.request_adapter, self.path_parameters) + @property def passive_dns_records(self) -> PassiveDnsRecordsRequestBuilder: """ @@ -243,6 +267,24 @@ def passive_dns_records(self) -> PassiveDnsRecordsRequestBuilder: return PassiveDnsRecordsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def ssl_certificates(self) -> SslCertificatesRequestBuilder: + """ + Provides operations to manage the sslCertificates property of the microsoft.graph.security.threatIntelligence entity. + """ + from .ssl_certificates.ssl_certificates_request_builder import SslCertificatesRequestBuilder + + return SslCertificatesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def subdomains(self) -> SubdomainsRequestBuilder: + """ + Provides operations to manage the subdomains property of the microsoft.graph.security.threatIntelligence entity. + """ + from .subdomains.subdomains_request_builder import SubdomainsRequestBuilder + + return SubdomainsRequestBuilder(self.request_adapter, self.path_parameters) + @property def vulnerabilities(self) -> VulnerabilitiesRequestBuilder: """ @@ -252,6 +294,24 @@ def vulnerabilities(self) -> VulnerabilitiesRequestBuilder: return VulnerabilitiesRequestBuilder(self.request_adapter, self.path_parameters) + @property + def whois_history_records(self) -> WhoisHistoryRecordsRequestBuilder: + """ + Provides operations to manage the whoisHistoryRecords property of the microsoft.graph.security.threatIntelligence entity. + """ + from .whois_history_records.whois_history_records_request_builder import WhoisHistoryRecordsRequestBuilder + + return WhoisHistoryRecordsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def whois_records(self) -> WhoisRecordsRequestBuilder: + """ + Provides operations to manage the whoisRecords property of the microsoft.graph.security.threatIntelligence entity. + """ + from .whois_records.whois_records_request_builder import WhoisRecordsRequestBuilder + + return WhoisRecordsRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/count/count_request_builder.py index 18bcd22b4a7..bfe26083f8d 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/articles_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/articles_request_builder.py index a19929b5728..7f3ec85561f 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/articles_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/articles_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ArticlesRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ArticlesRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/count/count_request_builder.py index 8e54345f15a..16a63d1dac8 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/item/article_item_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/item/article_item_request_builder.py index de9ccdc9223..76bdbe89347 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/item/article_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/articles/item/article_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ArticleItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ArticleItemRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/components_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/components_request_builder.py index 8a61afbd608..0c122bf16af 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/components_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/components_request_builder.py @@ -45,7 +45,7 @@ def by_vulnerability_component_id(self,vulnerability_component_id: str) -> Vulne async def get(self,request_configuration: Optional[ComponentsRequestBuilderGetRequestConfiguration] = None) -> Optional[VulnerabilityComponentCollectionResponse]: """ - Get a list of the microsoft.graph.security.vulnerabilityComponent objects and their properties. + Get a list of vulnerabilityComponent objects related to a known vulnerability. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[VulnerabilityComponentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-vulnerability-list-components?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[VulnerabilityComponent] = None, request_confi def to_get_request_information(self,request_configuration: Optional[ComponentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the microsoft.graph.security.vulnerabilityComponent objects and their properties. + Get a list of vulnerabilityComponent objects related to a known vulnerability. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[VulnerabilityComponent] = None, request_configuration: Optional[ComponentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[VulnerabilityComponent] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ComponentsRequestBuilderGetQueryParameters(): """ - Get a list of the microsoft.graph.security.vulnerabilityComponent objects and their properties. + Get a list of vulnerabilityComponent objects related to a known vulnerability. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/count/count_request_builder.py index 2b3b57fc371..e389c8b21e2 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/count/count_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/item/vulnerability_component_item_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/item/vulnerability_component_item_request_builder.py index 6ac6d6964a3..819014f2f29 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/item/vulnerability_component_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/components/item/vulnerability_component_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[VulnerabilityComponentItem async def get(self,request_configuration: Optional[VulnerabilityComponentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[VulnerabilityComponent]: """ - Read the properties and relationships of a vulnerabilityComponent object. + Read the properties and relationships of a vulnerabilityComponent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[VulnerabilityComponent] Find more info here: https://learn.microsoft.com/graph/api/security-vulnerabilitycomponent-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Vulnerabi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[VulnerabilityComponentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a vulnerabilityComponent object. + Read the properties and relationships of a vulnerabilityComponent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[VulnerabilityComponent] = None, request_configuration: Optional[VulnerabilityComponentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[VulnerabilityComponent] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class VulnerabilityComponentItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class VulnerabilityComponentItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a vulnerabilityComponent object. + Read the properties and relationships of a vulnerabilityComponent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/vulnerability_item_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/vulnerability_item_request_builder.py index fddd12896cd..1b915ef035c 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/item/vulnerability_item_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/item/vulnerability_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[VulnerabilityItemRequestBu async def get(self,request_configuration: Optional[VulnerabilityItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Vulnerability]: """ - Read the properties and relationships of a vulnerability object. + Read the properties and relationships of a vulnerability object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Vulnerability] Find more info here: https://learn.microsoft.com/graph/api/security-vulnerability-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[Vulnerabi Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[VulnerabilityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a vulnerability object. + Read the properties and relationships of a vulnerability object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Vulnerability] = None, request_configuration: Optional[VulnerabilityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Vulnerability] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class VulnerabilityItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class VulnerabilityItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a vulnerability object. + Read the properties and relationships of a vulnerability object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/vulnerabilities/vulnerabilities_request_builder.py b/msgraph/generated/security/threat_intelligence/vulnerabilities/vulnerabilities_request_builder.py index 2f2b9ba917a..53c06902fba 100644 --- a/msgraph/generated/security/threat_intelligence/vulnerabilities/vulnerabilities_request_builder.py +++ b/msgraph/generated/security/threat_intelligence/vulnerabilities/vulnerabilities_request_builder.py @@ -45,7 +45,7 @@ def by_vulnerability_id(self,vulnerability_id: str) -> VulnerabilityItemRequestB async def get(self,request_configuration: Optional[VulnerabilitiesRequestBuilderGetRequestConfiguration] = None) -> Optional[VulnerabilityCollectionResponse]: """ - Read the properties and relationships of a vulnerability object. + Read the properties and relationships of a vulnerability object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[VulnerabilityCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Vulnerability] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[VulnerabilitiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a vulnerability object. + Read the properties and relationships of a vulnerability object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Vulnerability] = None, request_configuration: Optional[VulnerabilitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Vulnerability] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VulnerabilitiesRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a vulnerability object. + Read the properties and relationships of a vulnerability object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/threat_intelligence/whois_history_records/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_history_records/count/count_request_builder.py new file mode 100644 index 00000000000..37de68102a6 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_history_records/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisHistoryRecords/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_history_records/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_history_records/item/host/host_request_builder.py new file mode 100644 index 00000000000..09f168e3276 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_history_records/item/host/host_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.security.host import Host + +class HostRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the host property of the microsoft.graph.security.whoisBaseRecord entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisHistoryRecords/{whoisHistoryRecord%2Did}/host{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + The host associated to this WHOIS object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The host associated to this WHOIS 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(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) -> HostRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostRequestBuilderGetQueryParameters(): + """ + The host associated to this WHOIS 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 HostRequestBuilderGetRequestConfiguration(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[HostRequestBuilder.HostRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_history_records/item/whois_history_record_item_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_history_records/item/whois_history_record_item_request_builder.py new file mode 100644 index 00000000000..0718c39bfa6 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_history_records/item/whois_history_record_item_request_builder.py @@ -0,0 +1,224 @@ +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.security.whois_history_record import WhoisHistoryRecord + from .host.host_request_builder import HostRequestBuilder + +class WhoisHistoryRecordItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the whoisHistoryRecords property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new WhoisHistoryRecordItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisHistoryRecords/{whoisHistoryRecord%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property whoisHistoryRecords for security + 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[WhoisHistoryRecordItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisHistoryRecord]: + """ + Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisHistoryRecord] + """ + 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.security.whois_history_record import WhoisHistoryRecord + + return await self.request_adapter.send_async(request_info, WhoisHistoryRecord, error_mapping) + + async def patch(self,body: Optional[WhoisHistoryRecord] = None, request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WhoisHistoryRecord]: + """ + Update the navigation property whoisHistoryRecords in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisHistoryRecord] + """ + 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.security.whois_history_record import WhoisHistoryRecord + + return await self.request_adapter.send_async(request_info, WhoisHistoryRecord, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property whoisHistoryRecords for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + 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(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[WhoisHistoryRecord] = None, request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property whoisHistoryRecords in security + param body: The request body + param request_configuration: Configuration for 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(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) -> WhoisHistoryRecordItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WhoisHistoryRecordItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WhoisHistoryRecordItemRequestBuilder(self.request_adapter, raw_url) + + @property + def host(self) -> HostRequestBuilder: + """ + Provides operations to manage the host property of the microsoft.graph.security.whoisBaseRecord entity. + """ + from .host.host_request_builder import HostRequestBuilder + + return HostRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WhoisHistoryRecordItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class WhoisHistoryRecordItemRequestBuilderGetQueryParameters(): + """ + Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + """ + 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 WhoisHistoryRecordItemRequestBuilderGetRequestConfiguration(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[WhoisHistoryRecordItemRequestBuilder.WhoisHistoryRecordItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WhoisHistoryRecordItemRequestBuilderPatchRequestConfiguration(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/security/threat_intelligence/whois_history_records/whois_history_records_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_history_records/whois_history_records_request_builder.py new file mode 100644 index 00000000000..48d390a8458 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_history_records/whois_history_records_request_builder.py @@ -0,0 +1,226 @@ +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.security.whois_history_record import WhoisHistoryRecord + from ....models.security.whois_history_record_collection_response import WhoisHistoryRecordCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.whois_history_record_item_request_builder import WhoisHistoryRecordItemRequestBuilder + +class WhoisHistoryRecordsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the whoisHistoryRecords property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new WhoisHistoryRecordsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisHistoryRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_whois_history_record_id(self,whois_history_record_id: str) -> WhoisHistoryRecordItemRequestBuilder: + """ + Provides operations to manage the whoisHistoryRecords property of the microsoft.graph.security.threatIntelligence entity. + param whois_history_record_id: The unique identifier of whoisHistoryRecord + Returns: WhoisHistoryRecordItemRequestBuilder + """ + if not whois_history_record_id: + raise TypeError("whois_history_record_id cannot be null.") + from .item.whois_history_record_item_request_builder import WhoisHistoryRecordItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["whoisHistoryRecord%2Did"] = whois_history_record_id + return WhoisHistoryRecordItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[WhoisHistoryRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisHistoryRecordCollectionResponse]: + """ + Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisHistoryRecordCollectionResponse] + """ + 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.security.whois_history_record_collection_response import WhoisHistoryRecordCollectionResponse + + return await self.request_adapter.send_async(request_info, WhoisHistoryRecordCollectionResponse, error_mapping) + + async def post(self,body: Optional[WhoisHistoryRecord] = None, request_configuration: Optional[WhoisHistoryRecordsRequestBuilderPostRequestConfiguration] = None) -> Optional[WhoisHistoryRecord]: + """ + Create new navigation property to whoisHistoryRecords for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisHistoryRecord] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.security.whois_history_record import WhoisHistoryRecord + + return await self.request_adapter.send_async(request_info, WhoisHistoryRecord, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[WhoisHistoryRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + 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(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[WhoisHistoryRecord] = None, request_configuration: Optional[WhoisHistoryRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to whoisHistoryRecords for security + param body: The request body + param request_configuration: Configuration for 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(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) -> WhoisHistoryRecordsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WhoisHistoryRecordsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WhoisHistoryRecordsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WhoisHistoryRecordsRequestBuilderGetQueryParameters(): + """ + Retrieve details about whoisHistoryRecord objects.Note: List retrieval is not yet supported. + """ + 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 WhoisHistoryRecordsRequestBuilderGetRequestConfiguration(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[WhoisHistoryRecordsRequestBuilder.WhoisHistoryRecordsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WhoisHistoryRecordsRequestBuilderPostRequestConfiguration(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/security/threat_intelligence/whois_records/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/count/count_request_builder.py new file mode 100644 index 00000000000..6e4e9b365b5 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_records/item/history/count/count_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/item/history/count/count_request_builder.py new file mode 100644 index 00000000000..206898d9259 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/item/history/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords/{whoisRecord%2Did}/history/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_records/item/history/history_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/item/history/history_request_builder.py new file mode 100644 index 00000000000..ec0fb6b79c7 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/item/history/history_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.whois_history_record_collection_response import WhoisHistoryRecordCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.whois_history_record_item_request_builder import WhoisHistoryRecordItemRequestBuilder + +class HistoryRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the history property of the microsoft.graph.security.whoisRecord entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HistoryRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords/{whoisRecord%2Did}/history{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_whois_history_record_id(self,whois_history_record_id: str) -> WhoisHistoryRecordItemRequestBuilder: + """ + Provides operations to manage the history property of the microsoft.graph.security.whoisRecord entity. + param whois_history_record_id: The unique identifier of whoisHistoryRecord + Returns: WhoisHistoryRecordItemRequestBuilder + """ + if not whois_history_record_id: + raise TypeError("whois_history_record_id cannot be null.") + from .item.whois_history_record_item_request_builder import WhoisHistoryRecordItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["whoisHistoryRecord%2Did"] = whois_history_record_id + return WhoisHistoryRecordItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisHistoryRecordCollectionResponse]: + """ + Get the history for a whoisRecord, as represented by a collection of whoisHistoryRecord resources. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisHistoryRecordCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-whoisrecord-list-history?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.security.whois_history_record_collection_response import WhoisHistoryRecordCollectionResponse + + return await self.request_adapter.send_async(request_info, WhoisHistoryRecordCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the history for a whoisRecord, as represented by a collection of whoisHistoryRecord resources. This API is available in the following national cloud deployments. + 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(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) -> HistoryRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HistoryRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HistoryRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class HistoryRequestBuilderGetQueryParameters(): + """ + Get the history for a whoisRecord, as represented by a collection of whoisHistoryRecord resources. This API is available in the following national cloud deployments. + """ + 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 HistoryRequestBuilderGetRequestConfiguration(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[HistoryRequestBuilder.HistoryRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_records/item/history/item/whois_history_record_item_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/item/history/item/whois_history_record_item_request_builder.py new file mode 100644 index 00000000000..fd59e64f615 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/item/history/item/whois_history_record_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.whois_history_record import WhoisHistoryRecord + +class WhoisHistoryRecordItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the history property of the microsoft.graph.security.whoisRecord entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new WhoisHistoryRecordItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords/{whoisRecord%2Did}/history/{whoisHistoryRecord%2Did}{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisHistoryRecord]: + """ + The collection of historical records associated to this WHOIS object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisHistoryRecord] + """ + 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.security.whois_history_record import WhoisHistoryRecord + + return await self.request_adapter.send_async(request_info, WhoisHistoryRecord, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[WhoisHistoryRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of historical records associated to this WHOIS 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(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) -> WhoisHistoryRecordItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WhoisHistoryRecordItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WhoisHistoryRecordItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WhoisHistoryRecordItemRequestBuilderGetQueryParameters(): + """ + The collection of historical records associated to this WHOIS 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 WhoisHistoryRecordItemRequestBuilderGetRequestConfiguration(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[WhoisHistoryRecordItemRequestBuilder.WhoisHistoryRecordItemRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_records/item/host/host_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/item/host/host_request_builder.py new file mode 100644 index 00000000000..3f50294ae6d --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/item/host/host_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.security.host import Host + +class HostRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the host property of the microsoft.graph.security.whoisBaseRecord entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new HostRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords/{whoisRecord%2Did}/host{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> Optional[Host]: + """ + The host associated to this WHOIS object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Host] + """ + 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.security.host import Host + + return await self.request_adapter.send_async(request_info, Host, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[HostRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The host associated to this WHOIS 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(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) -> HostRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HostRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HostRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HostRequestBuilderGetQueryParameters(): + """ + The host associated to this WHOIS 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 HostRequestBuilderGetRequestConfiguration(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[HostRequestBuilder.HostRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/security/threat_intelligence/whois_records/item/whois_record_item_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/item/whois_record_item_request_builder.py new file mode 100644 index 00000000000..c890c0fc0e2 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/item/whois_record_item_request_builder.py @@ -0,0 +1,235 @@ +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.security.whois_record import WhoisRecord + from .history.history_request_builder import HistoryRequestBuilder + from .host.host_request_builder import HostRequestBuilder + +class WhoisRecordItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the whoisRecords property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new WhoisRecordItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords/{whoisRecord%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[WhoisRecordItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property whoisRecords for security + 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[WhoisRecordItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisRecord]: + """ + Get the specified whoisRecord resource. Specify the desired whoisRecord in one of the following two ways:- Identify a host and get its current whoisRecord. - Specify an id value to get the corresponding whoisRecord. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisRecord] + Find more info here: https://learn.microsoft.com/graph/api/security-whoisrecord-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.security.whois_record import WhoisRecord + + return await self.request_adapter.send_async(request_info, WhoisRecord, error_mapping) + + async def patch(self,body: Optional[WhoisRecord] = None, request_configuration: Optional[WhoisRecordItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WhoisRecord]: + """ + Update the navigation property whoisRecords in security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisRecord] + """ + 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.security.whois_record import WhoisRecord + + return await self.request_adapter.send_async(request_info, WhoisRecord, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[WhoisRecordItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property whoisRecords for security + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[WhoisRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the specified whoisRecord resource. Specify the desired whoisRecord in one of the following two ways:- Identify a host and get its current whoisRecord. - Specify an id value to get the corresponding whoisRecord. This API is available in the following national cloud deployments. + 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(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[WhoisRecord] = None, request_configuration: Optional[WhoisRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property whoisRecords in security + param body: The request body + param request_configuration: Configuration for 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(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) -> WhoisRecordItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WhoisRecordItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WhoisRecordItemRequestBuilder(self.request_adapter, raw_url) + + @property + def history(self) -> HistoryRequestBuilder: + """ + Provides operations to manage the history property of the microsoft.graph.security.whoisRecord entity. + """ + from .history.history_request_builder import HistoryRequestBuilder + + return HistoryRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def host(self) -> HostRequestBuilder: + """ + Provides operations to manage the host property of the microsoft.graph.security.whoisBaseRecord entity. + """ + from .host.host_request_builder import HostRequestBuilder + + return HostRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WhoisRecordItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class WhoisRecordItemRequestBuilderGetQueryParameters(): + """ + Get the specified whoisRecord resource. Specify the desired whoisRecord in one of the following two ways:- Identify a host and get its current whoisRecord. - Specify an id value to get the corresponding whoisRecord. This API is available in the following national cloud deployments. + """ + 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 WhoisRecordItemRequestBuilderGetRequestConfiguration(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[WhoisRecordItemRequestBuilder.WhoisRecordItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WhoisRecordItemRequestBuilderPatchRequestConfiguration(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/security/threat_intelligence/whois_records/whois_records_request_builder.py b/msgraph/generated/security/threat_intelligence/whois_records/whois_records_request_builder.py new file mode 100644 index 00000000000..333dacb2863 --- /dev/null +++ b/msgraph/generated/security/threat_intelligence/whois_records/whois_records_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.security.whois_record import WhoisRecord + from ....models.security.whois_record_collection_response import WhoisRecordCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.whois_record_item_request_builder import WhoisRecordItemRequestBuilder + +class WhoisRecordsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the whoisRecords property of the microsoft.graph.security.threatIntelligence entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new WhoisRecordsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/security/threatIntelligence/whoisRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_whois_record_id(self,whois_record_id: str) -> WhoisRecordItemRequestBuilder: + """ + Provides operations to manage the whoisRecords property of the microsoft.graph.security.threatIntelligence entity. + param whois_record_id: The unique identifier of whoisRecord + Returns: WhoisRecordItemRequestBuilder + """ + if not whois_record_id: + raise TypeError("whois_record_id cannot be null.") + from .item.whois_record_item_request_builder import WhoisRecordItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["whoisRecord%2Did"] = whois_record_id + return WhoisRecordItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[WhoisRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[WhoisRecordCollectionResponse]: + """ + Get a list of whoisRecord objects. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisRecordCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/security-threatintelligence-list-whoisrecords?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.security.whois_record_collection_response import WhoisRecordCollectionResponse + + return await self.request_adapter.send_async(request_info, WhoisRecordCollectionResponse, error_mapping) + + async def post(self,body: Optional[WhoisRecord] = None, request_configuration: Optional[WhoisRecordsRequestBuilderPostRequestConfiguration] = None) -> Optional[WhoisRecord]: + """ + Create new navigation property to whoisRecords for security + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WhoisRecord] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.security.whois_record import WhoisRecord + + return await self.request_adapter.send_async(request_info, WhoisRecord, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[WhoisRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of whoisRecord objects. This API is available in the following national cloud deployments. + 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(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[WhoisRecord] = None, request_configuration: Optional[WhoisRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to whoisRecords for security + param body: The request body + param request_configuration: Configuration for 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(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) -> WhoisRecordsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WhoisRecordsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WhoisRecordsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WhoisRecordsRequestBuilderGetQueryParameters(): + """ + Get a list of whoisRecord objects. This API is available in the following national cloud deployments. + """ + 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 WhoisRecordsRequestBuilderGetRequestConfiguration(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[WhoisRecordsRequestBuilder.WhoisRecordsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WhoisRecordsRequestBuilderPostRequestConfiguration(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/security/trigger_types/retention_event_types/count/count_request_builder.py b/msgraph/generated/security/trigger_types/retention_event_types/count/count_request_builder.py index 0d4af399762..84799277e99 100644 --- a/msgraph/generated/security/trigger_types/retention_event_types/count/count_request_builder.py +++ b/msgraph/generated/security/trigger_types/retention_event_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/trigger_types/retention_event_types/item/retention_event_type_item_request_builder.py b/msgraph/generated/security/trigger_types/retention_event_types/item/retention_event_type_item_request_builder.py index 655f9098e72..fc2cb84c56a 100644 --- a/msgraph/generated/security/trigger_types/retention_event_types/item/retention_event_type_item_request_builder.py +++ b/msgraph/generated/security/trigger_types/retention_event_types/item/retention_event_type_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RetentionEventTypeItemRequ async def get(self,request_configuration: Optional[RetentionEventTypeItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RetentionEventType]: """ - Read the properties and relationships of a retentionEventType object. + Read the properties and relationships of a retentionEventType object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RetentionEventType] Find more info here: https://learn.microsoft.com/graph/api/security-retentioneventtype-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[Retention Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RetentionEventTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a retentionEventType object. + Read the properties and relationships of a retentionEventType object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RetentionEventType] = None, request_configuration: Optional[RetentionEventTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[RetentionEventType] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class RetentionEventTypeItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class RetentionEventTypeItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a retentionEventType object. + Read the properties and relationships of a retentionEventType object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/trigger_types/retention_event_types/retention_event_types_request_builder.py b/msgraph/generated/security/trigger_types/retention_event_types/retention_event_types_request_builder.py index e26267f2062..0d17ccc79f4 100644 --- a/msgraph/generated/security/trigger_types/retention_event_types/retention_event_types_request_builder.py +++ b/msgraph/generated/security/trigger_types/retention_event_types/retention_event_types_request_builder.py @@ -45,7 +45,7 @@ def by_retention_event_type_id(self,retention_event_type_id: str) -> RetentionEv async def get(self,request_configuration: Optional[RetentionEventTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[RetentionEventTypeCollectionResponse]: """ - Get a list of the retentionEventType objects and their properties. + Get a list of the retentionEventType objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RetentionEventTypeCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-retentioneventtype-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RetentionEventTypesRequestBui async def post(self,body: Optional[RetentionEventType] = None, request_configuration: Optional[RetentionEventTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[RetentionEventType]: """ - Create a new retentionEventType object. + Create a new retentionEventType object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RetentionEventType] @@ -92,24 +92,24 @@ async def post(self,body: Optional[RetentionEventType] = None, request_configura def to_get_request_information(self,request_configuration: Optional[RetentionEventTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the retentionEventType objects and their properties. + Get a list of the retentionEventType objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RetentionEventType] = None, request_configuration: Optional[RetentionEventTypesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new retentionEventType object. + Create a new retentionEventType object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[RetentionEventType] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RetentionEventTypesRequestBuilderGetQueryParameters(): """ - Get a list of the retentionEventType objects and their properties. + Get a list of the retentionEventType objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/trigger_types/trigger_types_request_builder.py b/msgraph/generated/security/trigger_types/trigger_types_request_builder.py index 72610081535..ef7a2be28f3 100644 --- a/msgraph/generated/security/trigger_types/trigger_types_request_builder.py +++ b/msgraph/generated/security/trigger_types/trigger_types_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TriggerTy Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TriggerTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TriggerTypes Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TriggerTypesRoot] = None, request_configuration: Optional[TriggerTypesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[TriggerTypesRoot] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/security/triggers/retention_events/count/count_request_builder.py b/msgraph/generated/security/triggers/retention_events/count/count_request_builder.py index e133f43b7ff..e2291c93030 100644 --- a/msgraph/generated/security/triggers/retention_events/count/count_request_builder.py +++ b/msgraph/generated/security/triggers/retention_events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/security/triggers/retention_events/item/retention_event_item_request_builder.py b/msgraph/generated/security/triggers/retention_events/item/retention_event_item_request_builder.py index 6c641b66746..f18ed536b86 100644 --- a/msgraph/generated/security/triggers/retention_events/item/retention_event_item_request_builder.py +++ b/msgraph/generated/security/triggers/retention_events/item/retention_event_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RetentionEventItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a retentionEvent object. + Delete a retentionEvent object. This API is available in the following national cloud deployments. 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/security-retentionevent-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[RetentionEventItemRequestB async def get(self,request_configuration: Optional[RetentionEventItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RetentionEvent]: """ - Read the properties and relationships of a retentionEvent object. + Read the properties and relationships of a retentionEvent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RetentionEvent] Find more info here: https://learn.microsoft.com/graph/api/security-retentionevent-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[RetentionEvent] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[RetentionEventItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a retentionEvent object. + Delete a retentionEvent object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RetentionEventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a retentionEvent object. + Read the properties and relationships of a retentionEvent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RetentionEvent] = None, request_configuration: Optional[RetentionEventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[RetentionEvent] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class RetentionEventItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class RetentionEventItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a retentionEvent object. + Read the properties and relationships of a retentionEvent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/triggers/retention_events/item/retention_event_type/retention_event_type_request_builder.py b/msgraph/generated/security/triggers/retention_events/item/retention_event_type/retention_event_type_request_builder.py index 71554bf8d69..789d8e39134 100644 --- a/msgraph/generated/security/triggers/retention_events/item/retention_event_type/retention_event_type_request_builder.py +++ b/msgraph/generated/security/triggers/retention_events/item/retention_event_type/retention_event_type_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[RetentionEve Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RetentionEventTypeRequestBuilder: diff --git a/msgraph/generated/security/triggers/retention_events/retention_events_request_builder.py b/msgraph/generated/security/triggers/retention_events/retention_events_request_builder.py index e26b639a89d..bf43ded00b7 100644 --- a/msgraph/generated/security/triggers/retention_events/retention_events_request_builder.py +++ b/msgraph/generated/security/triggers/retention_events/retention_events_request_builder.py @@ -45,7 +45,7 @@ def by_retention_event_id(self,retention_event_id: str) -> RetentionEventItemReq async def get(self,request_configuration: Optional[RetentionEventsRequestBuilderGetRequestConfiguration] = None) -> Optional[RetentionEventCollectionResponse]: """ - Get a list of the retentionEvent objects and their properties. + Get a list of the retentionEvent objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RetentionEventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/security-retentionevent-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RetentionEventsRequestBuilder async def post(self,body: Optional[RetentionEvent] = None, request_configuration: Optional[RetentionEventsRequestBuilderPostRequestConfiguration] = None) -> Optional[RetentionEvent]: """ - Create a new retentionEvent object. + Create a new retentionEvent object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RetentionEvent] @@ -92,24 +92,24 @@ async def post(self,body: Optional[RetentionEvent] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[RetentionEventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the retentionEvent objects and their properties. + Get a list of the retentionEvent objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RetentionEvent] = None, request_configuration: Optional[RetentionEventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new retentionEvent object. + Create a new retentionEvent object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[RetentionEvent] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RetentionEventsRequestBuilderGetQueryParameters(): """ - Get a list of the retentionEvent objects and their properties. + Get a list of the retentionEvent objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/security/triggers/triggers_request_builder.py b/msgraph/generated/security/triggers/triggers_request_builder.py index b59d2d8a484..b6565829190 100644 --- a/msgraph/generated/security/triggers/triggers_request_builder.py +++ b/msgraph/generated/security/triggers/triggers_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TriggersR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TriggersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TriggersRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TriggersRoot] = None, request_configuration: Optional[TriggersRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[TriggersRoot] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/count/count_request_builder.py b/msgraph/generated/service_principals/count/count_request_builder.py index c47e657e7ff..9560d29bb2b 100644 --- a/msgraph/generated/service_principals/count/count_request_builder.py +++ b/msgraph/generated/service_principals/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/delta/delta_response.py b/msgraph/generated/service_principals/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/service_principals/delta/delta_response.py rename to msgraph/generated/service_principals/delta/delta_get_response.py index 39c4feb41ef..128684e1fb3 100644 --- a/msgraph/generated/service_principals/delta/delta_response.py +++ b/msgraph/generated/service_principals/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ServicePrincipal]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/service_principals/delta/delta_request_builder.py b/msgraph/generated/service_principals/delta/delta_request_builder.py index 715a9e56ae7..d680082200c 100644 --- a/msgraph/generated/service_principals/delta/delta_request_builder.py +++ b/msgraph/generated/service_principals/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/service_principals/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_request_builder.py index 195ffb24bba..695ecf2c285 100644 --- a/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/service_principals/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/service_principals/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/service_principals/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/service_principals/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/service_principals/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/service_principals/get_by_ids/get_by_ids_request_builder.py index 960fdddb956..847ea9944b7 100644 --- a/msgraph/generated/service_principals/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/service_principals/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/get_by_ids/get_by_ids_response.py b/msgraph/generated/service_principals/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/service_principals/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/service_principals/item/add_key/add_key_request_builder.py b/msgraph/generated/service_principals/item/add_key/add_key_request_builder.py index 968f19b48e7..815f60b1761 100644 --- a/msgraph/generated/service_principals/item/add_key/add_key_request_builder.py +++ b/msgraph/generated/service_principals/item/add_key/add_key_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddKeyPostRequestBody] = None, request_configuration: Optional[AddKeyRequestBuilderPostRequestConfiguration] = None) -> Optional[KeyCredential]: """ - Adds a key credential to a servicePrincipal. This method along with removeKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. ServicePrincipals that don’t have any existing valid certificates (i.e.: no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. Update servicePrincipal can be used to perform an update instead. + Adds a key credential to a servicePrincipal. This method along with removeKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. ServicePrincipals that don’t have any existing valid certificates (i.e.: no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. Update servicePrincipal can be used to perform an update instead. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[KeyCredential] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddKeyPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AddKeyPostRequestBody] = None, request_configuration: Optional[AddKeyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds a key credential to a servicePrincipal. This method along with removeKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. ServicePrincipals that don’t have any existing valid certificates (i.e.: no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. Update servicePrincipal can be used to perform an update instead. + Adds a key credential to a servicePrincipal. This method along with removeKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. ServicePrincipals that don’t have any existing valid certificates (i.e.: no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. Update servicePrincipal can be used to perform an update instead. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddKeyPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/add_password/add_password_request_builder.py b/msgraph/generated/service_principals/item/add_password/add_password_request_builder.py index 2f4285144b7..94e0f617c04 100644 --- a/msgraph/generated/service_principals/item/add_password/add_password_request_builder.py +++ b/msgraph/generated/service_principals/item/add_password/add_password_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddPasswordPostRequestBody] = None, request_configuration: Optional[AddPasswordRequestBuilderPostRequestConfiguration] = None) -> Optional[PasswordCredential]: """ - Add a strong password or secret to a servicePrincipal object. + Add a strong password or secret to a servicePrincipal object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordCredential] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddPasswordPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[AddPasswordPostRequestBody] = None, request_configuration: Optional[AddPasswordRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a strong password or secret to a servicePrincipal object. + Add a strong password or secret to a servicePrincipal object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPasswordPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/add_token_signing_certificate/add_token_signing_certificate_request_builder.py b/msgraph/generated/service_principals/item/add_token_signing_certificate/add_token_signing_certificate_request_builder.py index 12f208c56b9..acfde72777b 100644 --- a/msgraph/generated/service_principals/item/add_token_signing_certificate/add_token_signing_certificate_request_builder.py +++ b/msgraph/generated/service_principals/item/add_token_signing_certificate/add_token_signing_certificate_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddTokenSigningCertificatePostRequestBody] = None, request_configuration: Optional[AddTokenSigningCertificateRequestBuilderPostRequestConfiguration] = None) -> Optional[SelfSignedCertificate]: """ - Create a self-signed signing certificate and return a selfSignedCertificate object, which is the public part of the generated certificate. The self-signed signing certificate is composed of the following objects, which are added to the servicePrincipal: + The keyCredentials object with the following objects: + A private key object with usage set to Sign. + A public key object with usage set to Verify.+ The passwordCredentials object. All the objects have the same value of customKeyIdentifier. The passwordCredential is used to open the PFX file (private key). It and the associated private key object have the same value of keyId. When set during creation through the displayName property, the subject of the certificate cannot be updated. The startDateTime is set to the same time the certificate is created using the action. The endDateTime can be up to three years after the certificate is created. + Create a self-signed signing certificate and return a selfSignedCertificate object, which is the public part of the generated certificate. The self-signed signing certificate is composed of the following objects, which are added to the servicePrincipal: + The keyCredentials object with the following objects: + A private key object with usage set to Sign. + A public key object with usage set to Verify.+ The passwordCredentials object. All the objects have the same value of customKeyIdentifier. The passwordCredential is used to open the PFX file (private key). It and the associated private key object have the same value of keyId. When set during creation through the displayName property, the subject of the certificate cannot be updated. The startDateTime is set to the same time the certificate is created using the action. The endDateTime can be up to three years after the certificate is created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SelfSignedCertificate] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddTokenSigningCertificatePostRequestBody] = def to_post_request_information(self,body: Optional[AddTokenSigningCertificatePostRequestBody] = None, request_configuration: Optional[AddTokenSigningCertificateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a self-signed signing certificate and return a selfSignedCertificate object, which is the public part of the generated certificate. The self-signed signing certificate is composed of the following objects, which are added to the servicePrincipal: + The keyCredentials object with the following objects: + A private key object with usage set to Sign. + A public key object with usage set to Verify.+ The passwordCredentials object. All the objects have the same value of customKeyIdentifier. The passwordCredential is used to open the PFX file (private key). It and the associated private key object have the same value of keyId. When set during creation through the displayName property, the subject of the certificate cannot be updated. The startDateTime is set to the same time the certificate is created using the action. The endDateTime can be up to three years after the certificate is created. + Create a self-signed signing certificate and return a selfSignedCertificate object, which is the public part of the generated certificate. The self-signed signing certificate is composed of the following objects, which are added to the servicePrincipal: + The keyCredentials object with the following objects: + A private key object with usage set to Sign. + A public key object with usage set to Verify.+ The passwordCredentials object. All the objects have the same value of customKeyIdentifier. The passwordCredential is used to open the PFX file (private key). It and the associated private key object have the same value of keyId. When set during creation through the displayName property, the subject of the certificate cannot be updated. The startDateTime is set to the same time the certificate is created using the action. The endDateTime can be up to three years after the certificate is created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddTokenSigningCertificatePo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/app_management_policies/app_management_policies_request_builder.py b/msgraph/generated/service_principals/item/app_management_policies/app_management_policies_request_builder.py index a496ffa9d31..fc8ed1d6434 100644 --- a/msgraph/generated/service_principals/item/app_management_policies/app_management_policies_request_builder.py +++ b/msgraph/generated/service_principals/item/app_management_policies/app_management_policies_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AppManagemen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppManagementPoliciesRequestBuilder: diff --git a/msgraph/generated/service_principals/item/app_management_policies/count/count_request_builder.py b/msgraph/generated/service_principals/item/app_management_policies/count/count_request_builder.py index 73187d2a568..2ac9829850b 100644 --- a/msgraph/generated/service_principals/item/app_management_policies/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/app_management_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/app_management_policies/item/app_management_policy_item_request_builder.py b/msgraph/generated/service_principals/item/app_management_policies/item/app_management_policy_item_request_builder.py index db7f819777d..959fb14559d 100644 --- a/msgraph/generated/service_principals/item/app_management_policies/item/app_management_policy_item_request_builder.py +++ b/msgraph/generated/service_principals/item/app_management_policies/item/app_management_policy_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. This API is available in the following national cloud deployments. 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/appmanagementpolicy-delete-appliesto?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AppManagementPolicyItemReques def to_delete_request_information(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppManagementPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AppManagemen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AppManagementPolicyItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/app_role_assigned_to/app_role_assigned_to_request_builder.py b/msgraph/generated/service_principals/item/app_role_assigned_to/app_role_assigned_to_request_builder.py index 2b06b6b3286..c0c4e59d5b5 100644 --- a/msgraph/generated/service_principals/item/app_role_assigned_to/app_role_assigned_to_request_builder.py +++ b/msgraph/generated/service_principals/item/app_role_assigned_to/app_role_assigned_to_request_builder.py @@ -45,7 +45,7 @@ def by_app_role_assignment_id(self,app_role_assignment_id: str) -> AppRoleAssign async def get(self,request_configuration: Optional[AppRoleAssignedToRequestBuilderGetRequestConfiguration] = None) -> Optional[AppRoleAssignmentCollectionResponse]: """ - Retrieve a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal. For example, if the resource service principal is the service principal for the Microsoft Graph API, this will return all service principals that have been granted any app-only permissions to Microsoft Graph. If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application. + Retrieve a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal. For example, if the resource service principal is the service principal for the Microsoft Graph API, this will return all service principals that have been granted any app-only permissions to Microsoft Graph. If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppRoleAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-approleassignedto?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AppRoleAssignedToRequestBuild async def post(self,body: Optional[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignedToRequestBuilderPostRequestConfiguration] = None) -> Optional[AppRoleAssignment]: """ - Assign an app role for a resource service principal, to a user, group, or client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment, you need three identifiers: + Assign an app role for a resource service principal, to a user, group, or client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment, you need three identifiers: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppRoleAssignment] @@ -92,24 +92,24 @@ async def post(self,body: Optional[AppRoleAssignment] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[AppRoleAssignedToRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal. For example, if the resource service principal is the service principal for the Microsoft Graph API, this will return all service principals that have been granted any app-only permissions to Microsoft Graph. If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application. + Retrieve a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal. For example, if the resource service principal is the service principal for the Microsoft Graph API, this will return all service principals that have been granted any app-only permissions to Microsoft Graph. If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignedToRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign an app role for a resource service principal, to a user, group, or client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment, you need three identifiers: + Assign an app role for a resource service principal, to a user, group, or client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment, you need three identifiers: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AppRoleAssignment] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AppRoleAssignedToRequestBuilderGetQueryParameters(): """ - Retrieve a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal. For example, if the resource service principal is the service principal for the Microsoft Graph API, this will return all service principals that have been granted any app-only permissions to Microsoft Graph. If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application. + Retrieve a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal. For example, if the resource service principal is the service principal for the Microsoft Graph API, this will return all service principals that have been granted any app-only permissions to Microsoft Graph. If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/app_role_assigned_to/count/count_request_builder.py b/msgraph/generated/service_principals/item/app_role_assigned_to/count/count_request_builder.py index 567df287d54..3a2f97919e9 100644 --- a/msgraph/generated/service_principals/item/app_role_assigned_to/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/app_role_assigned_to/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/app_role_assigned_to/item/app_role_assignment_item_request_builder.py b/msgraph/generated/service_principals/item/app_role_assigned_to/item/app_role_assignment_item_request_builder.py index b200f209952..36067ee3c25 100644 --- a/msgraph/generated/service_principals/item/app_role_assigned_to/item/app_role_assignment_item_request_builder.py +++ b/msgraph/generated/service_principals/item/app_role_assigned_to/item/app_role_assignment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes an appRoleAssignment that a user, group, or client service principal has been granted for a resource service principal. + Deletes an appRoleAssignment that a user, group, or client service principal has been granted for a resource service principal. This API is available in the following national cloud deployments. 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/serviceprincipal-delete-approleassignedto?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[AppRoleAssignment] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes an appRoleAssignment that a user, group, or client service principal has been granted for a resource service principal. + Deletes an appRoleAssignment that a user, group, or client service principal has been granted for a resource service principal. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AppRoleAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/app_role_assignments/app_role_assignments_request_builder.py b/msgraph/generated/service_principals/item/app_role_assignments/app_role_assignments_request_builder.py index 302673bab51..e0b00af2abc 100644 --- a/msgraph/generated/service_principals/item/app_role_assignments/app_role_assignments_request_builder.py +++ b/msgraph/generated/service_principals/item/app_role_assignments/app_role_assignments_request_builder.py @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AppRoleAssignmentsRequestBuil async def post(self,body: Optional[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[AppRoleAssignment]: """ - Assign an app role to a client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment to a client service principal, you need three identifiers: + Assign an app role to a client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment to a client service principal, you need three identifiers: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppRoleAssignment] @@ -97,19 +97,19 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign an app role to a client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment to a client service principal, you need three identifiers: + Assign an app role to a client service principal. App roles that are assigned to service principals are also known as application permissions. Application permissions can be granted directly with app role assignments, or through a consent experience. To grant an app role assignment to a client service principal, you need three identifiers: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AppRoleAssignment] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/app_role_assignments/count/count_request_builder.py b/msgraph/generated/service_principals/item/app_role_assignments/count/count_request_builder.py index af076fda24f..678b2c72e5c 100644 --- a/msgraph/generated/service_principals/item/app_role_assignments/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/app_role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/app_role_assignments/item/app_role_assignment_item_request_builder.py b/msgraph/generated/service_principals/item/app_role_assignments/item/app_role_assignment_item_request_builder.py index e0befe1cd88..5d2d9b065e4 100644 --- a/msgraph/generated/service_principals/item/app_role_assignments/item/app_role_assignment_item_request_builder.py +++ b/msgraph/generated/service_principals/item/app_role_assignments/item/app_role_assignment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes an appRoleAssignment that a service principal has been granted. App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. + Deletes an appRoleAssignment that a service principal has been granted. App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. This API is available in the following national cloud deployments. 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/serviceprincipal-delete-approleassignments?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[AppRoleAssignment] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes an appRoleAssignment that a service principal has been granted. App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. + Deletes an appRoleAssignment that a service principal has been granted. App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AppRoleAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_request_builder.py index bf48a8bce97..7831549b0b4 100644 --- a/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/service_principals/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_request_builder.py index 5313fed7de3..796675b8ff9 100644 --- a/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/service_principals/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/service_principals/item/claims_mapping_policies/claims_mapping_policies_request_builder.py b/msgraph/generated/service_principals/item/claims_mapping_policies/claims_mapping_policies_request_builder.py index 41dfac869e5..c0016575fb2 100644 --- a/msgraph/generated/service_principals/item/claims_mapping_policies/claims_mapping_policies_request_builder.py +++ b/msgraph/generated/service_principals/item/claims_mapping_policies/claims_mapping_policies_request_builder.py @@ -45,7 +45,7 @@ def by_claims_mapping_policy_id(self,claims_mapping_policy_id: str) -> ClaimsMap async def get(self,request_configuration: Optional[ClaimsMappingPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[ClaimsMappingPolicyCollectionResponse]: """ - List the claimsMappingPolicy objects that are assigned to a servicePrincipal. + List the claimsMappingPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ClaimsMappingPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-claimsmappingpolicies?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[ClaimsMappingPoliciesRequestB def to_get_request_information(self,request_configuration: Optional[ClaimsMappingPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the claimsMappingPolicy objects that are assigned to a servicePrincipal. + List the claimsMappingPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ClaimsMappingPoliciesRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class ClaimsMappingPoliciesRequestBuilderGetQueryParameters(): """ - List the claimsMappingPolicy objects that are assigned to a servicePrincipal. + List the claimsMappingPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/claims_mapping_policies/count/count_request_builder.py b/msgraph/generated/service_principals/item/claims_mapping_policies/count/count_request_builder.py index 14937b054d8..d3e2ce79c32 100644 --- a/msgraph/generated/service_principals/item/claims_mapping_policies/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/claims_mapping_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/claims_mapping_policies/item/ref/ref_request_builder.py b/msgraph/generated/service_principals/item/claims_mapping_policies/item/ref/ref_request_builder.py index 37382a0454d..70c50d53333 100644 --- a/msgraph/generated/service_principals/item/claims_mapping_policies/item/ref/ref_request_builder.py +++ b/msgraph/generated/service_principals/item/claims_mapping_policies/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a claimsMappingPolicy from a servicePrincipal. + Remove a claimsMappingPolicy from a servicePrincipal. This API is available in the following national cloud deployments. 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/serviceprincipal-delete-claimsmappingpolicies?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a claimsMappingPolicy from a servicePrincipal. + Remove a claimsMappingPolicy from a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a claimsMappingPolicy from a servicePrincipal. + Remove a claimsMappingPolicy from a servicePrincipal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/claims_mapping_policies/ref/ref_request_builder.py b/msgraph/generated/service_principals/item/claims_mapping_policies/ref/ref_request_builder.py index 6005f735ddf..03bf412de0a 100644 --- a/msgraph/generated/service_principals/item/claims_mapping_policies/ref/ref_request_builder.py +++ b/msgraph/generated/service_principals/item/claims_mapping_policies/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List the claimsMappingPolicy objects that are assigned to a servicePrincipal. + List the claimsMappingPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-claimsmappingpolicies?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Assign a claimsMappingPolicy to a servicePrincipal. + Assign a claimsMappingPolicy to a servicePrincipal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the claimsMappingPolicy objects that are assigned to a servicePrincipal. + List the claimsMappingPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign a claimsMappingPolicy to a servicePrincipal. + Assign a claimsMappingPolicy to a servicePrincipal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List the claimsMappingPolicy objects that are assigned to a servicePrincipal. + List the claimsMappingPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/created_objects/count/count_request_builder.py b/msgraph/generated/service_principals/item/created_objects/count/count_request_builder.py index 3a2a827deb6..e5e6c88b2fe 100644 --- a/msgraph/generated/service_principals/item/created_objects/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/created_objects/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/created_objects/created_objects_request_builder.py b/msgraph/generated/service_principals/item/created_objects/created_objects_request_builder.py index 487956201bd..2dedbcb0f21 100644 --- a/msgraph/generated/service_principals/item/created_objects/created_objects_request_builder.py +++ b/msgraph/generated/service_principals/item/created_objects/created_objects_request_builder.py @@ -71,14 +71,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedObjec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedObjectsRequestBuilder: diff --git a/msgraph/generated/service_principals/item/created_objects/graph_service_principal/count/count_request_builder.py b/msgraph/generated/service_principals/item/created_objects/graph_service_principal/count/count_request_builder.py index 15cc96eb311..8a881fbe3c3 100644 --- a/msgraph/generated/service_principals/item/created_objects/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/created_objects/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/service_principals/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py index d6b69b02560..5c5df666ce6 100644 --- a/msgraph/generated/service_principals/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/service_principals/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/service_principals/item/created_objects/item/directory_object_item_request_builder.py b/msgraph/generated/service_principals/item/created_objects/item/directory_object_item_request_builder.py index 85c17507a76..b162af849a9 100644 --- a/msgraph/generated/service_principals/item/created_objects/item/directory_object_item_request_builder.py +++ b/msgraph/generated/service_principals/item/created_objects/item/directory_object_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/service_principals/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py index b4f3cebcc9f..f79fcd617c7 100644 --- a/msgraph/generated/service_principals/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/service_principals/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/service_principals/item/delegated_permission_classifications/count/count_request_builder.py b/msgraph/generated/service_principals/item/delegated_permission_classifications/count/count_request_builder.py index a4655f61e64..8ab0f8e188c 100644 --- a/msgraph/generated/service_principals/item/delegated_permission_classifications/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/delegated_permission_classifications/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/delegated_permission_classifications/delegated_permission_classifications_request_builder.py b/msgraph/generated/service_principals/item/delegated_permission_classifications/delegated_permission_classifications_request_builder.py index 59221e55ce9..d158754e5de 100644 --- a/msgraph/generated/service_principals/item/delegated_permission_classifications/delegated_permission_classifications_request_builder.py +++ b/msgraph/generated/service_principals/item/delegated_permission_classifications/delegated_permission_classifications_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_permission_classification_id(self,delegated_permission_classifi async def get(self,request_configuration: Optional[DelegatedPermissionClassificationsRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedPermissionClassificationCollectionResponse]: """ - Retrieve the list of delegatedPermissionClassification currently configured for the delegated permissions exposed by an API. + Retrieve the list of delegatedPermissionClassification currently configured for the delegated permissions exposed by an API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedPermissionClassificationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-delegatedpermissionclassifications?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DelegatedPermissionClassifica async def post(self,body: Optional[DelegatedPermissionClassification] = None, request_configuration: Optional[DelegatedPermissionClassificationsRequestBuilderPostRequestConfiguration] = None) -> Optional[DelegatedPermissionClassification]: """ - Classify a delegated permission by adding a delegatedPermissionClassification to the servicePrincipal representing the API. + Classify a delegated permission by adding a delegatedPermissionClassification to the servicePrincipal representing the API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedPermissionClassification] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DelegatedPermissionClassification] = None, re def to_get_request_information(self,request_configuration: Optional[DelegatedPermissionClassificationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of delegatedPermissionClassification currently configured for the delegated permissions exposed by an API. + Retrieve the list of delegatedPermissionClassification currently configured for the delegated permissions exposed by an API. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedPermissionClassification] = None, request_configuration: Optional[DelegatedPermissionClassificationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Classify a delegated permission by adding a delegatedPermissionClassification to the servicePrincipal representing the API. + Classify a delegated permission by adding a delegatedPermissionClassification to the servicePrincipal representing the API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DelegatedPermissionClassific if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DelegatedPermissionClassificationsRequestBuilderGetQueryParameters(): """ - Retrieve the list of delegatedPermissionClassification currently configured for the delegated permissions exposed by an API. + Retrieve the list of delegatedPermissionClassification currently configured for the delegated permissions exposed by an API. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/delegated_permission_classifications/item/delegated_permission_classification_item_request_builder.py b/msgraph/generated/service_principals/item/delegated_permission_classifications/item/delegated_permission_classification_item_request_builder.py index 51a0654ed31..51101a4d026 100644 --- a/msgraph/generated/service_principals/item/delegated_permission_classifications/item/delegated_permission_classification_item_request_builder.py +++ b/msgraph/generated/service_principals/item/delegated_permission_classifications/item/delegated_permission_classification_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DelegatedPermissionClassificationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a delegatedPermissionClassification which had previously been set for a delegated permission. + Deletes a delegatedPermissionClassification which had previously been set for a delegated permission. This API is available in the following national cloud deployments. 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/serviceprincipal-delete-delegatedpermissionclassifications?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[DelegatedPermissionClassification] = None, r def to_delete_request_information(self,request_configuration: Optional[DelegatedPermissionClassificationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a delegatedPermissionClassification which had previously been set for a delegated permission. + Deletes a delegatedPermissionClassification which had previously been set for a delegated permission. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedPermissionClassificationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DelegatedPer Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedPermissionClassification] = None, request_configuration: Optional[DelegatedPermissionClassificationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DelegatedPermissionClassifi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/endpoints/count/count_request_builder.py b/msgraph/generated/service_principals/item/endpoints/count/count_request_builder.py index b41f0080686..1f0eea4a7a5 100644 --- a/msgraph/generated/service_principals/item/endpoints/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/endpoints/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/endpoints/endpoints_request_builder.py b/msgraph/generated/service_principals/item/endpoints/endpoints_request_builder.py index f647787424d..70947913bf5 100644 --- a/msgraph/generated/service_principals/item/endpoints/endpoints_request_builder.py +++ b/msgraph/generated/service_principals/item/endpoints/endpoints_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[EndpointsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Endpoint] = None, request_configuration: Optional[EndpointsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Endpoint] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/endpoints/item/endpoint_item_request_builder.py b/msgraph/generated/service_principals/item/endpoints/item/endpoint_item_request_builder.py index 70f0758e621..68fe46bbe27 100644 --- a/msgraph/generated/service_principals/item/endpoints/item/endpoint_item_request_builder.py +++ b/msgraph/generated/service_principals/item/endpoints/item/endpoint_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[EndpointI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EndpointItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[EndpointItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Endpoint] = None, request_configuration: Optional[EndpointItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Endpoint] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/federated_identity_credentials/count/count_request_builder.py b/msgraph/generated/service_principals/item/federated_identity_credentials/count/count_request_builder.py index f340f3bd9a3..63194b304d0 100644 --- a/msgraph/generated/service_principals/item/federated_identity_credentials/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/federated_identity_credentials/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/federated_identity_credentials/federated_identity_credentials_request_builder.py b/msgraph/generated/service_principals/item/federated_identity_credentials/federated_identity_credentials_request_builder.py index 1b532ef44bb..5f4553359d6 100644 --- a/msgraph/generated/service_principals/item/federated_identity_credentials/federated_identity_credentials_request_builder.py +++ b/msgraph/generated/service_principals/item/federated_identity_credentials/federated_identity_credentials_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[FederatedIde Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FederatedIdentityCredential] = None, request_configuration: Optional[FederatedIdentityCredentialsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[FederatedIdentityCredential] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py b/msgraph/generated/service_principals/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py index 4f08e7523ed..d8c35d21815 100644 --- a/msgraph/generated/service_principals/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py +++ b/msgraph/generated/service_principals/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Federated Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FederatedIde Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FederatedIdentityCredential] = None, request_configuration: Optional[FederatedIdentityCredentialItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FederatedIdentityCredential if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_request_builder.py index b5089af59c2..887d147398a 100644 --- a/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/service_principals/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_request_builder.py index 6a0e4b611ae..1981a3cd435 100644 --- a/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/service_principals/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/service_principals/item/home_realm_discovery_policies/count/count_request_builder.py b/msgraph/generated/service_principals/item/home_realm_discovery_policies/count/count_request_builder.py index b6d8d4eec09..fa0c9d38f56 100644 --- a/msgraph/generated/service_principals/item/home_realm_discovery_policies/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/home_realm_discovery_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py b/msgraph/generated/service_principals/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py index f307841af20..cb9a08b7f2b 100644 --- a/msgraph/generated/service_principals/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py +++ b/msgraph/generated/service_principals/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.py @@ -45,7 +45,7 @@ def by_home_realm_discovery_policy_id(self,home_realm_discovery_policy_id: str) async def get(self,request_configuration: Optional[HomeRealmDiscoveryPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[HomeRealmDiscoveryPolicyCollectionResponse]: """ - List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. + List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HomeRealmDiscoveryPolicyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-homerealmdiscoverypolicies?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[HomeRealmDiscoveryPoliciesReq def to_get_request_information(self,request_configuration: Optional[HomeRealmDiscoveryPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. + List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> HomeRealmDiscoveryPoliciesRequestBuilder: @@ -113,7 +113,7 @@ def ref(self) -> RefRequestBuilder: @dataclass class HomeRealmDiscoveryPoliciesRequestBuilderGetQueryParameters(): """ - List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. + List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/home_realm_discovery_policies/item/ref/ref_request_builder.py b/msgraph/generated/service_principals/item/home_realm_discovery_policies/item/ref/ref_request_builder.py index 6458f64ed59..304a552d956 100644 --- a/msgraph/generated/service_principals/item/home_realm_discovery_policies/item/ref/ref_request_builder.py +++ b/msgraph/generated/service_principals/item/home_realm_discovery_policies/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a homeRealmDiscoveryPolicy from a servicePrincipal. + Remove a homeRealmDiscoveryPolicy from a servicePrincipal. This API is available in the following national cloud deployments. 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/serviceprincipal-delete-homerealmdiscoverypolicies?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a homeRealmDiscoveryPolicy from a servicePrincipal. + Remove a homeRealmDiscoveryPolicy from a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove a homeRealmDiscoveryPolicy from a servicePrincipal. + Remove a homeRealmDiscoveryPolicy from a servicePrincipal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/home_realm_discovery_policies/ref/ref_request_builder.py b/msgraph/generated/service_principals/item/home_realm_discovery_policies/ref/ref_request_builder.py index 95dc39b797c..2000c1a9a3a 100644 --- a/msgraph/generated/service_principals/item/home_realm_discovery_policies/ref/ref_request_builder.py +++ b/msgraph/generated/service_principals/item/home_realm_discovery_policies/ref/ref_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]: """ - List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. + List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-homerealmdiscoverypolicies?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Assign a homeRealmDiscoveryPolicy to a servicePrincipal. + Assign a homeRealmDiscoveryPolicy to a servicePrincipal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -74,24 +74,24 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. + List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Assign a homeRealmDiscoveryPolicy to a servicePrincipal. + Assign a homeRealmDiscoveryPolicy to a servicePrincipal. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -121,7 +121,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderGetQueryParameters(): """ - List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. + List the homeRealmDiscoveryPolicy objects that are assigned to a servicePrincipal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/member_of/count/count_request_builder.py b/msgraph/generated/service_principals/item/member_of/count/count_request_builder.py index d44b1d67c85..38bff2af4ee 100644 --- a/msgraph/generated/service_principals/item/member_of/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/count/count_request_builder.py index ed43ecd7e38..62493186c59 100644 --- a/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index febada16d76..1a78aeea1e4 100644 --- a/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/graph_directory_role/count/count_request_builder.py b/msgraph/generated/service_principals/item/member_of/graph_directory_role/count/count_request_builder.py index c8b66fd49c2..0fb0eedf61d 100644 --- a/msgraph/generated/service_principals/item/member_of/graph_directory_role/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/graph_directory_role/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/service_principals/item/member_of/graph_directory_role/graph_directory_role_request_builder.py index e3f8ce3e147..7460467f339 100644 --- a/msgraph/generated/service_principals/item/member_of/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/graph_directory_role/graph_directory_role_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/graph_group/count/count_request_builder.py b/msgraph/generated/service_principals/item/member_of/graph_group/count/count_request_builder.py index f77ddf2b778..cadc5bcd4c3 100644 --- a/msgraph/generated/service_principals/item/member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/service_principals/item/member_of/graph_group/graph_group_request_builder.py index 9aed897df5f..3eb5ea65828 100644 --- a/msgraph/generated/service_principals/item/member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/item/directory_object_item_request_builder.py b/msgraph/generated/service_principals/item/member_of/item/directory_object_item_request_builder.py index f17d30951af..9450583225f 100644 --- a/msgraph/generated/service_principals/item/member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/item/directory_object_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/service_principals/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index cb0e76891eb..aaa68d4503e 100644 --- a/msgraph/generated/service_principals/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/service_principals/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py index 06af77827f8..6b9aa814241 100644 --- a/msgraph/generated/service_principals/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/service_principals/item/member_of/item/graph_group/graph_group_request_builder.py index 6618d1ef5d9..c6a2c64a7e2 100644 --- a/msgraph/generated/service_principals/item/member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/service_principals/item/member_of/member_of_request_builder.py b/msgraph/generated/service_principals/item/member_of/member_of_request_builder.py index 0d6986fd119..399b3d01942 100644 --- a/msgraph/generated/service_principals/item/member_of/member_of_request_builder.py +++ b/msgraph/generated/service_principals/item/member_of/member_of_request_builder.py @@ -74,14 +74,14 @@ def to_get_request_information(self,request_configuration: Optional[MemberOfRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MemberOfRequestBuilder: diff --git a/msgraph/generated/service_principals/item/oauth2_permission_grants/count/count_request_builder.py b/msgraph/generated/service_principals/item/oauth2_permission_grants/count/count_request_builder.py index cf23af0fb1d..625143da824 100644 --- a/msgraph/generated/service_principals/item/oauth2_permission_grants/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/oauth2_permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py b/msgraph/generated/service_principals/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py index 674f4c6594d..f47c00c53e7 100644 --- a/msgraph/generated/service_principals/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py +++ b/msgraph/generated/service_principals/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[OAuth2Permis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OAuth2PermissionGrantItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py b/msgraph/generated/service_principals/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py index 1619dc0d4f8..00cdf749d84 100644 --- a/msgraph/generated/service_principals/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py +++ b/msgraph/generated/service_principals/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py @@ -44,7 +44,7 @@ def by_o_auth2_permission_grant_id(self,o_auth2_permission_grant_id: str) -> OAu async def get(self,request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[OAuth2PermissionGrantCollectionResponse]: """ - Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. + Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OAuth2PermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list-oauth2permissiongrants?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[Oauth2PermissionGrantsRequest def to_get_request_information(self,request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. + Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> Oauth2PermissionGrantsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class Oauth2PermissionGrantsRequestBuilderGetQueryParameters(): """ - Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. + Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/owned_objects/count/count_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/count/count_request_builder.py index 97a86c2ac81..8cb5d3893a9 100644 --- a/msgraph/generated/service_principals/item/owned_objects/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/count/count_request_builder.py index 5a87da1b5ae..80fde17d875 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 0b6c626e848..2d94972ac67 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_application/count/count_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_application/count/count_request_builder.py index 57668bfb76d..c2fd2c2f247 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_application/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_application/graph_application_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_application/graph_application_request_builder.py index 6fbb2308008..18a2fa9def6 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/count/count_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/count/count_request_builder.py index 9cc1a4f23e2..a33124e59b4 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/graph_endpoint_request_builder.py index 6ebe832100a..46b1b997877 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_group/count/count_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_group/count/count_request_builder.py index 71bb966c924..f6d94e2d5a3 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_group/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_group/graph_group_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_group/graph_group_request_builder.py index 73d2a5699a1..62702a438b7 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/count/count_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/count/count_request_builder.py index 20449ed54d9..ea7be8f18fa 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py index ece9b9bcd5c..eaca6bd29ef 100644 --- a/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/item/directory_object_item_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/item/directory_object_item_request_builder.py index d1079477b55..ef27ddd5e3c 100644 --- a/msgraph/generated/service_principals/item/owned_objects/item/directory_object_item_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/item/directory_object_item_request_builder.py @@ -59,14 +59,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: @@ -80,22 +80,22 @@ def with_url(self,raw_url: Optional[str] = None) -> DirectoryObjectItemRequestBu return DirectoryObjectItemRequestBuilder(self.request_adapter, raw_url) @property - def graph_application(self) -> GraphApplicationRequestBuilder: + def graph_app_role_assignment(self) -> GraphAppRoleAssignmentRequestBuilder: """ - Casts the previous resource to application. + Casts the previous resource to appRoleAssignment. """ - from .graph_application.graph_application_request_builder import GraphApplicationRequestBuilder + from .graph_app_role_assignment.graph_app_role_assignment_request_builder import GraphAppRoleAssignmentRequestBuilder - return GraphApplicationRequestBuilder(self.request_adapter, self.path_parameters) + return GraphAppRoleAssignmentRequestBuilder(self.request_adapter, self.path_parameters) @property - def graph_app_role_assignment(self) -> GraphAppRoleAssignmentRequestBuilder: + def graph_application(self) -> GraphApplicationRequestBuilder: """ - Casts the previous resource to appRoleAssignment. + Casts the previous resource to application. """ - from .graph_app_role_assignment.graph_app_role_assignment_request_builder import GraphAppRoleAssignmentRequestBuilder + from .graph_application.graph_application_request_builder import GraphApplicationRequestBuilder - return GraphAppRoleAssignmentRequestBuilder(self.request_adapter, self.path_parameters) + return GraphApplicationRequestBuilder(self.request_adapter, self.path_parameters) @property def graph_endpoint(self) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 039491db08f..dc844f1ef6b 100644 --- a/msgraph/generated/service_principals/item/owned_objects/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/item/graph_application/graph_application_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/item/graph_application/graph_application_request_builder.py index 143f880ab7d..c2c31c6c3f8 100644 --- a/msgraph/generated/service_principals/item/owned_objects/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/item/graph_endpoint/graph_endpoint_request_builder.py index 3e3c5271208..0a335b21229 100644 --- a/msgraph/generated/service_principals/item/owned_objects/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/item/graph_group/graph_group_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/item/graph_group/graph_group_request_builder.py index d77d38f7269..05ce2794f82 100644 --- a/msgraph/generated/service_principals/item/owned_objects/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py index 793865ed0d2..91f302f3ec0 100644 --- a/msgraph/generated/service_principals/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owned_objects/owned_objects_request_builder.py b/msgraph/generated/service_principals/item/owned_objects/owned_objects_request_builder.py index c5fa7412460..5efce5cfe97 100644 --- a/msgraph/generated/service_principals/item/owned_objects/owned_objects_request_builder.py +++ b/msgraph/generated/service_principals/item/owned_objects/owned_objects_request_builder.py @@ -75,14 +75,14 @@ def to_get_request_information(self,request_configuration: Optional[OwnedObjects Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OwnedObjectsRequestBuilder: @@ -105,22 +105,22 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) @property - def graph_application(self) -> GraphApplicationRequestBuilder: + def graph_app_role_assignment(self) -> GraphAppRoleAssignmentRequestBuilder: """ - Casts the previous resource to application. + Casts the previous resource to appRoleAssignment. """ - from .graph_application.graph_application_request_builder import GraphApplicationRequestBuilder + from .graph_app_role_assignment.graph_app_role_assignment_request_builder import GraphAppRoleAssignmentRequestBuilder - return GraphApplicationRequestBuilder(self.request_adapter, self.path_parameters) + return GraphAppRoleAssignmentRequestBuilder(self.request_adapter, self.path_parameters) @property - def graph_app_role_assignment(self) -> GraphAppRoleAssignmentRequestBuilder: + def graph_application(self) -> GraphApplicationRequestBuilder: """ - Casts the previous resource to appRoleAssignment. + Casts the previous resource to application. """ - from .graph_app_role_assignment.graph_app_role_assignment_request_builder import GraphAppRoleAssignmentRequestBuilder + from .graph_application.graph_application_request_builder import GraphApplicationRequestBuilder - return GraphAppRoleAssignmentRequestBuilder(self.request_adapter, self.path_parameters) + return GraphApplicationRequestBuilder(self.request_adapter, self.path_parameters) @property def graph_endpoint(self) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/count/count_request_builder.py b/msgraph/generated/service_principals/item/owners/count/count_request_builder.py index ff8eb9ae737..f99e8e6997c 100644 --- a/msgraph/generated/service_principals/item/owners/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/count/count_request_builder.py index 5b8d34a315b..3a45faf0743 100644 --- a/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index ab1493ca2e5..57f319c2701 100644 --- a/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_endpoint/count/count_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_endpoint/count/count_request_builder.py index 4cb9da10969..bbc0e121eb5 100644 --- a/msgraph/generated/service_principals/item/owners/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_endpoint/graph_endpoint_request_builder.py index 5ccf13b5e02..9769b1bb741 100644 --- a/msgraph/generated/service_principals/item/owners/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_service_principal/count/count_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_service_principal/count/count_request_builder.py index 669bba44687..8427b21cebf 100644 --- a/msgraph/generated/service_principals/item/owners/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_service_principal/graph_service_principal_request_builder.py index afeaa61164c..0bef3eb3741 100644 --- a/msgraph/generated/service_principals/item/owners/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_user/count/count_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_user/count/count_request_builder.py index bd8dd132cb7..b25cbd131c9 100644 --- a/msgraph/generated/service_principals/item/owners/graph_user/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/graph_user/graph_user_request_builder.py b/msgraph/generated/service_principals/item/owners/graph_user/graph_user_request_builder.py index c0b57dc172f..6d64c392449 100644 --- a/msgraph/generated/service_principals/item/owners/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/service_principals/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 3a98eccc3c6..432e8bf5354 100644 --- a/msgraph/generated/service_principals/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/service_principals/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py index c7df0c0b0c1..d482b99d0ae 100644 --- a/msgraph/generated/service_principals/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/service_principals/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py index 038dbc7d3ce..4cc717a6e6a 100644 --- a/msgraph/generated/service_principals/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/item/graph_user/graph_user_request_builder.py b/msgraph/generated/service_principals/item/owners/item/graph_user/graph_user_request_builder.py index cf68502d0f1..25620e57003 100644 --- a/msgraph/generated/service_principals/item/owners/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/item/ref/ref_request_builder.py b/msgraph/generated/service_principals/item/owners/item/ref/ref_request_builder.py index c87726c6f03..bbb4a2dab81 100644 --- a/msgraph/generated/service_principals/item/owners/item/ref/ref_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/item/ref/ref_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove an owner from a servicePrincipal object. As a recommended best practice, service principals should have at least two owners. + Remove an owner from a servicePrincipal object. As a recommended best practice, service principals should have at least two owners. This API is available in the following national cloud deployments. 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/serviceprincipal-delete-owners?view=graph-rest-1.0 @@ -47,18 +47,18 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove an owner from a servicePrincipal object. As a recommended best practice, service principals should have at least two owners. + Remove an owner from a servicePrincipal object. As a recommended best practice, service principals should have at least two owners. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.DELETE if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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.DELETE return request_info def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @@ -74,7 +74,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RefRequestBuilder: @dataclass class RefRequestBuilderDeleteQueryParameters(): """ - Remove an owner from a servicePrincipal object. As a recommended best practice, service principals should have at least two owners. + Remove an owner from a servicePrincipal object. As a recommended best practice, service principals should have at least two owners. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/owners/owners_request_builder.py b/msgraph/generated/service_principals/item/owners/owners_request_builder.py index 29ac13c9ab2..411dd2f10c9 100644 --- a/msgraph/generated/service_principals/item/owners/owners_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/owners_request_builder.py @@ -76,14 +76,14 @@ def to_get_request_information(self,request_configuration: Optional[OwnersReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OwnersRequestBuilder: diff --git a/msgraph/generated/service_principals/item/owners/ref/ref_request_builder.py b/msgraph/generated/service_principals/item/owners/ref/ref_request_builder.py index b903dece62a..3089566e9c0 100644 --- a/msgraph/generated/service_principals/item/owners/ref/ref_request_builder.py +++ b/msgraph/generated/service_principals/item/owners/ref/ref_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None: """ - Use this API to add an owner for the servicePrincipal. Service principal owners can be users, the service principal itself, or other service principals. + Use this API to add an owner for the servicePrincipal. Service principal owners can be users, the service principal itself, or other service principals. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -79,19 +79,19 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to add an owner for the servicePrincipal. Service principal owners can be users, the service principal itself, or other service principals. + Use this API to add an owner for the servicePrincipal. Service principal owners can be users, the service principal itself, or other service principals. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -99,12 +99,12 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/remove_key/remove_key_request_builder.py b/msgraph/generated/service_principals/item/remove_key/remove_key_request_builder.py index e54f945a269..f3e5b49c3e4 100644 --- a/msgraph/generated/service_principals/item/remove_key/remove_key_request_builder.py +++ b/msgraph/generated/service_principals/item/remove_key/remove_key_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RemoveKeyPostRequestBody] = None, request_configuration: Optional[RemoveKeyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove a key credential from a servicePrincipal. This method along with addKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. + Remove a key credential from a servicePrincipal. This method along with addKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. This API is available in the following national cloud deployments. 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[RemoveKeyPostRequestBody] = None, request_con def to_post_request_information(self,body: Optional[RemoveKeyPostRequestBody] = None, request_configuration: Optional[RemoveKeyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove a key credential from a servicePrincipal. This method along with addKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. + Remove a key credential from a servicePrincipal. This method along with addKey can be used by a servicePrincipal to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RemoveKeyPostRequestBody] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/remove_password/remove_password_request_builder.py b/msgraph/generated/service_principals/item/remove_password/remove_password_request_builder.py index 1c4644d0485..6f77b5d4243 100644 --- a/msgraph/generated/service_principals/item/remove_password/remove_password_request_builder.py +++ b/msgraph/generated/service_principals/item/remove_password/remove_password_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RemovePasswordPostRequestBody] = None, request_configuration: Optional[RemovePasswordRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove a password from a servicePrincipal object. + Remove a password from a servicePrincipal object. This API is available in the following national cloud deployments. 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[RemovePasswordPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[RemovePasswordPostRequestBody] = None, request_configuration: Optional[RemovePasswordRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove a password from a servicePrincipal object. + Remove a password from a servicePrincipal object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RemovePasswordPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/restore/restore_request_builder.py b/msgraph/generated/service_principals/item/restore/restore_request_builder.py index e0a5bd7556b..8f3fb72f520 100644 --- a/msgraph/generated/service_principals/item/restore/restore_request_builder.py +++ b/msgraph/generated/service_principals/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/service_principals/item/service_principal_item_request_builder.py b/msgraph/generated/service_principals/item/service_principal_item_request_builder.py index c27bdf86a8e..69da7999c40 100644 --- a/msgraph/generated/service_principals/item/service_principal_item_request_builder.py +++ b/msgraph/generated/service_principals/item/service_principal_item_request_builder.py @@ -55,7 +55,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ServicePrincipalItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a servicePrincipal object. + Delete a servicePrincipal object. This API is available in the following national cloud deployments. 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/serviceprincipal-delete?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def delete(self,request_configuration: Optional[ServicePrincipalItemReques async def get(self,request_configuration: Optional[ServicePrincipalItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ServicePrincipal]: """ - Retrieve the properties and relationships of a servicePrincipal object. + Retrieve the properties and relationships of a servicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServicePrincipal] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-get?view=graph-rest-1.0 @@ -121,34 +121,34 @@ async def patch(self,body: Optional[ServicePrincipal] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ServicePrincipalItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a servicePrincipal object. + Delete a servicePrincipal object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServicePrincipalItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a servicePrincipal object. + Retrieve the properties and relationships of a servicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServicePrincipal] = None, request_configuration: Optional[ServicePrincipalItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -161,13 +161,13 @@ def to_patch_request_information(self,body: Optional[ServicePrincipal] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -437,7 +437,7 @@ class ServicePrincipalItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ServicePrincipalItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a servicePrincipal object. + Retrieve the properties and relationships of a servicePrincipal object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py b/msgraph/generated/service_principals/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py index de6259a44ee..0382b627c17 100644 --- a/msgraph/generated/service_principals/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcquireAccessTokenPostRequestBody] = None, request_configuration: Optional[AcquireAccessTokenRequestBuilderPostRequestConfiguration] = None) -> None: """ - Acquire an OAuth access token to authorize the Azure AD provisioning service to provision users into an application. + Acquire an OAuth access token to authorize the Microsoft Entra provisioning service to provision users into an application. This API is available in the following national cloud deployments. 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[AcquireAccessTokenPostRequestBody] = None, re def to_post_request_information(self,body: Optional[AcquireAccessTokenPostRequestBody] = None, request_configuration: Optional[AcquireAccessTokenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Acquire an OAuth access token to authorize the Azure AD provisioning service to provision users into an application. + Acquire an OAuth access token to authorize the Microsoft Entra provisioning service to provision users into an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcquireAccessTokenPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/count/count_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/count/count_request_builder.py index c02629c0ca6..c9465650cdf 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/pause/pause_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/pause/pause_request_builder.py index 5035b7c4587..76a570483f1 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/pause/pause_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/pause/pause_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PauseRequestBuilderPostRequestConfiguration] = None) -> None: """ - Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. + Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. This API is available in the following national cloud deployments. 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/synchronization-synchronizationjob-pause?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PauseRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[PauseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. + Temporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PauseRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py index 1ecb226b0d7..6317f6acc63 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ProvisionOnDemandPostRequestBody] = None, request_configuration: Optional[ProvisionOnDemandRequestBuilderPostRequestConfiguration] = None) -> Optional[StringKeyStringValuePair]: """ - Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. + Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[StringKeyStringValuePair] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ProvisionOnDemandPostRequestBody] = None, req def to_post_request_information(self,body: Optional[ProvisionOnDemandPostRequestBody] = None, request_configuration: Optional[ProvisionOnDemandRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. + Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ProvisionOnDemandPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/restart/restart_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/restart/restart_request_builder.py index fbd035212b9..d9699b398ac 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/restart/restart_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/restart/restart_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[RestartPostRequestBody] = None, request_configuration: Optional[RestartRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. + Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. This API is available in the following national cloud deployments. 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[RestartPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[RestartPostRequestBody] = None, request_configuration: Optional[RestartRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. + Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[RestartPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py index 1a03bab084d..07421f2a866 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/directories_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/directories_request_builder.py index 67018a12bf8..625d5cfe257 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/directories_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/directories_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoriesR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DirectoryDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py index 5af64bdeb74..4cc16aeb0e9 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryDef Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DirectoryDefinition] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py index 01793ab6f77..dfb549e227e 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryDefinition]: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryDefinition] Find more info here: https://learn.microsoft.com/graph/api/synchronization-directorydefinition-discover?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DiscoverRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py similarity index 91% rename from msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py rename to msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py index 9a7ec25d741..4f5437977e1 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterOperatorsResponse(BaseCollectionPaginationCountResponse): +class FilterOperatorsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[FilterOperatorSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterOperatorsResponse + Returns: FilterOperatorsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterOperatorsResponse() + return FilterOperatorsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py index 188589eeaa7..eb681e98e4f 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse class FilterOperatorsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsResponse]: + async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsGetResponse]: """ Invoke function filterOperators param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterOperatorsResponse] + Returns: Optional[FilterOperatorsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilder } if not self.request_adapter: raise Exception("Http core is null") - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse - return await self.request_adapter.send_async(request_info, FilterOperatorsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterOperatorsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterOperat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterOperatorsRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_response.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_get_response.py similarity index 92% rename from msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_response.py rename to msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_get_response.py index 8cca32a1b5d..362ed77654b 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_response.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FunctionsResponse(BaseCollectionPaginationCountResponse): +class FunctionsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttributeMappingFunctionSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FunctionsResponse + Returns: FunctionsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FunctionsResponse() + return FunctionsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_request_builder.py index 259ff6c3b49..09815ab706f 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/functions/functions_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse class FunctionsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsResponse]: + async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsGetResponse]: """ Invoke function functions param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FunctionsResponse] + Returns: Optional[FunctionsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetReq } if not self.request_adapter: raise Exception("Http core is null") - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse - return await self.request_adapter.send_async(request_info, FunctionsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FunctionsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FunctionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FunctionsRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py index 1bae2b7a303..5c670d0a292 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> Optional[ParseExpressionResponse]: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ParseExpressionResponse] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, reque def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/schema_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/schema_request_builder.py index f8a0f2e25d5..ad1db55e41f 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/schema_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/schema/schema_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SchemaRequestBuilderDelete async def get(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationSchema]: """ - Retrieve the schema for a given synchronization job or template. + Retrieve the schema for a given synchronization job or template. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationSchema] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronizationschema-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[SchemaReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the schema for a given synchronization job or template. + Retrieve the schema for a given synchronization job or template. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationSchema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationSchema] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -207,7 +207,7 @@ class SchemaRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SchemaRequestBuilderGetQueryParameters(): """ - Retrieve the schema for a given synchronization job or template. + Retrieve the schema for a given synchronization job or template. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/start/start_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/start/start_request_builder.py index c620cf7d695..645bcd0e97d 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/start/start_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/start/start_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> None: """ - Start an existing synchronization job. If the job is in a paused state, it will continue processing changes from the point where it was paused. If the job is in quarantine, the quarantine status will be cleared. Do not create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. + Start an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. This API is available in the following national cloud deployments. 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/synchronization-synchronizationjob-start?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[StartRequestBuilderPostReque def to_post_request_information(self,request_configuration: Optional[StartRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Start an existing synchronization job. If the job is in a paused state, it will continue processing changes from the point where it was paused. If the job is in quarantine, the quarantine status will be cleared. Do not create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. + Start an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> StartRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/synchronization_job_item_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/synchronization_job_item_request_builder.py index d9fb826428f..69cfb7ffea7 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/synchronization_job_item_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/synchronization_job_item_request_builder.py @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. + Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. This API is available in the following national cloud deployments. 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/synchronization-synchronizationjob-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[SynchronizationJobItemRequ async def get(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationJob]: """ - Retrieve the existing synchronization job and its properties. + Retrieve the existing synchronization job and its properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationJob] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronizationjob-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[SynchronizationJob] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. + Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SynchronizationJobItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the existing synchronization job and its properties. + Retrieve the existing synchronization job and its properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationJob] = None, request_configuration: Optional[SynchronizationJobItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationJob] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class SynchronizationJobItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class SynchronizationJobItemRequestBuilderGetQueryParameters(): """ - Retrieve the existing synchronization job and its properties. + Retrieve the existing synchronization job and its properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py index b7c829ba05a..a89c4d415a1 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidateCredentialsPostRequestBody] = None, request_configuration: Optional[ValidateCredentialsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that the credentials are valid in the tenant. + Validate that the credentials are valid in the tenant. This API is available in the following national cloud deployments. 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[ValidateCredentialsPostRequestBody] = None, r def to_post_request_information(self,body: Optional[ValidateCredentialsPostRequestBody] = None, request_configuration: Optional[ValidateCredentialsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that the credentials are valid in the tenant. + Validate that the credentials are valid in the tenant. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidateCredentialsPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/jobs_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/jobs_request_builder.py index 0485670b574..e0fd93b3c0c 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/jobs_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/jobs_request_builder.py @@ -46,7 +46,7 @@ def by_synchronization_job_id(self,synchronization_job_id: str) -> Synchronizati async def get(self,request_configuration: Optional[JobsRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationJobCollectionResponse]: """ - List existing jobs for a given application instance (service principal). + List existing jobs for a given application instance (service principal). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationJobCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronization-list-jobs?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[JobsRequestBuilderGetRequestC async def post(self,body: Optional[SynchronizationJob] = None, request_configuration: Optional[JobsRequestBuilderPostRequestConfiguration] = None) -> Optional[SynchronizationJob]: """ - Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. + Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationJob] @@ -93,24 +93,24 @@ async def post(self,body: Optional[SynchronizationJob] = None, request_configura def to_get_request_information(self,request_configuration: Optional[JobsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List existing jobs for a given application instance (service principal). + List existing jobs for a given application instance (service principal). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationJob] = None, request_configuration: Optional[JobsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. + Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[SynchronizationJob] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def validate_credentials(self) -> ValidateCredentialsRequestBuilder: @dataclass class JobsRequestBuilderGetQueryParameters(): """ - List existing jobs for a given application instance (service principal). + List existing jobs for a given application instance (service principal). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py b/msgraph/generated/service_principals/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py index 57e5ee4a466..b0052b4a62e 100644 --- a/msgraph/generated/service_principals/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[ValidateCredentialsPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/secrets/count/count_request_builder.py b/msgraph/generated/service_principals/item/synchronization/secrets/count/count_request_builder.py index 13130bd474d..caba0296da4 100644 --- a/msgraph/generated/service_principals/item/synchronization/secrets/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/secrets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 00e328897dd..2d0c02821f3 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 @@ -61,13 +61,13 @@ def to_put_request_information(self,body: Optional[List[SynchronizationSecretKey if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/synchronization_request_builder.py b/msgraph/generated/service_principals/item/synchronization/synchronization_request_builder.py index 8f2645d3671..7523998676f 100644 --- a/msgraph/generated/service_principals/item/synchronization/synchronization_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/synchronization_request_builder.py @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SynchronizationRequestBuil async def get(self,request_configuration: Optional[SynchronizationRequestBuilderGetRequestConfiguration] = None) -> Optional[Synchronization]: """ - Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Synchronization] """ @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[Synchroni Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SynchronizationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[Synchronization] = None, request_configuration: Optional[SynchronizationRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_put_request_information(self,body: Optional[Synchronization] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -205,7 +205,7 @@ class SynchronizationRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class SynchronizationRequestBuilderGetQueryParameters(): """ - Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/templates/count/count_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/count/count_request_builder.py index d3955e83dd5..cd2cf7e6beb 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/count/count_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/count/count_request_builder.py index 66d84f6f9e9..58a5bf7a5c4 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/directories_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/directories_request_builder.py index 26cf62f28b7..afdd62bc1b1 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/directories_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/directories_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoriesR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DirectoryDefinition] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py index 2f85183c878..e55035cdef1 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Directory Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DirectoryDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryDef Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DirectoryDefinition] = None, request_configuration: Optional[DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DirectoryDefinition] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py index c38762eefa0..365d95e6d1a 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryDefinition]: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryDefinition] Find more info here: https://learn.microsoft.com/graph/api/synchronization-directorydefinition-discover?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[DiscoverRequestBuilderPostRe def to_post_request_information(self,request_configuration: Optional[DiscoverRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Discover the latest schema definition for provisioning to an application. + Discover the latest schema definition for provisioning to an application. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> DiscoverRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py similarity index 91% rename from msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py rename to msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py index 9a7ec25d741..4f5437977e1 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FilterOperatorsResponse(BaseCollectionPaginationCountResponse): +class FilterOperatorsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[FilterOperatorSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FilterOperatorsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FilterOperatorsResponse + Returns: FilterOperatorsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FilterOperatorsResponse() + return FilterOperatorsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py index 6d576183b65..7d136f8359f 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse class FilterOperatorsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsResponse]: + async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> Optional[FilterOperatorsGetResponse]: """ Invoke function filterOperators param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FilterOperatorsResponse] + Returns: Optional[FilterOperatorsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FilterOperatorsRequestBuilder } if not self.request_adapter: raise Exception("Http core is null") - from .filter_operators_response import FilterOperatorsResponse + from .filter_operators_get_response import FilterOperatorsGetResponse - return await self.request_adapter.send_async(request_info, FilterOperatorsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FilterOperatorsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FilterOperatorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FilterOperat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilterOperatorsRequestBuilder: diff --git a/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_response.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_get_response.py similarity index 92% rename from msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_response.py rename to msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_get_response.py index 8cca32a1b5d..362ed77654b 100644 --- a/msgraph/generated/applications/item/synchronization/templates/item/schema/functions/functions_response.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class FunctionsResponse(BaseCollectionPaginationCountResponse): +class FunctionsGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[AttributeMappingFunctionSchema]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> FunctionsGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: FunctionsResponse + Returns: FunctionsGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return FunctionsResponse() + return FunctionsGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_request_builder.py index 281cdd53815..55246688bc1 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/functions/functions_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse class FunctionsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsResponse]: + async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> Optional[FunctionsGetResponse]: """ Invoke function functions param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[FunctionsResponse] + Returns: Optional[FunctionsGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[FunctionsRequestBuilderGetReq } if not self.request_adapter: raise Exception("Http core is null") - from .functions_response import FunctionsResponse + from .functions_get_response import FunctionsGetResponse - return await self.request_adapter.send_async(request_info, FunctionsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, FunctionsGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[FunctionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FunctionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FunctionsRequestBuilder: diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py index 4b8b9dc5b21..372554ace83 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> Optional[ParseExpressionResponse]: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ParseExpressionResponse] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ParseExpressionPostRequestBody] = None, reque def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBody] = None, request_configuration: Optional[ParseExpressionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ParseExpressionPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/schema_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/schema_request_builder.py index f927d775a02..356d209e1c2 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/schema/schema_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/schema/schema_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SchemaReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchemaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SchemaReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationSchema] = None, request_configuration: Optional[SchemaRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationSchema] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals/item/synchronization/templates/item/synchronization_template_item_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/item/synchronization_template_item_request_builder.py index 40d43057e4a..3706f3f858e 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/item/synchronization_template_item_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/item/synchronization_template_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SynchronizationTemplateIte async def get(self,request_configuration: Optional[SynchronizationTemplateItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationTemplate]: """ - Pre-configured synchronization settings for a particular application. + Preconfigured synchronization settings for a particular application. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationTemplate] """ @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[SynchronizationTemplateItemRe async def patch(self,body: Optional[SynchronizationTemplate] = None, request_configuration: Optional[SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[SynchronizationTemplate]: """ - Update (override) the synchronization template associated with a given application. + Update (override) the synchronization template associated with a given application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationTemplate] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[Synchroni Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SynchronizationTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Pre-configured synchronization settings for a particular application. + Preconfigured synchronization settings for a particular application. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationTemplate] = None, request_configuration: Optional[SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update (override) the synchronization template associated with a given application. + Update (override) the synchronization template associated with a given application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[SynchronizationTemplate] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class SynchronizationTemplateItemRequestBuilderGetQueryParameters(): """ - Pre-configured synchronization settings for a particular application. + Preconfigured synchronization settings for a particular application. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/templates/templates_request_builder.py b/msgraph/generated/service_principals/item/synchronization/templates/templates_request_builder.py index cd55b647e84..f1a7503c3ad 100644 --- a/msgraph/generated/service_principals/item/synchronization/templates/templates_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/templates/templates_request_builder.py @@ -45,7 +45,7 @@ def by_synchronization_template_id(self,synchronization_template_id: str) -> Syn async def get(self,request_configuration: Optional[TemplatesRequestBuilderGetRequestConfiguration] = None) -> Optional[SynchronizationTemplateCollectionResponse]: """ - List the synchronization templates associated with a given application or service principal. + List the synchronization templates associated with a given application or service principal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SynchronizationTemplateCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronization-list-templates?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SynchronizationTemplate] = None, request_conf def to_get_request_information(self,request_configuration: Optional[TemplatesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the synchronization templates associated with a given application or service principal. + List the synchronization templates associated with a given application or service principal. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SynchronizationTemplate] = None, request_configuration: Optional[TemplatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SynchronizationTemplate] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TemplatesRequestBuilderGetQueryParameters(): """ - List the synchronization templates associated with a given application or service principal. + List the synchronization templates associated with a given application or service principal. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/token_issuance_policies/count/count_request_builder.py b/msgraph/generated/service_principals/item/token_issuance_policies/count/count_request_builder.py index db1d16616b4..f73af3881eb 100644 --- a/msgraph/generated/service_principals/item/token_issuance_policies/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/token_issuance_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/token_issuance_policies/item/token_issuance_policy_item_request_builder.py b/msgraph/generated/service_principals/item/token_issuance_policies/item/token_issuance_policy_item_request_builder.py index 7b679cddff4..42c27c05ed9 100644 --- a/msgraph/generated/service_principals/item/token_issuance_policies/item/token_issuance_policy_item_request_builder.py +++ b/msgraph/generated/service_principals/item/token_issuance_policies/item/token_issuance_policy_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TokenIssuanc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TokenIssuancePolicyItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/token_issuance_policies/token_issuance_policies_request_builder.py b/msgraph/generated/service_principals/item/token_issuance_policies/token_issuance_policies_request_builder.py index a55c42c147a..bf293179fc7 100644 --- a/msgraph/generated/service_principals/item/token_issuance_policies/token_issuance_policies_request_builder.py +++ b/msgraph/generated/service_principals/item/token_issuance_policies/token_issuance_policies_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TokenIssuanc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TokenIssuancePoliciesRequestBuilder: diff --git a/msgraph/generated/service_principals/item/token_lifetime_policies/count/count_request_builder.py b/msgraph/generated/service_principals/item/token_lifetime_policies/count/count_request_builder.py index adaccfae2bc..3ce2c11dfd1 100644 --- a/msgraph/generated/service_principals/item/token_lifetime_policies/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/token_lifetime_policies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py b/msgraph/generated/service_principals/item/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py index 09beb540506..744eb04d852 100644 --- a/msgraph/generated/service_principals/item/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py +++ b/msgraph/generated/service_principals/item/token_lifetime_policies/item/token_lifetime_policy_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TokenLifetim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TokenLifetimePolicyItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/token_lifetime_policies/token_lifetime_policies_request_builder.py b/msgraph/generated/service_principals/item/token_lifetime_policies/token_lifetime_policies_request_builder.py index 205ca06f1d7..9a859ffe237 100644 --- a/msgraph/generated/service_principals/item/token_lifetime_policies/token_lifetime_policies_request_builder.py +++ b/msgraph/generated/service_principals/item/token_lifetime_policies/token_lifetime_policies_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[TokenLifetim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TokenLifetimePoliciesRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/count/count_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/count/count_request_builder.py index df7c9c7d6af..9072faae7d5 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py index 456f88e9ddd..ea8979468b7 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index 3a7055eceb1..b2daafcf508 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/count/count_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/count/count_request_builder.py index 7c1b474891b..cb35852b7c3 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py index f254226f772..abff4ba1645 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/graph_group/count/count_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/graph_group/count/count_request_builder.py index 1974f9b2fb2..367bad7637f 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/graph_group/graph_group_request_builder.py index 5267a3824a6..704f6f019b5 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/item/directory_object_item_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/item/directory_object_item_request_builder.py index 13278432c7c..17115634ef2 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/item/directory_object_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index b78fac8e167..6b594a2d96a 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py index d3f8bf7e81a..6bb16301839 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/item/graph_group/graph_group_request_builder.py index ed8c6fcfa1a..d189ed0475f 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/service_principals/item/transitive_member_of/transitive_member_of_request_builder.py b/msgraph/generated/service_principals/item/transitive_member_of/transitive_member_of_request_builder.py index 6230e13ba9d..4fa6ca763c9 100644 --- a/msgraph/generated/service_principals/item/transitive_member_of/transitive_member_of_request_builder.py +++ b/msgraph/generated/service_principals/item/transitive_member_of/transitive_member_of_request_builder.py @@ -74,14 +74,14 @@ def to_get_request_information(self,request_configuration: Optional[TransitiveMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TransitiveMemberOfRequestBuilder: diff --git a/msgraph/generated/service_principals/service_principals_request_builder.py b/msgraph/generated/service_principals/service_principals_request_builder.py index 97f54c4ed32..da8d4c14709 100644 --- a/msgraph/generated/service_principals/service_principals_request_builder.py +++ b/msgraph/generated/service_principals/service_principals_request_builder.py @@ -49,7 +49,7 @@ def by_service_principal_id(self,service_principal_id: str) -> ServicePrincipalI async def get(self,request_configuration: Optional[ServicePrincipalsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServicePrincipalCollectionResponse]: """ - Retrieve a list of servicePrincipal objects. + Retrieve a list of servicePrincipal objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServicePrincipalCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-list?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ServicePrincipalsRequestBuild async def post(self,body: Optional[ServicePrincipal] = None, request_configuration: Optional[ServicePrincipalsRequestBuilderPostRequestConfiguration] = None) -> Optional[ServicePrincipal]: """ - Create a new servicePrincipal object. + Create a new servicePrincipal object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServicePrincipal] @@ -96,24 +96,24 @@ async def post(self,body: Optional[ServicePrincipal] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ServicePrincipalsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of servicePrincipal objects. + Retrieve a list of servicePrincipal objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServicePrincipal] = None, request_configuration: Optional[ServicePrincipalsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new servicePrincipal object. + Create a new servicePrincipal object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -121,13 +121,13 @@ def to_post_request_information(self,body: Optional[ServicePrincipal] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -189,7 +189,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class ServicePrincipalsRequestBuilderGetQueryParameters(): """ - Retrieve a list of servicePrincipal objects. + Retrieve a list of servicePrincipal objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/validate_properties/validate_properties_request_builder.py b/msgraph/generated/service_principals/validate_properties/validate_properties_request_builder.py index 4da3769126c..a885fe48191 100644 --- a/msgraph/generated/service_principals/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/service_principals/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/service_principals_with_app_id/service_principals_with_app_id_request_builder.py b/msgraph/generated/service_principals_with_app_id/service_principals_with_app_id_request_builder.py index 01aa67bb7ec..c21762155d6 100644 --- a/msgraph/generated/service_principals_with_app_id/service_principals_with_app_id_request_builder.py +++ b/msgraph/generated/service_principals_with_app_id/service_principals_with_app_id_request_builder.py @@ -25,11 +25,13 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['app_id'] = str(app_id) super().__init__(request_adapter, "{+baseurl}/servicePrincipals(appId='{appId}'){?%24select,%24expand}", path_parameters) async def delete(self,request_configuration: Optional[ServicePrincipalsWithAppIdRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a servicePrincipal object. + Delete a servicePrincipal object. This API is available in the following national cloud deployments. 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/serviceprincipal-delete?view=graph-rest-1.0 @@ -49,7 +51,7 @@ async def delete(self,request_configuration: Optional[ServicePrincipalsWithAppId async def get(self,request_configuration: Optional[ServicePrincipalsWithAppIdRequestBuilderGetRequestConfiguration] = None) -> Optional[ServicePrincipal]: """ - Retrieve the properties and relationships of a servicePrincipal object. + Retrieve the properties and relationships of a servicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ServicePrincipal] Find more info here: https://learn.microsoft.com/graph/api/serviceprincipal-get?view=graph-rest-1.0 @@ -95,34 +97,34 @@ async def patch(self,body: Optional[ServicePrincipal] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ServicePrincipalsWithAppIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a servicePrincipal object. + Delete a servicePrincipal object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ServicePrincipalsWithAppIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a servicePrincipal object. + Retrieve the properties and relationships of a servicePrincipal object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ServicePrincipal] = None, request_configuration: Optional[ServicePrincipalsWithAppIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +137,13 @@ def to_patch_request_information(self,body: Optional[ServicePrincipal] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +170,7 @@ class ServicePrincipalsWithAppIdRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class ServicePrincipalsWithAppIdRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a servicePrincipal object. + Retrieve the properties and relationships of a servicePrincipal object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/count/count_request_builder.py b/msgraph/generated/shares/count/count_request_builder.py index b3ff68a6352..bce9eed0f73 100644 --- a/msgraph/generated/shares/count/count_request_builder.py +++ b/msgraph/generated/shares/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/shares/item/created_by_user/created_by_user_request_builder.py index 4b576624992..1f5f838c7d0 100644 --- a/msgraph/generated/shares/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/shares/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/shares/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/shares/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index fda7ade020f..ac7d6c4389a 100644 --- a/msgraph/generated/shares/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/shares/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/shares/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..156c67c0933 --- /dev/null +++ b/msgraph/generated/shares/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/shares/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..32c6b78c11d --- /dev/null +++ b/msgraph/generated/shares/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /shares/{sharedDriveItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/drive_item/content/content_request_builder.py b/msgraph/generated/shares/item/drive_item/content/content_request_builder.py index 712b01ec663..c132f76711c 100644 --- a/msgraph/generated/shares/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/shares/item/drive_item/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/shares/item/drive_item/drive_item_request_builder.py b/msgraph/generated/shares/item/drive_item/drive_item_request_builder.py index abb7d0515ec..450dc3099ca 100644 --- a/msgraph/generated/shares/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/shares/item/drive_item/drive_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. 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/shares-get?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[DriveItemRequestBuilderGetReq def to_get_request_information(self,request_configuration: Optional[DriveItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class DriveItemRequestBuilderGetQueryParameters(): """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/items/count/count_request_builder.py b/msgraph/generated/shares/item/items/count/count_request_builder.py index b5349997bfc..796146e5f79 100644 --- a/msgraph/generated/shares/item/items/count/count_request_builder.py +++ b/msgraph/generated/shares/item/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/items/item/content/content_request_builder.py b/msgraph/generated/shares/item/items/item/content/content_request_builder.py index 352550a6c91..39236a7726c 100644 --- a/msgraph/generated/shares/item/items/item/content/content_request_builder.py +++ b/msgraph/generated/shares/item/items/item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/shares/item/items/item/drive_item_item_request_builder.py b/msgraph/generated/shares/item/items/item/drive_item_item_request_builder.py index 4ae9d145c52..3761de9e7cf 100644 --- a/msgraph/generated/shares/item/items/item/drive_item_item_request_builder.py +++ b/msgraph/generated/shares/item/items/item/drive_item_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemItemRequestBuilder: diff --git a/msgraph/generated/shares/item/items/items_request_builder.py b/msgraph/generated/shares/item/items/items_request_builder.py index 41db7c7a275..4b804cc91f2 100644 --- a/msgraph/generated/shares/item/items/items_request_builder.py +++ b/msgraph/generated/shares/item/items/items_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemsRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/shares/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/shares/item/last_modified_by_user/last_modified_by_user_request_builder.py index b1707d6d354..be341527770 100644 --- a/msgraph/generated/shares/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/shares/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/shares/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/shares/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 80f916b9c3e..feec99f4c8d 100644 --- a/msgraph/generated/shares/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/shares/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..467fcc7ce06 --- /dev/null +++ b/msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..0c5ba05ad57 --- /dev/null +++ b/msgraph/generated/shares/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /shares/{sharedDriveItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/columns/columns_request_builder.py b/msgraph/generated/shares/item/list_/columns/columns_request_builder.py index b663ed07ffc..5c267e7637d 100644 --- a/msgraph/generated/shares/item/list_/columns/columns_request_builder.py +++ b/msgraph/generated/shares/item/list_/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. 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/list-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Create a column for a [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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 [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/columns/count/count_request_builder.py b/msgraph/generated/shares/item/list_/columns/count/count_request_builder.py index ec2026e24fa..0e7fc9ccd3a 100644 --- a/msgraph/generated/shares/item/list_/columns/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/columns/item/column_definition_item_request_builder.py b/msgraph/generated/shares/item/list_/columns/item/column_definition_item_request_builder.py index f70dad17bdc..a343d19ccf2 100644 --- a/msgraph/generated/shares/item/list_/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/columns/item/column_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnDef Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/shares/item/list_/columns/item/source_column/source_column_request_builder.py index 967678a4919..29283fe5e13 100644 --- a/msgraph/generated/shares/item/list_/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/shares/item/list_/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/shares/item/list_/content_types/add_copy/add_copy_request_builder.py index bbefbd1875b..a45e1cfe756 100644 --- a/msgraph/generated/shares/item/list_/content_types/add_copy/add_copy_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/add_copy/add_copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/shares/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py index 71c830bf7be..a5763c78cd7 100644 --- a/msgraph/generated/shares/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = N def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/content_types_request_builder.py b/msgraph/generated/shares/item/list_/content_types/content_types_request_builder.py index 06f6828a8c5..87d01437ee0 100644 --- a/msgraph/generated/shares/item/list_/content_types/content_types_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/content_types_request_builder.py @@ -48,7 +48,7 @@ def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuild async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. 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/list-list-contenttypes?view=graph-rest-1.0 @@ -94,19 +94,19 @@ async def post(self,body: Optional[ContentType] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[ContentType] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesReques @dataclass class ContentTypesRequestBuilderGetQueryParameters(): """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/content_types/count/count_request_builder.py b/msgraph/generated/shares/item/list_/content_types/count/count_request_builder.py index f424da6c4ae..be9fec74dc2 100644 --- a/msgraph/generated/shares/item/list_/content_types/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py b/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py similarity index 89% rename from msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py rename to msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py index 4f27a15e2c4..18ec4d512d0 100644 --- a/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py +++ b/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetCompatibleHubContentTypesResponse(BaseCollectionPaginationCountResponse): +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetCompatibleHubContentTypesResponse + Returns: GetCompatibleHubContentTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetCompatibleHubContentTypesResponse() + return GetCompatibleHubContentTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py index 395ec538c65..97cac5e1ca5 100644 --- a/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/contentTypes/getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesResponse]: + async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: """ Invoke function getCompatibleHubContentTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetCompatibleHubContentTypesResponse] + Returns: Optional[GetCompatibleHubContentTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesR } if not self.request_adapter: raise Exception("Http core is null") - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse - return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetCompatibl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetCompatibleHubContentTypesRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py index e69729a8cdf..0817d96f4e0 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. 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[AssociateWithHubSitesPostRequestBody] = None, def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/item/base/base_request_builder_.py b/msgraph/generated/shares/item/list_/content_types/item/base/base_request_builder_.py index 58ad89ffb0e..da09ed125de 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/base/base_request_builder_.py +++ b/msgraph/generated/shares/item/list_/content_types/item/base/base_request_builder_.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseRequestBuilder_: diff --git a/msgraph/generated/shares/item/list_/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/base_types/base_types_request_builder.py index e1a8f7f09bd..080f23c1041 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/base_types/base_types_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/base_types/base_types_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseTypesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseTypesRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/base_types/count/count_request_builder.py index 0b6b1efbd66..d7bb36ef010 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/base_types/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/base_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py index c33723c32f9..3dc53e21d55 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/base_types/item/content_type_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ContentTypeItemRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/column_links/column_links_request_builder.py index 608d3a6d76c..e382c7d1aef 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/column_links/column_links_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/column_links/column_links_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinksR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ColumnLink] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/column_links/count/count_request_builder.py index 3e3dfe7c04a..0843ad29ebf 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/column_links/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/column_links/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py index 9c73a27a532..c9181153233 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/column_links/item/column_link_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnLin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnLinkItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinkIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinkItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ColumnLink] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/column_positions/column_positions_request_builder.py index c72775fe466..c2b3982e96c 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/column_positions/column_positions_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/column_positions/column_positions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnPositi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnPositionsRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/column_positions/count/count_request_builder.py index bf1e2f6b845..10d5aaac02e 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/column_positions/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/column_positions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py index 5f079092677..094e26157c8 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/columns/columns_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/columns/columns_request_builder.py index 189988bd9a5..ac469c34972 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/columns/columns_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. 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/contenttype-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/columns/count/count_request_builder.py index efb68b18402..9494bf39f39 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/columns/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py index b5799689190..51f008fb4d4 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/columns/item/column_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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/columndefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ColumnDefinitionItemReques async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. 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/columndefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBu async def patch(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ColumnDefinition] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ColumnDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py index e5534920e70..2661a947d6a 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/content_type_item_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/content_type_item_request_builder.py index 485ae396591..8f397e7cafd 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/content_type_item_request_builder.py @@ -15,9 +15,9 @@ from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder from .column_links.column_links_request_builder import ColumnLinksRequestBuilder from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder - from .columns.columns_request_builder import ColumnsRequestBuilder from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder from .is_published.is_published_request_builder import IsPublishedRequestBuilder from .publish.publish_request_builder import PublishRequestBuilder @@ -107,12 +107,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContentTy Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -122,14 +122,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[ContentType] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py index c15329a8bbd..a218cc326f3 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. 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[CopyToDefaultContentLocationPostRequestBody] def to_post_request_information(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CopyToDefaultContentLocation if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..97dd03cb77a --- /dev/null +++ b/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_request_builder.py index d185325f0f0..38371784f27 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse class IsPublishedRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/contentTypes/{contentType%2Did}/isPublished()", path_parameters) - async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedResponse]: + async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedGetResponse]: """ Invoke function isPublished param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[IsPublishedResponse] + Returns: Optional[IsPublishedGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse - return await self.request_adapter.send_async(request_info, IsPublishedResponse, error_mapping) + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[IsPublishedR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> IsPublishedRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_response.py b/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_response.py deleted file mode 100644 index 7e0c9f380cc..00000000000 --- a/msgraph/generated/shares/item/list_/content_types/item/is_published/is_published_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: IsPublishedResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return IsPublishedResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/shares/item/list_/content_types/item/publish/publish_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/publish/publish_request_builder.py index 58c9c803156..1868561c48e 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/publish/publish_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/shares/item/list_/content_types/item/unpublish/unpublish_request_builder.py index 5c0ed49714b..e1c3f8e87d9 100644 --- a/msgraph/generated/shares/item/list_/content_types/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/shares/item/list_/content_types/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/created_by_user/created_by_user_request_builder.py b/msgraph/generated/shares/item/list_/created_by_user/created_by_user_request_builder.py index 68382d41f36..dc8cb69bbc6 100644 --- a/msgraph/generated/shares/item/list_/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/shares/item/list_/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from .....models.o_data_errors.o_data_error import ODataError from .....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/shares/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/shares/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index fb26cbc9591..dc7afd5fbd8 100644 --- a/msgraph/generated/shares/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/shares/item/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..4fbb05fba14 --- /dev/null +++ b/msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..0a1580f7309 --- /dev/null +++ b/msgraph/generated/shares/item/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /shares/{sharedDriveItem-id}/list/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/drive/drive_request_builder.py b/msgraph/generated/shares/item/list_/drive/drive_request_builder.py index 826c3d83546..17b31be0fe4 100644 --- a/msgraph/generated/shares/item/list_/drive/drive_request_builder.py +++ b/msgraph/generated/shares/item/list_/drive/drive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Drive] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DriveRequestBuilder: @dataclass class DriveRequestBuilderGetQueryParameters(): """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/items/item/analytics/analytics_request_builder.py b/msgraph/generated/shares/item/list_/items/item/analytics/analytics_request_builder.py index bcb3a4920a4..99dd9449230 100644 --- a/msgraph/generated/shares/item/list_/items/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/analytics/analytics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AnalyticsRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/shares/item/list_/items/item/created_by_user/created_by_user_request_builder.py index e0a57526440..a2a6f2d8ffa 100644 --- a/msgraph/generated/shares/item/list_/items/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from .......models.o_data_errors.o_data_error import ODataError from .......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/shares/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/shares/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 34ff0ed5e1d..5e1e9d8a2e9 100644 --- a/msgraph/generated/shares/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..d37e2fe9365 --- /dev/null +++ b/msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..24d5eb99462 --- /dev/null +++ b/msgraph/generated/shares/item/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /shares/{sharedDriveItem-id}/list/items/{listItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/items/item/document_set_versions/count/count_request_builder.py b/msgraph/generated/shares/item/list_/items/item/document_set_versions/count/count_request_builder.py index 34b8dbbd318..739b34dd6fe 100644 --- a/msgraph/generated/shares/item/list_/items/item/document_set_versions/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/document_set_versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py b/msgraph/generated/shares/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py index bc6c7b175ce..b0ea47da134 100644 --- a/msgraph/generated/shares/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/document_set_versions/document_set_versions_request_builder.py @@ -45,7 +45,7 @@ def by_document_set_version_id(self,document_set_version_id: str) -> DocumentSet async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersionCollectionResponse]: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-documentsetversions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBui async def post(self,body: Optional[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DocumentSetVersion] = None, request_configura def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DocumentSetVersionsRequestBuilderGetQueryParameters(): """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py b/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py index 1c36d61aac7..51b7701f14d 100644 --- a/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequ async def get(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[DocumentSetVersion] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class DocumentSetVersionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py b/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py index 56b9a4b5c1e..2778352ef88 100644 --- a/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py b/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py index 472dfe13075..684d4c0f86d 100644 --- a/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/document_set_versions/item/restore/restore_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/items/item/drive_item/content/content_request_builder.py b/msgraph/generated/shares/item/list_/items/item/drive_item/content/content_request_builder.py index 33a45373875..b1bd2603bd1 100644 --- a/msgraph/generated/shares/item/list_/items/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/shares/item/list_/items/item/drive_item/drive_item_request_builder.py b/msgraph/generated/shares/item/list_/items/item/drive_item/drive_item_request_builder.py index 9f1b46c0545..e27deeb80b3 100644 --- a/msgraph/generated/shares/item/list_/items/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/items/item/fields/fields_request_builder.py b/msgraph/generated/shares/item/list_/items/item/fields/fields_request_builder.py index 9dca432a1ab..a6017f4deaf 100644 --- a/msgraph/generated/shares/item/list_/items/item/fields/fields_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/fields/fields_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[FieldsRequestBuilderGetReques async def patch(self,body: Optional[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> Optional[FieldValueSet]: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FieldValueSet] @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,19 +113,19 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py index 13eab5abd1e..c0732961acf 100644 --- a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index 75b01fe4753..cb6f558eef1 100644 --- a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index 3ff2427ba45..0749a77a29a 100644 --- a/msgraph/generated/drives/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index 65d459e4321..810d3f975e6 100644 --- a/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py index b06e851a7dc..22875f7395f 100644 --- a/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from .......models.o_data_errors.o_data_error import ODataError from .......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 0ea9c06021e..30f35fc811a 100644 --- a/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..41ea4830ec8 --- /dev/null +++ b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..1f117501dbd --- /dev/null +++ b/msgraph/generated/shares/item/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /shares/{sharedDriveItem-id}/list/items/{listItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/items/item/list_item_item_request_builder.py b/msgraph/generated/shares/item/list_/items/item/list_item_item_request_builder.py index 01655e84325..7a6bde12801 100644 --- a/msgraph/generated/shares/item/list_/items/item/list_item_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/list_item_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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/listitem-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ListItemItemRequestBuilder async def get(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItem]: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] Find more info here: https://learn.microsoft.com/graph/api/listitem-get?view=graph-rest-1.0 @@ -121,34 +121,34 @@ async def patch(self,body: Optional[ListItem] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ListItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -161,13 +161,13 @@ def to_patch_request_information(self,body: Optional[ListItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ListItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class ListItemItemRequestBuilderGetQueryParameters(): """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/items/item/versions/count/count_request_builder.py b/msgraph/generated/shares/item/list_/items/item/versions/count/count_request_builder.py index b8a54f1d7b1..494682b9340 100644 --- a/msgraph/generated/shares/item/list_/items/item/versions/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/items/item/versions/item/fields/fields_request_builder.py b/msgraph/generated/shares/item/list_/items/item/versions/item/fields/fields_request_builder.py index ab68c549bd4..277965209fb 100644 --- a/msgraph/generated/shares/item/list_/items/item/versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/items/item/versions/item/list_item_version_item_request_builder.py b/msgraph/generated/shares/item/list_/items/item/versions/item/list_item_version_item_request_builder.py index d536311cc16..76dda3e9a5f 100644 --- a/msgraph/generated/shares/item/list_/items/item/versions/item/list_item_version_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/versions/item/list_item_version_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ListItemVersionItemRequest async def get(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersion]: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersion] Find more info here: https://learn.microsoft.com/graph/api/listitemversion-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemV Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[ListItemVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ListItemVersion] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class ListItemVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class ListItemVersionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/shares/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py index 5bad83fc70e..3a59c0124e0 100644 --- a/msgraph/generated/shares/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/listitemversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreVersionRequestBuilder def to_post_request_information(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreVersionRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/items/item/versions/versions_request_builder.py b/msgraph/generated/shares/item/list_/items/item/versions/versions_request_builder.py index 51468749588..66c5a925f7f 100644 --- a/msgraph/generated/shares/item/list_/items/item/versions/versions_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_list_item_version_id(self,list_item_version_id: str) -> ListItemVersionIt async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersionCollectionResponse]: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-versions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ListItemVersion] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItemVersion] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/items/items_request_builder.py b/msgraph/generated/shares/item/list_/items/items_request_builder.py index ab83e6f938b..5799ef7987e 100644 --- a/msgraph/generated/shares/item/list_/items/items_request_builder.py +++ b/msgraph/generated/shares/item/list_/items/items_request_builder.py @@ -44,7 +44,7 @@ def by_list_item_id(self,list_item_id: str) -> ListItemItemRequestBuilder: async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemCollectionResponse]: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list?view=graph-rest-1.0 @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequest async def post(self,body: Optional[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> Optional[ListItem]: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] @@ -91,24 +91,24 @@ async def post(self,body: Optional[ListItem] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItem] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -139,7 +139,7 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemsRequestBuilder: @dataclass class ItemsRequestBuilderGetQueryParameters(): """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/shares/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py index c4bc1c93786..284cec23a80 100644 --- a/msgraph/generated/shares/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/shares/item/list_/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from .....models.o_data_errors.o_data_error import ODataError from .....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/shares/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/shares/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 9063d8ad2c1..969e3aeb770 100644 --- a/msgraph/generated/shares/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/shares/item/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..1aa9ae00f50 --- /dev/null +++ b/msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..f3b767d1838 --- /dev/null +++ b/msgraph/generated/shares/item/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /shares/{sharedDriveItem-id}/list/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/shares/item/list_/list_request_builder.py b/msgraph/generated/shares/item/list_/list_request_builder.py index 1223c275563..ad46a30a13c 100644 --- a/msgraph/generated/shares/item/list_/list_request_builder.py +++ b/msgraph/generated/shares/item/list_/list_request_builder.py @@ -105,12 +105,12 @@ def to_delete_request_information(self,request_configuration: Optional[ListReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -120,14 +120,14 @@ def to_get_request_information(self,request_configuration: Optional[ListRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[List_] = None, request_configuration: Optional[ListRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[List_] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/operations/count/count_request_builder.py b/msgraph/generated/shares/item/list_/operations/count/count_request_builder.py index 5fbfe66182b..7ea49dd7cb2 100644 --- a/msgraph/generated/shares/item/list_/operations/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/shares/item/list_/operations/item/rich_long_running_operation_item_request_builder.py index 168e97aa308..07ac3679e8d 100644 --- a/msgraph/generated/shares/item/list_/operations/item/rich_long_running_operation_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/operations/item/rich_long_running_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[RichLongR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[RichLongRunn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RichLongRunningOperation] = None, request_configuration: Optional[RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/operations/operations_request_builder.py b/msgraph/generated/shares/item/list_/operations/operations_request_builder.py index b10f777d044..b35125449c9 100644 --- a/msgraph/generated/shares/item/list_/operations/operations_request_builder.py +++ b/msgraph/generated/shares/item/list_/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/subscriptions/count/count_request_builder.py b/msgraph/generated/shares/item/list_/subscriptions/count/count_request_builder.py index d38c934ef15..0ee8ea1a60d 100644 --- a/msgraph/generated/shares/item/list_/subscriptions/count/count_request_builder.py +++ b/msgraph/generated/shares/item/list_/subscriptions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/shares/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py index 636e323bec5..38f7ad3c3fd 100644 --- a/msgraph/generated/shares/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py +++ b/msgraph/generated/shares/item/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReauthorizeRequestBuilder: diff --git a/msgraph/generated/shares/item/list_/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/shares/item/list_/subscriptions/item/subscription_item_request_builder.py index 64921e6e2f4..d6db7fea6c6 100644 --- a/msgraph/generated/shares/item/list_/subscriptions/item/subscription_item_request_builder.py +++ b/msgraph/generated/shares/item/list_/subscriptions/item/subscription_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Subscript Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Subscription] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_/subscriptions/subscriptions_request_builder.py b/msgraph/generated/shares/item/list_/subscriptions/subscriptions_request_builder.py index 7b56f872433..4750337c018 100644 --- a/msgraph/generated/shares/item/list_/subscriptions/subscriptions_request_builder.py +++ b/msgraph/generated/shares/item/list_/subscriptions/subscriptions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Subscription] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/list_item/list_item_request_builder.py b/msgraph/generated/shares/item/list_item/list_item_request_builder.py index d63fe654a67..109acd84610 100644 --- a/msgraph/generated/shares/item/list_item/list_item_request_builder.py +++ b/msgraph/generated/shares/item/list_item/list_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ListItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ListItemRequestBuilder: diff --git a/msgraph/generated/shares/item/permission/grant/grant_response.py b/msgraph/generated/shares/item/permission/grant/grant_post_response.py similarity index 92% rename from msgraph/generated/shares/item/permission/grant/grant_response.py rename to msgraph/generated/shares/item/permission/grant/grant_post_response.py index ba6e523769f..aec077c4f3a 100644 --- a/msgraph/generated/shares/item/permission/grant/grant_response.py +++ b/msgraph/generated/shares/item/permission/grant/grant_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GrantResponse(BaseCollectionPaginationCountResponse): +class GrantPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Permission]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GrantResponse + Returns: GrantPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GrantResponse() + return GrantPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/shares/item/permission/grant/grant_request_builder.py b/msgraph/generated/shares/item/permission/grant/grant_request_builder.py index 57103588e44..9e268838ece 100644 --- a/msgraph/generated/shares/item/permission/grant/grant_request_builder.py +++ b/msgraph/generated/shares/item/permission/grant/grant_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .grant_post_request_body import GrantPostRequestBody - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse class GrantRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/permission/grant", path_parameters) - async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantResponse]: + async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantPostResponse]: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GrantResponse] + Returns: Optional[GrantPostResponse] Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GrantPostRequestBody] = None, request_configu } if not self.request_adapter: raise Exception("Http core is null") - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse - return await self.request_adapter.send_async(request_info, GrantResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/permission/permission_request_builder.py b/msgraph/generated/shares/item/permission/permission_request_builder.py index f307c9a1e48..d7df6dbd0ce 100644 --- a/msgraph/generated/shares/item/permission/permission_request_builder.py +++ b/msgraph/generated/shares/item/permission/permission_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Permissio Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PermissionRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Permission] = None, request_configuration: Optional[PermissionRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Permission] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/shares/item/root/content/content_request_builder.py b/msgraph/generated/shares/item/root/content/content_request_builder.py index 0139b82ceaf..1cfbc044c2d 100644 --- a/msgraph/generated/shares/item/root/content/content_request_builder.py +++ b/msgraph/generated/shares/item/root/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/shares/item/root/root_request_builder.py b/msgraph/generated/shares/item/root/root_request_builder.py index b02f2e3acce..f59094702a0 100644 --- a/msgraph/generated/shares/item/root/root_request_builder.py +++ b/msgraph/generated/shares/item/root/root_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[RootRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RootRequestBuilder: diff --git a/msgraph/generated/shares/item/shared_drive_item_item_request_builder.py b/msgraph/generated/shares/item/shared_drive_item_item_request_builder.py index 53141e247b1..b6c24d34702 100644 --- a/msgraph/generated/shares/item/shared_drive_item_item_request_builder.py +++ b/msgraph/generated/shares/item/shared_drive_item_item_request_builder.py @@ -16,8 +16,8 @@ from .drive_item.drive_item_request_builder import DriveItemRequestBuilder from .items.items_request_builder import ItemsRequestBuilder from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder - from .list_item.list_item_request_builder import ListItemRequestBuilder from .list_.list_request_builder import ListRequestBuilder + from .list_item.list_item_request_builder import ListItemRequestBuilder from .permission.permission_request_builder import PermissionRequestBuilder from .root.root_request_builder import RootRequestBuilder from .site.site_request_builder import SiteRequestBuilder @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[SharedDriveItemItemRequest async def get(self,request_configuration: Optional[SharedDriveItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedDriveItem]: """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedDriveItem] Find more info here: https://learn.microsoft.com/graph/api/shares-get?view=graph-rest-1.0 @@ -107,29 +107,29 @@ def to_delete_request_information(self,request_configuration: Optional[SharedDri Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedDriveItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedDriveItem] = None, request_configuration: Optional[SharedDriveItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[SharedDriveItem] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -256,7 +256,7 @@ class SharedDriveItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class SharedDriveItemItemRequestBuilderGetQueryParameters(): """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/shares/item/site/site_request_builder.py b/msgraph/generated/shares/item/site/site_request_builder.py index c25675e517f..5e725013122 100644 --- a/msgraph/generated/shares/item/site/site_request_builder.py +++ b/msgraph/generated/shares/item/site/site_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SiteRequestBuilder: diff --git a/msgraph/generated/shares/shares_request_builder.py b/msgraph/generated/shares/shares_request_builder.py index b281a5a4d07..92ed75aacac 100644 --- a/msgraph/generated/shares/shares_request_builder.py +++ b/msgraph/generated/shares/shares_request_builder.py @@ -45,7 +45,7 @@ def by_shared_drive_item_id(self,shared_drive_item_id: str) -> SharedDriveItemIt async def get(self,request_configuration: Optional[SharesRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedDriveItemCollectionResponse]: """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedDriveItemCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[SharedDriveItem] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SharesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedDriveItem] = None, request_configuration: Optional[SharesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[SharedDriveItem] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharesRequestBuilderGetQueryParameters(): """ - Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. + Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/remove/remove_response.py b/msgraph/generated/sites/add/add_post_response.py similarity index 93% rename from msgraph/generated/sites/remove/remove_response.py rename to msgraph/generated/sites/add/add_post_response.py index 76b63cc3df7..97e91ce6671 100644 --- a/msgraph/generated/sites/remove/remove_response.py +++ b/msgraph/generated/sites/add/add_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class RemoveResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Site]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemoveResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RemoveResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return RemoveResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/add/add_request_builder.py b/msgraph/generated/sites/add/add_request_builder.py index 65271e2d52f..0076ca056f5 100644 --- a/msgraph/generated/sites/add/add_request_builder.py +++ b/msgraph/generated/sites/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ Follow a user's site or multiple sites. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/site-follow?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/count/count_request_builder.py b/msgraph/generated/sites/count/count_request_builder.py index 274c8476cc7..a44247942a7 100644 --- a/msgraph/generated/sites/count/count_request_builder.py +++ b/msgraph/generated/sites/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/get_all_sites/get_all_sites_response.py b/msgraph/generated/sites/get_all_sites/get_all_sites_get_response.py similarity index 91% rename from msgraph/generated/sites/get_all_sites/get_all_sites_response.py rename to msgraph/generated/sites/get_all_sites/get_all_sites_get_response.py index 865d4c2720a..7fa7b52e1ff 100644 --- a/msgraph/generated/sites/get_all_sites/get_all_sites_response.py +++ b/msgraph/generated/sites/get_all_sites/get_all_sites_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllSitesResponse(BaseCollectionPaginationCountResponse): +class GetAllSitesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Site]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllSitesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllSitesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllSitesResponse + Returns: GetAllSitesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllSitesResponse() + return GetAllSitesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/get_all_sites/get_all_sites_request_builder.py b/msgraph/generated/sites/get_all_sites/get_all_sites_request_builder.py index 8f6c5c7159c..b50f1b8824b 100644 --- a/msgraph/generated/sites/get_all_sites/get_all_sites_request_builder.py +++ b/msgraph/generated/sites/get_all_sites/get_all_sites_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_all_sites_response import GetAllSitesResponse + from .get_all_sites_get_response import GetAllSitesGetResponse class GetAllSitesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/getAllSites(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllSitesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllSitesResponse]: + async def get(self,request_configuration: Optional[GetAllSitesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllSitesGetResponse]: """ Invoke function getAllSites param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllSitesResponse] + Returns: Optional[GetAllSitesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllSitesRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_sites_response import GetAllSitesResponse + from .get_all_sites_get_response import GetAllSitesGetResponse - return await self.request_adapter.send_async(request_info, GetAllSitesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllSitesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllSitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllSitesR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllSitesRequestBuilder: diff --git a/msgraph/generated/sites/item/analytics/all_time/all_time_request_builder.py b/msgraph/generated/sites/item/analytics/all_time/all_time_request_builder.py index 1ad358b06ef..0b3b7e55bc8 100644 --- a/msgraph/generated/sites/item/analytics/all_time/all_time_request_builder.py +++ b/msgraph/generated/sites/item/analytics/all_time/all_time_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AllTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemActivityStat]: """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ItemActivityStat] Find more info here: https://learn.microsoft.com/graph/api/itemanalytics-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[AllTimeRequestBuilderGetReque def to_get_request_information(self,request_configuration: Optional[AllTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllTimeRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> AllTimeRequestBuilder: @dataclass class AllTimeRequestBuilderGetQueryParameters(): """ - Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval][] API. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/analytics/analytics_request_builder.py b/msgraph/generated/sites/item/analytics/analytics_request_builder.py index e8e04a04bc5..2a55616b0e7 100644 --- a/msgraph/generated/sites/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/sites/item/analytics/analytics_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[Analytics Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/count/count_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/count/count_request_builder.py index 0b9ca5474c8..91200dea3ba 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/count/count_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py index 1c27c717e29..ea86ae0bd7c 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/activities_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivitiesRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivity] = None, request_configuration: Optional[ActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ItemActivity] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py index 7ec3cad3e20..ad7d3c8e241 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py index 5e752a51291..9697bf702c3 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py index 76b676f1850..8e94fb156cd 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py index 706aa24798c..85b6199782a 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ItemActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ItemActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivity] = None, request_configuration: Optional[ItemActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ItemActivity] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py index cf2d21b8cad..205e11571da 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ItemActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ItemActivityStatItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivityStat] = None, request_configuration: Optional[ItemActivityStatItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ItemActivityStat] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py b/msgraph/generated/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py index ca1ea5a2f4f..925d8ecce5f 100644 --- a/msgraph/generated/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py +++ b/msgraph/generated/sites/item/analytics/item_activity_stats/item_activity_stats_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ItemActivityStat] = None, request_configuration: Optional[ItemActivityStatsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ItemActivityStat] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py b/msgraph/generated/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py index 104fab42218..6d8f80a42f1 100644 --- a/msgraph/generated/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py +++ b/msgraph/generated/sites/item/analytics/last_seven_days/last_seven_days_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[LastSevenDay Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastSevenDaysRequestBuilder: diff --git a/msgraph/generated/sites/item/columns/columns_request_builder.py b/msgraph/generated/sites/item/columns/columns_request_builder.py index d70f7e89991..d101a23b7e5 100644 --- a/msgraph/generated/sites/item/columns/columns_request_builder.py +++ b/msgraph/generated/sites/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI 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]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [site][site]. This API is available in the following [national cloud deployments. 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 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque 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]. + Create a column for a site][site] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati 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]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [site][site]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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]. + Create a column for a site][site] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [site][site]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/columns/count/count_request_builder.py b/msgraph/generated/sites/item/columns/count/count_request_builder.py index 8d11880cc0e..6dd7262cae7 100644 --- a/msgraph/generated/sites/item/columns/count/count_request_builder.py +++ b/msgraph/generated/sites/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/columns/item/column_definition_item_request_builder.py index d4df4b4afc1..319d385d0dd 100644 --- a/msgraph/generated/sites/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/columns/item/column_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnDef Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/sites/item/columns/item/source_column/source_column_request_builder.py index ad2850dee0f..31157a2206f 100644 --- a/msgraph/generated/sites/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/sites/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/sites/item/content_types/add_copy/add_copy_request_builder.py index c8928a17e9a..824d82926f6 100644 --- a/msgraph/generated/sites/item/content_types/add_copy/add_copy_request_builder.py +++ b/msgraph/generated/sites/item/content_types/add_copy/add_copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py index fda6be5dd9d..b232f06dbea 100644 --- a/msgraph/generated/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py +++ b/msgraph/generated/sites/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = N def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/content_types/content_types_request_builder.py b/msgraph/generated/sites/item/content_types/content_types_request_builder.py index 53e56d0e225..9149af6a30c 100644 --- a/msgraph/generated/sites/item/content_types/content_types_request_builder.py +++ b/msgraph/generated/sites/item/content_types/content_types_request_builder.py @@ -48,7 +48,7 @@ def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuild async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: """ - Get the collection of [contentType][contentType] resources in a [site][]. + Get the collection of contentType][contentType] resources in a [site][]. This API is available in the following [national cloud deployments. 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 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGet async def post(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Create a new [contentType][] in a [site][]. + Create a new contentType][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -95,24 +95,24 @@ async def post(self,body: Optional[ContentType] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [contentType][contentType] resources in a [site][]. + Get the collection of contentType][contentType] resources in a [site][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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][]. + Create a new contentType][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -120,13 +120,13 @@ def to_post_request_information(self,body: Optional[ContentType] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -179,7 +179,7 @@ def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesReques @dataclass class ContentTypesRequestBuilderGetQueryParameters(): """ - Get the collection of [contentType][contentType] resources in a [site][]. + Get the collection of contentType][contentType] resources in a [site][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/content_types/count/count_request_builder.py b/msgraph/generated/sites/item/content_types/count/count_request_builder.py index a01c08817c5..d0e0712b36f 100644 --- a/msgraph/generated/sites/item/content_types/count/count_request_builder.py +++ b/msgraph/generated/sites/item/content_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py b/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py similarity index 89% rename from msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py rename to msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py index a35455356f5..b6f91778f86 100644 --- a/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py +++ b/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetCompatibleHubContentTypesResponse(BaseCollectionPaginationCountResponse): +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetCompatibleHubContentTypesResponse + Returns: GetCompatibleHubContentTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetCompatibleHubContentTypesResponse() + return GetCompatibleHubContentTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py index 413cdc1a51c..117cf12c992 100644 --- a/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py +++ b/msgraph/generated/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/contentTypes/getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesResponse]: + async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: """ Invoke function getCompatibleHubContentTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetCompatibleHubContentTypesResponse] + Returns: Optional[GetCompatibleHubContentTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesR } if not self.request_adapter: raise Exception("Http core is null") - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse - return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetCompatibl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetCompatibleHubContentTypesRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py index d6f6bfd700b..e77d4def298 100644 --- a/msgraph/generated/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. 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[AssociateWithHubSitesPostRequestBody] = None, def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/content_types/item/base/base_request_builder_.py b/msgraph/generated/sites/item/content_types/item/base/base_request_builder_.py index 23113d1a26a..3c818286450 100644 --- a/msgraph/generated/sites/item/content_types/item/base/base_request_builder_.py +++ b/msgraph/generated/sites/item/content_types/item/base/base_request_builder_.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseRequestBuilder_: diff --git a/msgraph/generated/sites/item/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/sites/item/content_types/item/base_types/base_types_request_builder.py index 0cfcc73527a..8308159b6c8 100644 --- a/msgraph/generated/sites/item/content_types/item/base_types/base_types_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/base_types/base_types_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseTypesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseTypesRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/sites/item/content_types/item/base_types/count/count_request_builder.py index e0faa62c610..c041a3c1868 100644 --- a/msgraph/generated/sites/item/content_types/item/base_types/count/count_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/base_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py index 0a5081d2834..9bfa55db080 100644 --- a/msgraph/generated/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/base_types/item/content_type_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ContentTypeItemRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/sites/item/content_types/item/column_links/column_links_request_builder.py index 5c729e5989b..d37684d9f46 100644 --- a/msgraph/generated/sites/item/content_types/item/column_links/column_links_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/column_links/column_links_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinksR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ColumnLink] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/sites/item/content_types/item/column_links/count/count_request_builder.py index 9080f24e4ef..1deb3bd3c33 100644 --- a/msgraph/generated/sites/item/content_types/item/column_links/count/count_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/column_links/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py index 186634f6116..f329c49f548 100644 --- a/msgraph/generated/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/column_links/item/column_link_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnLin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnLinkItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinkIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinkItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ColumnLink] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/sites/item/content_types/item/column_positions/column_positions_request_builder.py index 1fe4fa1b12f..5a71faf16b8 100644 --- a/msgraph/generated/sites/item/content_types/item/column_positions/column_positions_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/column_positions/column_positions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnPositi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnPositionsRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/sites/item/content_types/item/column_positions/count/count_request_builder.py index eb217bdca0f..b12e9b50adb 100644 --- a/msgraph/generated/sites/item/content_types/item/column_positions/count/count_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/column_positions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py index b1a0ac5a234..05509ae2155 100644 --- a/msgraph/generated/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/columns/columns_request_builder.py b/msgraph/generated/sites/item/content_types/item/columns/columns_request_builder.py index 352acc317ba..134434757a2 100644 --- a/msgraph/generated/sites/item/content_types/item/columns/columns_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. 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/contenttype-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/sites/item/content_types/item/columns/count/count_request_builder.py index 62fd97d054d..c643889f0dd 100644 --- a/msgraph/generated/sites/item/content_types/item/columns/count/count_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py index dd8f24a1d52..f8309e04831 100644 --- a/msgraph/generated/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/columns/item/column_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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/columndefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ColumnDefinitionItemReques async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. 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/columndefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBu async def patch(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ColumnDefinition] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ColumnDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py index 1919f7296f0..4481a7dc11f 100644 --- a/msgraph/generated/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/content_type_item_request_builder.py b/msgraph/generated/sites/item/content_types/item/content_type_item_request_builder.py index 30e156692b9..d7aa8924c3a 100644 --- a/msgraph/generated/sites/item/content_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/content_type_item_request_builder.py @@ -15,9 +15,9 @@ from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder from .column_links.column_links_request_builder import ColumnLinksRequestBuilder from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder - from .columns.columns_request_builder import ColumnsRequestBuilder from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder from .is_published.is_published_request_builder import IsPublishedRequestBuilder from .publish.publish_request_builder import PublishRequestBuilder @@ -38,7 +38,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ContentTypeItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [content type][contentType] from a [list][] or a [site][]. + Remove a content type][contentType] from a [list][] or a [site][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-delete?view=graph-rest-1.0 @@ -58,7 +58,7 @@ async def delete(self,request_configuration: Optional[ContentTypeItemRequestBuil async def get(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentType]: """ - Retrieve the metadata for a [content type][contentType] in a [site][] or a [list][]. + Retrieve the metadata for a content type][contentType] in a [site][] or a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] Find more info here: https://learn.microsoft.com/graph/api/contenttype-get?view=graph-rest-1.0 @@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[ContentTypeItemRequestBuilder async def patch(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ContentType]: """ - Update a [content type][contentType]. + Update a content type][contentType]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -105,39 +105,39 @@ async def patch(self,body: Optional[ContentType] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [content type][contentType] from a [list][] or a [site][]. + Remove a content type][contentType] from a [list][] or a [site][]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [content type][contentType] in a [site][] or a [list][]. + Retrieve the metadata for a content type][contentType] in a [site][] or a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [content type][contentType]. + Update a content type][contentType]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -145,13 +145,13 @@ def to_patch_request_information(self,body: Optional[ContentType] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -268,7 +268,7 @@ class ContentTypeItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ContentTypeItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [content type][contentType] in a [site][] or a [list][]. + Retrieve the metadata for a content type][contentType] in a [site][] or a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py index d9dc2633bfe..437cce4d165 100644 --- a/msgraph/generated/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. 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[CopyToDefaultContentLocationPostRequestBody] def to_post_request_information(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CopyToDefaultContentLocation if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/sites/item/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..97dd03cb77a --- /dev/null +++ b/msgraph/generated/sites/item/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/sites/item/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/sites/item/content_types/item/is_published/is_published_request_builder.py index 12dafaf6b6e..b77fe8669ee 100644 --- a/msgraph/generated/sites/item/content_types/item/is_published/is_published_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/is_published/is_published_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse class IsPublishedRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/contentTypes/{contentType%2Did}/isPublished()", path_parameters) - async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedResponse]: + async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedGetResponse]: """ Invoke function isPublished param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[IsPublishedResponse] + Returns: Optional[IsPublishedGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse - return await self.request_adapter.send_async(request_info, IsPublishedResponse, error_mapping) + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[IsPublishedR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> IsPublishedRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/is_published/is_published_response.py b/msgraph/generated/sites/item/content_types/item/is_published/is_published_response.py deleted file mode 100644 index 7e0c9f380cc..00000000000 --- a/msgraph/generated/sites/item/content_types/item/is_published/is_published_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: IsPublishedResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return IsPublishedResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/sites/item/content_types/item/publish/publish_request_builder.py b/msgraph/generated/sites/item/content_types/item/publish/publish_request_builder.py index 96de33a861f..ce44d393db7 100644 --- a/msgraph/generated/sites/item/content_types/item/publish/publish_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/sites/item/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/sites/item/content_types/item/unpublish/unpublish_request_builder.py index a32f8e3de25..911f51d6555 100644 --- a/msgraph/generated/sites/item/content_types/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/sites/item/content_types/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/sites/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/sites/item/created_by_user/created_by_user_request_builder.py index 6eb095f1df5..83f7a301f93 100644 --- a/msgraph/generated/sites/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/sites/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 545d07d4f1d..79ee6d9132c 100644 --- a/msgraph/generated/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/sites/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..687175ce5d5 --- /dev/null +++ b/msgraph/generated/sites/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..6f3707af32f --- /dev/null +++ b/msgraph/generated/sites/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /sites/{site-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/drive/drive_request_builder.py b/msgraph/generated/sites/item/drive/drive_request_builder.py index 86312862655..25a90a4ade3 100644 --- a/msgraph/generated/sites/item/drive/drive_request_builder.py +++ b/msgraph/generated/sites/item/drive/drive_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/drives/count/count_request_builder.py b/msgraph/generated/sites/item/drives/count/count_request_builder.py index f1593fcf7a5..ec47e428f8a 100644 --- a/msgraph/generated/sites/item/drives/count/count_request_builder.py +++ b/msgraph/generated/sites/item/drives/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/drives/drives_request_builder.py b/msgraph/generated/sites/item/drives/drives_request_builder.py index e45e0b7c766..c5ec2f2cc9d 100644 --- a/msgraph/generated/sites/item/drives/drives_request_builder.py +++ b/msgraph/generated/sites/item/drives/drives_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[DrivesReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/drives/item/drive_item_request_builder.py b/msgraph/generated/sites/item/drives/item/drive_item_request_builder.py index 294881a97c7..fe68dcce39b 100644 --- a/msgraph/generated/sites/item/drives/item/drive_item_request_builder.py +++ b/msgraph/generated/sites/item/drives/item/drive_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/sites/item/external_columns/count/count_request_builder.py b/msgraph/generated/sites/item/external_columns/count/count_request_builder.py index 9112f7effbe..e3269c4a3b6 100644 --- a/msgraph/generated/sites/item/external_columns/count/count_request_builder.py +++ b/msgraph/generated/sites/item/external_columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/external_columns/external_columns_request_builder.py b/msgraph/generated/sites/item/external_columns/external_columns_request_builder.py index dc15f8a603f..30830b07fe9 100644 --- a/msgraph/generated/sites/item/external_columns/external_columns_request_builder.py +++ b/msgraph/generated/sites/item/external_columns/external_columns_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ExternalColu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/external_columns/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/external_columns/item/column_definition_item_request_builder.py index d6aded1035b..effd2c0a05f 100644 --- a/msgraph/generated/sites/item/external_columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/external_columns/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py index d202b7fd498..c1bec195cd6 100644 --- a/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index acfe134a605..731a3124a9c 100644 --- a/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/sites/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index 69e23104912..72cf4f9ddad 100644 --- a/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index 2a5444033c7..5fc0a23d2de 100644 --- a/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/sites/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_response.py b/msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py similarity index 87% rename from msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_response.py rename to msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py index 25526c1fa22..8f729536e3f 100644 --- a/msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_response.py +++ b/msgraph/generated/sites/item/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetApplicableContentTypesForListWithListIdResponse(BaseCollectionPaginationCountResponse): +class GetApplicableContentTypesForListWithListIdGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetApplicableContentTypesForListWithListIdResponse: + 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: GetApplicableContentTypesForListWithListIdResponse + Returns: GetApplicableContentTypesForListWithListIdGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetApplicableContentTypesForListWithListIdResponse() + return GetApplicableContentTypesForListWithListIdGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/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_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py index 9228ef0bb48..6bf292440d0 100644 --- a/msgraph/generated/sites/item/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_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_applicable_content_types_for_list_with_list_id_response import GetApplicableContentTypesForListWithListIdResponse + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse class GetApplicableContentTypesForListWithListIdRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['list_id'] = str(list_id) super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getApplicableContentTypesForList(listId='{listId}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> Optional[GetApplicableContentTypesForListWithListIdResponse]: + 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[GetApplicableContentTypesForListWithListIdResponse] + Returns: Optional[GetApplicableContentTypesForListWithListIdGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetApplicableContentTypesForL } if not self.request_adapter: raise Exception("Http core is null") - from .get_applicable_content_types_for_list_with_list_id_response import GetApplicableContentTypesForListWithListIdResponse + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse - return await self.request_adapter.send_async(request_info, GetApplicableContentTypesForListWithListIdResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetApplicableContentTypesForListWithListIdGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetApplicabl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: 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 f4ba9dc68e1..7451ea3e0a1 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 @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['path'] = str(path) super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')", path_parameters) async def get(self,request_configuration: Optional[GetByPathWithPathRequestBuilderGetRequestConfiguration] = None) -> Optional[Site]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[GetByPathWit Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetByPathWithPathRequestBuilder: diff --git a/msgraph/generated/sites/item/items/count/count_request_builder.py b/msgraph/generated/sites/item/items/count/count_request_builder.py index 8b7118b052a..049f71235d6 100644 --- a/msgraph/generated/sites/item/items/count/count_request_builder.py +++ b/msgraph/generated/sites/item/items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/items/item/base_item_item_request_builder.py b/msgraph/generated/sites/item/items/item/base_item_item_request_builder.py index 14aebffca00..03758f7ba89 100644 --- a/msgraph/generated/sites/item/items/item/base_item_item_request_builder.py +++ b/msgraph/generated/sites/item/items/item/base_item_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseItemItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseItemItemRequestBuilder: diff --git a/msgraph/generated/sites/item/items/items_request_builder.py b/msgraph/generated/sites/item/items/items_request_builder.py index c947d310494..ad89ffb5d1b 100644 --- a/msgraph/generated/sites/item/items/items_request_builder.py +++ b/msgraph/generated/sites/item/items/items_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ItemsRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py index 998adde88c6..e1c8b754bf5 100644 --- a/msgraph/generated/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/sites/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 05b711bfded..6a9f0c473be 100644 --- a/msgraph/generated/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/sites/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..6728098054c --- /dev/null +++ b/msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..ded5b2ccb14 --- /dev/null +++ b/msgraph/generated/sites/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /sites/{site-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/count/count_request_builder.py b/msgraph/generated/sites/item/lists/count/count_request_builder.py index 9a9c0ca3f1e..c4e55f0c4da 100644 --- a/msgraph/generated/sites/item/lists/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/columns/columns_request_builder.py b/msgraph/generated/sites/item/lists/item/columns/columns_request_builder.py index 3fa62146f5c..38d491aaeaf 100644 --- a/msgraph/generated/sites/item/lists/item/columns/columns_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. 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/list-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Create a column for a [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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 [list][list] with a request that specifies a [columnDefinition][columnDefinition]. + Create a column for a list][list] with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [list][list]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [list][list]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/columns/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/columns/count/count_request_builder.py index 94a48fe93ea..fee77593631 100644 --- a/msgraph/generated/sites/item/lists/item/columns/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/lists/item/columns/item/column_definition_item_request_builder.py index 76f0efad67d..b16088625d7 100644 --- a/msgraph/generated/sites/item/lists/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/columns/item/column_definition_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnDef Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py index 23a6aeb0f24..ff592e93167 100644 --- a/msgraph/generated/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py index 4b08dddb107..90131aa65c6 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/add_copy/add_copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = None, request_configuration: Optional[AddCopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a copy of a [content type][contentType] from a [site][site] to a [list][list]. + Add a copy of a content type][contentType] from a [site][site] to a [list][list]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py index 355ab5b9416..9ffe038bd01 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContentType] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = N def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPostRequestBody] = None, request_configuration: Optional[AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddCopyFromContentTypeHubPos if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/content_types_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/content_types_request_builder.py index 2c3a85ef218..b69ad8b446a 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/content_types_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/content_types_request_builder.py @@ -48,7 +48,7 @@ def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuild async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. 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/list-list-contenttypes?view=graph-rest-1.0 @@ -94,19 +94,19 @@ async def post(self,body: Optional[ContentType] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -119,13 +119,13 @@ def to_post_request_information(self,body: Optional[ContentType] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesReques @dataclass class ContentTypesRequestBuilderGetQueryParameters(): """ - Get the collection of [contentType][contentType] resources in a [list][]. + Get the collection of contentType][contentType] resources in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/content_types/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/count/count_request_builder.py index ef566cdbae4..2bb2ee18d64 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py b/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py similarity index 89% rename from msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py rename to msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py index 18a2c046e26..8d8f52c2fcd 100644 --- a/msgraph/generated/groups/item/sites/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_response.py +++ b/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetCompatibleHubContentTypesResponse(BaseCollectionPaginationCountResponse): +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ContentType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetCompatibleHubContentTypesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetCompatibleHubContentTypesResponse + Returns: GetCompatibleHubContentTypesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetCompatibleHubContentTypesResponse() + return GetCompatibleHubContentTypesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py index cab02e04864..0191c0afbc9 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/contentTypes/getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesResponse]: + async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: """ Invoke function getCompatibleHubContentTypes param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetCompatibleHubContentTypesResponse] + Returns: Optional[GetCompatibleHubContentTypesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetCompatibleHubContentTypesR } if not self.request_adapter: raise Exception("Http core is null") - from .get_compatible_hub_content_types_response import GetCompatibleHubContentTypesResponse + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse - return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetCompatibl Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetCompatibleHubContentTypesRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py index 615e78a2d52..8bc27ac4f64 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. 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[AssociateWithHubSitesPostRequestBody] = None, def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostRequestBody] = None, request_configuration: Optional[AssociateWithHubSitesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Associate a published [content type][contentType] present in a content type hub with a list of hub sites. + Associate a published content type][contentType] present in a content type hub with a list of hub sites. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AssociateWithHubSitesPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/base/base_request_builder_.py b/msgraph/generated/sites/item/lists/item/content_types/item/base/base_request_builder_.py index 9befb416582..ac588598471 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/base/base_request_builder_.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/base/base_request_builder_.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseRequestBuilder_: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py index 60c92203fc9..e1798fbc278 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/base_types/base_types_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[BaseTypesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> BaseTypesRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py index e7bfd0880c1..709499524e0 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/base_types/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py index 291ee2c47ee..edba3714078 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/base_types/item/content_type_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ContentTypeItemRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py index cdc72231ba0..7fafd0976a7 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/column_links/column_links_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinksR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ColumnLink] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py index 991c4dccda4..5a987677d0d 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/column_links/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py index 1cc76385124..e998151d7b0 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/column_links/item/column_link_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ColumnLin Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnLinkItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnLinkIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnLink] = None, request_configuration: Optional[ColumnLinkItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ColumnLink] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py index 2babb957af2..f5c73d5e97f 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/column_positions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnPositi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnPositionsRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py index f33d5ad4a5e..a4620512b82 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py index 931c77e2e41..428ceb6646f 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ColumnDefini Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ColumnDefinitionItemRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/columns/columns_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/columns/columns_request_builder.py index 1d86b43a7b0..3a457f88a92 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/columns/columns_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/columns/columns_request_builder.py @@ -45,7 +45,7 @@ def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionI async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. 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/contenttype-list-columns?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque async def post(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ColumnDefinition] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: """ - Add a column to a [content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. + Add a column to a content type][contentType] in a site, or a list with a request that specifies a [columnDefinition][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ColumnDefinition] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ColumnsRequestBuilderGetQueryParameters(): """ - Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [content type][contentType]. + Get the collection of columns represented as columnDefinition][columnDefinition] resources in a [content type][contentType]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py index 1ac5f7f70a6..61e7723ba95 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/columns/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py index 95b425e64fa..b6e48e7b7bd 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/column_definition_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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/columndefinition-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ColumnDefinitionItemReques async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. 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/columndefinition-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[ColumnDefinitionItemRequestBu async def patch(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ColumnDefinition]: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ColumnDefinition] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[ColumnDefinition] = None, request_configurat def to_delete_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a [column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. + Remove a column][columndefinition] from a [site][], a [list][], or a [content type][contentType]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ColumnDefinitionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ColumnDefinition] = None, request_configuration: Optional[ColumnDefinitionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a [site][], a [list][], or a [content type][contentType] [column][columnDefinition]. + Update a site][], a [list][], or a [content type][contentType] [column][columnDefinition]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[ColumnDefinition] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ColumnDefinitionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a [site][], a [list][], or a [contentType][] [column][columnDefinition]. + Retrieve the metadata for a site][], a [list][], or a [contentType][] [column][columnDefinition]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py index 9b9d3bb1437..31ce42b3fc5 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SourceColumn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SourceColumnRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/content_type_item_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/content_type_item_request_builder.py index e2b8c96869a..b5c3c37c9b5 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/content_type_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/content_type_item_request_builder.py @@ -15,9 +15,9 @@ from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder from .base.base_request_builder_ import BaseRequestBuilder_ from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder from .column_links.column_links_request_builder import ColumnLinksRequestBuilder from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder - from .columns.columns_request_builder import ColumnsRequestBuilder from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder from .is_published.is_published_request_builder import IsPublishedRequestBuilder from .publish.publish_request_builder import PublishRequestBuilder @@ -107,12 +107,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContentTy Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContentTypeItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -122,14 +122,14 @@ def to_get_request_information(self,request_configuration: Optional[ContentTypeI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContentType] = None, request_configuration: Optional[ContentTypeItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[ContentType] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py index f5debe43b3a..c34f8dc11aa 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. 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[CopyToDefaultContentLocationPostRequestBody] def to_post_request_information(self,body: Optional[CopyToDefaultContentLocationPostRequestBody] = None, request_configuration: Optional[CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation. + Copy a file to a default content location in a content type][contentType]. The file can then be added as a default file or template via a POST operation. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CopyToDefaultContentLocation if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..97dd03cb77a --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py index 6a6da7c67cf..8feb96677b8 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse class IsPublishedRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/contentTypes/{contentType%2Did}/isPublished()", path_parameters) - async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedResponse]: + async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> Optional[IsPublishedGetResponse]: """ Invoke function isPublished param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[IsPublishedResponse] + Returns: Optional[IsPublishedGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[IsPublishedRequestBuilderGetR } if not self.request_adapter: raise Exception("Http core is null") - from .is_published_response import IsPublishedResponse + from .is_published_get_response import IsPublishedGetResponse - return await self.request_adapter.send_async(request_info, IsPublishedResponse, error_mapping) + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[IsPublishedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[IsPublishedR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> IsPublishedRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_response.py b/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_response.py deleted file mode 100644 index 7e0c9f380cc..00000000000 --- a/msgraph/generated/sites/item/lists/item/content_types/item/is_published/is_published_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 IsPublishedResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> IsPublishedResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: IsPublishedResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return IsPublishedResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/publish/publish_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/publish/publish_request_builder.py index 3ef0d5b68a5..a4be299ecd7 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/publish/publish_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Publishes a [contentType][] present in the content type hub site. + Publishes a contentType][] present in the content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py index 09c16ec76a6..6d3214534ca 100644 --- a/msgraph/generated/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/content_types/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unpublish a [contentType][] from a content type hub site. + Unpublish a contentType][] from a content type hub site. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/sites/item/lists/item/created_by_user/created_by_user_request_builder.py index 4dc79d19de2..cdf1dece475 100644 --- a/msgraph/generated/sites/item/lists/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index da9c457370d..ef1a2c4864f 100644 --- a/msgraph/generated/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..ac5df0853ca --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..8717a7a67fd --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /sites/{site-id}/lists/{list-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/drive/drive_request_builder.py b/msgraph/generated/sites/item/lists/item/drive/drive_request_builder.py index c7f6f7c8cbb..8ca2feb087b 100644 --- a/msgraph/generated/sites/item/lists/item/drive/drive_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/drive/drive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Drive] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DriveRequestBuilder: @dataclass class DriveRequestBuilderGetQueryParameters(): """ - Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + Allows access to the list as a drive resource with driveItems. Only present on document libraries. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/analytics/analytics_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/analytics/analytics_request_builder.py index 129b5a82d32..24fb86e7da4 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/analytics/analytics_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/analytics/analytics_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AnalyticsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AnalyticsRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py index bc3aa6f905b..2263a40ec23 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/created_by_user_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class CreatedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[CreatedByUse Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class CreatedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py index 9be8dd0f8bc..9a214b9c922 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..5f41fafbce0 --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..f5050e810fe --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /sites/{site-id}/lists/{list-id}/items/{listItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py index 6c561e18b8c..d8fda6b0659 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py index e919d3dcba7..e40b01731ef 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/document_set_versions_request_builder.py @@ -45,7 +45,7 @@ def by_document_set_version_id(self,document_set_version_id: str) -> DocumentSet async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersionCollectionResponse]: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-documentsetversions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DocumentSetVersionsRequestBui async def post(self,body: Optional[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DocumentSetVersion] = None, request_configura def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new version of a document set item in a list. + Create a new version of a document set item in a list. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DocumentSetVersionsRequestBuilderGetQueryParameters(): """ - Get a list of the versions of a document set item in a list. + Get a list of the versions of a document set item in a list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py index 0d2b799b40b..1b871973dcc 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/document_set_version_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[DocumentSetVersionItemRequ async def get(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DocumentSetVersion]: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DocumentSetVersion] Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[DocumentSetVersion] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a version of a document set in a list. + Delete a version of a document set in a list. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DocumentSetVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DocumentSetVersion] = None, request_configuration: Optional[DocumentSetVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[DocumentSetVersion] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class DocumentSetVersionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a documentSetVersion object. + Read the properties and relationships of a documentSetVersion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py index 1a6ed665667..38bb7502767 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py index 4654f792287..90959718223 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/document_set_versions/item/restore/restore_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a document set version. + Restore a document set version. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py index f8edd5dccd1..dbb037f4736 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/drive_item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py index 8e89f39a002..698c28b99f6 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/drive_item/drive_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/items/item/fields/fields_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/fields/fields_request_builder.py index 83bdb428f9c..a0047c2b046 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/fields/fields_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/fields/fields_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[FieldsRequestBuilderGetReques async def patch(self,body: Optional[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> Optional[FieldValueSet]: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[FieldValueSet] @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,19 +113,19 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties on a [listItem][]. + Update the properties on a listItem][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py similarity index 90% rename from msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py rename to msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py index bcd5006ba9e..bd648fdbf2f 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_response.py +++ b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalResponse: + 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: GetActivitiesByIntervalResponse + Returns: GetActivitiesByIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalResponse() + return GetActivitiesByIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py index 23fb132070a..43fe0bc795a 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> Optional[GetActivitiesByIntervalResponse]: + 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[GetActivitiesByIntervalResponse] + Returns: Optional[GetActivitiesByIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalReques } if not self.request_adapter: raise Exception("Http core is null") - from .get_activities_by_interval_response import GetActivitiesByIntervalResponse + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse - return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py similarity index 94% rename from msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py rename to msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py index f5e338f8d84..dc92bb11964 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.py +++ b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(BaseCollectionPaginationCountResponse): +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ItemActivityStat]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse: + 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: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse() + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py index 410a801102a..e4d3a8ec9c9 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -11,7 +11,7 @@ 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): """ @@ -27,13 +27,17 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: startDateTime='{startDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse]: + 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse] + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -46,9 +50,9 @@ async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithSt } 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_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse + 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, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -57,14 +61,14 @@ def to_get_request_information(self,request_configuration: Optional[GetActivitie Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: diff --git a/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py index 6aacfc10602..6d10c6d07e4 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ........models.o_data_errors.o_data_error import ODataError from ........models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index f5b8319b203..b294f88203c 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..b780228abca --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..379a2802aa7 --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /sites/{site-id}/lists/{list-id}/items/{listItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/items/item/list_item_item_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/list_item_item_request_builder.py index 4462125b3d7..17568ce9255 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/list_item_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/list_item_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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/listitem-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ListItemItemRequestBuilder async def get(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItem]: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] Find more info here: https://learn.microsoft.com/graph/api/listitem-get?view=graph-rest-1.0 @@ -121,34 +121,34 @@ async def patch(self,body: Optional[ListItem] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes an item from a [list][]. + Removes an item from a list][]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ListItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -161,13 +161,13 @@ def to_patch_request_information(self,body: Optional[ListItem] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ListItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class ListItemItemRequestBuilderGetQueryParameters(): """ - Returns the metadata for an [item][] in a [list][]. + Returns the metadata for an item][] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/versions/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/versions/count/count_request_builder.py index e963848d75b..d823798690f 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/versions/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/versions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py index a8db99c4872..93d0ad21b78 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/versions/item/fields/fields_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[FieldsReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[FieldsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[FieldsReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[FieldValueSet] = None, request_configuration: Optional[FieldsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[FieldValueSet] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py index 1aed7df298b..302e7d81075 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/versions/item/list_item_version_item_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ListItemVersionItemRequest async def get(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersion]: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersion] Find more info here: https://learn.microsoft.com/graph/api/listitemversion-get?view=graph-rest-1.0 @@ -100,29 +100,29 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemV Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemVersionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[ListItemVersionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ListItemVersion] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -186,7 +186,7 @@ class ListItemVersionItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class ListItemVersionItemRequestBuilderGetQueryParameters(): """ - Retrieve the metadata for a specific version of a ListItem. + Retrieve the metadata for a specific version of a ListItem. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py index 4b8c3f67eba..5e9c26227c2 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/listitemversion-restore?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RestoreVersionRequestBuilder def to_post_request_information(self,request_configuration: Optional[RestoreVersionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreVersionRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/items/item/versions/versions_request_builder.py b/msgraph/generated/sites/item/lists/item/items/item/versions/versions_request_builder.py index 0dad804d400..55e009caace 100644 --- a/msgraph/generated/sites/item/lists/item/items/item/versions/versions_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/item/versions/versions_request_builder.py @@ -45,7 +45,7 @@ def by_list_item_version_id(self,list_item_version_id: str) -> ListItemVersionIt async def get(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemVersionCollectionResponse]: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemVersionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list-versions?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ListItemVersion] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[VersionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItemVersion] = None, request_configuration: Optional[VersionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItemVersion] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class VersionsRequestBuilderGetQueryParameters(): """ - SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. + SharePoint can be configured to retain the history for list items. Previous versions may be retained for a finite period of time depending on admin settings which may be unique per user or location. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/items/items_request_builder.py b/msgraph/generated/sites/item/lists/item/items/items_request_builder.py index 487b50f2897..9f273cb5fb1 100644 --- a/msgraph/generated/sites/item/lists/item/items/items_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/items/items_request_builder.py @@ -44,7 +44,7 @@ def by_list_item_id(self,list_item_id: str) -> ListItemItemRequestBuilder: async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListItemCollectionResponse]: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/listitem-list?view=graph-rest-1.0 @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequest async def post(self,body: Optional[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> Optional[ListItem]: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ListItem] @@ -91,24 +91,24 @@ async def post(self,body: Optional[ListItem] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ListItem] = None, request_configuration: Optional[ItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new [listItem][] in a [list][]. + Create a new listItem][] in a [list][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ListItem] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -139,7 +139,7 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemsRequestBuilder: @dataclass class ItemsRequestBuilderGetQueryParameters(): """ - Get the collection of [items][item] in a [list][]. + Get the collection of items][item] in a [list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py index 1671d2a19f3..eb9257ae4b2 100644 --- a/msgraph/generated/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -13,6 +13,7 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.user import User from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class LastModifiedByUserRequestBuilder(BaseRequestBuilder): """ @@ -55,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[LastModified Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -84,6 +85,15 @@ def mailbox_settings(self) -> MailboxSettingsRequestBuilder: return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class LastModifiedByUserRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py index 6047216e812..2700c246499 100644 --- a/msgraph/generated/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..e2511a7b5c2 --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..14b3451d980 --- /dev/null +++ b/msgraph/generated/sites/item/lists/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,156 @@ +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.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /sites/{site-id}/lists/{list-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Get serviceProvisioningErrors property value + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get serviceProvisioningErrors property value + 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(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) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Get serviceProvisioningErrors property value + """ + 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None + + + 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 b1f1fb7a7b8..c9de5978d79 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,7 +55,7 @@ async def delete(self,request_configuration: Optional[ListItemRequestBuilderDele async def get(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> Optional[List_]: """ - Returns the metadata for a [list][]. + Returns the metadata for a list][]. This API is available in the following [national cloud deployments. 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-get?view=graph-rest-1.0 @@ -106,29 +106,29 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the metadata for a [list][]. + Returns the metadata for a list][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[List_] = None, request_configuration: Optional[ListItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[List_] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -246,7 +246,7 @@ class ListItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ListItemRequestBuilderGetQueryParameters(): """ - Returns the metadata for a [list][]. + Returns the metadata for a list][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/lists/item/operations/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/operations/count/count_request_builder.py index c816f39d5a1..72f185fdd27 100644 --- a/msgraph/generated/sites/item/lists/item/operations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py index 43484e03c51..452d73c2bc3 100644 --- a/msgraph/generated/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/operations/item/rich_long_running_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[RichLongR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[RichLongRunn Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RichLongRunningOperation] = None, request_configuration: Optional[RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/operations/operations_request_builder.py b/msgraph/generated/sites/item/lists/item/operations/operations_request_builder.py index c5e22f9d510..b50cbf398fe 100644 --- a/msgraph/generated/sites/item/lists/item/operations/operations_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/subscriptions/count/count_request_builder.py b/msgraph/generated/sites/item/lists/item/subscriptions/count/count_request_builder.py index 31d7837e582..88c2caf13a8 100644 --- a/msgraph/generated/sites/item/lists/item/subscriptions/count/count_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/subscriptions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py index 5912f14e23b..75a17996458 100644 --- a/msgraph/generated/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReauthorizeRequestBuilder: diff --git a/msgraph/generated/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py index c144aa1df78..b9e98ce66b6 100644 --- a/msgraph/generated/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/subscriptions/item/subscription_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Subscript Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Subscription] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/item/subscriptions/subscriptions_request_builder.py b/msgraph/generated/sites/item/lists/item/subscriptions/subscriptions_request_builder.py index f59622384f2..a2d9dcccc19 100644 --- a/msgraph/generated/sites/item/lists/item/subscriptions/subscriptions_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/subscriptions/subscriptions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[Subscription Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Subscription] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/lists/lists_request_builder.py b/msgraph/generated/sites/item/lists/lists_request_builder.py index 0612689b5b6..fbc9c59d1d3 100644 --- a/msgraph/generated/sites/item/lists/lists_request_builder.py +++ b/msgraph/generated/sites/item/lists/lists_request_builder.py @@ -10,8 +10,8 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: - from ....models.list_collection_response import ListCollectionResponse from ....models.list_ import List_ + from ....models.list_collection_response import ListCollectionResponse from ....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.list_item_request_builder import ListItemRequestBuilder @@ -45,7 +45,7 @@ def by_list_id(self,list_id: str) -> ListItemRequestBuilder: 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. + 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. This API is available in the following national cloud deployments. 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 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequest async def post(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[List_]: """ - Create a new [list][] in a [site][]. + Create a new list][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[List_] @@ -92,24 +92,24 @@ async def post(self,body: Optional[List_] = None, request_configuration: Optiona 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. + 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. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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][]. + Create a new list][] in a [site][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[List_] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @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. + 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. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/count/count_request_builder.py index db2d5e5a9f5..50321712df6 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py index 8ce78a16ce2..3b954a76ec1 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CopyNotebookModel]: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CopyNotebookModel] @@ -54,7 +54,7 @@ async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py b/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py similarity index 89% rename from msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py rename to msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py index ffb2677ba0e..127f0785384 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py +++ b/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetRecentNotebooksWithIncludePersonalNotebooksResponse(BaseCollectionPaginationCountResponse): +class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[RecentNotebook]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetRecentNotebooksWithIncludePersonalNotebooksResponse + Returns: GetRecentNotebooksWithIncludePersonalNotebooksGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetRecentNotebooksWithIncludePersonalNotebooksResponse() + return GetRecentNotebooksWithIncludePersonalNotebooksGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py index 52725c61754..a5160bf810b 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse class GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['include_personal_notebooks'] = str(include_personal_notebooks) super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse]: + async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse]: """ Invoke function getRecentNotebooks param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse] + Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetRecentNotebooksWithInclude } if not self.request_adapter: raise Exception("Http core is null") - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse - return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetRecentNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py index aee25f9f3f8..4dad69911ac 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_notebook_post_request_body import CopyNotebookPostRequestBody class CopyNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/notebook_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/notebook_item_request_builder.py index 20830a12f68..886cb98bd37 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/notebook_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/notebook_item_request_builder.py @@ -13,8 +13,8 @@ from ......models.notebook import Notebook from ......models.o_data_errors.o_data_error import ODataError from .copy_notebook.copy_notebook_request_builder import CopyNotebookRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class NotebookItemRequestBuilder(BaseRequestBuilder): """ @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[NotebookItemRequestBuilder async def get(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Notebook]: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] Find more info here: https://learn.microsoft.com/graph/api/notebook-get?view=graph-rest-1.0 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[NotebookI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebookItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Notebook] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class NotebookItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class NotebookItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py index 659ebff2c46..2787b8ff4f8 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py index d7be4763188..924daf0e096 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py index b56c2942e1d..65f90618c77 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py index 25fbfda317c..484a882cecd 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ........models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py index e0c4c09f4b0..0cddc8ed614 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py index 41500eb516e..c4505823af9 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py index 84217c35d88..8e98ab30946 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py index 4433dc23f7c..d57369cad06 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 4991b9994dd..71eeb5a7858 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 68d8b5e17e9..e348896e9b1 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py index 73bc69a92d7..8094f9d65a3 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ..........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py index f1309304568..95c220d98d2 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py index 97abf1acaa1..9e05ee04234 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .............models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 1895afe02d5..3e95d23337b 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index 5b85f172ec3..1cae608b551 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ............models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 433e2bfc4a0..48e4b6c4793 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 35ee7a9e7ca..7641d464467 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 2988c71979b..cc42cbbf38c 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .............models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index 8b1a183be6a..e7e8417dca2 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .............models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py index 5b3405edb39..59ce014a33d 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from ...........models.onenote_page_collection_response import OnenotePageCollectionResponse + from ...........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 083043087ef..caaf1bb081b 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 9c9ee66246b..026a0a2f344 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py index 16caf8a0648..d95fb9b222c 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .........models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py index 165ab2e6d2e..0971d09b063 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sectiongroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe async def post(self,body: Optional[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py index 78255e4bb43..7b12418881b 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 4186cb55be3..49a5a77d945 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 40a3c4acd6f..fe31adfbb17 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py index de9758039bc..059bbbde1fb 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py index 1b101ea005b..49cfb149bf5 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py index 4d3b4ed4fc5..63f1b5384ce 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index a39ec680995..3408c770ca5 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py index 532c8127c76..fb3eb26e6c7 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 57b8a561dff..2a53b5abf52 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 7111b934396..a6dcd01cc62 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index eac55d4706a..6179af05721 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py index a0ebd4ffff9..55c679fc336 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py index 4dc286773ea..13dfa297f6a 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py index e9649f9c8d1..de3df0e4172 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 406ae4aa9f0..9770a1ff5af 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/notebooks/item/sections/sections_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/item/sections/sections_request_builder.py index 0cde5721768..0b80a3280b0 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/item/sections/sections_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/notebooks/notebooks_request_builder.py b/msgraph/generated/sites/item/onenote/notebooks/notebooks_request_builder.py index 6828a7673e9..b1f71593439 100644 --- a/msgraph/generated/sites/item/onenote/notebooks/notebooks_request_builder.py +++ b/msgraph/generated/sites/item/onenote/notebooks/notebooks_request_builder.py @@ -47,7 +47,7 @@ def by_notebook_id(self,notebook_id: str) -> NotebookItemRequestBuilder: async def get(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[NotebookCollectionResponse]: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NotebookCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-notebooks?view=graph-rest-1.0 @@ -81,7 +81,7 @@ def get_recent_notebooks_with_include_personal_notebooks(self,include_personal_n async def post(self,body: Optional[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> Optional[Notebook]: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] @@ -106,24 +106,24 @@ async def post(self,body: Optional[Notebook] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[Notebook] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def get_notebook_from_web_url(self) -> GetNotebookFromWebUrlRequestBuilder: @dataclass class NotebooksRequestBuilderGetQueryParameters(): """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/onenote_request_builder.py b/msgraph/generated/sites/item/onenote/onenote_request_builder.py index 58423a3e42d..818a23586f2 100644 --- a/msgraph/generated/sites/item/onenote/onenote_request_builder.py +++ b/msgraph/generated/sites/item/onenote/onenote_request_builder.py @@ -10,14 +10,14 @@ 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.onenote import Onenote + from ....models.o_data_errors.o_data_error import ODataError from .notebooks.notebooks_request_builder import NotebooksRequestBuilder from .operations.operations_request_builder import OperationsRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder from .resources.resources_request_builder import ResourcesRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class OnenoteRequestBuilder(BaseRequestBuilder): """ @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Onenote] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/operations/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/operations/count/count_request_builder.py index 27904bde777..767e5f990e5 100644 --- a/msgraph/generated/sites/item/onenote/operations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py b/msgraph/generated/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py index b8fca073546..6fe30018067 100644 --- a/msgraph/generated/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/operations/item/onenote_operation_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ......models.o_data_errors.o_data_error import ODataError class OnenoteOperationItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OnenoteOperationItemReques async def get(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] Find more info here: https://learn.microsoft.com/graph/api/onenoteoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteOp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OnenoteOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteOperation] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OnenoteOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class OnenoteOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/operations/operations_request_builder.py b/msgraph/generated/sites/item/onenote/operations/operations_request_builder.py index bb1538f4ba0..1cc2b35207d 100644 --- a/msgraph/generated/sites/item/onenote/operations/operations_request_builder.py +++ b/msgraph/generated/sites/item/onenote/operations/operations_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_operation import OnenoteOperation from .....models.onenote_operation_collection_response import OnenoteOperationCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_operation_item_request_builder import OnenoteOperationItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_operation_id(self,onenote_operation_id: str) -> OnenoteOperationI async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperationCollectionResponse]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteOperation] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteOperation] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/pages/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/pages/count/count_request_builder.py index c17f4fc5be4..6a472a6da79 100644 --- a/msgraph/generated/sites/item/onenote/pages/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/pages/item/content/content_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/content/content_request_builder.py index d24850af8b5..bc24b608499 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .......models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py index fa4f736560c..6413a3bb984 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/onenote_page_item_request_builder.py index bf507081a11..4412dd021a0 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ......models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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/page-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuil async def get(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] Find more info here: https://learn.microsoft.com/graph/api/page-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[OnenotePage] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class OnenotePageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class OnenotePageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 3a37812ab98..15881173f1d 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py index bbf2099dc89..9fdcef73793 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py index 7be5e28adbc..1b1a7328457 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .......models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/pages/item/preview/preview_request_builder.py b/msgraph/generated/sites/item/onenote/pages/item/preview/preview_request_builder.py index 12a05af453a..64e15eb5502 100644 --- a/msgraph/generated/sites/item/onenote/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .......models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/pages/pages_request_builder.py b/msgraph/generated/sites/item/onenote/pages/pages_request_builder.py index 668706b0c3e..5c87ced83d1 100644 --- a/msgraph/generated/sites/item/onenote/pages/pages_request_builder.py +++ b/msgraph/generated/sites/item/onenote/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .....models.onenote_page_collection_response import OnenotePageCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/resources/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/resources/count/count_request_builder.py index 002b98608e0..9a0cbdc536c 100644 --- a/msgraph/generated/sites/item/onenote/resources/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/resources/item/content/content_request_builder.py b/msgraph/generated/sites/item/onenote/resources/item/content/content_request_builder.py index 140809e4a8c..bd1b133ac69 100644 --- a/msgraph/generated/sites/item/onenote/resources/item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/resources/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from .......models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py b/msgraph/generated/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py index fe981fb0c15..9f067362d2e 100644 --- a/msgraph/generated/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/resources/item/onenote_resource_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from ......models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder class OnenoteResourceItemRequestBuilder(BaseRequestBuilder): @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OnenoteResourceItemRequest async def get(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResource]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResource] """ @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[OnenoteResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteResource] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -175,7 +175,7 @@ class OnenoteResourceItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class OnenoteResourceItemRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/resources/resources_request_builder.py b/msgraph/generated/sites/item/onenote/resources/resources_request_builder.py index 7d12fa50c6a..676f40dc7a8 100644 --- a/msgraph/generated/sites/item/onenote/resources/resources_request_builder.py +++ b/msgraph/generated/sites/item/onenote/resources/resources_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_resource import OnenoteResource from .....models.onenote_resource_collection_response import OnenoteResourceCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_resource_item_request_builder import OnenoteResourceItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_resource_id(self,onenote_resource_id: str) -> OnenoteResourceItem async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResourceCollectionResponse]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResourceCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteResource] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteResource] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/section_groups/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/count/count_request_builder.py index b31aea04c48..c86dbf41592 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py index 49ec0d00b3b..942bca3adca 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py index e698017c7cb..6874623835e 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/section_group_item_request_builder.py index e669b17901b..bf5ebe0e83a 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ......models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SectionGroupItemRequestBui async def get(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class SectionGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class SectionGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py index 702131f3e54..f479014ec83 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py index 44a068debf1..f795e423c51 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py index cb835e678dd..a4ece57606a 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py index 6b9594d8b03..fd9d39f441c 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 3fef815598f..2d11f7a809d 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 1eb4b1ebd0e..401e7f46d52 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py index 16618f36c38..f78b548fa45 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py index 837d7f06aba..a02b90449a7 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py index 8ddbb116dbe..9b7e9ef4499 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index b211328b684..7464da00e62 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index 4e786994bee..651d2d849b2 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index be6f47d0a2b..eaa045db4c5 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 0fd6712edea..ad36f419cf0 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 79fd2ca6975..c1fe5f2f7a3 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index 89065e3545f..6aef05d01b4 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py index 105fef57021..f1ba094794d 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 4bba8434b88..4d53fd88abf 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 5254b48d25e..1908f92a6c8 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/item/sections/sections_request_builder.py index 51f3f0e24fb..beeb78a04b4 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/section_groups/section_groups_request_builder.py b/msgraph/generated/sites/item/onenote/section_groups/section_groups_request_builder.py index a6d8379e62d..0ec9032b586 100644 --- a/msgraph/generated/sites/item/onenote/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/sites/item/onenote/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sectiongroups?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/sections/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/sections/count/count_request_builder.py index 30a4e53ebaf..6b63d72a461 100644 --- a/msgraph/generated/sites/item/onenote/sections/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 0945020dfe4..be69da43790 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 230a52f5d97..83059a81398 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/onenote_section_item_request_builder.py index 5cae55bd00f..269a6e81984 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ......models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[OnenoteSectionItemRequestB async def get(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] Find more info here: https://learn.microsoft.com/graph/api/section-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class OnenoteSectionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class OnenoteSectionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/count/count_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/count/count_request_builder.py index ae6afd05e84..e32343f6f88 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py index 86236395635..c79faa0152a 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 91d479b4bc2..126b2e8b5ae 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py index 0c012a507fb..208e9feb53b 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 2677aac5738..29667a05e24 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 630e74ab86f..7e42683b699 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py index fcd6b10625a..f096d9a22f6 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py index 54244fbb866..e510c5c3059 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/item/pages/pages_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/pages/pages_request_builder.py index 658e4ab98a8..35e412ddd98 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .......models.onenote_page_collection_response import OnenotePageCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py index 126a659ed0a..1702bd70ae9 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py index f534a64148e..c85242be784 100644 --- a/msgraph/generated/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/sites/item/onenote/sections/sections_request_builder.py b/msgraph/generated/sites/item/onenote/sections/sections_request_builder.py index 3439adbba58..4aadf9448ac 100644 --- a/msgraph/generated/sites/item/onenote/sections/sections_request_builder.py +++ b/msgraph/generated/sites/item/onenote/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .....models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sections?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/operations/count/count_request_builder.py b/msgraph/generated/sites/item/operations/count/count_request_builder.py index 1927b02e3d9..f1a1a13cf38 100644 --- a/msgraph/generated/sites/item/operations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/sites/item/operations/item/rich_long_running_operation_item_request_builder.py index 6d80be12b2e..29950f046dc 100644 --- a/msgraph/generated/sites/item/operations/item/rich_long_running_operation_item_request_builder.py +++ b/msgraph/generated/sites/item/operations/item/rich_long_running_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[RichLongRunningOperationIt async def get(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperation]: """ - Get the status of a rich long-running operation on a site or a list. + Get the status of a rich long-running operation on a site or a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RichLongRunningOperation] Find more info here: https://learn.microsoft.com/graph/api/richlongrunningoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[RichLongR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RichLongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a rich long-running operation on a site or a list. + Get the status of a rich long-running operation on a site or a list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[RichLongRunningOperation] = None, request_configuration: Optional[RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class RichLongRunningOperationItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class RichLongRunningOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of a rich long-running operation on a site or a list. + Get the status of a rich long-running operation on a site or a list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/operations/operations_request_builder.py b/msgraph/generated/sites/item/operations/operations_request_builder.py index 4d38107a097..38d0bf60738 100644 --- a/msgraph/generated/sites/item/operations/operations_request_builder.py +++ b/msgraph/generated/sites/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_rich_long_running_operation_id(self,rich_long_running_operation_id: str) async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperationCollectionResponse]: """ - Get a list of rich long-running operations associated with a site. + Get a list of rich long-running operations associated with a site. This API is available in the following national cloud deployments. 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 @@ -91,19 +91,19 @@ async def post(self,body: Optional[RichLongRunningOperation] = None, request_con def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of rich long-running operations associated with a site. + Get a list of rich long-running operations associated with a site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[RichLongRunningOperation] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get a list of rich long-running operations associated with a site. + Get a list of rich long-running operations associated with a site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/permissions/count/count_request_builder.py b/msgraph/generated/sites/item/permissions/count/count_request_builder.py index 429dfb8f3de..7fb881711a3 100644 --- a/msgraph/generated/sites/item/permissions/count/count_request_builder.py +++ b/msgraph/generated/sites/item/permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/drives/item/items/item/invite/invite_response.py b/msgraph/generated/sites/item/permissions/item/grant/grant_post_response.py similarity index 92% rename from msgraph/generated/drives/item/items/item/invite/invite_response.py rename to msgraph/generated/sites/item/permissions/item/grant/grant_post_response.py index 431ee1dabf9..1c1f8e352f0 100644 --- a/msgraph/generated/drives/item/items/item/invite/invite_response.py +++ b/msgraph/generated/sites/item/permissions/item/grant/grant_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class InviteResponse(BaseCollectionPaginationCountResponse): +class GrantPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Permission]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> InviteResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GrantPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: InviteResponse + Returns: GrantPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return InviteResponse() + return GrantPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/item/permissions/item/grant/grant_request_builder.py b/msgraph/generated/sites/item/permissions/item/grant/grant_request_builder.py index 2806d6d2cc1..57720bd3d5d 100644 --- a/msgraph/generated/sites/item/permissions/item/grant/grant_request_builder.py +++ b/msgraph/generated/sites/item/permissions/item/grant/grant_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .grant_post_request_body import GrantPostRequestBody - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse class GrantRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/permissions/{permission%2Did}/grant", path_parameters) - async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantResponse]: + async def post(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> Optional[GrantPostResponse]: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GrantResponse] + Returns: Optional[GrantPostResponse] Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GrantPostRequestBody] = None, request_configu } if not self.request_adapter: raise Exception("Http core is null") - from .grant_response import GrantResponse + from .grant_post_response import GrantPostResponse - return await self.request_adapter.send_async(request_info, GrantResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None, request_configuration: Optional[GrantRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Grant users access to a link represented by a [permission][]. + Grant users access to a link represented by a permission][]. This API is available in the following [national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GrantPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/permissions/item/permission_item_request_builder.py b/msgraph/generated/sites/item/permissions/item/permission_item_request_builder.py index 20ae89eb6d6..58aeae3d395 100644 --- a/msgraph/generated/sites/item/permissions/item/permission_item_request_builder.py +++ b/msgraph/generated/sites/item/permissions/item/permission_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a permission object on a site. + Delete a permission object on a site. This API is available in the following national cloud deployments. 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/site-delete-permission?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[PermissionItemRequestBuild async def get(self,request_configuration: Optional[PermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Permission]: """ - Retrieve the properties and relationships of a permission object on a site. + Retrieve the properties and relationships of a permission object on a site. This API is available in the following national cloud deployments. 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-get-permission?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[PermissionItemRequestBuilderG async def patch(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Permission]: """ - Update an application permission object on a site. + Update an application permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Permission] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[Permission] = None, request_configuration: O def to_delete_request_information(self,request_configuration: Optional[PermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a permission object on a site. + Delete a permission object on a site. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a permission object on a site. + Retrieve the properties and relationships of a permission object on a site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Permission] = None, request_configuration: Optional[PermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an application permission object on a site. + Update an application permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Permission] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class PermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class PermissionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a permission object on a site. + Retrieve the properties and relationships of a permission object on a site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/permissions/permissions_request_builder.py b/msgraph/generated/sites/item/permissions/permissions_request_builder.py index b35c810e91b..93dd4aa8151 100644 --- a/msgraph/generated/sites/item/permissions/permissions_request_builder.py +++ b/msgraph/generated/sites/item/permissions/permissions_request_builder.py @@ -45,7 +45,7 @@ def by_permission_id(self,permission_id: str) -> PermissionItemRequestBuilder: async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: """ - Get the permission resources from the permissions navigation property on a site. + Get the permission resources from the permissions navigation property on a site. This API is available in the following national cloud deployments. 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 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetR async def post(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: """ - Create a new permission object on a site. + Create a new permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Permission] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Permission] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the permission resources from the permissions navigation property on a site. + Get the permission resources from the permissions navigation property on a site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Create a new permission object on a site. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Permission] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PermissionsRequestBuilderGetQueryParameters(): """ - Get the permission resources from the permissions navigation property on a site. + Get the permission resources from the permissions navigation property on a site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/site_item_request_builder.py b/msgraph/generated/sites/item/site_item_request_builder.py index 0390a976106..43dfc059c2a 100644 --- a/msgraph/generated/sites/item/site_item_request_builder.py +++ b/msgraph/generated/sites/item/site_item_request_builder.py @@ -141,14 +141,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Site] = None, request_configuration: Optional[SiteItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -161,13 +161,13 @@ def to_patch_request_information(self,body: Optional[Site] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/sites/count/count_request_builder.py b/msgraph/generated/sites/item/sites/count/count_request_builder.py index fe695bac42b..cd60d7f87e5 100644 --- a/msgraph/generated/sites/item/sites/count/count_request_builder.py +++ b/msgraph/generated/sites/item/sites/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/sites/item/site_item_request_builder.py b/msgraph/generated/sites/item/sites/item/site_item_request_builder.py index 88d14c03e20..a8d908f6ddc 100644 --- a/msgraph/generated/sites/item/sites/item/site_item_request_builder.py +++ b/msgraph/generated/sites/item/sites/item/site_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SiteItemRequestBuilder: diff --git a/msgraph/generated/sites/item/sites/sites_request_builder.py b/msgraph/generated/sites/item/sites/sites_request_builder.py index cc0a48f309d..1970542ace5 100644 --- a/msgraph/generated/sites/item/sites/sites_request_builder.py +++ b/msgraph/generated/sites/item/sites/sites_request_builder.py @@ -44,7 +44,7 @@ def by_site_id1(self,site_id1: str) -> SiteItemRequestBuilder: async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: """ - Get a collection of subsites defined for a [site][]. + Get a collection of subsites defined for a site][]. This API is available in the following [national cloud deployments. 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 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of subsites defined for a [site][]. + Get a collection of subsites defined for a site][]. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SitesRequestBuilderGetQueryParameters(): """ - Get a collection of subsites defined for a [site][]. + Get a collection of subsites defined for a site][]. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/count/count_request_builder.py index 932f504fe0e..170f2e1bbf8 100644 --- a/msgraph/generated/sites/item/term_store/groups/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/groups_request_builder.py b/msgraph/generated/sites/item/term_store/groups/groups_request_builder.py index 83d52db6f04..e7ad24f3b9e 100644 --- a/msgraph/generated/sites/item/term_store/groups/groups_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/groups_request_builder.py @@ -45,7 +45,7 @@ def by_group_id(self,group_id: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-list-groups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[Group]: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Group] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Group] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/item/group_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/group_item_request_builder.py index 18e9b67b7a9..b0867595c97 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/group_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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/termstore-group-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDel async def get(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. 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/termstore-group-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Group] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class GroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class GroupItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/count/count_request_builder.py index e7343b8d590..fbb4b36b161 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py index 994dc70d584..9bff2eaee61 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py index 935ce447c69..6076d766dd8 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py index 6b430c678d5..e477a8ece3c 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py index c6223007c23..9218eb99cad 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py index ce85ffea9ff..227c8d58369 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 5182198db61..a0c2f30a288 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index a479d121617..122e5f89d35 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index e45d6d61b16..027bbe7f089 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index 07dc8efa2ef..dc9bad47133 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py index 70d6f6dc2f2..e3783255325 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py index 972c1b5738c..ec12df48b6b 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py index 5a3472b6628..6a5f96696f1 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py index b34817156d1..b4a61d86361 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index ca20c0ab25e..9e4b1f25d89 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py index 384b1dcf6e2..44a6f24a3ab 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py index d5bbe689039..4573bf666a8 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 5159cb168ee..6dbe97dc307 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py index 602a7d86f8e..a7517c498b9 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py index e35d4e19c47..a01db3ba381 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py index 1f855160f23..86fe8313ae5 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py index ec4b5b7eadb..dcb1521a2ae 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/parent_group/parent_group_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py index 06539985cda..183c89d6f04 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py index bb994a87c82..944bcf8435a 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py index baf0e98eb30..e3475070a63 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py index fdce6253a77..98f2c42837a 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py index 57a9d8f34fe..26a1ad60723 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py index e82fabb62f2..a497a4fa43f 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py index 6f5b8b3ddd0..efe4e6597e6 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/set_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py index 5135feadeac..dc432f18b4e 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py index 6cf23409652..bb5bff0eacb 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py index a63edc9cdbc..9a5c3322573 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 97583b524f0..4a5ebbe8d3b 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index f42816cb0ef..0e12b0369b6 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index be3247435f3..eb4e7944e3c 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 19aa1c11b44..1290436db29 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 37c4d8484f1..528ced4cf53 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py index de9ec3ae5e9..f6dc3285216 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py index ec18b037dd4..ef0a8827a66 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py index 82cdf2e3314..e76b399b8d5 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py index 21025cbc4ba..5bf8885dafa 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 919bae58ea7..63994e605b2 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py index 3fa2c47b7b2..677de603468 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py index 36719c0003f..c14ec3ce83a 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index a2223e85002..c9a31e34e75 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py index c9d864cc268..a48f63e93a1 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py index 4b79dcc8b56..c1fc31bce06 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py index 33bd3ba4f64..a1c11481fa9 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py index 9b8256b4b0d..b06de9aca80 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/groups/item/sets/sets_request_builder.py b/msgraph/generated/sites/item/term_store/groups/item/sets/sets_request_builder.py index 1f52ac13c8f..12ebdef3ad0 100644 --- a/msgraph/generated/sites/item/term_store/groups/item/sets/sets_request_builder.py +++ b/msgraph/generated/sites/item/term_store/groups/item/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/count/count_request_builder.py index 6484514f23a..ba2ef8e1596 100644 --- a/msgraph/generated/sites/item/term_store/sets/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/children_request_builder.py index 5f097008ae9..43adb8af699 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/count/count_request_builder.py index 31b0c2b366f..5eddd2e2620 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/children_request_builder.py index 5ce1dbeeb02..c041915c027 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py index 59a89773514..c7debc29422 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py index 4d1be1b2615..97911131d1e 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 54ba4e92e51..9b40f28c091 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 68cd0b823e6..4ebb60545be 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 24ac3d1c2a7..f0e724ef008 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index c6f3a9f34a4..e0282fdb864 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py index acd59146d2e..31bca93ad29 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py index b1d8bd72713..a99d96022c4 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py index dd06842b0fd..3f33a55da2f 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py index c0ba003b75a..66c323868c6 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index 492155afc76..05932d0e339 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py index c3258872761..5212c1f5c2e 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py index 2532793a378..e8e5c5e0fe7 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 10b78bb1510..c21bd8313c3 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py index 2ed2c749eca..dae8df2ed4c 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/set/set_request_builder.py index 159aa8c75e3..b6024dd98d6 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/children/item/term_item_request_builder.py index 20b5cc759c5..468b6727ecc 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py index 84230d947f8..36ad8e702a4 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/parent_group_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py index 91a3a5c8feb..091c8ed8dfc 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py index acab3006a68..a239e21abfa 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py index 13b322c3a8b..76c3ea11474 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py index 75f0c3f9dfd..8073a8a32e9 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py index 1653e86ca38..1b799aab7c4 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py index 0ce94842e21..ccfe80068a3 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 3f794460676..522f81df069 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 9db3baf1719..baff68cc57d 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 553c6e9d317..5f889d75f96 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index b6293c642b0..31cefdefa38 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py index cb9be63fd6a..c5dc5afd145 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py index 5d2f21d2435..d5739e89ae2 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py index 48a4d84e5b7..33514e24843 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py index ebc0356f9ea..09a1395b48f 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index c87d8a356c2..44c841244d8 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py index c36f8c60400..1615c5ebfdf 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py index 6269b125092..e0bc8f9cbaf 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index f58a922ac5d..52cdce4f5da 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py index 24f9773ce3c..a4ca0a00a8a 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py index 28f15b8bed1..3a2e051c522 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py index 6df91c25031..736dc90b045 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py index d033a8f26aa..c0698c2c2d6 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py index 4a41e989460..88209cf854d 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py index b6bc4030f7e..b96587fb4c0 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py index 59278918e41..031d8719489 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py index f798e380e50..75499484ae3 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py index e10aa78f567..314294a79d3 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py index a089e04f6fa..d98e6e83d0c 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/set_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py index e282a8c57a5..1dfe333d047 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py index e726a31220c..a7330e5c7ab 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py index 58f82aa2e76..b2c0a0fe17e 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 6d62a031772..53a29224700 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 093a92a4c01..551752ba20b 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index c45a541a2b7..7d0c811341e 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 2a6ac55cc55..080ed033c25 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 3e75cd9b4fd..2894e154162 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py index 0c135cc0a96..b88fbf15564 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py index a3672bd0695..b97514eeda6 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py index 089f17fe718..fad598e7812 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py index e4229c80461..c366bb43126 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 4e360b6bbb4..1457703299f 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py index f19dd6bbb27..046f04fa3d0 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py index 060597f6fdd..b49e2650291 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index 20c8352d463..fc796b740e9 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py index bba7582b6fe..227e0ba0730 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py index ca9311eeadd..3a4a0ac347a 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py index b6822e0e28d..06c3e334cde 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py index 1807d5e8d0a..b32c2af82c1 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py index ed7d6f6660b..73b5abd0e9a 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/parent_group/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id1(self,set_id1: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/relations/count/count_request_builder.py index b487cba6b7c..e826cfc4457 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py index 314313390c1..937289a2cbe 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py index db89002a2a5..892a6aad03e 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py index 01077a110fb..b1dd7f579be 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py index d5f25f3bf31..78a109e07a3 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/relations/relations_request_builder.py index e2f1a9d73cd..2eb79dee890 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/set_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/set_item_request_builder.py index 3d3027a3b23..5b181d47622 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/set_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/set_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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/termstore-set-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[SetItemRequestBuilderDelet async def get(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Set]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] Find more info here: https://learn.microsoft.com/graph/api/termstore-set-get?view=graph-rest-1.0 @@ -74,7 +74,7 @@ async def get(self,request_configuration: Optional[SetItemRequestBuilderGetReque async def patch(self,body: Optional[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Set]: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -99,39 +99,39 @@ async def patch(self,body: Optional[Set] = None, request_configuration: Optional def to_delete_request_information(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class SetItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SetItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/count/count_request_builder.py index 4f0211fb2be..916c7f63fa7 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py index 1571d4b8cff..df2724c3c65 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py index 06b8611fbe5..610a2589a72 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 83b2caf82bf..9973c5dcda1 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index a29350ac30d..a834cef5263 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index abf8d56287b..5395efa72e0 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 2e5ca2c2e7d..65258e08c03 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index d96cee93ab6..6581b760505 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py index 966069f2870..b9179d9408f 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py index 5fad2347cbb..8a282738a79 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py index 2e2618cb033..c304b2cd718 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py index d333efd4edd..ac516824889 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 1d1ac836cae..9562aa363bc 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py index 76a74889e10..fbec2327a77 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py index b8e10799799..d6e462ff138 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index f8bfce66f47..3264e8f20c9 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py index 2076c5f2ae1..71804878840 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py index 3c507a554da..d99e8471997 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py index 09cca88649a..df480340320 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/item/terms/terms_request_builder.py b/msgraph/generated/sites/item/term_store/sets/item/terms/terms_request_builder.py index 25c126c2eea..7e45c4ed7c9 100644 --- a/msgraph/generated/sites/item/term_store/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/sets/sets_request_builder.py b/msgraph/generated/sites/item/term_store/sets/sets_request_builder.py index 9cf4a6304e9..59f88f83ef6 100644 --- a/msgraph/generated/sites/item/term_store/sets/sets_request_builder.py +++ b/msgraph/generated/sites/item/term_store/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestC async def post(self,body: Optional[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> Optional[Set]: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_store/term_store_request_builder.py b/msgraph/generated/sites/item/term_store/term_store_request_builder.py index 25c20e6078c..665add47fdd 100644 --- a/msgraph/generated/sites/item/term_store/term_store_request_builder.py +++ b/msgraph/generated/sites/item/term_store/term_store_request_builder.py @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TermStoreRequestBuilderDel async def get(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> Optional[Store]: """ - Read the properties and relationships of a store object. + Read the properties and relationships of a store object. This API is available in the following national cloud deployments. 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 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TermStoreRequestBuilderGetReq async def patch(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> Optional[Store]: """ - Update the properties of a store object. + Update the properties of a store object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Store] @@ -101,34 +101,34 @@ def to_delete_request_information(self,request_configuration: Optional[TermStore Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a store object. + Read the properties and relationships of a store object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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. + Update the properties of a store object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Store] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class TermStoreRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class TermStoreRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a store object. + Read the properties and relationships of a store object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/count/count_request_builder.py index f3393de1a4e..19e977ed634 100644 --- a/msgraph/generated/sites/item/term_stores/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/count/count_request_builder.py index 994451b9990..544ab3e6b3d 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/groups_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/groups_request_builder.py index a8aa8f52c12..4e96afa16f0 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/groups_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/groups_request_builder.py @@ -45,7 +45,7 @@ def by_group_id(self,group_id: str) -> GroupItemRequestBuilder: async def get(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[GroupCollectionResponse]: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[GroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-list-groups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[GroupsRequestBuilderGetReques async def post(self,body: Optional[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[Group]: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Group] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[GroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new group object in a term store. + Create a new group object in a term store. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Group] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class GroupsRequestBuilderGetQueryParameters(): """ - Get a list of group objects in a term store. + Get a list of group objects in a term store. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/group_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/group_item_request_builder.py index 1284d558976..a86512a9fbe 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/group_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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/termstore-group-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[GroupItemRequestBuilderDel async def get(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Group]: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. 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/termstore-group-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Group] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[GroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a group object in a term [store]. + Delete a group object in a term store]. This API is available in the following [national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[GroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[GroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class GroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class GroupItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term store group object. + Read the properties and relationships of a term store group object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py index 79e187cdbdf..b01a28d49d7 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py index 31e85619c3d..c51e14caae4 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py index b46c3dc2d63..404bc021456 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py index b84efa98552..9e09310ba04 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py index 9e8cf977452..700e0a1295a 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py index f40181b8930..0239fc92ede 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 6fc08e6f8cc..7f8eeb210aa 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 3f58ed257e6..4cc2235b025 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 9b6d738dc9c..a7cabd4ae98 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index 86c7bb1bef4..2576f59e13c 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py index 31419ed3e61..ca7d37b27e6 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py index 00c4de7ec0d..84b7ce57ace 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py index fa550a28d93..e149bdb4968 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py index 43a682473fb..77b79577a46 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index af13762b132..efd5d8ca3ae 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py index 1f29d9d9cd4..8d7587f7c04 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py index b950985fe3b..421f949a208 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index c21f084087a..888914527dd 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py index 326166749be..660a5c5e333 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py index ceb2997a63d..92e8ac36e3b 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py index eb9a7cc909d..3efd2b06d16 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py index bcac4739d2b..d725d043566 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/parent_group/parent_group_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py index 4c34a4a61d8..5febaaf64fd 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py index 7853e1da817..daff457ce50 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py index eaa00057a59..8d2328b2cdb 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py index 27159aff097..8941f9c9932 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py index b54cd0bb070..950c526069b 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py index 1303371575e..0f6c3ced518 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py index 0158687d840..1d31f1949e8 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/set_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py index 3f8d790b6c9..28cc511c7be 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py index bb7de71f435..9b60f599b67 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py index bb828d82da0..de4389b8de9 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py index 5a9234da6e5..7a90f8bdb96 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 07cac4f5832..a5fd589a571 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index cb7d83c0942..397b05da8dd 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index 4b1d6acfa15..16b10a29b4e 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 0a4d80a6d93..705f857a524 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py index 909fe37394c..34266db7b55 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py index 5af226b8df0..621e5166f3d 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py index e1ef8ca88ee..f30c6789d21 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py index 17bcd229fa1..b3a3329448c 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index f119d9b9120..dff93891ee1 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py index 9936a76c456..e7907ee09fa 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py index b1acb0030e9..89abb94bc11 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index 639dd13b161..0104369eae2 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py index 2774eef430c..c8a4969e7f9 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py index add92c65cec..c21721c489b 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py index 5dff470937b..d3edb29b974 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py index a1eb33f06b9..53b3cca66a4 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py index 56ee856bac5..0966cb5a423 100644 --- a/msgraph/generated/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/groups/item/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/count/count_request_builder.py index 9fd68460f93..a214111702f 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/children_request_builder.py index 54af6f15aa1..59b4cc2180d 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py index 54e42ac1060..917b8790ed1 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py index 0b6a6e2c974..55423746166 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py index 0532efc45d5..6c647ab7f0f 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py index 6d4cb1b6f44..bd1d24bb1f9 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 64753e58101..f41b0d32857 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index 04a888c9c96..719e4f202a6 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 0da14304659..840e4b49549 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index bed729efe1c..220425ff16c 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py index 8e2d9273ee5..26274b32332 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py index 21564a9bc5a..8d31b86fd74 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py index 9aecf4a0791..73913b90910 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py index 6990e891a84..b71cb317a90 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index d8790b4ea6d..16525033812 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py index 9de49939958..5ab1c7886e0 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py index d8270543cda..7e9cfb2d67e 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index d93923b0de0..46776cf4963 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py index b9f0d1be50b..3f9107f9fd8 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py index 447e89e46a9..78d70e9ea98 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py index 76affbf37a0..2b820fe129f 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py index 58e4a869179..ae2d8736744 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/parent_group_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ParentGro Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ParentGroupRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentGroupR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Group] = None, request_configuration: Optional[ParentGroupRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Group] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py index ff66486e540..062930ab41d 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py index cae667fae94..425bc0c1d53 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/children_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-children?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChildrenRequestBuilderGetRequ async def post(self,body: Optional[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> Optional[Term]: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChildrenRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new term object. + Create a new term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChildrenRequestBuilderGetQueryParameters(): """ - Get the first level children of a [set] or [term] resource using the children navigation property. + Get the first level children of a set] or [term] resource using the children navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py index 1ea1de03e3a..0b7944f11e8 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py index b7d31f0974f..2fb9be62242 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py index 788e6863dbe..d5036e7f51c 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py index f09392ed30d..fa7ff788d67 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py index 06c9a2d3bfc..e4ae30d72cd 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py index aad45d67c37..11ff95cf903 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py index 93620f9f1a8..94e322d71fe 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py index 26093e349cd..e46a4c97f52 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py index c33e6404ebd..f5a4ef0a70e 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py index c7f0f9914d1..c797442b3d9 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py index 4fcae882aeb..276baf69774 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py index 03e3c53bad3..d7d88669002 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py index 6a510d916df..a9b7cbfb6ec 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py index b61d37ad5ca..78a1c550335 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py index 408f34e4471..16827178e5a 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py index 4425d333955..df205d0c2fc 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py index 254bd7fd488..81ca9c867be 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py index 17d9883adee..c6c2fa13ade 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py index 615e71e25ab..83fd9c83489 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/children/item/term_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py index 7eb2d2c3d14..162efe0bd5e 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py index 2e13369177f..bb74be0939c 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py index a45353d568f..20234798f9e 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py index a9c74ebe25b..945ecf422c3 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py index 0404716a57d..52b86e13afd 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py index 67546a5bb83..b62b5f9d065 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py index 5fad0b3e997..9b852864bb5 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/set_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[SetItemRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[SetItemReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py index dc9a1a1b5b2..7c310113a92 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py index f857f694f41..8103feed63a 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py index 556208ff670..a1e1b9494f3 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py index b1be2f4bca6..19125b7eb32 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 6dfa02e3897..f94e2e41e15 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index 4c710093f8a..4d1cab66950 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index b3f3c6b1952..e4d43e783a4 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 31f7a3273f9..6a13c12cded 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py index c21e82983ac..20242155908 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py index b39ba20d536..e92ddcbea63 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py index 9d387ed74fa..fe77ce2e513 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py index 5874aef4da0..323c9697843 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index 130ef229f6b..2b8ff5af6ed 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py index aef59c2b1bf..dd6d1f17c54 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py index 55a728750d1..73cbb371969 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index f3834aefb93..9150cc6ce27 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py index 5334c4e324b..dd72e2428df 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py index 4a0e253ff0c..c0b9c6e8120 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py index 31b1f89636c..5bbcb335920 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py index a1051b50e43..2801a064332 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py index a1a0483cf74..688de2f38b7 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/parent_group/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id1(self,set_id1: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-group-list-sets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Get a list of the set objects and their properties. + Get a list of the set objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py index a70c133b3fa..d480beccebf 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py index 04d6fda5815..b7e77b9d44c 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py index 24b91bb5fc3..302a23aed03 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py index 324a12d9fa3..b9b6d97da86 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py index d94e408b536..1b35a3a3f22 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py index 6f1584aa61a..f5c6e839789 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/relations/relations_request_builder.py @@ -45,7 +45,7 @@ def by_relation_id(self,relation_id: str) -> RelationItemRequestBuilder: async def get(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RelationCollectionResponse]: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RelationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-list-relations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Relation] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[RelationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RelationsRequestBuilderGetQueryParameters(): """ - Get the different relation of a [term] or [set] from the relations navigation property. + Get the different relation of a term] or [set] from the relations navigation property. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/set_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/set_item_request_builder.py index f38f0a2a391..50f972f9833 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/set_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/set_item_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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/termstore-set-delete?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[SetItemRequestBuilderDelet async def get(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Set]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] Find more info here: https://learn.microsoft.com/graph/api/termstore-set-get?view=graph-rest-1.0 @@ -74,7 +74,7 @@ async def get(self,request_configuration: Optional[SetItemRequestBuilderGetReque async def patch(self,body: Optional[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Set]: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -99,39 +99,39 @@ async def patch(self,body: Optional[Set] = None, request_configuration: Optional def to_delete_request_information(self,request_configuration: Optional[SetItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a set object. + Delete a set object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SetItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a set object. + Update the properties of a set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[Set] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -208,7 +208,7 @@ class SetItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class SetItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py index 465752a525b..d13a8d93bdf 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py index 03c04c080de..bb5f4a73e73 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/children_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ChildrenRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[ChildrenRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py index b0d663fef93..0a95325f802 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py index d5546e4480e..405eba783de 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py index 6aafdda0b8a..f20ad7b1531 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py index 2cfacfd8aaf..53620e75744 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py index a3610a87472..0f865d69d53 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py index 096bef1e4e3..c92a1e9a5f5 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py index b66e74b92c0..097575929ad 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py index 155116925f6..c0eef693b9b 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py index 84256d4c145..b00b40d2196 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/children/item/term_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[TermItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[TermItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py index eea90a7da99..21501529819 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py index c854062cf8d..a024f7fa592 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/from_term/from_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[FromTermRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FromTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py index bf4336e926d..c6a94752691 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/relation_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[RelationI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RelationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Relation] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py index cce57ab5fc5..b56f4d47509 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py index fabd4dfc3c6..f29d2529dd7 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/item/to_term/to_term_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ToTermReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ToTermRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py index 54ba5797bbb..fdd973d78ce 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/relations/relations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[RelationsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Relation] = None, request_configuration: Optional[RelationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Relation] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py index 91af919c07e..f86e42de881 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/set/set_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SetRequestBu Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SetRequestBuilder: diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py index 4483a16a56e..bf01a87496c 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/item/term_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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/termstore-term-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TermItemRequestBuilderDele async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Term]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] Find more info here: https://learn.microsoft.com/graph/api/termstore-term-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[TermItemRequestBuilderGetRequ async def patch(self,body: Optional[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Term]: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Term] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[Term] = None, request_configuration: Optiona def to_delete_request_information(self,request_configuration: Optional[TermItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a term object. + Delete a term object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TermItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a term object. + Update the properties of a term object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Term] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class TermItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TermItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py index e5382b37ac3..9dac7c45b8f 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/item/terms/terms_request_builder.py @@ -45,7 +45,7 @@ def by_term_id(self,term_id: str) -> TermItemRequestBuilder: async def get(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> Optional[TermCollectionResponse]: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TermCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[Term] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TermsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Term] = None, request_configuration: Optional[TermsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Term] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TermsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a term object. + Read the properties and relationships of a term object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/sets/sets_request_builder.py b/msgraph/generated/sites/item/term_stores/item/sets/sets_request_builder.py index 36d300ca58a..5284f93971f 100644 --- a/msgraph/generated/sites/item/term_stores/item/sets/sets_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/sets/sets_request_builder.py @@ -45,7 +45,7 @@ def by_set_id(self,set_id: str) -> SetItemRequestBuilder: async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> Optional[SetCollectionResponse]: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SetCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[SetsRequestBuilderGetRequestC async def post(self,body: Optional[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> Optional[Set]: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Set] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Set] = None, request_configuration: Optional[ def to_get_request_information(self,request_configuration: Optional[SetsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Set] = None, request_configuration: Optional[SetsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new set object. + Create a new set object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Set] = None, request_configu if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SetsRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a set object. + Read the properties and relationships of a set object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/sites/item/term_stores/item/store_item_request_builder.py b/msgraph/generated/sites/item/term_stores/item/store_item_request_builder.py index d116c584b92..93c4e0129f8 100644 --- a/msgraph/generated/sites/item/term_stores/item/store_item_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/item/store_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[StoreItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[StoreItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[StoreItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[StoreItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Store] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/item/term_stores/term_stores_request_builder.py b/msgraph/generated/sites/item/term_stores/term_stores_request_builder.py index 7b13b8590c1..986777e2b3f 100644 --- a/msgraph/generated/sites/item/term_stores/term_stores_request_builder.py +++ b/msgraph/generated/sites/item/term_stores/term_stores_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TermStoresRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Store] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/add/add_response.py b/msgraph/generated/sites/remove/remove_post_response.py similarity index 92% rename from msgraph/generated/sites/add/add_response.py rename to msgraph/generated/sites/remove/remove_post_response.py index f292516d025..a098a767a52 100644 --- a/msgraph/generated/sites/add/add_response.py +++ b/msgraph/generated/sites/remove/remove_post_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class RemovePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Site]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RemovePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: RemovePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return RemovePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/sites/remove/remove_request_builder.py b/msgraph/generated/sites/remove/remove_request_builder.py index 00331dd7bbf..ba4b55e312d 100644 --- a/msgraph/generated/sites/remove/remove_request_builder.py +++ b/msgraph/generated/sites/remove/remove_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .remove_post_request_body import RemovePostRequestBody - from .remove_response import RemoveResponse + from .remove_post_response import RemovePostResponse class RemoveRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/sites/remove", path_parameters) - async def post(self,body: Optional[RemovePostRequestBody] = None, request_configuration: Optional[RemoveRequestBuilderPostRequestConfiguration] = None) -> Optional[RemoveResponse]: + async def post(self,body: Optional[RemovePostRequestBody] = None, request_configuration: Optional[RemoveRequestBuilderPostRequestConfiguration] = None) -> Optional[RemovePostResponse]: """ Unfollow a user's site or multiple sites. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RemoveResponse] + Returns: Optional[RemovePostResponse] Find more info here: https://learn.microsoft.com/graph/api/site-unfollow?view=graph-rest-1.0 """ if not body: @@ -48,9 +48,9 @@ async def post(self,body: Optional[RemovePostRequestBody] = None, request_config } if not self.request_adapter: raise Exception("Http core is null") - from .remove_response import RemoveResponse + from .remove_post_response import RemovePostResponse - return await self.request_adapter.send_async(request_info, RemoveResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RemovePostResponse, error_mapping) def to_post_request_information(self,body: Optional[RemovePostRequestBody] = None, request_configuration: Optional[RemoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[RemovePostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/sites/sites_request_builder.py b/msgraph/generated/sites/sites_request_builder.py index 45bff31a55f..f1c32a23e64 100644 --- a/msgraph/generated/sites/sites_request_builder.py +++ b/msgraph/generated/sites/sites_request_builder.py @@ -47,10 +47,10 @@ def by_site_id(self,site_id: str) -> SiteItemRequestBuilder: async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: """ - List all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a [$search][] query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + Search across a SharePoint tenant for sites][] that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SiteCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/site-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/site-search?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -69,19 +69,19 @@ async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a [$search][] query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + Search across a SharePoint tenant for sites][] that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. This API is available in the following [national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -133,7 +133,7 @@ def remove(self) -> RemoveRequestBuilder: @dataclass class SitesRequestBuilderGetQueryParameters(): """ - List all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a [$search][] query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + Search across a SharePoint tenant for sites][] that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. This API is available in the following [national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/booking_businesses_request_builder.py b/msgraph/generated/solutions/booking_businesses/booking_businesses_request_builder.py index 5fbd5eb93ca..84e88dfbc91 100644 --- a/msgraph/generated/solutions/booking_businesses/booking_businesses_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/booking_businesses_request_builder.py @@ -45,7 +45,7 @@ def by_booking_business_id(self,booking_business_id: str) -> BookingBusinessItem async def get(self,request_configuration: Optional[BookingBusinessesRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingBusinessCollectionResponse]: """ - Get a collection of bookingBusiness objects that has been created for the tenant. This operation returns only the id and displayName of each Microsoft Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation. + Get a collection of bookingBusiness objects that has been created for the tenant. This operation returns only the id and displayName of each Microsoft Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingBusinessCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[BookingBusinessesRequestBuild async def post(self,body: Optional[BookingBusiness] = None, request_configuration: Optional[BookingBusinessesRequestBuilderPostRequestConfiguration] = None) -> Optional[BookingBusiness]: """ - Create a new Microsoft Bookings business in a tenant. This is the first step in setting up a Bookings business where you must specify the business display name. You can include other information such as business address, web site address, and scheduling policy, or set that information later by updating the bookingBusiness. + Create a new Microsoft Bookings business in a tenant. This is the first step in setting up a Bookings business where you must specify the business display name. You can include other information such as business address, web site address, and scheduling policy, or set that information later by updating the bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingBusiness] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BookingBusiness] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[BookingBusinessesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of bookingBusiness objects that has been created for the tenant. This operation returns only the id and displayName of each Microsoft Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation. + Get a collection of bookingBusiness objects that has been created for the tenant. This operation returns only the id and displayName of each Microsoft Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingBusiness] = None, request_configuration: Optional[BookingBusinessesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new Microsoft Bookings business in a tenant. This is the first step in setting up a Bookings business where you must specify the business display name. You can include other information such as business address, web site address, and scheduling policy, or set that information later by updating the bookingBusiness. + Create a new Microsoft Bookings business in a tenant. This is the first step in setting up a Bookings business where you must specify the business display name. You can include other information such as business address, web site address, and scheduling policy, or set that information later by updating the bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BookingBusiness] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class BookingBusinessesRequestBuilderGetQueryParameters(): """ - Get a collection of bookingBusiness objects that has been created for the tenant. This operation returns only the id and displayName of each Microsoft Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation. + Get a collection of bookingBusiness objects that has been created for the tenant. This operation returns only the id and displayName of each Microsoft Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/count/count_request_builder.py index f62b7712e22..3d37c7dc6dd 100644 --- a/msgraph/generated/solutions/booking_businesses/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/appointments/appointments_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/appointments/appointments_request_builder.py index cbbe41e6c74..7b55266e2bd 100644 --- a/msgraph/generated/solutions/booking_businesses/item/appointments/appointments_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/appointments/appointments_request_builder.py @@ -45,7 +45,7 @@ def by_booking_appointment_id(self,booking_appointment_id: str) -> BookingAppoin async def get(self,request_configuration: Optional[AppointmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingAppointmentCollectionResponse]: """ - Get a list of bookingAppointment objects for the specified bookingBusiness. + Get a list of bookingAppointment objects for the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingAppointmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-list-appointments?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AppointmentsRequestBuilderGet async def post(self,body: Optional[BookingAppointment] = None, request_configuration: Optional[AppointmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[BookingAppointment]: """ - Create a new bookingAppointment for the specified bookingBusiness. + Create a new bookingAppointment for the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingAppointment] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BookingAppointment] = None, request_configura def to_get_request_information(self,request_configuration: Optional[AppointmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of bookingAppointment objects for the specified bookingBusiness. + Get a list of bookingAppointment objects for the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingAppointment] = None, request_configuration: Optional[AppointmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new bookingAppointment for the specified bookingBusiness. + Create a new bookingAppointment for the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BookingAppointment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AppointmentsRequestBuilderGetQueryParameters(): """ - Get a list of bookingAppointment objects for the specified bookingBusiness. + Get a list of bookingAppointment objects for the specified bookingBusiness. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/appointments/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/appointments/count/count_request_builder.py index 8e4cc8dfe19..22ecf0b5de5 100644 --- a/msgraph/generated/solutions/booking_businesses/item/appointments/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/appointments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/appointments/item/booking_appointment_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/appointments/item/booking_appointment_item_request_builder.py index f953a561ede..925e6903c36 100644 --- a/msgraph/generated/solutions/booking_businesses/item/appointments/item/booking_appointment_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/appointments/item/booking_appointment_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BookingAppointmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a bookingAppointment in the specified bookingBusiness. + Delete a bookingAppointment in the specified bookingBusiness. This API is available in the following national cloud deployments. 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/bookingappointment-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[BookingAppointmentItemRequ async def get(self,request_configuration: Optional[BookingAppointmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingAppointment]: """ - Get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The startDateTime and endDateTime properties are always returned in UTC. + Get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The startDateTime and endDateTime properties are always returned in UTC. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingAppointment] Find more info here: https://learn.microsoft.com/graph/api/bookingappointment-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[BookingAppointmentItemRequest async def patch(self,body: Optional[BookingAppointment] = None, request_configuration: Optional[BookingAppointmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BookingAppointment]: """ - Update the properties of a bookingAppointment object in the specified bookingBusiness. + Update the properties of a bookingAppointment object in the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingAppointment] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[BookingAppointment] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[BookingAppointmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a bookingAppointment in the specified bookingBusiness. + Delete a bookingAppointment in the specified bookingBusiness. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingAppointmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The startDateTime and endDateTime properties are always returned in UTC. + Get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The startDateTime and endDateTime properties are always returned in UTC. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingAppointment] = None, request_configuration: Optional[BookingAppointmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a bookingAppointment object in the specified bookingBusiness. + Update the properties of a bookingAppointment object in the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[BookingAppointment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class BookingAppointmentItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class BookingAppointmentItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The startDateTime and endDateTime properties are always returned in UTC. + Get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The startDateTime and endDateTime properties are always returned in UTC. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/appointments/item/cancel/cancel_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/appointments/item/cancel/cancel_request_builder.py index c40a25c3757..9d52dc7206c 100644 --- a/msgraph/generated/solutions/booking_businesses/item/appointments/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/appointments/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. + Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. + Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/solutions/booking_businesses/item/booking_business_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/booking_business_item_request_builder.py index 128cd2824f1..7dd6f64072f 100644 --- a/msgraph/generated/solutions/booking_businesses/item/booking_business_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/booking_business_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BookingBusinessItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a bookingBusiness object. + Delete a bookingBusiness object. This API is available in the following national cloud deployments. 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/bookingbusiness-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[BookingBusinessItemRequest async def get(self,request_configuration: Optional[BookingBusinessItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingBusiness]: """ - Get the properties and relationships of a bookingBusiness object. + Get the properties and relationships of a bookingBusiness object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingBusiness] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-get?view=graph-rest-1.0 @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[BookingBusinessItemRequestBui async def patch(self,body: Optional[BookingBusiness] = None, request_configuration: Optional[BookingBusinessItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BookingBusiness]: """ - Update the properties of a bookingBusiness object. + Update the properties of a bookingBusiness object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingBusiness] @@ -104,39 +104,39 @@ async def patch(self,body: Optional[BookingBusiness] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[BookingBusinessItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a bookingBusiness object. + Delete a bookingBusiness object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingBusinessItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a bookingBusiness object. + Get the properties and relationships of a bookingBusiness object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingBusiness] = None, request_configuration: Optional[BookingBusinessItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a bookingBusiness object. + Update the properties of a bookingBusiness object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[BookingBusiness] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -183,22 +183,22 @@ def calendar_view(self) -> CalendarViewRequestBuilder: return CalendarViewRequestBuilder(self.request_adapter, self.path_parameters) @property - def customers(self) -> CustomersRequestBuilder: + def custom_questions(self) -> CustomQuestionsRequestBuilder: """ - Provides operations to manage the customers property of the microsoft.graph.bookingBusiness entity. + Provides operations to manage the customQuestions property of the microsoft.graph.bookingBusiness entity. """ - from .customers.customers_request_builder import CustomersRequestBuilder + from .custom_questions.custom_questions_request_builder import CustomQuestionsRequestBuilder - return CustomersRequestBuilder(self.request_adapter, self.path_parameters) + return CustomQuestionsRequestBuilder(self.request_adapter, self.path_parameters) @property - def custom_questions(self) -> CustomQuestionsRequestBuilder: + def customers(self) -> CustomersRequestBuilder: """ - Provides operations to manage the customQuestions property of the microsoft.graph.bookingBusiness entity. + Provides operations to manage the customers property of the microsoft.graph.bookingBusiness entity. """ - from .custom_questions.custom_questions_request_builder import CustomQuestionsRequestBuilder + from .customers.customers_request_builder import CustomersRequestBuilder - return CustomQuestionsRequestBuilder(self.request_adapter, self.path_parameters) + return CustomersRequestBuilder(self.request_adapter, self.path_parameters) @property def get_staff_availability(self) -> GetStaffAvailabilityRequestBuilder: @@ -258,7 +258,7 @@ class BookingBusinessItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class BookingBusinessItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a bookingBusiness object. + Get the properties and relationships of a bookingBusiness object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/calendar_view/calendar_view_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/calendar_view/calendar_view_request_builder.py index 183d4e90b21..8bdefd0b279 100644 --- a/msgraph/generated/solutions/booking_businesses/item/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/calendar_view/calendar_view_request_builder.py @@ -96,14 +96,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingAppointment] = None, request_configuration: Optional[CalendarViewRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[BookingAppointment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/solutions/booking_businesses/item/calendar_view/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/calendar_view/count/count_request_builder.py index f6de8567c11..a50ca5262bb 100644 --- a/msgraph/generated/solutions/booking_businesses/item/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/booking_appointment_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/booking_appointment_item_request_builder.py index 559db5b55fd..65bb0380f81 100644 --- a/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/booking_appointment_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/booking_appointment_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[BookingAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingAppointmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[BookingAppoi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingAppointment] = None, request_configuration: Optional[BookingAppointmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[BookingAppointment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/cancel/cancel_request_builder.py index 4c6237f0b78..8b4ddd21092 100644 --- a/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. + Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. + Cancel the specified bookingAppointment in the specified bookingBusiness and send a message to the involved customer and staff members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/solutions/booking_businesses/item/custom_questions/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/custom_questions/count/count_request_builder.py index 78357e71ae7..468a06d7e20 100644 --- a/msgraph/generated/solutions/booking_businesses/item/custom_questions/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/custom_questions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/custom_questions/custom_questions_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/custom_questions/custom_questions_request_builder.py index b5184873179..361d81d2f1c 100644 --- a/msgraph/generated/solutions/booking_businesses/item/custom_questions/custom_questions_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/custom_questions/custom_questions_request_builder.py @@ -45,7 +45,7 @@ def by_booking_custom_question_id(self,booking_custom_question_id: str) -> Booki async def get(self,request_configuration: Optional[CustomQuestionsRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingCustomQuestionCollectionResponse]: """ - Get the bookingCustomQuestion resources associated with a bookingBusiness. + Get the bookingCustomQuestion resources associated with a bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomQuestionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-list-customquestions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CustomQuestionsRequestBuilder async def post(self,body: Optional[BookingCustomQuestion] = None, request_configuration: Optional[CustomQuestionsRequestBuilderPostRequestConfiguration] = None) -> Optional[BookingCustomQuestion]: """ - Create a new bookingCustomQuestion object. + Create a new bookingCustomQuestion object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomQuestion] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BookingCustomQuestion] = None, request_config def to_get_request_information(self,request_configuration: Optional[CustomQuestionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the bookingCustomQuestion resources associated with a bookingBusiness. + Get the bookingCustomQuestion resources associated with a bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingCustomQuestion] = None, request_configuration: Optional[CustomQuestionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new bookingCustomQuestion object. + Create a new bookingCustomQuestion object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BookingCustomQuestion] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustomQuestionsRequestBuilderGetQueryParameters(): """ - Get the bookingCustomQuestion resources associated with a bookingBusiness. + Get the bookingCustomQuestion resources associated with a bookingBusiness. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/custom_questions/item/booking_custom_question_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/custom_questions/item/booking_custom_question_item_request_builder.py index 2cd0babee8e..f0eddeb95bc 100644 --- a/msgraph/generated/solutions/booking_businesses/item/custom_questions/item/booking_custom_question_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/custom_questions/item/booking_custom_question_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a bookingCustomQuestion object. + Delete a bookingCustomQuestion object. This API is available in the following national cloud deployments. 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/bookingcustomquestion-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[BookingCustomQuestionItemR async def get(self,request_configuration: Optional[BookingCustomQuestionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingCustomQuestion]: """ - Read the properties and relationships of a bookingCustomQuestion object. + Read the properties and relationships of a bookingCustomQuestion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomQuestion] Find more info here: https://learn.microsoft.com/graph/api/bookingcustomquestion-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[BookingCustomQuestionItemRequ async def patch(self,body: Optional[BookingCustomQuestion] = None, request_configuration: Optional[BookingCustomQuestionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BookingCustomQuestion]: """ - Update the properties of a bookingCustomQuestion object. + Update the properties of a bookingCustomQuestion object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomQuestion] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[BookingCustomQuestion] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[BookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a bookingCustomQuestion object. + Delete a bookingCustomQuestion object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingCustomQuestionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a bookingCustomQuestion object. + Read the properties and relationships of a bookingCustomQuestion object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingCustomQuestion] = None, request_configuration: Optional[BookingCustomQuestionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a bookingCustomQuestion object. + Update the properties of a bookingCustomQuestion object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[BookingCustomQuestion] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class BookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class BookingCustomQuestionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a bookingCustomQuestion object. + Read the properties and relationships of a bookingCustomQuestion object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/customers/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/customers/count/count_request_builder.py index c0d27e5b886..aa008404589 100644 --- a/msgraph/generated/solutions/booking_businesses/item/customers/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/customers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/customers/customers_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/customers/customers_request_builder.py index 06497b8cec6..58b44da7cfa 100644 --- a/msgraph/generated/solutions/booking_businesses/item/customers/customers_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/customers/customers_request_builder.py @@ -45,7 +45,7 @@ def by_booking_customer_base_id(self,booking_customer_base_id: str) -> BookingCu async def get(self,request_configuration: Optional[CustomersRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingCustomerBaseCollectionResponse]: """ - Get a list of bookingCustomer objects of a business. + Get a list of bookingCustomer objects of a business. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomerBaseCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-list-customers?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CustomersRequestBuilderGetReq async def post(self,body: Optional[BookingCustomerBase] = None, request_configuration: Optional[CustomersRequestBuilderPostRequestConfiguration] = None) -> Optional[BookingCustomerBase]: """ - Create a new bookingCustomer object. + Create a new bookingCustomer object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomerBase] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BookingCustomerBase] = None, request_configur def to_get_request_information(self,request_configuration: Optional[CustomersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of bookingCustomer objects of a business. + Get a list of bookingCustomer objects of a business. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingCustomerBase] = None, request_configuration: Optional[CustomersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new bookingCustomer object. + Create a new bookingCustomer object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BookingCustomerBase] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CustomersRequestBuilderGetQueryParameters(): """ - Get a list of bookingCustomer objects of a business. + Get a list of bookingCustomer objects of a business. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/customers/item/booking_customer_base_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/customers/item/booking_customer_base_item_request_builder.py index 911c307d3aa..c9d9ab3cb79 100644 --- a/msgraph/generated/solutions/booking_businesses/item/customers/item/booking_customer_base_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/customers/item/booking_customer_base_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BookingCustomerBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the specified bookingCustomer object. + Delete the specified bookingCustomer object. This API is available in the following national cloud deployments. 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/bookingcustomer-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[BookingCustomerBaseItemReq async def get(self,request_configuration: Optional[BookingCustomerBaseItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingCustomerBase]: """ - Get the properties and relationships of a bookingCustomer object. + Get the properties and relationships of a bookingCustomer object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomerBase] Find more info here: https://learn.microsoft.com/graph/api/bookingcustomer-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[BookingCustomerBaseItemReques async def patch(self,body: Optional[BookingCustomerBase] = None, request_configuration: Optional[BookingCustomerBaseItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BookingCustomerBase]: """ - Update the properties of a bookingCustomer object. + Update the properties of a bookingCustomer object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCustomerBase] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[BookingCustomerBase] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[BookingCustomerBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the specified bookingCustomer object. + Delete the specified bookingCustomer object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingCustomerBaseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a bookingCustomer object. + Get the properties and relationships of a bookingCustomer object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingCustomerBase] = None, request_configuration: Optional[BookingCustomerBaseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a bookingCustomer object. + Update the properties of a bookingCustomer object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[BookingCustomerBase] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class BookingCustomerBaseItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class BookingCustomerBaseItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a bookingCustomer object. + Get the properties and relationships of a bookingCustomer object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_response.py b/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_post_response.py similarity index 91% rename from msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_response.py rename to msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_post_response.py index c0edad20234..ef9099a0297 100644 --- a/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_response.py +++ b/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetStaffAvailabilityResponse(BaseCollectionPaginationCountResponse): +class GetStaffAvailabilityPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[StaffAvailabilityItem]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetStaffAvailabilityResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetStaffAvailabilityPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetStaffAvailabilityResponse + Returns: GetStaffAvailabilityPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetStaffAvailabilityResponse() + return GetStaffAvailabilityPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_request_builder.py index b7697b430fe..9348d235382 100644 --- a/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/get_staff_availability/get_staff_availability_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .get_staff_availability_post_request_body import GetStaffAvailabilityPostRequestBody - from .get_staff_availability_response import GetStaffAvailabilityResponse + from .get_staff_availability_post_response import GetStaffAvailabilityPostResponse class GetStaffAvailabilityRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/getStaffAvailability", path_parameters) - async def post(self,body: Optional[GetStaffAvailabilityPostRequestBody] = None, request_configuration: Optional[GetStaffAvailabilityRequestBuilderPostRequestConfiguration] = None) -> Optional[GetStaffAvailabilityResponse]: + async def post(self,body: Optional[GetStaffAvailabilityPostRequestBody] = None, request_configuration: Optional[GetStaffAvailabilityRequestBuilderPostRequestConfiguration] = None) -> Optional[GetStaffAvailabilityPostResponse]: """ - Get the availability information of staff members of a Microsoft Bookings calendar. + Get the availability information of staff members of a Microsoft Bookings calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetStaffAvailabilityResponse] + Returns: Optional[GetStaffAvailabilityPostResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-getstaffavailability?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetStaffAvailabilityPostRequestBody] = None, } if not self.request_adapter: raise Exception("Http core is null") - from .get_staff_availability_response import GetStaffAvailabilityResponse + from .get_staff_availability_post_response import GetStaffAvailabilityPostResponse - return await self.request_adapter.send_async(request_info, GetStaffAvailabilityResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetStaffAvailabilityPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetStaffAvailabilityPostRequestBody] = None, request_configuration: Optional[GetStaffAvailabilityRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the availability information of staff members of a Microsoft Bookings calendar. + Get the availability information of staff members of a Microsoft Bookings calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetStaffAvailabilityPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/solutions/booking_businesses/item/publish/publish_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/publish/publish_request_builder.py index a0c6b9d7402..456d5b30583 100644 --- a/msgraph/generated/solutions/booking_businesses/item/publish/publish_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/publish/publish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Make the scheduling page of a business available to external customers. Set the isPublished property to true, and the publicUrl property to the URL of the scheduling page. + Make the scheduling page of a business available to external customers. Set the isPublished property to true, and the publicUrl property to the URL of the scheduling page. This API is available in the following national cloud deployments. 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/bookingbusiness-publish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[PublishRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[PublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Make the scheduling page of a business available to external customers. Set the isPublished property to true, and the publicUrl property to the URL of the scheduling page. + Make the scheduling page of a business available to external customers. Set the isPublished property to true, and the publicUrl property to the URL of the scheduling page. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> PublishRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/services/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/services/count/count_request_builder.py index 3dd9b9657e3..d46dec22926 100644 --- a/msgraph/generated/solutions/booking_businesses/item/services/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/services/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/services/item/booking_service_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/services/item/booking_service_item_request_builder.py index 39aa543a869..a336972abcc 100644 --- a/msgraph/generated/solutions/booking_businesses/item/services/item/booking_service_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/services/item/booking_service_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BookingServiceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a bookingService object in the specified bookingBusiness. + Delete a bookingService object in the specified bookingBusiness. This API is available in the following national cloud deployments. 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/bookingservice-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[BookingServiceItemRequestB async def get(self,request_configuration: Optional[BookingServiceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingService]: """ - Get the properties and relationships of a bookingService object in the specified bookingBusiness. + Get the properties and relationships of a bookingService object in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingService] Find more info here: https://learn.microsoft.com/graph/api/bookingservice-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[BookingServiceItemRequestBuil async def patch(self,body: Optional[BookingService] = None, request_configuration: Optional[BookingServiceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BookingService]: """ - Update the properties of a bookingService object in the specified bookingBusiness. The following are some examples you can customize for a service:- Price- Typical length of an appointment- Reminders- Any time buffer to set up before or finish up after the service- Scheduling policy parameters, such as minimum notice to book or cancel, and whether customers can select specific staff members for an appointment. + Update the properties of a bookingService object in the specified bookingBusiness. The following are some examples you can customize for a service:- Price- Typical length of an appointment- Reminders- Any time buffer to set up before or finish up after the service- Scheduling policy parameters, such as minimum notice to book or cancel, and whether customers can select specific staff members for an appointment. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingService] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[BookingService] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[BookingServiceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a bookingService object in the specified bookingBusiness. + Delete a bookingService object in the specified bookingBusiness. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingServiceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a bookingService object in the specified bookingBusiness. + Get the properties and relationships of a bookingService object in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingService] = None, request_configuration: Optional[BookingServiceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a bookingService object in the specified bookingBusiness. The following are some examples you can customize for a service:- Price- Typical length of an appointment- Reminders- Any time buffer to set up before or finish up after the service- Scheduling policy parameters, such as minimum notice to book or cancel, and whether customers can select specific staff members for an appointment. + Update the properties of a bookingService object in the specified bookingBusiness. The following are some examples you can customize for a service:- Price- Typical length of an appointment- Reminders- Any time buffer to set up before or finish up after the service- Scheduling policy parameters, such as minimum notice to book or cancel, and whether customers can select specific staff members for an appointment. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[BookingService] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class BookingServiceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class BookingServiceItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a bookingService object in the specified bookingBusiness. + Get the properties and relationships of a bookingService object in the specified bookingBusiness. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/services/services_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/services/services_request_builder.py index c3c0cce8b1d..fde790501af 100644 --- a/msgraph/generated/solutions/booking_businesses/item/services/services_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/services/services_request_builder.py @@ -45,7 +45,7 @@ def by_booking_service_id(self,booking_service_id: str) -> BookingServiceItemReq async def get(self,request_configuration: Optional[ServicesRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingServiceCollectionResponse]: """ - Get a list of bookingService objects in the specified bookingBusiness. + Get a list of bookingService objects in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingServiceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-list-services?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ServicesRequestBuilderGetRequ async def post(self,body: Optional[BookingService] = None, request_configuration: Optional[ServicesRequestBuilderPostRequestConfiguration] = None) -> Optional[BookingService]: """ - Create a new bookingService for the specified bookingBusiness. + Create a new bookingService for the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingService] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BookingService] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[ServicesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of bookingService objects in the specified bookingBusiness. + Get a list of bookingService objects in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingService] = None, request_configuration: Optional[ServicesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new bookingService for the specified bookingBusiness. + Create a new bookingService for the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BookingService] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ServicesRequestBuilderGetQueryParameters(): """ - Get a list of bookingService objects in the specified bookingBusiness. + Get a list of bookingService objects in the specified bookingBusiness. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/staff_members/count/count_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/staff_members/count/count_request_builder.py index 3cfe13de0b0..8ed1e2c567d 100644 --- a/msgraph/generated/solutions/booking_businesses/item/staff_members/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/staff_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_businesses/item/staff_members/item/booking_staff_member_base_item_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/staff_members/item/booking_staff_member_base_item_request_builder.py index b09735cf858..6565432dfcb 100644 --- a/msgraph/generated/solutions/booking_businesses/item/staff_members/item/booking_staff_member_base_item_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/staff_members/item/booking_staff_member_base_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[BookingStaffMemberBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a bookingStaffMember in the specified bookingBusiness. + Delete a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. 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/bookingstaffmember-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[BookingStaffMemberBaseItem async def get(self,request_configuration: Optional[BookingStaffMemberBaseItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingStaffMemberBase]: """ - Get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. + Get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingStaffMemberBase] Find more info here: https://learn.microsoft.com/graph/api/bookingstaffmember-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[BookingStaffMemberBaseItemReq async def patch(self,body: Optional[BookingStaffMemberBase] = None, request_configuration: Optional[BookingStaffMemberBaseItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[BookingStaffMemberBase]: """ - Update the properties of a bookingStaffMember in the specified bookingBusiness. + Update the properties of a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingStaffMemberBase] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[BookingStaffMemberBase] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[BookingStaffMemberBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a bookingStaffMember in the specified bookingBusiness. + Delete a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingStaffMemberBaseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. + Get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingStaffMemberBase] = None, request_configuration: Optional[BookingStaffMemberBaseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a bookingStaffMember in the specified bookingBusiness. + Update the properties of a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[BookingStaffMemberBase] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class BookingStaffMemberBaseItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class BookingStaffMemberBaseItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. + Get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/staff_members/staff_members_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/staff_members/staff_members_request_builder.py index 33c3238927b..1d1c8eccf9d 100644 --- a/msgraph/generated/solutions/booking_businesses/item/staff_members/staff_members_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/staff_members/staff_members_request_builder.py @@ -45,7 +45,7 @@ def by_booking_staff_member_base_id(self,booking_staff_member_base_id: str) -> B async def get(self,request_configuration: Optional[StaffMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingStaffMemberBaseCollectionResponse]: """ - Get a list of bookingStaffMember objects in the specified bookingBusiness. + Get a list of bookingStaffMember objects in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingStaffMemberBaseCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingbusiness-list-staffmembers?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[StaffMembersRequestBuilderGet async def post(self,body: Optional[BookingStaffMemberBase] = None, request_configuration: Optional[StaffMembersRequestBuilderPostRequestConfiguration] = None) -> Optional[BookingStaffMemberBase]: """ - Create a new bookingStaffMember in the specified bookingBusiness. + Create a new bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingStaffMemberBase] @@ -92,24 +92,24 @@ async def post(self,body: Optional[BookingStaffMemberBase] = None, request_confi def to_get_request_information(self,request_configuration: Optional[StaffMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of bookingStaffMember objects in the specified bookingBusiness. + Get a list of bookingStaffMember objects in the specified bookingBusiness. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingStaffMemberBase] = None, request_configuration: Optional[StaffMembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new bookingStaffMember in the specified bookingBusiness. + Create a new bookingStaffMember in the specified bookingBusiness. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[BookingStaffMemberBase] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class StaffMembersRequestBuilderGetQueryParameters(): """ - Get a list of bookingStaffMember objects in the specified bookingBusiness. + Get a list of bookingStaffMember objects in the specified bookingBusiness. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_businesses/item/unpublish/unpublish_request_builder.py b/msgraph/generated/solutions/booking_businesses/item/unpublish/unpublish_request_builder.py index 94e62abd0df..c61a6ea6b06 100644 --- a/msgraph/generated/solutions/booking_businesses/item/unpublish/unpublish_request_builder.py +++ b/msgraph/generated/solutions/booking_businesses/item/unpublish/unpublish_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> None: """ - Make the scheduling page of this business not available to external customers. Set the isPublished property to false, and the publicUrl property to null. + Make the scheduling page of this business not available to external customers. Set the isPublished property to false, and the publicUrl property to null. This API is available in the following national cloud deployments. 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/bookingbusiness-unpublish?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnpublishRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnpublishRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Make the scheduling page of this business not available to external customers. Set the isPublished property to false, and the publicUrl property to null. + Make the scheduling page of this business not available to external customers. Set the isPublished property to false, and the publicUrl property to null. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnpublishRequestBuilder: diff --git a/msgraph/generated/solutions/booking_currencies/booking_currencies_request_builder.py b/msgraph/generated/solutions/booking_currencies/booking_currencies_request_builder.py index d11f8f197f2..4bb75160692 100644 --- a/msgraph/generated/solutions/booking_currencies/booking_currencies_request_builder.py +++ b/msgraph/generated/solutions/booking_currencies/booking_currencies_request_builder.py @@ -45,7 +45,7 @@ def by_booking_currency_id(self,booking_currency_id: str) -> BookingCurrencyItem async def get(self,request_configuration: Optional[BookingCurrenciesRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingCurrencyCollectionResponse]: """ - Get a list of bookingCurrency objects available to a Microsoft Bookings business. + Get a list of bookingCurrency objects available to a Microsoft Bookings business. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCurrencyCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/bookingcurrency-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[BookingCurrency] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[BookingCurrenciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of bookingCurrency objects available to a Microsoft Bookings business. + Get a list of bookingCurrency objects available to a Microsoft Bookings business. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingCurrency] = None, request_configuration: Optional[BookingCurrenciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[BookingCurrency] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class BookingCurrenciesRequestBuilderGetQueryParameters(): """ - Get a list of bookingCurrency objects available to a Microsoft Bookings business. + Get a list of bookingCurrency objects available to a Microsoft Bookings business. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/booking_currencies/count/count_request_builder.py b/msgraph/generated/solutions/booking_currencies/count/count_request_builder.py index 6f90a43311a..29b1937caf8 100644 --- a/msgraph/generated/solutions/booking_currencies/count/count_request_builder.py +++ b/msgraph/generated/solutions/booking_currencies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/solutions/booking_currencies/item/booking_currency_item_request_builder.py b/msgraph/generated/solutions/booking_currencies/item/booking_currency_item_request_builder.py index 410d1537e2b..15ab3879f0f 100644 --- a/msgraph/generated/solutions/booking_currencies/item/booking_currency_item_request_builder.py +++ b/msgraph/generated/solutions/booking_currencies/item/booking_currency_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BookingCurrencyItemRequest async def get(self,request_configuration: Optional[BookingCurrencyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[BookingCurrency]: """ - Get the properties of a bookingCurrency object that is available to a Microsoft Bookings business. Use the id property, which is the currency code, to specify the currency. + Get the properties of a bookingCurrency object that is available to a Microsoft Bookings business. Use the id property, which is the currency code, to specify the currency. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[BookingCurrency] Find more info here: https://learn.microsoft.com/graph/api/bookingcurrency-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[BookingCu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BookingCurrencyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties of a bookingCurrency object that is available to a Microsoft Bookings business. Use the id property, which is the currency code, to specify the currency. + Get the properties of a bookingCurrency object that is available to a Microsoft Bookings business. Use the id property, which is the currency code, to specify the currency. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[BookingCurrency] = None, request_configuration: Optional[BookingCurrencyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[BookingCurrency] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class BookingCurrencyItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class BookingCurrencyItemRequestBuilderGetQueryParameters(): """ - Get the properties of a bookingCurrency object that is available to a Microsoft Bookings business. Use the id property, which is the currency code, to specify the currency. + Get the properties of a bookingCurrency object that is available to a Microsoft Bookings business. Use the id property, which is the currency code, to specify the currency. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/solutions/solutions_request_builder.py b/msgraph/generated/solutions/solutions_request_builder.py index 8a74863c12f..aa6e22bca3d 100644 --- a/msgraph/generated/solutions/solutions_request_builder.py +++ b/msgraph/generated/solutions/solutions_request_builder.py @@ -80,14 +80,14 @@ def to_get_request_information(self,request_configuration: Optional[SolutionsReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SolutionsRoot] = None, request_configuration: Optional[SolutionsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[SolutionsRoot] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/subscribed_skus/item/subscribed_sku_item_request_builder.py b/msgraph/generated/subscribed_skus/item/subscribed_sku_item_request_builder.py index fa90a4827e1..f71de454e26 100644 --- a/msgraph/generated/subscribed_skus/item/subscribed_sku_item_request_builder.py +++ b/msgraph/generated/subscribed_skus/item/subscribed_sku_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SubscribedSkuItemRequestBu async def get(self,request_configuration: Optional[SubscribedSkuItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SubscribedSku]: """ - Get a specific commercial subscription that an organization has acquired. + Get a specific commercial subscription that an organization has acquired. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubscribedSku] Find more info here: https://learn.microsoft.com/graph/api/subscribedsku-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Subscribe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscribedSkuItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a specific commercial subscription that an organization has acquired. + Get a specific commercial subscription that an organization has acquired. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SubscribedSku] = None, request_configuration: Optional[SubscribedSkuItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SubscribedSku] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class SubscribedSkuItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class SubscribedSkuItemRequestBuilderGetQueryParameters(): """ - Get a specific commercial subscription that an organization has acquired. + Get a specific commercial subscription that an organization has acquired. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/subscribed_skus/subscribed_skus_request_builder.py b/msgraph/generated/subscribed_skus/subscribed_skus_request_builder.py index 8e76da249b2..edf918a8d25 100644 --- a/msgraph/generated/subscribed_skus/subscribed_skus_request_builder.py +++ b/msgraph/generated/subscribed_skus/subscribed_skus_request_builder.py @@ -44,7 +44,7 @@ def by_subscribed_sku_id(self,subscribed_sku_id: str) -> SubscribedSkuItemReques async def get(self,request_configuration: Optional[SubscribedSkusRequestBuilderGetRequestConfiguration] = None) -> Optional[SubscribedSkuCollectionResponse]: """ - Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Azure portal or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. + Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Microsoft Entra admin center or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubscribedSkuCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/subscribedsku-list?view=graph-rest-1.0 @@ -90,19 +90,19 @@ async def post(self,body: Optional[SubscribedSku] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SubscribedSkusRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Azure portal or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. + Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Microsoft Entra admin center or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SubscribedSku] = None, request_configuration: Optional[SubscribedSkusRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[SubscribedSku] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -138,7 +138,7 @@ def with_url(self,raw_url: Optional[str] = None) -> SubscribedSkusRequestBuilder @dataclass class SubscribedSkusRequestBuilderGetQueryParameters(): """ - Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Azure portal or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. + Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Microsoft Entra admin center or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/subscriptions/item/reauthorize/reauthorize_request_builder.py index 904aa12fb33..2b0c5f4c769 100644 --- a/msgraph/generated/subscriptions/item/reauthorize/reauthorize_request_builder.py +++ b/msgraph/generated/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ReauthorizeRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[ReauthorizeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reauthorize a subscription when you receive a reauthorizationRequired challenge. + Reauthorize a subscription when you receive a reauthorizationRequired challenge. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ReauthorizeRequestBuilder: diff --git a/msgraph/generated/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/subscriptions/item/subscription_item_request_builder.py index 8691fa476f3..d0f44f342e4 100644 --- a/msgraph/generated/subscriptions/item/subscription_item_request_builder.py +++ b/msgraph/generated/subscriptions/item/subscription_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SubscriptionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a subscription. For the list of resources that support subscribing to change notifications, see the table in the Permissions section. + Delete a subscription. For the list of resources that support subscribing to change notifications, see the table in the Permissions section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None Find more info here: https://learn.microsoft.com/graph/api/subscription-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[SubscriptionItemRequestBui async def get(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Subscription]: """ - Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications. + Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Subscription] Find more info here: https://learn.microsoft.com/graph/api/subscription-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[SubscriptionItemRequestBuilde async def patch(self,body: Optional[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Subscription]: """ - Renew a subscription by extending its expiry time. The table in the Permissions section lists the resources that support subscribing to change notifications. Subscriptions expire after a length of time that varies by resource type. In order to avoid missing change notifications, an app should renew its subscriptions well in advance of their expiry date. See subscription for maximum length of a subscription for each resource type. + Renew a subscription by extending its expiry time. The table in the Permissions section lists the resources that support subscribing to change notifications. Subscriptions expire after a length of time that varies by resource type. In order to avoid missing change notifications, an app should renew its subscriptions well in advance of their expiry date. See subscription for maximum length of a subscription for each resource type. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Subscription] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[Subscription] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a subscription. For the list of resources that support subscribing to change notifications, see the table in the Permissions section. + Delete a subscription. For the list of resources that support subscribing to change notifications, see the table in the Permissions section. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SubscriptionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications. + Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Renew a subscription by extending its expiry time. The table in the Permissions section lists the resources that support subscribing to change notifications. Subscriptions expire after a length of time that varies by resource type. In order to avoid missing change notifications, an app should renew its subscriptions well in advance of their expiry date. See subscription for maximum length of a subscription for each resource type. + Renew a subscription by extending its expiry time. The table in the Permissions section lists the resources that support subscribing to change notifications. Subscriptions expire after a length of time that varies by resource type. In order to avoid missing change notifications, an app should renew its subscriptions well in advance of their expiry date. See subscription for maximum length of a subscription for each resource type. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Subscription] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class SubscriptionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class SubscriptionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications. + Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/subscriptions/subscriptions_request_builder.py b/msgraph/generated/subscriptions/subscriptions_request_builder.py index 3d2d57ea482..814f68f14b2 100644 --- a/msgraph/generated/subscriptions/subscriptions_request_builder.py +++ b/msgraph/generated/subscriptions/subscriptions_request_builder.py @@ -44,7 +44,7 @@ def by_subscription_id(self,subscription_id: str) -> SubscriptionItemRequestBuil async def get(self,request_configuration: Optional[SubscriptionsRequestBuilderGetRequestConfiguration] = None) -> Optional[SubscriptionCollectionResponse]: """ - Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. + Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SubscriptionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/subscription-list?view=graph-rest-1.0 @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[SubscriptionsRequestBuilderGe async def post(self,body: Optional[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Subscription]: """ - Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources. + Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Subscription] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Subscription] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SubscriptionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. + Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Subscription] = None, request_configuration: Optional[SubscriptionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources. + Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Subscription] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -139,7 +139,7 @@ def with_url(self,raw_url: Optional[str] = None) -> SubscriptionsRequestBuilder: @dataclass class SubscriptionsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. + Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/count/count_request_builder.py b/msgraph/generated/teams/count/count_request_builder.py index 0e8cfc3d0e2..49b102ea3f5 100644 --- a/msgraph/generated/teams/count/count_request_builder.py +++ b/msgraph/generated/teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/get_all_messages/get_all_messages_response.py b/msgraph/generated/teams/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/chats/get_all_messages/get_all_messages_response.py rename to msgraph/generated/teams/get_all_messages/get_all_messages_get_response.py index 8a0681d97d1..2d914ec2570 100644 --- a/msgraph/generated/chats/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/teams/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/teams/get_all_messages/get_all_messages_request_builder.py index c0acfa6dfc4..4c9b0fcbbc2 100644 --- a/msgraph/generated/teams/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/teams/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/teams/item/all_channels/all_channels_request_builder.py b/msgraph/generated/teams/item/all_channels/all_channels_request_builder.py index 1dabf9bbac8..188897f3756 100644 --- a/msgraph/generated/teams/item/all_channels/all_channels_request_builder.py +++ b/msgraph/generated/teams/item/all_channels/all_channels_request_builder.py @@ -44,7 +44,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[AllChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-allchannels?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllChannelsRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[AllChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllChannelsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllChannelsRequestBuilderGetQueryParameters(): """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/all_channels/count/count_request_builder.py b/msgraph/generated/teams/item/all_channels/count/count_request_builder.py index 3273ff261e2..40f3a7083fb 100644 --- a/msgraph/generated/teams/item/all_channels/count/count_request_builder.py +++ b/msgraph/generated/teams/item/all_channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/all_channels/item/channel_item_request_builder.py b/msgraph/generated/teams/item/all_channels/item/channel_item_request_builder.py index 676735326a2..f2043a320db 100644 --- a/msgraph/generated/teams/item/all_channels/item/channel_item_request_builder.py +++ b/msgraph/generated/teams/item/all_channels/item/channel_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChannelItemRequestBuilder: diff --git a/msgraph/generated/teams/item/archive/archive_request_builder.py b/msgraph/generated/teams/item/archive/archive_request_builder.py index e7afb467f77..b9d43b40814 100644 --- a/msgraph/generated/teams/item/archive/archive_request_builder.py +++ b/msgraph/generated/teams/item/archive/archive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. + Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. This API is available in the following national cloud deployments. 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[ArchivePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. + Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/channels/channels_request_builder.py b/msgraph/generated/teams/item/channels/channels_request_builder.py index 54d1d2d82c4..61c5735331a 100644 --- a/msgraph/generated/teams/item/channels/channels_request_builder.py +++ b/msgraph/generated/teams/item/channels/channels_request_builder.py @@ -46,7 +46,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[ChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ChannelsRequestBuilderGetRequ async def post(self,body: Optional[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> Optional[Channel]: """ - Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. + Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Channel] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. + Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Channel] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class ChannelsRequestBuilderGetQueryParameters(): """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/count/count_request_builder.py b/msgraph/generated/teams/item/channels/count/count_request_builder.py index fbd17a0cd1d..6bb988f29f8 100644 --- a/msgraph/generated/teams/item/channels/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_response.py b/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_response.py rename to msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_get_response.py index 71931d32819..51a6bd5d308 100644 --- a/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_request_builder.py index dfe55f2058b..f30eb6ea746 100644 --- a/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/teams/item/channels/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/channels/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/channel_item_request_builder.py b/msgraph/generated/teams/item/channels/item/channel_item_request_builder.py index e7ab2c5346a..44bf4aa4a94 100644 --- a/msgraph/generated/teams/item/channels/item/channel_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/channel_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ChannelItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the channel. + Delete the channel. This API is available in the following national cloud deployments. 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/channel-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ChannelItemRequestBuilderD async def get(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Channel]: """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] Find more info here: https://learn.microsoft.com/graph/api/channel-get?view=graph-rest-1.0 @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[ChannelItemRequestBuilderGetR async def patch(self,body: Optional[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Channel]: """ - Update the properties of the specified channel. + Update the properties of the specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] @@ -104,39 +104,39 @@ async def patch(self,body: Optional[Channel] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the channel. + Delete the channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified channel. + Update the properties of the specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -258,7 +258,7 @@ class ChannelItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class ChannelItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/complete_migration/complete_migration_request_builder.py b/msgraph/generated/teams/item/channels/item/complete_migration/complete_migration_request_builder.py index 77f412fad12..25415c51bd9 100644 --- a/msgraph/generated/teams/item/channels/item/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py similarity index 91% rename from msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename to msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py index 1aa3df0306e..349bf1b33ed 100644 --- a/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ b/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): +class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincip value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index a2441e601d0..94c395fce05 100644 --- a/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/files_folder/content/content_request_builder.py b/msgraph/generated/teams/item/channels/item/files_folder/content/content_request_builder.py index 4087305cd86..a9a1c185b77 100644 --- a/msgraph/generated/teams/item/channels/item/files_folder/content/content_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/channels/item/files_folder/files_folder_request_builder.py b/msgraph/generated/teams/item/channels/item/files_folder/files_folder_request_builder.py index 9e77f9da873..3ed6328dd34 100644 --- a/msgraph/generated/teams/item/channels/item/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/members/add/add_response.py b/msgraph/generated/teams/item/channels/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/users/item/chats/item/members/add/add_response.py rename to msgraph/generated/teams/item/channels/item/members/add/add_post_response.py index 73509a849f5..77f0fa0e9e4 100644 --- a/msgraph/generated/users/item/chats/item/members/add/add_response.py +++ b/msgraph/generated/teams/item/channels/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/channels/item/members/add/add_request_builder.py b/msgraph/generated/teams/item/channels/item/members/add/add_request_builder.py index 1ac3ed6f1f4..856b03093be 100644 --- a/msgraph/generated/teams/item/channels/item/members/add/add_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/channels/item/members/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/members/count/count_request_builder.py index 3ba883ca727..d884026e5a9 100644 --- a/msgraph/generated/teams/item/channels/item/members/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 947941c683f..6e0d0a2ad99 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/members/members_request_builder.py b/msgraph/generated/teams/item/channels/item/members/members_request_builder.py index 8613308b3a6..277420bcf6b 100644 --- a/msgraph/generated/teams/item/channels/item/members/members_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/count/count_request_builder.py index 6fd760207ee..554aa59aed0 100644 --- a/msgraph/generated/teams/item/channels/item/messages/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/delta/delta_response.py b/msgraph/generated/teams/item/channels/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/chats/item/messages/delta/delta_response.py rename to msgraph/generated/teams/item/channels/item/messages/delta/delta_get_response.py index b52bac4c1d4..59ba7b29309 100644 --- a/msgraph/generated/users/item/chats/item/messages/delta/delta_response.py +++ b/msgraph/generated/teams/item/channels/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/delta/delta_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/delta/delta_request_builder.py index b4b0ec94989..5b5dd2a3233 100644 --- a/msgraph/generated/teams/item/channels/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/chat_message_item_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/chat_message_item_request_builder.py index 59d7f7f21ec..9d43bc909db 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py index 571f39e9284..189b2d69b8d 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py index 529da367525..affe9663a6c 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 6060a12ad04..5986d2b5f13 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py index f09d3aed59b..d4945c66049 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/count/count_request_builder.py index 1d014de5da3..435b078f090 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_response.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_response.py rename to msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_get_response.py index b2b0589aadb..0842f9f0387 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py index 1d2bca4e4c3..167cb1bac23 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py index e77ab89bb57..c67de28e03d 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py index af495c66e6f..199eb684e48 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index a5a907de12e..0f0e0222bac 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index ec7ddb99844..f5bc1e136e1 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index b6fd59231f9..7392ba5edcd 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index 3b10f33b966..b6b909581fb 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index a3967767a44..5ff6bbe28cc 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index d5feb78df59..c6e3c484492 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index 28dc99df4bd..33fa5b8e475 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 68f3c596e0f..872b3807089 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py index 87ca488b1c2..a87e3e83e37 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py index 1aff26a7391..ec2ce3620a1 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index 9e5f79a9860..0600572a770 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py index 1683671bbc4..8ae58baead4 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 de738fe3b5f..3507d97cd3e 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/provision_email/provision_email_request_builder.py b/msgraph/generated/teams/item/channels/item/provision_email/provision_email_request_builder.py index 68ed698de28..693bf96e63a 100644 --- a/msgraph/generated/teams/item/channels/item/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/remove_email/remove_email_request_builder.py b/msgraph/generated/teams/item/channels/item/remove_email/remove_email_request_builder.py index a65359c8416..db66c3028a7 100644 --- a/msgraph/generated/teams/item/channels/item/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/count/count_request_builder.py index d223c16b214..5f08e950af5 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index 540617edc26..4ee26435dfe 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py index 1e72eacf9b2..3daf7460900 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index ef3b75737ea..334102a4361 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index 2573b4e2f3a..788cadebcf1 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py index 5bf24e8a04a..419cc852739 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py index 4205cff6060..acef4682e8c 100644 --- a/msgraph/generated/teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/tabs/count/count_request_builder.py b/msgraph/generated/teams/item/channels/item/tabs/count/count_request_builder.py index 3459ddc1389..f9e4127028f 100644 --- a/msgraph/generated/teams/item/channels/item/tabs/count/count_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py index e10d802974b..90fa99a32cf 100644 --- a/msgraph/generated/teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py index 4f9e390b1f5..12cd0d06161 100644 --- a/msgraph/generated/teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/channels/item/tabs/tabs_request_builder.py b/msgraph/generated/teams/item/channels/item/tabs/tabs_request_builder.py index a4d10cce537..b139ad18b7a 100644 --- a/msgraph/generated/teams/item/channels/item/tabs/tabs_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/clone/clone_request_builder.py b/msgraph/generated/teams/item/clone/clone_request_builder.py index 66293d7e02a..19e1947b02e 100644 --- a/msgraph/generated/teams/item/clone/clone_request_builder.py +++ b/msgraph/generated/teams/item/clone/clone_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ClonePostRequestBody] = None, request_configuration: Optional[CloneRequestBuilderPostRequestConfiguration] = None) -> None: """ - Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. + Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. This API is available in the following national cloud deployments. 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[ClonePostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ClonePostRequestBody] = None, request_configuration: Optional[CloneRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. + Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ClonePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/complete_migration/complete_migration_request_builder.py b/msgraph/generated/teams/item/complete_migration/complete_migration_request_builder.py index 42e7959f8a5..7a3b314f661 100644 --- a/msgraph/generated/teams/item/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/teams/item/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/team-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/teams/item/group/group_request_builder.py b/msgraph/generated/teams/item/group/group_request_builder.py index 05b1e59d760..049ba5ee103 100644 --- a/msgraph/generated/teams/item/group/group_request_builder.py +++ b/msgraph/generated/teams/item/group/group_request_builder.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ....models.group import Group from ....models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GroupRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GroupRequestBuilder: @@ -74,6 +75,15 @@ def with_url(self,raw_url: Optional[str] = None) -> GroupRequestBuilder: raise TypeError("raw_url cannot be null.") return GroupRequestBuilder(self.request_adapter, raw_url) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GroupRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/teams/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/teams/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..72dba0a5925 --- /dev/null +++ b/msgraph/generated/teams/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/teams/item/permission_grants/delta/delta_request_builder.py b/msgraph/generated/teams/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py similarity index 65% rename from msgraph/generated/teams/item/permission_grants/delta/delta_request_builder.py rename to msgraph/generated/teams/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py index 62e4f504187..af45d1b22fe 100644 --- a/msgraph/generated/teams/item/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/teams/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -11,26 +11,27 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder -class DeltaRequestBuilder(BaseRequestBuilder): +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Builds and executes requests for operations under /teams/{team-id}/group/serviceProvisioningErrors """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[ServiceProvisioningErrorCollectionResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +44,50 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> ServiceProvisioningErrorsRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: ServiceProvisioningErrorsRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): """ - Invoke function delta + Get serviceProvisioningErrors property value """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -89,6 +99,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: 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": @@ -106,6 +118,9 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: # 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 @@ -128,14 +143,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/teams/item/incoming_channels/count/count_request_builder.py b/msgraph/generated/teams/item/incoming_channels/count/count_request_builder.py index 3c4080fb678..79b28e28975 100644 --- a/msgraph/generated/teams/item/incoming_channels/count/count_request_builder.py +++ b/msgraph/generated/teams/item/incoming_channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/incoming_channels/incoming_channels_request_builder.py b/msgraph/generated/teams/item/incoming_channels/incoming_channels_request_builder.py index 4c66746f39b..d296bf13b2d 100644 --- a/msgraph/generated/teams/item/incoming_channels/incoming_channels_request_builder.py +++ b/msgraph/generated/teams/item/incoming_channels/incoming_channels_request_builder.py @@ -44,7 +44,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[IncomingChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-incomingchannels?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[IncomingChannelsRequestBuilde def to_get_request_information(self,request_configuration: Optional[IncomingChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IncomingChannelsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IncomingChannelsRequestBuilderGetQueryParameters(): """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/incoming_channels/item/channel_item_request_builder.py b/msgraph/generated/teams/item/incoming_channels/item/channel_item_request_builder.py index d086ad6b6f6..5950fe4730d 100644 --- a/msgraph/generated/teams/item/incoming_channels/item/channel_item_request_builder.py +++ b/msgraph/generated/teams/item/incoming_channels/item/channel_item_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[ChannelIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChannelItemRequestBuilder: diff --git a/msgraph/generated/teams/item/installed_apps/count/count_request_builder.py b/msgraph/generated/teams/item/installed_apps/count/count_request_builder.py index bb0fbef5503..c2f0958388a 100644 --- a/msgraph/generated/teams/item/installed_apps/count/count_request_builder.py +++ b/msgraph/generated/teams/item/installed_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/installed_apps/installed_apps_request_builder.py b/msgraph/generated/teams/item/installed_apps/installed_apps_request_builder.py index ef9510eaa28..9c200215ad7 100644 --- a/msgraph/generated/teams/item/installed_apps/installed_apps_request_builder.py +++ b/msgraph/generated/teams/item/installed_apps/installed_apps_request_builder.py @@ -45,7 +45,7 @@ def by_teams_app_installation_id(self,teams_app_installation_id: str) -> TeamsAp async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallationCollectionResponse]: """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-installedapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGe async def post(self,body: Optional[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Install an app to the specified team. + Install an app to the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsAppInstallation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Install an app to the specified team. + Install an app to the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsAppInstallation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstalledAppsRequestBuilderGetQueryParameters(): """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/installed_apps/item/teams_app/teams_app_request_builder.py b/msgraph/generated/teams/item/installed_apps/item/teams_app/teams_app_request_builder.py index 78b789b7086..c169944e0a0 100644 --- a/msgraph/generated/teams/item/installed_apps/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/teams/item/installed_apps/item/teams_app/teams_app_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: diff --git a/msgraph/generated/teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py b/msgraph/generated/teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py index 647a4677141..f14a2854389 100644 --- a/msgraph/generated/teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py +++ b/msgraph/generated/teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppDefinitionRequestBuilder: diff --git a/msgraph/generated/teams/item/installed_apps/item/teams_app_installation_item_request_builder.py b/msgraph/generated/teams/item/installed_apps/item/teams_app_installation_item_request_builder.py index c34482e35c8..e19f6d46617 100644 --- a/msgraph/generated/teams/item/installed_apps/item/teams_app_installation_item_request_builder.py +++ b/msgraph/generated/teams/item/installed_apps/item/teams_app_installation_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Uninstalls an app from the specified team. + Uninstalls an app from the specified team. This API is available in the following national cloud deployments. 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/team-delete-installedapps?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRe async def get(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] Find more info here: https://learn.microsoft.com/graph/api/team-get-installedapps?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[TeamsAppInstallation] = None, request_config def to_delete_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Uninstalls an app from the specified team. + Uninstalls an app from the specified team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[TeamsAppInstallationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppInstallation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class TeamsAppInstallationItemRequestBuilderGetQueryParameters(): """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/installed_apps/item/upgrade/upgrade_request_builder.py b/msgraph/generated/teams/item/installed_apps/item/upgrade/upgrade_request_builder.py index 746d503c20e..2068f34911f 100644 --- a/msgraph/generated/teams/item/installed_apps/item/upgrade/upgrade_request_builder.py +++ b/msgraph/generated/teams/item/installed_apps/item/upgrade/upgrade_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. 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[UpgradePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/chats/item/members/add/add_response.py b/msgraph/generated/teams/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/chats/item/members/add/add_response.py rename to msgraph/generated/teams/item/members/add/add_post_response.py index e5795598999..daf4c052a27 100644 --- a/msgraph/generated/chats/item/members/add/add_response.py +++ b/msgraph/generated/teams/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/members/add/add_request_builder.py b/msgraph/generated/teams/item/members/add/add_request_builder.py index 76eefb0d1ff..08afd34ace5 100644 --- a/msgraph/generated/teams/item/members/add/add_request_builder.py +++ b/msgraph/generated/teams/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/members/count/count_request_builder.py b/msgraph/generated/teams/item/members/count/count_request_builder.py index 1d3515ec7a4..05808e093be 100644 --- a/msgraph/generated/teams/item/members/count/count_request_builder.py +++ b/msgraph/generated/teams/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/teams/item/members/item/conversation_member_item_request_builder.py index 2acf202f4fb..0134cd49e9e 100644 --- a/msgraph/generated/teams/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teams/item/members/item/conversation_member_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a conversationMember from a team. + Remove a conversationMember from a team. This API is available in the following national cloud deployments. 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/team-delete-members?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. 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/team-get-members?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a team. + Update the role of a conversationMember in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a conversationMember from a team. + Remove a conversationMember from a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a team. + Update the role of a conversationMember in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/members/members_request_builder.py b/msgraph/generated/teams/item/members/members_request_builder.py index 5774fa21082..efed1e5068d 100644 --- a/msgraph/generated/teams/item/members/members_request_builder.py +++ b/msgraph/generated/teams/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-members?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a new conversationMember to a team. + Add a new conversationMember to a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a new conversationMember to a team. + Add a new conversationMember to a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/operations/count/count_request_builder.py b/msgraph/generated/teams/item/operations/count/count_request_builder.py index 5218025aaf3..98ea2b80b98 100644 --- a/msgraph/generated/teams/item/operations/count/count_request_builder.py +++ b/msgraph/generated/teams/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/operations/item/teams_async_operation_item_request_builder.py b/msgraph/generated/teams/item/operations/item/teams_async_operation_item_request_builder.py index 770f41a28a8..4048349290d 100644 --- a/msgraph/generated/teams/item/operations/item/teams_async_operation_item_request_builder.py +++ b/msgraph/generated/teams/item/operations/item/teams_async_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamsAsyn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAsyncOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAsyncOp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAsyncOperation] = None, request_configuration: Optional[TeamsAsyncOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TeamsAsyncOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/operations/operations_request_builder.py b/msgraph/generated/teams/item/operations/operations_request_builder.py index d0d0ed8e988..ce05cc56ded 100644 --- a/msgraph/generated/teams/item/operations/operations_request_builder.py +++ b/msgraph/generated/teams/item/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAsyncOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TeamsAsyncOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/permission_grants/count/count_request_builder.py b/msgraph/generated/teams/item/permission_grants/count/count_request_builder.py index 5f5d33a5e87..87d8567875d 100644 --- a/msgraph/generated/teams/item/permission_grants/count/count_request_builder.py +++ b/msgraph/generated/teams/item/permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/permission_grants/delta/delta_response.py b/msgraph/generated/teams/item/permission_grants/delta/delta_response.py deleted file mode 100644 index cb883a33a6d..00000000000 --- a/msgraph/generated/teams/item/permission_grants/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject - -from .....models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject - - from .....models.base_delta_function_response import BaseDeltaFunctionResponse - from .....models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index aaa2ff2ca1c..00000000000 --- a/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 6cc0362e04b..00000000000 --- a/msgraph/generated/teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .....models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index 071558eabb1..00000000000 --- a/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/teams/item/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_response.py deleted file mode 100644 index fc436e4387d..00000000000 --- a/msgraph/generated/teams/item/permission_grants/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .....models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py b/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py deleted file mode 100644 index a5fc2c2476e..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The groupIds property - group_ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsPostRequestBody() - - 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]] = { - "groupIds": lambda n : setattr(self, 'group_ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("groupIds", self.group_ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py deleted file mode 100644 index 031dfc7f59b..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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 .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse - -class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?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 .check_member_groups_response import CheckMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberGroupsRequestBuilderPostRequestConfiguration(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/teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 37d1b2933a0..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py b/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py deleted file mode 100644 index 5f48b8577ec..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index 5405d07e36b..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py b/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py deleted file mode 100644 index 1a3308bfb6c..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py deleted file mode 100644 index ea0b10c4202..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse - -class GetMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?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 .get_member_groups_response import GetMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberGroupsRequestBuilderPostRequestConfiguration(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/teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 171e61b95e6..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py b/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py deleted file mode 100644 index 7552e02e441..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py deleted file mode 100644 index e3c83a836eb..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse - -class GetMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?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 .get_member_objects_response import GetMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberObjectsRequestBuilderPostRequestConfiguration(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/teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index d78b936af0e..00000000000 --- a/msgraph/generated/teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index d25bea18f4f..f5e902edd59 100644 --- a/msgraph/generated/teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -12,11 +12,6 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - from .restore.restore_request_builder import RestoreRequestBuilder class ResourceSpecificPermissionGrantItemRequestBuilder(BaseRequestBuilder): """ @@ -102,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -157,51 +152,6 @@ def with_url(self,raw_url: Optional[str] = None) -> ResourceSpecificPermissionGr raise TypeError("raw_url cannot be null.") return ResourceSpecificPermissionGrantItemRequestBuilder(self.request_adapter, raw_url) - @property - def check_member_groups(self) -> CheckMemberGroupsRequestBuilder: - """ - Provides operations to call the checkMemberGroups method. - """ - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - - return CheckMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def check_member_objects(self) -> CheckMemberObjectsRequestBuilder: - """ - Provides operations to call the checkMemberObjects method. - """ - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - - return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_groups(self) -> GetMemberGroupsRequestBuilder: - """ - Provides operations to call the getMemberGroups method. - """ - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - - return GetMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_objects(self) -> GetMemberObjectsRequestBuilder: - """ - Provides operations to call the getMemberObjects method. - """ - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - - return GetMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def restore(self) -> RestoreRequestBuilder: - """ - Provides operations to call the restore method. - """ - from .restore.restore_request_builder import RestoreRequestBuilder - - return RestoreRequestBuilder(self.request_adapter, self.path_parameters) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/teams/item/permission_grants/permission_grants_request_builder.py b/msgraph/generated/teams/item/permission_grants/permission_grants_request_builder.py index 31e4a572398..2b23453d573 100644 --- a/msgraph/generated/teams/item/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/teams/item/permission_grants/permission_grants_request_builder.py @@ -14,11 +14,7 @@ from ....models.resource_specific_permission_grant import ResourceSpecificPermissionGrant from ....models.resource_specific_permission_grant_collection_response import ResourceSpecificPermissionGrantCollectionResponse from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.resource_specific_permission_grant_item_request_builder import ResourceSpecificPermissionGrantItemRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class PermissionGrantsRequestBuilder(BaseRequestBuilder): """ @@ -49,7 +45,7 @@ def by_resource_specific_permission_grant_id(self,resource_specific_permission_g async def get(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ResourceSpecificPermissionGrantCollectionResponse]: """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ResourceSpecificPermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-permissiongrants?view=graph-rest-1.0 @@ -95,19 +91,19 @@ async def post(self,body: Optional[ResourceSpecificPermissionGrant] = None, requ def to_get_request_information(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +116,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,46 +145,10 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class PermissionGrantsRequestBuilderGetQueryParameters(): """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index 7e9d48bb51a..00000000000 --- a/msgraph/generated/teams/item/permission_grants/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/permissionGrants/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/teams/item/photo/photo_request_builder.py b/msgraph/generated/teams/item/photo/photo_request_builder.py index 1251443cae9..da65ab8de62 100644 --- a/msgraph/generated/teams/item/photo/photo_request_builder.py +++ b/msgraph/generated/teams/item/photo/photo_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfilePhoto]: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProfilePhoto] Find more info here: https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0 @@ -75,19 +75,19 @@ async def patch(self,body: Optional[ProfilePhoto] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -132,7 +132,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class PhotoRequestBuilderGetQueryParameters(): """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/photo/value/content_request_builder.py b/msgraph/generated/teams/item/photo/value/content_request_builder.py index 1d2e224197b..ef8261a1fb7 100644 --- a/msgraph/generated/teams/item/photo/value/content_request_builder.py +++ b/msgraph/generated/teams/item/photo/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/complete_migration/complete_migration_request_builder.py b/msgraph/generated/teams/item/primary_channel/complete_migration/complete_migration_request_builder.py index 37764707da6..d38e0eb61be 100644 --- a/msgraph/generated/teams/item/primary_channel/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py similarity index 91% rename from msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py rename to msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py index 1aa3df0306e..349bf1b33ed 100644 --- a/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ b/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): +class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincip value: Optional[bool] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index 86f3efb59d4..d8bb3ce8483 100644 --- a/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/files_folder/content/content_request_builder.py b/msgraph/generated/teams/item/primary_channel/files_folder/content/content_request_builder.py index 9cb5a5f15d2..eab7b3b8fd8 100644 --- a/msgraph/generated/teams/item/primary_channel/files_folder/content/content_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/files_folder/files_folder_request_builder.py b/msgraph/generated/teams/item/primary_channel/files_folder/files_folder_request_builder.py index b74760f9b1b..8d3ecbaf00c 100644 --- a/msgraph/generated/teams/item/primary_channel/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/members/add/add_response.py b/msgraph/generated/teams/item/primary_channel/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/groups/item/team/members/add/add_response.py rename to msgraph/generated/teams/item/primary_channel/members/add/add_post_response.py index 4cb34efc7b6..f5a61d6276d 100644 --- a/msgraph/generated/groups/item/team/members/add/add_response.py +++ b/msgraph/generated/teams/item/primary_channel/members/add/add_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/primary_channel/members/add/add_request_builder.py b/msgraph/generated/teams/item/primary_channel/members/add/add_request_builder.py index 5fabc43e02f..34025c47b8f 100644 --- a/msgraph/generated/teams/item/primary_channel/members/add/add_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/members/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/members/count/count_request_builder.py index 42fb927c627..23c61947385 100644 --- a/msgraph/generated/teams/item/primary_channel/members/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 719993a07ff..7233cc6f0e4 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/members/members_request_builder.py b/msgraph/generated/teams/item/primary_channel/members/members_request_builder.py index 25c3aa322a2..fd4cf9ce108 100644 --- a/msgraph/generated/teams/item/primary_channel/members/members_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/count/count_request_builder.py index 038084c58c0..ebe6b3d0e91 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/delta/delta_response.py b/msgraph/generated/teams/item/primary_channel/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/teams/item/primary_channel/messages/delta/delta_response.py rename to msgraph/generated/teams/item/primary_channel/messages/delta/delta_get_response.py index bad864be9aa..d7b745875ab 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/delta/delta_response.py +++ b/msgraph/generated/teams/item/primary_channel/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/delta/delta_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/delta/delta_request_builder.py index b934dfdc338..65ec00a8a0b 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/delta/delta_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/chat_message_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/chat_message_item_request_builder.py index fa47af0c229..58b5d169b71 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py index 9ce705471c3..49034d6a766 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py index 5db696e6283..c5dea28df02 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index f70b14e4368..1bb9b60e523 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py index 1bf218bea6b..5b17d633665 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/count/count_request_builder.py index 31c5f5a7cca..21a2b2c90c7 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_response.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_response.py rename to msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_get_response.py index b172edeb11a..fe1e2d1e0db 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py index c9e7227ba71..d30b8f358ad 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py index 84806237012..4fbd357cc49 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py index 2ce6e2bf060..3adf55cb61e 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index 3401977a8dd..cc7369afc88 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 9129e434c76..049d1742858 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index 80dfccb99d6..8e54a72919c 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index 8be296307b7..7c703eb4778 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index d2b535741b7..36fb349e8f0 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index 899d30815ba..8631c97fc9e 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index b1669066e6e..df3f16f004e 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 82913e292c4..5fb084fdbe0 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py index 8b155981bc3..2f4a111691b 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py index 750adc59030..5622cab1df2 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index ead6d822176..a93769c8864 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py index 823e025c3ad..99db1f9af82 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 532779df28e..32dca33527a 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/primary_channel_request_builder.py b/msgraph/generated/teams/item/primary_channel/primary_channel_request_builder.py index e55dc92a145..9bd463139dd 100644 --- a/msgraph/generated/teams/item/primary_channel/primary_channel_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/primary_channel_request_builder.py @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[PrimaryChannelRequestBuild async def get(self,request_configuration: Optional[PrimaryChannelRequestBuilderGetRequestConfiguration] = None) -> Optional[Channel]: """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] Find more info here: https://learn.microsoft.com/graph/api/team-get-primarychannel?view=graph-rest-1.0 @@ -107,29 +107,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrimaryCh Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrimaryChannelRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[PrimaryChannelRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -256,7 +256,7 @@ class PrimaryChannelRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class PrimaryChannelRequestBuilderGetQueryParameters(): """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/provision_email/provision_email_request_builder.py b/msgraph/generated/teams/item/primary_channel/provision_email/provision_email_request_builder.py index 83512b24fd8..678b2b94949 100644 --- a/msgraph/generated/teams/item/primary_channel/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/remove_email/remove_email_request_builder.py b/msgraph/generated/teams/item/primary_channel/remove_email/remove_email_request_builder.py index c7b6358589d..f250d07576b 100644 --- a/msgraph/generated/teams/item/primary_channel/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/count/count_request_builder.py index 0996d637dc6..513ead23f7f 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index d17696dc8a6..78176278b23 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py index a12bd693852..2bbb6c3c901 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index 1014e761b94..8e868c0715f 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index 6721f9dfebc..22f647afb71 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py index 855a6b161ea..bd32db3a6ad 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py index 805d09752c0..7fdeff0b584 100644 --- a/msgraph/generated/teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/tabs/count/count_request_builder.py b/msgraph/generated/teams/item/primary_channel/tabs/count/count_request_builder.py index 29376bbc2df..4126558a15c 100644 --- a/msgraph/generated/teams/item/primary_channel/tabs/count/count_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py index 253e0f98564..317a3e7019f 100644 --- a/msgraph/generated/teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py index e621db1116b..f9b710eb3bb 100644 --- a/msgraph/generated/teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/primary_channel/tabs/tabs_request_builder.py b/msgraph/generated/teams/item/primary_channel/tabs/tabs_request_builder.py index 85e20b21b9c..358ef09d79e 100644 --- a/msgraph/generated/teams/item/primary_channel/tabs/tabs_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/offer_shift_requests/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/offer_shift_requests/count/count_request_builder.py index 5528b0b6098..ba1596c9499 100644 --- a/msgraph/generated/teams/item/schedule/offer_shift_requests/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/offer_shift_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py b/msgraph/generated/teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py index ed4d9d20396..5c1ed3b783a 100644 --- a/msgraph/generated/teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py @@ -10,8 +10,8 @@ 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.offer_shift_request import OfferShiftRequest + from ......models.o_data_errors.o_data_error import ODataError class OfferShiftRequestItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OfferShiftRequestItemReque async def get(self,request_configuration: Optional[OfferShiftRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OfferShiftRequest]: """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequest] Find more info here: https://learn.microsoft.com/graph/api/offershiftrequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OfferShif Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OfferShiftRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OfferShiftRequest] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OfferShiftRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class OfferShiftRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py b/msgraph/generated/teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py index 330fff277fe..bed8172f077 100644 --- a/msgraph/generated/teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py +++ b/msgraph/generated/teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py @@ -10,9 +10,9 @@ 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.offer_shift_request import OfferShiftRequest from .....models.offer_shift_request_collection_response import OfferShiftRequestCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.offer_shift_request_item_request_builder import OfferShiftRequestItemRequestBuilder @@ -45,7 +45,7 @@ def by_offer_shift_request_id(self,offer_shift_request_id: str) -> OfferShiftReq async def get(self,request_configuration: Optional[OfferShiftRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[OfferShiftRequestCollectionResponse]: """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/offershiftrequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OfferShiftRequestsRequestBuil async def post(self,body: Optional[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[OfferShiftRequest]: """ - Create an instance of an offerShiftRequest. + Create an instance of an offerShiftRequest. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OfferShiftRequest] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[OfferShiftRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of an offerShiftRequest. + Create an instance of an offerShiftRequest. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OfferShiftRequest] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OfferShiftRequestsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/open_shift_change_requests/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/open_shift_change_requests/count/count_request_builder.py index fc11904fbe2..e1dc986a511 100644 --- a/msgraph/generated/teams/item/schedule/open_shift_change_requests/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/open_shift_change_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py b/msgraph/generated/teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py index bb2b382b09a..7b5bff4b80c 100644 --- a/msgraph/generated/teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py @@ -10,8 +10,8 @@ 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.open_shift_change_request import OpenShiftChangeRequest + from ......models.o_data_errors.o_data_error import ODataError class OpenShiftChangeRequestItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OpenShiftChangeRequestItem async def get(self,request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftChangeRequest]: """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequest] Find more info here: https://learn.microsoft.com/graph/api/openshiftchangerequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OpenShift Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OpenShiftChangeRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OpenShiftChangeRequestItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class OpenShiftChangeRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py b/msgraph/generated/teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py index 41d8784e868..d7bb4a66b98 100644 --- a/msgraph/generated/teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py +++ b/msgraph/generated/teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py @@ -10,9 +10,9 @@ 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.open_shift_change_request import OpenShiftChangeRequest from .....models.open_shift_change_request_collection_response import OpenShiftChangeRequestCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.open_shift_change_request_item_request_builder import OpenShiftChangeRequestItemRequestBuilder @@ -45,7 +45,7 @@ def by_open_shift_change_request_id(self,open_shift_change_request_id: str) -> O async def get(self,request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftChangeRequestCollectionResponse]: """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/openshiftchangerequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OpenShiftChangeRequestsReques async def post(self,body: Optional[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[OpenShiftChangeRequest]: """ - Create instance of an openShiftChangeRequest object. + Create instance of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OpenShiftChangeRequest] = None, request_confi def to_get_request_information(self,request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create instance of an openShiftChangeRequest object. + Create instance of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OpenShiftChangeRequest] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OpenShiftChangeRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/open_shifts/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/open_shifts/count/count_request_builder.py index e703a3007df..140dc277ef0 100644 --- a/msgraph/generated/teams/item/schedule/open_shifts/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/open_shifts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py b/msgraph/generated/teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py index 91202e9646a..cb9aeb59b17 100644 --- a/msgraph/generated/teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py @@ -10,8 +10,8 @@ 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.open_shift import OpenShift + from ......models.o_data_errors.o_data_error import ODataError class OpenShiftItemRequestBuilder(BaseRequestBuilder): """ @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OpenShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an openShift object. + Delete an openShift object. This API is available in the following national cloud deployments. 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/openshift-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OpenShiftItemRequestBuilde async def get(self,request_configuration: Optional[OpenShiftItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShift]: """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShift] Find more info here: https://learn.microsoft.com/graph/api/openshift-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[OpenShift] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[OpenShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an openShift object. + Delete an openShift object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OpenShiftItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShift] = None, request_configuration: Optional[OpenShiftItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[OpenShift] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class OpenShiftItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class OpenShiftItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/open_shifts/open_shifts_request_builder.py b/msgraph/generated/teams/item/schedule/open_shifts/open_shifts_request_builder.py index ba044bdce96..5007c261df6 100644 --- a/msgraph/generated/teams/item/schedule/open_shifts/open_shifts_request_builder.py +++ b/msgraph/generated/teams/item/schedule/open_shifts/open_shifts_request_builder.py @@ -10,9 +10,9 @@ 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.open_shift import OpenShift from .....models.open_shift_collection_response import OpenShiftCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.open_shift_item_request_builder import OpenShiftItemRequestBuilder @@ -45,7 +45,7 @@ def by_open_shift_id(self,open_shift_id: str) -> OpenShiftItemRequestBuilder: async def get(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftCollectionResponse]: """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/openshift-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRe async def post(self,body: Optional[OpenShift] = None, request_configuration: Optional[OpenShiftsRequestBuilderPostRequestConfiguration] = None) -> Optional[OpenShift]: """ - Create an instance of an openShift object. + Create an instance of an openShift object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShift] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OpenShift] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShift] = None, request_configuration: Optional[OpenShiftsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of an openShift object. + Create an instance of an openShift object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OpenShift] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OpenShiftsRequestBuilderGetQueryParameters(): """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/schedule_request_builder.py b/msgraph/generated/teams/item/schedule/schedule_request_builder.py index 1cd83e7b859..e5a6f61b84a 100644 --- a/msgraph/generated/teams/item/schedule/schedule_request_builder.py +++ b/msgraph/generated/teams/item/schedule/schedule_request_builder.py @@ -13,15 +13,15 @@ from ....models.o_data_errors.o_data_error import ODataError from ....models.schedule import Schedule from .offer_shift_requests.offer_shift_requests_request_builder import OfferShiftRequestsRequestBuilder - from .open_shift_change_requests.open_shift_change_requests_request_builder import OpenShiftChangeRequestsRequestBuilder from .open_shifts.open_shifts_request_builder import OpenShiftsRequestBuilder + from .open_shift_change_requests.open_shift_change_requests_request_builder import OpenShiftChangeRequestsRequestBuilder from .scheduling_groups.scheduling_groups_request_builder import SchedulingGroupsRequestBuilder from .share.share_request_builder import ShareRequestBuilder from .shifts.shifts_request_builder import ShiftsRequestBuilder from .swap_shifts_change_requests.swap_shifts_change_requests_request_builder import SwapShiftsChangeRequestsRequestBuilder + from .times_off.times_off_request_builder import TimesOffRequestBuilder from .time_off_reasons.time_off_reasons_request_builder import TimeOffReasonsRequestBuilder from .time_off_requests.time_off_requests_request_builder import TimeOffRequestsRequestBuilder - from .times_off.times_off_request_builder import TimesOffRequestBuilder class ScheduleRequestBuilder(BaseRequestBuilder): """ @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ScheduleRequestBuilderDele async def get(self,request_configuration: Optional[ScheduleRequestBuilderGetRequestConfiguration] = None) -> Optional[Schedule]: """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schedule] Find more info here: https://learn.microsoft.com/graph/api/schedule-get?view=graph-rest-1.0 @@ -108,29 +108,29 @@ def to_delete_request_information(self,request_configuration: Optional[ScheduleR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScheduleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[Schedule] = None, request_configuration: Optional[ScheduleRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +143,13 @@ def to_put_request_information(self,body: Optional[Schedule] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ScheduleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ScheduleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/scheduling_groups/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/scheduling_groups/count/count_request_builder.py index bbdc8af6b66..5263a1c2b81 100644 --- a/msgraph/generated/teams/item/schedule/scheduling_groups/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/scheduling_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py b/msgraph/generated/teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py index b3e562f9008..989f9b69b65 100644 --- a/msgraph/generated/teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. + Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. This API is available in the following national cloud deployments. 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/schedulinggroup-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SchedulingGroupItemRequest async def get(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SchedulingGroup]: """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroup] Find more info here: https://learn.microsoft.com/graph/api/schedulinggroup-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[SchedulingGroup] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. + Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[SchedulingGroup] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class SchedulingGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class SchedulingGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py b/msgraph/generated/teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py index ebcc42d3290..212e93f2b66 100644 --- a/msgraph/generated/teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py +++ b/msgraph/generated/teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py @@ -45,7 +45,7 @@ def by_scheduling_group_id(self,scheduling_group_id: str) -> SchedulingGroupItem async def get(self,request_configuration: Optional[SchedulingGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SchedulingGroupCollectionResponse]: """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-schedulinggroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SchedulingGroupsRequestBuilde async def post(self,body: Optional[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SchedulingGroup]: """ - Create a new schedulingGroup. + Create a new schedulingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SchedulingGroup] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SchedulingGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new schedulingGroup. + Create a new schedulingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SchedulingGroup] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchedulingGroupsRequestBuilderGetQueryParameters(): """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 8e746834b3e..cf4c87e00ff 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.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. This API is available in the following national cloud deployments. 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.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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SharePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/schedule/shifts/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/shifts/count/count_request_builder.py index 9aa187fb7f4..13ada9274fc 100644 --- a/msgraph/generated/teams/item/schedule/shifts/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/shifts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/shifts/item/shift_item_request_builder.py b/msgraph/generated/teams/item/schedule/shifts/item/shift_item_request_builder.py index 61fd1d4b24e..60932ffbe1d 100644 --- a/msgraph/generated/teams/item/schedule/shifts/item/shift_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/shifts/item/shift_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a shift from the schedule. + Delete a shift from the schedule. This API is available in the following national cloud deployments. 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/shift-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ShiftItemRequestBuilderDel async def get(self,request_configuration: Optional[ShiftItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Shift]: """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Shift] Find more info here: https://learn.microsoft.com/graph/api/shift-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Shift] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[ShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a shift from the schedule. + Delete a shift from the schedule. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ShiftItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Shift] = None, request_configuration: Optional[ShiftItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Shift] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ShiftItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class ShiftItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/shifts/shifts_request_builder.py b/msgraph/generated/teams/item/schedule/shifts/shifts_request_builder.py index 4dbf134271a..cb85d71c813 100644 --- a/msgraph/generated/teams/item/schedule/shifts/shifts_request_builder.py +++ b/msgraph/generated/teams/item/schedule/shifts/shifts_request_builder.py @@ -45,7 +45,7 @@ def by_shift_id(self,shift_id: str) -> ShiftItemRequestBuilder: async def get(self,request_configuration: Optional[ShiftsRequestBuilderGetRequestConfiguration] = None) -> Optional[ShiftCollectionResponse]: """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ShiftCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-shifts?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ShiftsRequestBuilderGetReques async def post(self,body: Optional[Shift] = None, request_configuration: Optional[ShiftsRequestBuilderPostRequestConfiguration] = None) -> Optional[Shift]: """ - Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. + Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Shift] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Shift] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[ShiftsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Shift] = None, request_configuration: Optional[ShiftsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. + Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Shift] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ShiftsRequestBuilderGetQueryParameters(): """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py index f5afdeb56c5..691dada351e 100644 --- a/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py b/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py index de61423a8d0..516ad80f9fd 100644 --- a/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SwapShiftsChangeRequestIte async def get(self,request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequest]: """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequest] Find more info here: https://learn.microsoft.com/graph/api/swapshiftschangerequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[SwapShift Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SwapShiftsChangeRequest] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class SwapShiftsChangeRequestItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class SwapShiftsChangeRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py b/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py index bc6ce6fce4c..a73aea69305 100644 --- a/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py +++ b/msgraph/generated/teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py @@ -45,7 +45,7 @@ def by_swap_shifts_change_request_id(self,swap_shifts_change_request_id: str) -> async def get(self,request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequestCollectionResponse]: """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/swapshiftschangerequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SwapShiftsChangeRequestsReque async def post(self,body: Optional[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequest]: """ - Create an instance of a swapShiftsChangeRequest object. + Create an instance of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SwapShiftsChangeRequest] = None, request_conf def to_get_request_information(self,request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of a swapShiftsChangeRequest object. + Create an instance of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SwapShiftsChangeRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SwapShiftsChangeRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/time_off_reasons/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/time_off_reasons/count/count_request_builder.py index 8d453765100..7ec09dbbd5d 100644 --- a/msgraph/generated/teams/item/schedule/time_off_reasons/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/time_off_reasons/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py b/msgraph/generated/teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py index 584daf163ea..6e1b6745848 100644 --- a/msgraph/generated/teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. + Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. This API is available in the following national cloud deployments. 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/timeoffreason-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffReasonItemRequestBu async def get(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffReason]: """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReason] Find more info here: https://learn.microsoft.com/graph/api/timeoffreason-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[TimeOffReason] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. + Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TimeOffReason] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class TimeOffReasonItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class TimeOffReasonItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py b/msgraph/generated/teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py index 4c89fcc5311..2b7b2c18caa 100644 --- a/msgraph/generated/teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py +++ b/msgraph/generated/teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_reason_id(self,time_off_reason_id: str) -> TimeOffReasonItemRequ async def get(self,request_configuration: Optional[TimeOffReasonsRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffReasonCollectionResponse]: """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReasonCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-timeoffreasons?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TimeOffReasonsRequestBuilderG async def post(self,body: Optional[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonsRequestBuilderPostRequestConfiguration] = None) -> Optional[TimeOffReason]: """ - Create a new timeOffReason. + Create a new timeOffReason. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReason] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TimeOffReason] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[TimeOffReasonsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new timeOffReason. + Create a new timeOffReason. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TimeOffReason] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimeOffReasonsRequestBuilderGetQueryParameters(): """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/time_off_requests/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/time_off_requests/count/count_request_builder.py index 6cf82d77223..4ee56ce05bb 100644 --- a/msgraph/generated/teams/item/schedule/time_off_requests/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/time_off_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py b/msgraph/generated/teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py index 97366bb7ce2..dc119da8369 100644 --- a/msgraph/generated/teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a timeOffRequest object. + Delete a timeOffRequest object. This API is available in the following national cloud deployments. 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/timeoffrequest-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffRequestItemRequestB async def get(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffRequest]: """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffRequest] Find more info here: https://learn.microsoft.com/graph/api/timeoffrequest-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[TimeOffRequest] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a timeOffRequest object. + Delete a timeOffRequest object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffRequest] = None, request_configuration: Optional[TimeOffRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TimeOffRequest] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class TimeOffRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class TimeOffRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/time_off_requests/time_off_requests_request_builder.py b/msgraph/generated/teams/item/schedule/time_off_requests/time_off_requests_request_builder.py index 92b8e72f2d7..02b67d7b60e 100644 --- a/msgraph/generated/teams/item/schedule/time_off_requests/time_off_requests_request_builder.py +++ b/msgraph/generated/teams/item/schedule/time_off_requests/time_off_requests_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_request_id(self,time_off_request_id: str) -> TimeOffRequestItemR async def get(self,request_configuration: Optional[TimeOffRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffRequestCollectionResponse]: """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/timeoffrequest-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[TimeOffRequest] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[TimeOffRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffRequest] = None, request_configuration: Optional[TimeOffRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[TimeOffRequest] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimeOffRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/times_off/count/count_request_builder.py b/msgraph/generated/teams/item/schedule/times_off/count/count_request_builder.py index 7ed33168a15..567510268bf 100644 --- a/msgraph/generated/teams/item/schedule/times_off/count/count_request_builder.py +++ b/msgraph/generated/teams/item/schedule/times_off/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/schedule/times_off/item/time_off_item_request_builder.py b/msgraph/generated/teams/item/schedule/times_off/item/time_off_item_request_builder.py index 1158053b0f3..0695b02daea 100644 --- a/msgraph/generated/teams/item/schedule/times_off/item/time_off_item_request_builder.py +++ b/msgraph/generated/teams/item/schedule/times_off/item/time_off_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a timeOff instance from a schedule. + Delete a timeOff instance from a schedule. This API is available in the following national cloud deployments. 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/timeoff-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffItemRequestBuilderD async def get(self,request_configuration: Optional[TimeOffItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOff]: """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOff] Find more info here: https://learn.microsoft.com/graph/api/timeoff-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[TimeOff] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[TimeOffItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a timeOff instance from a schedule. + Delete a timeOff instance from a schedule. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOff] = None, request_configuration: Optional[TimeOffItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TimeOff] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class TimeOffItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class TimeOffItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/schedule/times_off/times_off_request_builder.py b/msgraph/generated/teams/item/schedule/times_off/times_off_request_builder.py index 2fccc27a1cb..7f21ab143e1 100644 --- a/msgraph/generated/teams/item/schedule/times_off/times_off_request_builder.py +++ b/msgraph/generated/teams/item/schedule/times_off/times_off_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_id(self,time_off_id: str) -> TimeOffItemRequestBuilder: async def get(self,request_configuration: Optional[TimesOffRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffCollectionResponse]: """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-timesoff?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TimesOffRequestBuilderGetRequ async def post(self,body: Optional[TimeOff] = None, request_configuration: Optional[TimesOffRequestBuilderPostRequestConfiguration] = None) -> Optional[TimeOff]: """ - Create a new timeOff instance in a schedule. + Create a new timeOff instance in a schedule. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOff] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TimeOff] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[TimesOffRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOff] = None, request_configuration: Optional[TimesOffRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new timeOff instance in a schedule. + Create a new timeOff instance in a schedule. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TimeOff] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimesOffRequestBuilderGetQueryParameters(): """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/send_activity_notification/send_activity_notification_request_builder.py b/msgraph/generated/teams/item/send_activity_notification/send_activity_notification_request_builder.py index fa6b92d893d..e987cb06846 100644 --- a/msgraph/generated/teams/item/send_activity_notification/send_activity_notification_request_builder.py +++ b/msgraph/generated/teams/item/send_activity_notification/send_activity_notification_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationPostRequestBody] = No def to_post_request_information(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams/item/tags/count/count_request_builder.py b/msgraph/generated/teams/item/tags/count/count_request_builder.py index 588413b0fc9..ae2cf53da04 100644 --- a/msgraph/generated/teams/item/tags/count/count_request_builder.py +++ b/msgraph/generated/teams/item/tags/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/tags/item/members/count/count_request_builder.py b/msgraph/generated/teams/item/tags/item/members/count/count_request_builder.py index 443ab1312b3..b4a18ee2972 100644 --- a/msgraph/generated/teams/item/tags/item/members/count/count_request_builder.py +++ b/msgraph/generated/teams/item/tags/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py b/msgraph/generated/teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py index 6e440395be8..4846f16e7d6 100644 --- a/msgraph/generated/teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py +++ b/msgraph/generated/teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a member from a standard tag in a team. + Delete a member from a standard tag in a team. This API is available in the following national cloud deployments. 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/teamworktagmember-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TeamworkTagMemberItemReque async def get(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagMember]: """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMember] Find more info here: https://learn.microsoft.com/graph/api/teamworktagmember-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[TeamworkTagMember] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a member from a standard tag in a team. + Delete a member from a standard tag in a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTagMember] = None, request_configuration: Optional[TeamworkTagMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TeamworkTagMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class TeamworkTagMemberItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/tags/item/members/members_request_builder.py b/msgraph/generated/teams/item/tags/item/members/members_request_builder.py index 99a1fe65cb4..fd371fcf085 100644 --- a/msgraph/generated/teams/item/tags/item/members/members_request_builder.py +++ b/msgraph/generated/teams/item/tags/item/members/members_request_builder.py @@ -45,7 +45,7 @@ def by_teamwork_tag_member_id(self,teamwork_tag_member_id: str) -> TeamworkTagMe async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagMemberCollectionResponse]: """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamworktagmember-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[TeamworkTagMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamworkTagMember]: """ - Create a new teamworkTagMember object in a team. + Create a new teamworkTagMember object in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMember] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamworkTagMember] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTagMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new teamworkTagMember object in a team. + Create a new teamworkTagMember object in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamworkTagMember] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/tags/item/teamwork_tag_item_request_builder.py b/msgraph/generated/teams/item/tags/item/teamwork_tag_item_request_builder.py index a00f71620e0..d87c5a7da2d 100644 --- a/msgraph/generated/teams/item/tags/item/teamwork_tag_item_request_builder.py +++ b/msgraph/generated/teams/item/tags/item/teamwork_tag_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamworkTagItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a tag object permanently. + Delete a tag object permanently. This API is available in the following national cloud deployments. 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/teamworktag-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamworkTagItemRequestBuil async def get(self,request_configuration: Optional[TeamworkTagItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] Find more info here: https://learn.microsoft.com/graph/api/teamworktag-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamworkTagItemRequestBuilder async def patch(self,body: Optional[TeamworkTag] = None, request_configuration: Optional[TeamworkTagItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Update the properties of a tag object. + Update the properties of a tag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamworkTag] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[TeamworkTagItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a tag object permanently. + Delete a tag object permanently. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkTagItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTag] = None, request_configuration: Optional[TeamworkTagItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a tag object. + Update the properties of a tag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamworkTag] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamworkTagItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class TeamworkTagItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/tags/tags_request_builder.py b/msgraph/generated/teams/item/tags/tags_request_builder.py index 2205029586a..f78867bad5c 100644 --- a/msgraph/generated/teams/item/tags/tags_request_builder.py +++ b/msgraph/generated/teams/item/tags/tags_request_builder.py @@ -45,7 +45,7 @@ def by_teamwork_tag_id(self,teamwork_tag_id: str) -> TeamworkTagItemRequestBuild async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagCollectionResponse]: """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamworktag-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestC async def post(self,body: Optional[TeamworkTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Create a standard tag for members in a team. + Create a standard tag for members in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamworkTag] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a standard tag for members in a team. + Create a standard tag for members in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamworkTag] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TagsRequestBuilderGetQueryParameters(): """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/team_item_request_builder.py b/msgraph/generated/teams/item/team_item_request_builder.py index 6eb58a53561..9e7e4368d78 100644 --- a/msgraph/generated/teams/item/team_item_request_builder.py +++ b/msgraph/generated/teams/item/team_item_request_builder.py @@ -65,7 +65,7 @@ async def delete(self,request_configuration: Optional[TeamItemRequestBuilderDele async def get(self,request_configuration: Optional[TeamItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Team]: """ - Retrieve the properties and relationships of the specified team. + Retrieve the properties and relationships of the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Team] Find more info here: https://learn.microsoft.com/graph/api/team-get?view=graph-rest-1.0 @@ -87,7 +87,7 @@ async def get(self,request_configuration: Optional[TeamItemRequestBuilderGetRequ async def patch(self,body: Optional[Team] = None, request_configuration: Optional[TeamItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Team]: """ - Update the properties of the specified team. + Update the properties of the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Team] @@ -117,34 +117,34 @@ def to_delete_request_information(self,request_configuration: Optional[TeamItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified team. + Retrieve the properties and relationships of the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Team] = None, request_configuration: Optional[TeamItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified team. + Update the properties of the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -152,13 +152,13 @@ def to_patch_request_information(self,body: Optional[Team] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -347,7 +347,7 @@ class TeamItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class TeamItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified team. + Retrieve the properties and relationships of the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams/item/template/template_request_builder.py b/msgraph/generated/teams/item/template/template_request_builder.py index 343388bf892..b210f0ecbf2 100644 --- a/msgraph/generated/teams/item/template/template_request_builder.py +++ b/msgraph/generated/teams/item/template/template_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TemplateRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TemplateRequestBuilder: diff --git a/msgraph/generated/teams/item/unarchive/unarchive_request_builder.py b/msgraph/generated/teams/item/unarchive/unarchive_request_builder.py index b109d8b8667..4696bb7aafe 100644 --- a/msgraph/generated/teams/item/unarchive/unarchive_request_builder.py +++ b/msgraph/generated/teams/item/unarchive/unarchive_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. + Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. This API is available in the following national cloud deployments. 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/team-unarchive?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnarchiveRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. + Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnarchiveRequestBuilder: diff --git a/msgraph/generated/teams/teams_request_builder.py b/msgraph/generated/teams/teams_request_builder.py index 30ec5c9d16f..5819d7cee41 100644 --- a/msgraph/generated/teams/teams_request_builder.py +++ b/msgraph/generated/teams/teams_request_builder.py @@ -46,7 +46,7 @@ def by_team_id(self,team_id: str) -> TeamItemRequestBuilder: async def get(self,request_configuration: Optional[TeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamCollectionResponse]: """ - List all teams in an organization. + List all teams in an organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teams-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[TeamsRequestBuilderGetRequest async def post(self,body: Optional[Team] = None, request_configuration: Optional[TeamsRequestBuilderPostRequestConfiguration] = None) -> Optional[Team]: """ - Create a new team. + Create a new team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Team] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Team] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[TeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all teams in an organization. + List all teams in an organization. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Team] = None, request_configuration: Optional[TeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new team. + Create a new team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Team] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class TeamsRequestBuilderGetQueryParameters(): """ - List all teams in an organization. + List all teams in an organization. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teams_templates/count/count_request_builder.py b/msgraph/generated/teams_templates/count/count_request_builder.py index 0be49522bde..7d09cfa4606 100644 --- a/msgraph/generated/teams_templates/count/count_request_builder.py +++ b/msgraph/generated/teams_templates/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teams_templates/item/teams_template_item_request_builder.py b/msgraph/generated/teams_templates/item/teams_template_item_request_builder.py index 25c46c8b49a..337872a0f5d 100644 --- a/msgraph/generated/teams_templates/item/teams_template_item_request_builder.py +++ b/msgraph/generated/teams_templates/item/teams_template_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamsTemp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTemplateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsTemplat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTemplate] = None, request_configuration: Optional[TeamsTemplateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TeamsTemplate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teams_templates/teams_templates_request_builder.py b/msgraph/generated/teams_templates/teams_templates_request_builder.py index f2562d78c31..0179cef5670 100644 --- a/msgraph/generated/teams_templates/teams_templates_request_builder.py +++ b/msgraph/generated/teams_templates/teams_templates_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsTemplat Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTemplate] = None, request_configuration: Optional[TeamsTemplatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TeamsTemplate] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/count/count_request_builder.py index af6462dfa68..d30d62dec03 100644 --- a/msgraph/generated/teamwork/deleted_teams/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/deleted_teams_request_builder.py b/msgraph/generated/teamwork/deleted_teams/deleted_teams_request_builder.py index 0bb94a30c04..1429776f825 100644 --- a/msgraph/generated/teamwork/deleted_teams/deleted_teams_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/deleted_teams_request_builder.py @@ -46,7 +46,7 @@ def by_deleted_team_id(self,deleted_team_id: str) -> DeletedTeamItemRequestBuild async def get(self,request_configuration: Optional[DeletedTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[DeletedTeamCollectionResponse]: """ - Get a list of the deletedTeam objects and their properties. + Get a list of the deletedTeam objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeletedTeamCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamwork-list-deletedteams?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[DeletedTeam] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[DeletedTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the deletedTeam objects and their properties. + Get a list of the deletedTeam objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeletedTeam] = None, request_configuration: Optional[DeletedTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DeletedTeam] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class DeletedTeamsRequestBuilderGetQueryParameters(): """ - Get a list of the deletedTeam objects and their properties. + Get a list of the deletedTeam objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_response.py b/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_response.py rename to msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_get_response.py index 43cf7a72367..d9500a19078 100644 --- a/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_request_builder.py index ed2ebe39525..f8287a45568 100644 --- a/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teamwork/deletedTeams/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/channels_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/channels_request_builder.py index d0e5bdde6bf..89329a25cdb 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/channels_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/channels_request_builder.py @@ -96,14 +96,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelsRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Channel] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/count/count_request_builder.py index 711e4816acd..c111c3ef464 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_response.py b/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_response.py rename to msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_get_response.py index 80295e1ea0e..c6fd0a0c3cc 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_request_builder.py index 4c3f4bd10e9..d69bacd8818 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/channel_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/channel_item_request_builder.py index b6aa13b794f..36c6d96f008 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/channel_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/channel_item_request_builder.py @@ -106,12 +106,12 @@ def to_delete_request_information(self,request_configuration: Optional[ChannelIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -121,14 +121,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -141,13 +141,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/complete_migration/complete_migration_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/complete_migration/complete_migration_request_builder.py index 796761ee2c5..150fd8f40a3 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py new file mode 100644 index 00000000000..349bf1b33ed --- /dev/null +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_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 DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index 4644c757b6e..ff7104be271 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py deleted file mode 100644 index 1aa3df0306e..00000000000 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/content/content_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/content/content_request_builder.py index 34a31c56be4..1d2ff91a5f4 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/content/content_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/files_folder_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/files_folder_request_builder.py index 37cda955b13..37eeb345122 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_response.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_response.py rename to msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_post_response.py index bf7f1aca1fd..0ae8263f494 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_response.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_request_builder.py index 6cedaf861f6..0d4d365b2a6 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/count/count_request_builder.py index 1e62cc311cd..8455f065ecd 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 2ca5e9ce19e..a9e6e3f76c8 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/members_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/members_request_builder.py index 7f1d3f6a0a6..4dfc32c7a68 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/members_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/count/count_request_builder.py index 6fdc2170794..502778beb7f 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_response.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_response.py rename to msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_get_response.py index b172edeb11a..fe1e2d1e0db 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_response.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_request_builder.py index f6bb843271f..4aa8c3638a0 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/chat_message_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/chat_message_item_request_builder.py index bc88c498edf..27e2da69481 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py index 6ede5522d47..75ea2ff55df 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py index 01d46a52de4..68ebcf054b0 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 4022c84036e..66d14e209e5 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py index ce5e8346dd8..bc06bf8c43c 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/count/count_request_builder.py index 014241c0fa7..1ed09d4fcc9 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_response.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_response.py rename to msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_get_response.py index eb3db87a02e..215b257baaf 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ..........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py index 225575cde23..38d4e4ca089 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py index d0597b9d632..81a86758bf1 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py index 6b7b0238812..3509f9dcdea 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index ec17c311bca..5543e6c2d02 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index ef591b5c256..20cd23288e2 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index ee835ae2b27..1fd95886a94 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index aea0bcf3e38..f88d3560561 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index 83bc6f04969..5f54ffbb423 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index 93d9884d26d..b47215fa2b1 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index e6f19fe91bb..449ca078cc9 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 494f9674673..f0110bdc4be 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py index d7d01f42d59..b2e2588c11a 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py index 5425d122cf8..bfb71ea9af8 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index dd361ac97ee..00586570594 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py index bed918ab2ca..d20c5483eb0 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 cfe7d19f255..d8935d1cb78 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/provision_email/provision_email_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/provision_email/provision_email_request_builder.py index 29bfff445d6..023787f9203 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/remove_email/remove_email_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/remove_email/remove_email_request_builder.py index 81546a89b9c..366557100f5 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/count/count_request_builder.py index eeadcea7cc7..503e774fa38 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index 10091607349..7c8272d8e97 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py index d93b9c6797d..573b034d0b2 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index 6ce6d80ca7c..7972a2cf3e8 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index 1295b7ca822..a79991e6d87 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py index 6f9b9b6a3af..41d331423e4 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py index 60caa9f4771..67f07fd59b2 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/count/count_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/count/count_request_builder.py index f9bdf84e877..4ef01baaee6 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/count/count_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py index 2fbeea341b2..eb7e3040c1f 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py index 21911718fe0..880dad0f1e3 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/tabs_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/tabs_request_builder.py index 3ebeaf5151b..e7a273bcb55 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/tabs_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/deleted_team_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/deleted_team_item_request_builder.py index 88ac1c90b0f..2645bf53b59 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/deleted_team_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/deleted_team_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeletedTe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeletedTeamItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DeletedTeamI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeletedTeam] = None, request_configuration: Optional[DeletedTeamItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DeletedTeam] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/send_activity_notification_to_recipients/send_activity_notification_to_recipients_request_builder.py b/msgraph/generated/teamwork/send_activity_notification_to_recipients/send_activity_notification_to_recipients_request_builder.py index 6893b364012..b92f5ff9f60 100644 --- a/msgraph/generated/teamwork/send_activity_notification_to_recipients/send_activity_notification_to_recipients_request_builder.py +++ b/msgraph/generated/teamwork/send_activity_notification_to_recipients/send_activity_notification_to_recipients_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationToRecipientsPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationToRecipientsRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send activity feed notifications to multiple users, in bulk. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send activity feed notifications to multiple users, in bulk. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationToRecipientsPostReque def to_post_request_information(self,body: Optional[SendActivityNotificationToRecipientsPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationToRecipientsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send activity feed notifications to multiple users, in bulk. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send activity feed notifications to multiple users, in bulk. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationToRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/teams_app_settings/teams_app_settings_request_builder.py b/msgraph/generated/teamwork/teams_app_settings/teams_app_settings_request_builder.py index db2267c0a2d..e2c830727eb 100644 --- a/msgraph/generated/teamwork/teams_app_settings/teams_app_settings_request_builder.py +++ b/msgraph/generated/teamwork/teams_app_settings/teams_app_settings_request_builder.py @@ -47,9 +47,10 @@ async def delete(self,request_configuration: Optional[TeamsAppSettingsRequestBui async def get(self,request_configuration: Optional[TeamsAppSettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppSettings]: """ - Get teamsAppSettings from teamwork + Get the tenant-wide teamsAppSettings for all Teams apps in the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppSettings] + Find more info here: https://learn.microsoft.com/graph/api/teamsappsettings-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -68,10 +69,11 @@ async def get(self,request_configuration: Optional[TeamsAppSettingsRequestBuilde async def patch(self,body: Optional[TeamsAppSettings] = None, request_configuration: Optional[TeamsAppSettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsAppSettings]: """ - Update the navigation property teamsAppSettings in teamwork + Update the tenant-wide teamsAppSettings for all Teams apps in the tenant. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppSettings] + Find more info here: https://learn.microsoft.com/graph/api/teamsappsettings-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -97,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[TeamsAppS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppSettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get teamsAppSettings from teamwork + Get the tenant-wide teamsAppSettings for all Teams apps in the tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppSettings] = None, request_configuration: Optional[TeamsAppSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the navigation property teamsAppSettings in teamwork + Update the tenant-wide teamsAppSettings for all Teams apps in the tenant. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -132,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppSettings] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -165,7 +167,7 @@ class TeamsAppSettingsRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class TeamsAppSettingsRequestBuilderGetQueryParameters(): """ - Get teamsAppSettings from teamwork + Get the tenant-wide teamsAppSettings for all Teams apps in the tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/teamwork_request_builder.py b/msgraph/generated/teamwork/teamwork_request_builder.py index 28bda67bf0d..e19ac42b878 100644 --- a/msgraph/generated/teamwork/teamwork_request_builder.py +++ b/msgraph/generated/teamwork/teamwork_request_builder.py @@ -82,14 +82,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamworkRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Teamwork] = None, request_configuration: Optional[TeamworkRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -102,13 +102,13 @@ def to_patch_request_information(self,body: Optional[Teamwork] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/teamwork/workforce_integrations/count/count_request_builder.py b/msgraph/generated/teamwork/workforce_integrations/count/count_request_builder.py index 400e3250f8e..f96a9c067e1 100644 --- a/msgraph/generated/teamwork/workforce_integrations/count/count_request_builder.py +++ b/msgraph/generated/teamwork/workforce_integrations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/teamwork/workforce_integrations/item/workforce_integration_item_request_builder.py b/msgraph/generated/teamwork/workforce_integrations/item/workforce_integration_item_request_builder.py index ce0e08ae0bf..8fedaccea38 100644 --- a/msgraph/generated/teamwork/workforce_integrations/item/workforce_integration_item_request_builder.py +++ b/msgraph/generated/teamwork/workforce_integrations/item/workforce_integration_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WorkforceIntegrationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an instance of a workforceIntegration. + Delete an instance of a workforceIntegration. This API is available in the following national cloud deployments. 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/workforceintegration-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[WorkforceIntegrationItemRe async def get(self,request_configuration: Optional[WorkforceIntegrationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkforceIntegration]: """ - Retrieve the properties and relationships of a workforceIntegration object. + Retrieve the properties and relationships of a workforceIntegration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkforceIntegration] Find more info here: https://learn.microsoft.com/graph/api/workforceintegration-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[WorkforceIntegrationItemReque async def patch(self,body: Optional[WorkforceIntegration] = None, request_configuration: Optional[WorkforceIntegrationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkforceIntegration]: """ - Update the properties of a workforceIntegration object. + Update the properties of a workforceIntegration object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkforceIntegration] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[WorkforceIntegration] = None, request_config def to_delete_request_information(self,request_configuration: Optional[WorkforceIntegrationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an instance of a workforceIntegration. + Delete an instance of a workforceIntegration. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WorkforceIntegrationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a workforceIntegration object. + Retrieve the properties and relationships of a workforceIntegration object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkforceIntegration] = None, request_configuration: Optional[WorkforceIntegrationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a workforceIntegration object. + Update the properties of a workforceIntegration object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WorkforceIntegration] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class WorkforceIntegrationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class WorkforceIntegrationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a workforceIntegration object. + Retrieve the properties and relationships of a workforceIntegration object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/workforce_integrations/workforce_integrations_request_builder.py b/msgraph/generated/teamwork/workforce_integrations/workforce_integrations_request_builder.py index e185f73ef64..aecf36fd4f9 100644 --- a/msgraph/generated/teamwork/workforce_integrations/workforce_integrations_request_builder.py +++ b/msgraph/generated/teamwork/workforce_integrations/workforce_integrations_request_builder.py @@ -45,7 +45,7 @@ def by_workforce_integration_id(self,workforce_integration_id: str) -> Workforce async def get(self,request_configuration: Optional[WorkforceIntegrationsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkforceIntegrationCollectionResponse]: """ - Retrieve a list of workforceIntegration objects. + Retrieve a list of workforceIntegration objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkforceIntegrationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/workforceintegration-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[WorkforceIntegrationsRequestB async def post(self,body: Optional[WorkforceIntegration] = None, request_configuration: Optional[WorkforceIntegrationsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkforceIntegration]: """ - Create a new workforceIntegration object.You can set up which entities you want to receive Shifts synchronous change notifications on and set entities to configure filtering by WFM rules eligibility for, including swap requests. + Create a new workforceIntegration object.You can set up which entities you want to receive Shifts synchronous change notifications on and set entities to configure filtering by WFM rules eligibility for, including swap requests. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkforceIntegration] @@ -92,24 +92,24 @@ async def post(self,body: Optional[WorkforceIntegration] = None, request_configu def to_get_request_information(self,request_configuration: Optional[WorkforceIntegrationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of workforceIntegration objects. + Retrieve a list of workforceIntegration objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WorkforceIntegration] = None, request_configuration: Optional[WorkforceIntegrationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new workforceIntegration object.You can set up which entities you want to receive Shifts synchronous change notifications on and set entities to configure filtering by WFM rules eligibility for, including swap requests. + Create a new workforceIntegration object.You can set up which entities you want to receive Shifts synchronous change notifications on and set entities to configure filtering by WFM rules eligibility for, including swap requests. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WorkforceIntegration] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class WorkforceIntegrationsRequestBuilderGetQueryParameters(): """ - Retrieve a list of workforceIntegration objects. + Retrieve a list of workforceIntegration objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_customers/count/count_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_customers/count/count_request_builder.py index ceee29f7fa7..3fe2da81cf7 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_customers/count/count_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_customers/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/delegated_admin_customers/delegated_admin_customers_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_customers/delegated_admin_customers_request_builder.py index a793e0e2ade..734f9162733 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_customers/delegated_admin_customers_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_customers/delegated_admin_customers_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_admin_customer_id(self,delegated_admin_customer_id: str) -> Del async def get(self,request_configuration: Optional[DelegatedAdminCustomersRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminCustomerCollectionResponse]: """ - Get a list of the delegatedAdminCustomer objects and their properties. + Get a list of the delegatedAdminCustomer objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminCustomerCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/tenantrelationship-list-delegatedadmincustomers?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DelegatedAdminCustomer] = None, request_confi def to_get_request_information(self,request_configuration: Optional[DelegatedAdminCustomersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the delegatedAdminCustomer objects and their properties. + Get a list of the delegatedAdminCustomer objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminCustomer] = None, request_configuration: Optional[DelegatedAdminCustomersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DelegatedAdminCustomer] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DelegatedAdminCustomersRequestBuilderGetQueryParameters(): """ - Get a list of the delegatedAdminCustomer objects and their properties. + Get a list of the delegatedAdminCustomer objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/delegated_admin_customer_item_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/delegated_admin_customer_item_request_builder.py index 5c1564b7252..4732c8b93cf 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/delegated_admin_customer_item_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/delegated_admin_customer_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[DelegatedAdminCustomerItem async def get(self,request_configuration: Optional[DelegatedAdminCustomerItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminCustomer]: """ - Read the properties of a delegatedAdminCustomer object. + Read the properties of a delegatedAdminCustomer object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminCustomer] Find more info here: https://learn.microsoft.com/graph/api/delegatedadmincustomer-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[Delegated Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedAdminCustomerItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of a delegatedAdminCustomer object. + Read the properties of a delegatedAdminCustomer object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminCustomer] = None, request_configuration: Optional[DelegatedAdminCustomerItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DelegatedAdminCustomer] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class DelegatedAdminCustomerItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class DelegatedAdminCustomerItemRequestBuilderGetQueryParameters(): """ - Read the properties of a delegatedAdminCustomer object. + Read the properties of a delegatedAdminCustomer object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/count/count_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/count/count_request_builder.py index cbd93190cd0..c4c8a83c5dd 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/count/count_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/item/delegated_admin_service_management_detail_item_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/item/delegated_admin_service_management_detail_item_request_builder.py index 087c075e627..e234c621857 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/item/delegated_admin_service_management_detail_item_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/item/delegated_admin_service_management_detail_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Delegated Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedAdminServiceManagementDetailItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DelegatedAdm Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminServiceManagementDetail] = None, request_configuration: Optional[DelegatedAdminServiceManagementDetailItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DelegatedAdminServiceManage if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/service_management_details_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/service_management_details_request_builder.py index a848c5cd270..cf82384bd43 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/service_management_details_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_customers/item/service_management_details/service_management_details_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_admin_service_management_detail_id(self,delegated_admin_service async def get(self,request_configuration: Optional[ServiceManagementDetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminServiceManagementDetailCollectionResponse]: """ - Get a list of the delegatedAdminServiceManagementDetail objects and their properties. + Get a list of the delegatedAdminServiceManagementDetail objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminServiceManagementDetailCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/delegatedadmincustomer-list-servicemanagementdetails?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DelegatedAdminServiceManagementDetail] = None def to_get_request_information(self,request_configuration: Optional[ServiceManagementDetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the delegatedAdminServiceManagementDetail objects and their properties. + Get a list of the delegatedAdminServiceManagementDetail objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminServiceManagementDetail] = None, request_configuration: Optional[ServiceManagementDetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DelegatedAdminServiceManagem if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ServiceManagementDetailsRequestBuilderGetQueryParameters(): """ - Get a list of the delegatedAdminServiceManagementDetail objects and their properties. + Get a list of the delegatedAdminServiceManagementDetail objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/count/count_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/count/count_request_builder.py index 36a65b5759e..34c3e4bc11f 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/count/count_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/delegated_admin_relationships_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/delegated_admin_relationships_request_builder.py index 8c4e3722740..5ac06b99757 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/delegated_admin_relationships_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/delegated_admin_relationships_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_admin_relationship_id(self,delegated_admin_relationship_id: str async def get(self,request_configuration: Optional[DelegatedAdminRelationshipsRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminRelationshipCollectionResponse]: """ - Get a list of the delegatedAdminRelationship objects and their properties. + Get a list of the delegatedAdminRelationship objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationshipCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/tenantrelationship-list-delegatedadminrelationships?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[DelegatedAdminRelationshipsRe async def post(self,body: Optional[DelegatedAdminRelationship] = None, request_configuration: Optional[DelegatedAdminRelationshipsRequestBuilderPostRequestConfiguration] = None) -> Optional[DelegatedAdminRelationship]: """ - Create a new delegatedAdminRelationship object. + Create a new delegatedAdminRelationship object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationship] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DelegatedAdminRelationship] = None, request_c def to_get_request_information(self,request_configuration: Optional[DelegatedAdminRelationshipsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the delegatedAdminRelationship objects and their properties. + Get a list of the delegatedAdminRelationship objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminRelationship] = None, request_configuration: Optional[DelegatedAdminRelationshipsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new delegatedAdminRelationship object. + Create a new delegatedAdminRelationship object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DelegatedAdminRelationship] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DelegatedAdminRelationshipsRequestBuilderGetQueryParameters(): """ - Get a list of the delegatedAdminRelationship objects and their properties. + Get a list of the delegatedAdminRelationship objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/access_assignments_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/access_assignments_request_builder.py index ff42ab7f165..e7e850e14db 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/access_assignments_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/access_assignments_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_admin_access_assignment_id(self,delegated_admin_access_assignme async def get(self,request_configuration: Optional[AccessAssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminAccessAssignmentCollectionResponse]: """ - Get a list of the delegatedAdminAccessAssignment objects and their properties. + Get a list of the delegatedAdminAccessAssignment objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminAccessAssignmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminrelationship-list-accessassignments?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AccessAssignmentsRequestBuild async def post(self,body: Optional[DelegatedAdminAccessAssignment] = None, request_configuration: Optional[AccessAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[DelegatedAdminAccessAssignment]: """ - Create a new delegatedAdminAccessAssignment object. + Create a new delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminAccessAssignment] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DelegatedAdminAccessAssignment] = None, reque def to_get_request_information(self,request_configuration: Optional[AccessAssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the delegatedAdminAccessAssignment objects and their properties. + Get a list of the delegatedAdminAccessAssignment objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminAccessAssignment] = None, request_configuration: Optional[AccessAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new delegatedAdminAccessAssignment object. + Create a new delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DelegatedAdminAccessAssignme if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AccessAssignmentsRequestBuilderGetQueryParameters(): """ - Get a list of the delegatedAdminAccessAssignment objects and their properties. + Get a list of the delegatedAdminAccessAssignment objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/count/count_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/count/count_request_builder.py index ea777a4eaed..c94e8349262 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/count/count_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/item/delegated_admin_access_assignment_item_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/item/delegated_admin_access_assignment_item_request_builder.py index 458c9dfd0f2..a52eb490679 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/item/delegated_admin_access_assignment_item_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/access_assignments/item/delegated_admin_access_assignment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DelegatedAdminAccessAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a delegatedAdminAccessAssignment object. + Delete a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. 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/delegatedadminaccessassignment-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[DelegatedAdminAccessAssign async def get(self,request_configuration: Optional[DelegatedAdminAccessAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminAccessAssignment]: """ - Read the properties of a delegatedAdminAccessAssignment object. + Read the properties of a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminAccessAssignment] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminaccessassignment-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[DelegatedAdminAccessAssignmen async def patch(self,body: Optional[DelegatedAdminAccessAssignment] = None, request_configuration: Optional[DelegatedAdminAccessAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DelegatedAdminAccessAssignment]: """ - Update the properties of a delegatedAdminAccessAssignment object. + Update the properties of a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminAccessAssignment] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[DelegatedAdminAccessAssignment] = None, requ def to_delete_request_information(self,request_configuration: Optional[DelegatedAdminAccessAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a delegatedAdminAccessAssignment object. + Delete a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedAdminAccessAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of a delegatedAdminAccessAssignment object. + Read the properties of a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminAccessAssignment] = None, request_configuration: Optional[DelegatedAdminAccessAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a delegatedAdminAccessAssignment object. + Update the properties of a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[DelegatedAdminAccessAssignm if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class DelegatedAdminAccessAssignmentItemRequestBuilderDeleteRequestConfiguration @dataclass class DelegatedAdminAccessAssignmentItemRequestBuilderGetQueryParameters(): """ - Read the properties of a delegatedAdminAccessAssignment object. + Read the properties of a delegatedAdminAccessAssignment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/delegated_admin_relationship_item_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/delegated_admin_relationship_item_request_builder.py index 0d81e4f3cc4..df0e80176b1 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/delegated_admin_relationship_item_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/delegated_admin_relationship_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DelegatedAdminRelationshipItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a delegatedAdminRelationship object. A relationship can only be deleted if it's in the 'created' status. + Delete a delegatedAdminRelationship object. A relationship can only be deleted if it's in the 'created' status. This API is available in the following national cloud deployments. 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/delegatedadminrelationship-delete?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[DelegatedAdminRelationship async def get(self,request_configuration: Optional[DelegatedAdminRelationshipItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminRelationship]: """ - Read the properties of a delegatedAdminRelationship object. + Read the properties of a delegatedAdminRelationship object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationship] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminrelationship-get?view=graph-rest-1.0 @@ -73,7 +73,7 @@ async def get(self,request_configuration: Optional[DelegatedAdminRelationshipIte async def patch(self,body: Optional[DelegatedAdminRelationship] = None, request_configuration: Optional[DelegatedAdminRelationshipItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DelegatedAdminRelationship]: """ - Update the properties of a delegatedAdminRelationship object. A relationship can only be updated if it's in the created status. + Update the properties of a delegatedAdminRelationship object. A relationship can only be updated if it's in the created status. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationship] @@ -98,39 +98,39 @@ async def patch(self,body: Optional[DelegatedAdminRelationship] = None, request_ def to_delete_request_information(self,request_configuration: Optional[DelegatedAdminRelationshipItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a delegatedAdminRelationship object. A relationship can only be deleted if it's in the 'created' status. + Delete a delegatedAdminRelationship object. A relationship can only be deleted if it's in the 'created' status. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedAdminRelationshipItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of a delegatedAdminRelationship object. + Read the properties of a delegatedAdminRelationship object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminRelationship] = None, request_configuration: Optional[DelegatedAdminRelationshipItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a delegatedAdminRelationship object. A relationship can only be updated if it's in the created status. + Update the properties of a delegatedAdminRelationship object. A relationship can only be updated if it's in the created status. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[DelegatedAdminRelationship] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -198,7 +198,7 @@ class DelegatedAdminRelationshipItemRequestBuilderDeleteRequestConfiguration(Bas @dataclass class DelegatedAdminRelationshipItemRequestBuilderGetQueryParameters(): """ - Read the properties of a delegatedAdminRelationship object. + Read the properties of a delegatedAdminRelationship object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/count/count_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/count/count_request_builder.py index 78f72e83a5b..4359212290a 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/count/count_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/item/delegated_admin_relationship_operation_item_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/item/delegated_admin_relationship_operation_item_request_builder.py index 858506ca15d..2568bb25add 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/item/delegated_admin_relationship_operation_item_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/item/delegated_admin_relationship_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DelegatedAdminRelationship async def get(self,request_configuration: Optional[DelegatedAdminRelationshipOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminRelationshipOperation]: """ - Read the properties of a delegatedAdminRelationshipOperation object. + Read the properties of a delegatedAdminRelationshipOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationshipOperation] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminrelationshipoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Delegated Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedAdminRelationshipOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties of a delegatedAdminRelationshipOperation object. + Read the properties of a delegatedAdminRelationshipOperation object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminRelationshipOperation] = None, request_configuration: Optional[DelegatedAdminRelationshipOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DelegatedAdminRelationshipO if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class DelegatedAdminRelationshipOperationItemRequestBuilderDeleteRequestConfigur @dataclass class DelegatedAdminRelationshipOperationItemRequestBuilderGetQueryParameters(): """ - Read the properties of a delegatedAdminRelationshipOperation object. + Read the properties of a delegatedAdminRelationshipOperation object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/operations_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/operations_request_builder.py index d8113bac4d4..32e6b635055 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/operations_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_admin_relationship_operation_id(self,delegated_admin_relationsh async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminRelationshipOperationCollectionResponse]: """ - Get a list of the delegatedAdminRelationshipOperation objects and their properties. + Get a list of the delegatedAdminRelationshipOperation objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationshipOperationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminrelationship-list-operations?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[DelegatedAdminRelationshipOperation] = None, def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the delegatedAdminRelationshipOperation objects and their properties. + Get a list of the delegatedAdminRelationshipOperation objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminRelationshipOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[DelegatedAdminRelationshipOp if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get a list of the delegatedAdminRelationshipOperation objects and their properties. + Get a list of the delegatedAdminRelationshipOperation objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/count/count_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/count/count_request_builder.py index 3c470514d04..93f78a3dc74 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/count/count_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/item/delegated_admin_relationship_request_item_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/item/delegated_admin_relationship_request_item_request_builder.py index 5ebf2d58052..d954a235ab7 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/item/delegated_admin_relationship_request_item_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/item/delegated_admin_relationship_request_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DelegatedAdminRelationship async def get(self,request_configuration: Optional[DelegatedAdminRelationshipRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminRelationshipRequest]: """ - Read the properties and relationships of a delegatedAdminRelationshipRequest object. + Read the properties and relationships of a delegatedAdminRelationshipRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationshipRequest] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminrelationshiprequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Delegated Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DelegatedAdminRelationshipRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a delegatedAdminRelationshipRequest object. + Read the properties and relationships of a delegatedAdminRelationshipRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminRelationshipRequest] = None, request_configuration: Optional[DelegatedAdminRelationshipRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DelegatedAdminRelationshipR if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class DelegatedAdminRelationshipRequestItemRequestBuilderDeleteRequestConfigurat @dataclass class DelegatedAdminRelationshipRequestItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a delegatedAdminRelationshipRequest object. + Read the properties and relationships of a delegatedAdminRelationshipRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/requests_request_builder.py b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/requests_request_builder.py index bb6f34936c7..241c345a594 100644 --- a/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/requests_request_builder.py +++ b/msgraph/generated/tenant_relationships/delegated_admin_relationships/item/requests/requests_request_builder.py @@ -45,7 +45,7 @@ def by_delegated_admin_relationship_request_id(self,delegated_admin_relationship async def get(self,request_configuration: Optional[RequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[DelegatedAdminRelationshipRequestCollectionResponse]: """ - Get a list of the delegatedAdminRelationshipRequest objects and their properties. + Get a list of the delegatedAdminRelationshipRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationshipRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/delegatedadminrelationship-list-requests?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RequestsRequestBuilderGetRequ async def post(self,body: Optional[DelegatedAdminRelationshipRequest] = None, request_configuration: Optional[RequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[DelegatedAdminRelationshipRequest]: """ - Create a new delegatedAdminRelationshipRequest object. + Create a new delegatedAdminRelationshipRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DelegatedAdminRelationshipRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[DelegatedAdminRelationshipRequest] = None, re def to_get_request_information(self,request_configuration: Optional[RequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the delegatedAdminRelationshipRequest objects and their properties. + Get a list of the delegatedAdminRelationshipRequest objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DelegatedAdminRelationshipRequest] = None, request_configuration: Optional[RequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new delegatedAdminRelationshipRequest object. + Create a new delegatedAdminRelationshipRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[DelegatedAdminRelationshipRe if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RequestsRequestBuilderGetQueryParameters(): """ - Get a list of the delegatedAdminRelationshipRequest objects and their properties. + Get a list of the delegatedAdminRelationshipRequest objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/tenant_relationships/find_tenant_information_by_domain_name_with_domain_name/find_tenant_information_by_domain_name_with_domain_name_request_builder.py b/msgraph/generated/tenant_relationships/find_tenant_information_by_domain_name_with_domain_name/find_tenant_information_by_domain_name_with_domain_name_request_builder.py index f84ebcfc269..5f4ba299108 100644 --- a/msgraph/generated/tenant_relationships/find_tenant_information_by_domain_name_with_domain_name/find_tenant_information_by_domain_name_with_domain_name_request_builder.py +++ b/msgraph/generated/tenant_relationships/find_tenant_information_by_domain_name_with_domain_name/find_tenant_information_by_domain_name_with_domain_name_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['domain_name'] = str(domain_name) super().__init__(request_adapter, "{+baseurl}/tenantRelationships/findTenantInformationByDomainName(domainName='{domainName}')", path_parameters) async def get(self,request_configuration: Optional[FindTenantInformationByDomainNameWithDomainNameRequestBuilderGetRequestConfiguration] = None) -> Optional[TenantInformation]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[FindTenantIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> FindTenantInformationByDomainNameWithDomainNameRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/find_tenant_information_by_tenant_id_with_tenant_id/find_tenant_information_by_tenant_id_with_tenant_id_request_builder.py b/msgraph/generated/tenant_relationships/find_tenant_information_by_tenant_id_with_tenant_id/find_tenant_information_by_tenant_id_with_tenant_id_request_builder.py index 9a5bb790181..1fa15153355 100644 --- a/msgraph/generated/tenant_relationships/find_tenant_information_by_tenant_id_with_tenant_id/find_tenant_information_by_tenant_id_with_tenant_id_request_builder.py +++ b/msgraph/generated/tenant_relationships/find_tenant_information_by_tenant_id_with_tenant_id/find_tenant_information_by_tenant_id_with_tenant_id_request_builder.py @@ -25,6 +25,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param tenant_id: Usage: tenantId='{tenantId}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['tenant_id'] = str(tenant_id) super().__init__(request_adapter, "{+baseurl}/tenantRelationships/findTenantInformationByTenantId(tenantId='{tenantId}')", path_parameters) async def get(self,request_configuration: Optional[FindTenantInformationByTenantIdWithTenantIdRequestBuilderGetRequestConfiguration] = None) -> Optional[TenantInformation]: @@ -55,13 +57,13 @@ def to_get_request_information(self,request_configuration: Optional[FindTenantIn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> FindTenantInformationByTenantIdWithTenantIdRequestBuilder: diff --git a/msgraph/generated/tenant_relationships/tenant_relationships_request_builder.py b/msgraph/generated/tenant_relationships/tenant_relationships_request_builder.py index 760b8d5e440..3b53ccf7db4 100644 --- a/msgraph/generated/tenant_relationships/tenant_relationships_request_builder.py +++ b/msgraph/generated/tenant_relationships/tenant_relationships_request_builder.py @@ -106,14 +106,14 @@ def to_get_request_information(self,request_configuration: Optional[TenantRelati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TenantRelationship] = None, request_configuration: Optional[TenantRelationshipsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -126,13 +126,13 @@ def to_patch_request_information(self,body: Optional[TenantRelationship] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/count/count_request_builder.py b/msgraph/generated/users/count/count_request_builder.py index b43ef649435..fc0e3ac83aa 100644 --- a/msgraph/generated/users/count/count_request_builder.py +++ b/msgraph/generated/users/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/delta/delta_response.py b/msgraph/generated/users/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/delta/delta_response.py rename to msgraph/generated/users/delta/delta_get_response.py index 71ae2d5470c..50b0ac9debd 100644 --- a/msgraph/generated/users/delta/delta_response.py +++ b/msgraph/generated/users/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[User]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/delta/delta_request_builder.py b/msgraph/generated/users/delta/delta_request_builder.py index ddd2e754088..6efcf014dfb 100644 --- a/msgraph/generated/users/delta/delta_request_builder.py +++ b/msgraph/generated/users/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_post_response.py b/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_post_response.py new file mode 100644 index 00000000000..4811ce7ed9a --- /dev/null +++ b/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetAvailableExtensionPropertiesPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExtensionProperty]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetAvailableExtensionPropertiesPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetAvailableExtensionPropertiesPostResponse() + + def 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.extension_property import ExtensionProperty + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.extension_property import ExtensionProperty + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), + } + 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/users/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_request_builder.py index 7806f82f498..a2b55da2bdd 100644 --- a/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ b/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/getAvailableExtensionProperties", path_parameters) - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: + async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] + Returns: Optional[GetAvailableExtensionPropertiesPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBod } if not self.request_adapter: raise Exception("Http core is null") - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse + from .get_available_extension_properties_post_response import GetAvailableExtensionPropertiesPostResponse - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetAvailableExtensionPropert if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index bbc810c760f..00000000000 --- a/msgraph/generated/users/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/users/get_by_ids/get_by_ids_post_response.py b/msgraph/generated/users/get_by_ids/get_by_ids_post_response.py new file mode 100644 index 00000000000..11bb9a8ae29 --- /dev/null +++ b/msgraph/generated/users/get_by_ids/get_by_ids_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + +from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetByIdsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DirectoryObject]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetByIdsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetByIdsPostResponse() + + def 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.directory_object import DirectoryObject + + from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...models.directory_object import DirectoryObject + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), + } + 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/users/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/users/get_by_ids/get_by_ids_request_builder.py index d98bd255099..c45eac006c2 100644 --- a/msgraph/generated/users/get_by_ids/get_by_ids_request_builder.py +++ b/msgraph/generated/users/get_by_ids/get_by_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ...models.o_data_errors.o_data_error import ODataError from .get_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse class GetByIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/getByIds", path_parameters) - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: + async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsPostResponse]: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] + Returns: Optional[GetByIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_conf } if not self.request_adapter: raise Exception("Http core is null") - from .get_by_ids_response import GetByIdsResponse + from .get_by_ids_post_response import GetByIdsPostResponse - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetByIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/get_by_ids/get_by_ids_response.py b/msgraph/generated/users/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 3628311761a..00000000000 --- a/msgraph/generated/users/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from ...models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/users/item/activities/activities_request_builder.py b/msgraph/generated/users/item/activities/activities_request_builder.py index f1a658f2c54..7fe51cfa1d8 100644 --- a/msgraph/generated/users/item/activities/activities_request_builder.py +++ b/msgraph/generated/users/item/activities/activities_request_builder.py @@ -46,7 +46,7 @@ def by_user_activity_id(self,user_activity_id: str) -> UserActivityItemRequestBu async def get(self,request_configuration: Optional[ActivitiesRequestBuilderGetRequestConfiguration] = None) -> Optional[UserActivityCollectionResponse]: """ - Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. + Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserActivityCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/projectrome-get-activities?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[UserActivity] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ActivitiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. + Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserActivity] = None, request_configuration: Optional[ActivitiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UserActivity] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def recent(self) -> RecentRequestBuilder: @dataclass class ActivitiesRequestBuilderGetQueryParameters(): """ - Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. + Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/activities/count/count_request_builder.py b/msgraph/generated/users/item/activities/count/count_request_builder.py index 5eb80147514..bb46a566877 100644 --- a/msgraph/generated/users/item/activities/count/count_request_builder.py +++ b/msgraph/generated/users/item/activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/activities/item/history_items/count/count_request_builder.py b/msgraph/generated/users/item/activities/item/history_items/count/count_request_builder.py index 7bd90dba11f..0233b739f47 100644 --- a/msgraph/generated/users/item/activities/item/history_items/count/count_request_builder.py +++ b/msgraph/generated/users/item/activities/item/history_items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/activities/item/history_items/history_items_request_builder.py b/msgraph/generated/users/item/activities/item/history_items/history_items_request_builder.py index b307ed3f756..df7ccb8e0c1 100644 --- a/msgraph/generated/users/item/activities/item/history_items/history_items_request_builder.py +++ b/msgraph/generated/users/item/activities/item/history_items/history_items_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[HistoryItems Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ActivityHistoryItem] = None, request_configuration: Optional[HistoryItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ActivityHistoryItem] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/activities/item/history_items/item/activity/activity_request_builder.py b/msgraph/generated/users/item/activities/item/history_items/item/activity/activity_request_builder.py index 1c03bf010ca..d90e5cfe8f7 100644 --- a/msgraph/generated/users/item/activities/item/history_items/item/activity/activity_request_builder.py +++ b/msgraph/generated/users/item/activities/item/history_items/item/activity/activity_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ActivityRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ActivityRequestBuilder: diff --git a/msgraph/generated/users/item/activities/item/history_items/item/activity_history_item_item_request_builder.py b/msgraph/generated/users/item/activities/item/history_items/item/activity_history_item_item_request_builder.py index caf644d357d..9b627caf794 100644 --- a/msgraph/generated/users/item/activities/item/history_items/item/activity_history_item_item_request_builder.py +++ b/msgraph/generated/users/item/activities/item/history_items/item/activity_history_item_item_request_builder.py @@ -69,11 +69,11 @@ async def get(self,request_configuration: Optional[ActivityHistoryItemItemReques async def patch(self,body: Optional[ActivityHistoryItem] = None, request_configuration: Optional[ActivityHistoryItemItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ActivityHistoryItem]: """ - Delete an existing history item for an existing user activity. + Create a new or replace an existing history item for an existing user activity. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ActivityHistoryItem] - Find more info here: https://learn.microsoft.com/graph/api/projectrome-delete-historyitem?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/projectrome-put-historyitem?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ActivityH Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ActivityHistoryItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[ActivityHist Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ActivityHistoryItem] = None, request_configuration: Optional[ActivityHistoryItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Delete an existing history item for an existing user activity. + Create a new or replace an existing history item for an existing user activity. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ActivityHistoryItem] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/activities/item/user_activity_item_request_builder.py b/msgraph/generated/users/item/activities/item/user_activity_item_request_builder.py index b352c1f585c..4d7ce1de102 100644 --- a/msgraph/generated/users/item/activities/item/user_activity_item_request_builder.py +++ b/msgraph/generated/users/item/activities/item/user_activity_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UserActivityItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an existing user activity for your app. + Delete an existing user activity for your app. This API is available in the following national cloud deployments. 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/projectrome-delete-activity?view=graph-rest-1.0 @@ -94,17 +94,17 @@ async def patch(self,body: Optional[UserActivity] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[UserActivityItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an existing user activity for your app. + Delete an existing user activity for your app. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[UserActivity Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserActivity] = None, request_configuration: Optional[UserActivityItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[UserActivity] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/activities/recent/recent_response.py b/msgraph/generated/users/item/activities/recent/recent_get_response.py similarity index 92% rename from msgraph/generated/users/item/activities/recent/recent_response.py rename to msgraph/generated/users/item/activities/recent/recent_get_response.py index f223a134188..c929d8b6cfe 100644 --- a/msgraph/generated/users/item/activities/recent/recent_response.py +++ b/msgraph/generated/users/item/activities/recent/recent_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class RecentResponse(BaseCollectionPaginationCountResponse): +class RecentGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[UserActivity]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RecentResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RecentGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RecentResponse + Returns: RecentGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return RecentResponse() + return RecentGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/activities/recent/recent_request_builder.py b/msgraph/generated/users/item/activities/recent/recent_request_builder.py index 8846ff913f0..0ee9ef3fd98 100644 --- a/msgraph/generated/users/item/activities/recent/recent_request_builder.py +++ b/msgraph/generated/users/item/activities/recent/recent_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .recent_response import RecentResponse + from .recent_get_response import RecentGetResponse class RecentRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/activities/recent(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[RecentRequestBuilderGetRequestConfiguration] = None) -> Optional[RecentResponse]: + async def get(self,request_configuration: Optional[RecentRequestBuilderGetRequestConfiguration] = None) -> Optional[RecentGetResponse]: """ - Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service will query for the most recent historyItems, and then pull those related activities. Activities will be sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems will not be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. + Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service queries for the most recent historyItems, and then pull those related activities. Activities are sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems won't be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RecentResponse] + Returns: Optional[RecentGetResponse] Find more info here: https://learn.microsoft.com/graph/api/projectrome-get-recent-activities?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[RecentRequestBuilderGetReques } if not self.request_adapter: raise Exception("Http core is null") - from .recent_response import RecentResponse + from .recent_get_response import RecentGetResponse - return await self.request_adapter.send_async(request_info, RecentResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RecentGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[RecentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service will query for the most recent historyItems, and then pull those related activities. Activities will be sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems will not be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. + Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service queries for the most recent historyItems, and then pull those related activities. Activities are sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems won't be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RecentRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> RecentRequestBuilder: @dataclass class RecentRequestBuilderGetQueryParameters(): """ - Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service will query for the most recent historyItems, and then pull those related activities. Activities will be sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems will not be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. + Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service queries for the most recent historyItems, and then pull those related activities. Activities are sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems won't be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/agreement_acceptances/agreement_acceptances_request_builder.py b/msgraph/generated/users/item/agreement_acceptances/agreement_acceptances_request_builder.py index 846f47dea82..193af32ffe0 100644 --- a/msgraph/generated/users/item/agreement_acceptances/agreement_acceptances_request_builder.py +++ b/msgraph/generated/users/item/agreement_acceptances/agreement_acceptances_request_builder.py @@ -44,7 +44,7 @@ def by_agreement_acceptance_id(self,agreement_acceptance_id: str) -> AgreementAc async def get(self,request_configuration: Optional[AgreementAcceptancesRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementAcceptanceCollectionResponse]: """ - Retrieve the signed-in user's agreementAcceptance objects. + Retrieve the signed-in user's agreementAcceptance objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AgreementAcceptanceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-agreementacceptances?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AgreementAcceptancesRequestBu def to_get_request_information(self,request_configuration: Optional[AgreementAcceptancesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the signed-in user's agreementAcceptance objects. + Retrieve the signed-in user's agreementAcceptance objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AgreementAcceptancesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AgreementAcceptancesRequestBuilderGetQueryParameters(): """ - Retrieve the signed-in user's agreementAcceptance objects. + Retrieve the signed-in user's agreementAcceptance objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/agreement_acceptances/count/count_request_builder.py b/msgraph/generated/users/item/agreement_acceptances/count/count_request_builder.py index 994e6243fc8..99b6fe3afba 100644 --- a/msgraph/generated/users/item/agreement_acceptances/count/count_request_builder.py +++ b/msgraph/generated/users/item/agreement_acceptances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/agreement_acceptances/item/agreement_acceptance_item_request_builder.py b/msgraph/generated/users/item/agreement_acceptances/item/agreement_acceptance_item_request_builder.py index 497ac575d22..d522d4d3d37 100644 --- a/msgraph/generated/users/item/agreement_acceptances/item/agreement_acceptance_item_request_builder.py +++ b/msgraph/generated/users/item/agreement_acceptances/item/agreement_acceptance_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[AgreementAcc Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AgreementAcceptanceItemRequestBuilder: diff --git a/msgraph/generated/users/item/app_role_assignments/app_role_assignments_request_builder.py b/msgraph/generated/users/item/app_role_assignments/app_role_assignments_request_builder.py index f1ccef09da4..7a4b17a5aa7 100644 --- a/msgraph/generated/users/item/app_role_assignments/app_role_assignments_request_builder.py +++ b/msgraph/generated/users/item/app_role_assignments/app_role_assignments_request_builder.py @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[AppRoleAssignmentsRequestBuil async def post(self,body: Optional[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[AppRoleAssignment]: """ - Use this API to assign an app role to a user. To grant an app role assignment to a user, you need three identifiers: + Use this API to assign an app role to a user. To grant an app role assignment to a user, you need three identifiers: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AppRoleAssignment] @@ -97,19 +97,19 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to assign an app role to a user. To grant an app role assignment to a user, you need three identifiers: + Use this API to assign an app role to a user. To grant an app role assignment to a user, you need three identifiers: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[AppRoleAssignment] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/app_role_assignments/count/count_request_builder.py b/msgraph/generated/users/item/app_role_assignments/count/count_request_builder.py index 169b98f5e80..70b46a4b09f 100644 --- a/msgraph/generated/users/item/app_role_assignments/count/count_request_builder.py +++ b/msgraph/generated/users/item/app_role_assignments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/app_role_assignments/item/app_role_assignment_item_request_builder.py b/msgraph/generated/users/item/app_role_assignments/item/app_role_assignment_item_request_builder.py index e01796be5a2..bb080009fd9 100644 --- a/msgraph/generated/users/item/app_role_assignments/item/app_role_assignment_item_request_builder.py +++ b/msgraph/generated/users/item/app_role_assignments/item/app_role_assignment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an appRoleAssignment that has been granted to a user. + Delete an appRoleAssignment that has been granted to a user. This API is available in the following national cloud deployments. 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-approleassignments?view=graph-rest-1.0 @@ -93,17 +93,17 @@ async def patch(self,body: Optional[AppRoleAssignment] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an appRoleAssignment that has been granted to a user. + Delete an appRoleAssignment that has been granted to a user. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AppRoleAssignmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AppRoleAssig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AppRoleAssignment] = None, request_configuration: Optional[AppRoleAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AppRoleAssignment] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/assign_license/assign_license_request_builder.py b/msgraph/generated/users/item/assign_license/assign_license_request_builder.py index 381a5aeeaa8..02180a7acb5 100644 --- a/msgraph/generated/users/item/assign_license/assign_license_request_builder.py +++ b/msgraph/generated/users/item/assign_license/assign_license_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AssignLicensePostRequestBody] = None, request_configuration: Optional[AssignLicenseRequestBuilderPostRequestConfiguration] = None) -> Optional[User]: """ - Add or remove subscriptions for the user. You can also enable and disable specific plans associated with a subscription. + Add or remove subscriptions for the user. You can also enable and disable specific plans associated with a subscription. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] @@ -54,7 +54,7 @@ async def post(self,body: Optional[AssignLicensePostRequestBody] = None, request def to_post_request_information(self,body: Optional[AssignLicensePostRequestBody] = None, request_configuration: Optional[AssignLicenseRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add or remove subscriptions for the user. You can also enable and disable specific plans associated with a subscription. + Add or remove subscriptions for the user. You can also enable and disable specific plans associated with a subscription. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AssignLicensePostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/authentication/authentication_request_builder.py b/msgraph/generated/users/item/authentication/authentication_request_builder.py index 7623007753a..9c975459670 100644 --- a/msgraph/generated/users/item/authentication/authentication_request_builder.py +++ b/msgraph/generated/users/item/authentication/authentication_request_builder.py @@ -107,12 +107,12 @@ def to_delete_request_information(self,request_configuration: Optional[Authentic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AuthenticationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -122,14 +122,14 @@ def to_get_request_information(self,request_configuration: Optional[Authenticati Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Authentication] = None, request_configuration: Optional[AuthenticationRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[Authentication] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/authentication/email_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/email_methods/count/count_request_builder.py index 79131092e99..70f8cd23695 100644 --- a/msgraph/generated/users/item/authentication/email_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/email_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/email_methods/email_methods_request_builder.py b/msgraph/generated/users/item/authentication/email_methods/email_methods_request_builder.py index 21bb29014d2..d41a291c5f1 100644 --- a/msgraph/generated/users/item/authentication/email_methods/email_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/email_methods/email_methods_request_builder.py @@ -45,7 +45,7 @@ def by_email_authentication_method_id(self,email_authentication_method_id: str) async def get(self,request_configuration: Optional[EmailMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[EmailAuthenticationMethodCollectionResponse]: """ - Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. + Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EmailAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authentication-list-emailmethods?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[EmailMethodsRequestBuilderGet async def post(self,body: Optional[EmailAuthenticationMethod] = None, request_configuration: Optional[EmailMethodsRequestBuilderPostRequestConfiguration] = None) -> Optional[EmailAuthenticationMethod]: """ - Set a user's emailAuthenticationMethod object. Email authentication is a self-service password reset method. A user may only have one email authentication method. + Set a user's emailAuthenticationMethod object. Email authentication is a self-service password reset method. A user may only have one email authentication method. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EmailAuthenticationMethod] @@ -92,24 +92,24 @@ async def post(self,body: Optional[EmailAuthenticationMethod] = None, request_co def to_get_request_information(self,request_configuration: Optional[EmailMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. + Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EmailAuthenticationMethod] = None, request_configuration: Optional[EmailMethodsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set a user's emailAuthenticationMethod object. Email authentication is a self-service password reset method. A user may only have one email authentication method. + Set a user's emailAuthenticationMethod object. Email authentication is a self-service password reset method. A user may only have one email authentication method. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[EmailAuthenticationMethod] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class EmailMethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. + Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/email_methods/item/email_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/email_methods/item/email_authentication_method_item_request_builder.py index f93a9ce2116..e6319fe52a8 100644 --- a/msgraph/generated/users/item/authentication/email_methods/item/email_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/email_methods/item/email_authentication_method_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EmailAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a user's emailAuthenticationMethod object. + Deletes a user's emailAuthenticationMethod object. This API is available in the following national cloud deployments. 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/emailauthenticationmethod-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[EmailAuthenticationMethodI async def get(self,request_configuration: Optional[EmailAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[EmailAuthenticationMethod]: """ - Retrieve a user's single email authentication method object. + Retrieve a user's single email authentication method object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EmailAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/emailauthenticationmethod-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[EmailAuthenticationMethodItem async def patch(self,body: Optional[EmailAuthenticationMethod] = None, request_configuration: Optional[EmailAuthenticationMethodItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[EmailAuthenticationMethod]: """ - Update a user's email address represented by an emailAuthenticationMethod object. + Update a user's email address represented by an emailAuthenticationMethod object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EmailAuthenticationMethod] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[EmailAuthenticationMethod] = None, request_c def to_delete_request_information(self,request_configuration: Optional[EmailAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a user's emailAuthenticationMethod object. + Deletes a user's emailAuthenticationMethod object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EmailAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a user's single email authentication method object. + Retrieve a user's single email authentication method object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EmailAuthenticationMethod] = None, request_configuration: Optional[EmailAuthenticationMethodItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a user's email address represented by an emailAuthenticationMethod object. + Update a user's email address represented by an emailAuthenticationMethod object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[EmailAuthenticationMethod] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class EmailAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class EmailAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve a user's single email authentication method object. + Retrieve a user's single email authentication method object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/fido2_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/fido2_methods/count/count_request_builder.py index 523fb90a377..64e16af47a6 100644 --- a/msgraph/generated/users/item/authentication/fido2_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/fido2_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/fido2_methods/fido2_methods_request_builder.py b/msgraph/generated/users/item/authentication/fido2_methods/fido2_methods_request_builder.py index b038a9ab80f..3327e38066b 100644 --- a/msgraph/generated/users/item/authentication/fido2_methods/fido2_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/fido2_methods/fido2_methods_request_builder.py @@ -44,7 +44,7 @@ def by_fido2_authentication_method_id(self,fido2_authentication_method_id: str) async def get(self,request_configuration: Optional[Fido2MethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[Fido2AuthenticationMethodCollectionResponse]: """ - Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. + Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Fido2AuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/fido2authenticationmethod-list?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[Fido2MethodsRequestBuilderGet def to_get_request_information(self,request_configuration: Optional[Fido2MethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. + Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> Fido2MethodsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class Fido2MethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. + Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/fido2_methods/item/fido2_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/fido2_methods/item/fido2_authentication_method_item_request_builder.py index b951f2566ac..7d3dc684cdc 100644 --- a/msgraph/generated/users/item/authentication/fido2_methods/item/fido2_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/fido2_methods/item/fido2_authentication_method_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[Fido2AuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a user's FIDO2 Security Key Authentication Method object. + Deletes a user's FIDO2 Security Key Authentication Method object. This API is available in the following national cloud deployments. 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/fido2authenticationmethod-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[Fido2AuthenticationMethodI async def get(self,request_configuration: Optional[Fido2AuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Fido2AuthenticationMethod]: """ - Retrieve a user's single FIDO2 Security Key Authentication Method object. + Retrieve a user's single FIDO2 Security Key Authentication Method object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Fido2AuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/fido2authenticationmethod-get?view=graph-rest-1.0 @@ -70,34 +70,34 @@ async def get(self,request_configuration: Optional[Fido2AuthenticationMethodItem def to_delete_request_information(self,request_configuration: Optional[Fido2AuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a user's FIDO2 Security Key Authentication Method object. + Deletes a user's FIDO2 Security Key Authentication Method object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[Fido2AuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a user's single FIDO2 Security Key Authentication Method object. + Retrieve a user's single FIDO2 Security Key Authentication Method object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> Fido2AuthenticationMethodItemRequestBuilder: @@ -123,7 +123,7 @@ class Fido2AuthenticationMethodItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class Fido2AuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve a user's single FIDO2 Security Key Authentication Method object. + Retrieve a user's single FIDO2 Security Key Authentication Method object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/methods/count/count_request_builder.py index 82e50210da6..d65d7844606 100644 --- a/msgraph/generated/users/item/authentication/methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/methods/item/authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/methods/item/authentication_method_item_request_builder.py index 984ce99f46d..bfb64eb46b4 100644 --- a/msgraph/generated/users/item/authentication/methods/item/authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/methods/item/authentication_method_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationMethod]: """ - Retrieve the properties and relationships of an authenticationMethod object. + Retrieve the properties and relationships of an authenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/authenticationmethod-get?view=graph-rest-1.0 @@ -75,19 +75,19 @@ async def patch(self,body: Optional[AuthenticationMethod] = None, request_config def to_get_request_information(self,request_configuration: Optional[AuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an authenticationMethod object. + Retrieve the properties and relationships of an authenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethod] = None, request_configuration: Optional[AuthenticationMethodItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[AuthenticationMethod] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -132,7 +132,7 @@ def reset_password(self) -> ResetPasswordRequestBuilder: @dataclass class AuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an authenticationMethod object. + Retrieve the properties and relationships of an authenticationMethod object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/methods/item/reset_password/reset_password_request_builder.py b/msgraph/generated/users/item/authentication/methods/item/reset_password/reset_password_request_builder.py index 0b7555173da..c0d01bca4db 100644 --- a/msgraph/generated/users/item/authentication/methods/item/reset_password/reset_password_request_builder.py +++ b/msgraph/generated/users/item/authentication/methods/item/reset_password/reset_password_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ResetPasswordPostRequestBody] = None, request_configuration: Optional[ResetPasswordRequestBuilderPostRequestConfiguration] = None) -> Optional[PasswordResetResponse]: """ - Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account. This flow writes the new password to Azure Active Directory and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and will return a Location header with a link where the caller can periodically check for the status of the reset operation. + Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and can't be performed on a user's own account. This flow writes the new password to Microsoft Entra ID and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and returns a Location header with a link where the caller can periodically check for the status of the reset operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordResetResponse] @@ -54,7 +54,7 @@ async def post(self,body: Optional[ResetPasswordPostRequestBody] = None, request def to_post_request_information(self,body: Optional[ResetPasswordPostRequestBody] = None, request_configuration: Optional[ResetPasswordRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account. This flow writes the new password to Azure Active Directory and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and will return a Location header with a link where the caller can periodically check for the status of the reset operation. + Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and can't be performed on a user's own account. This flow writes the new password to Microsoft Entra ID and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and returns a Location header with a link where the caller can periodically check for the status of the reset operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[ResetPasswordPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/authentication/methods/methods_request_builder.py b/msgraph/generated/users/item/authentication/methods/methods_request_builder.py index ba238b1e1cc..44b2f4ff440 100644 --- a/msgraph/generated/users/item/authentication/methods/methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/methods/methods_request_builder.py @@ -45,7 +45,7 @@ def by_authentication_method_id(self,authentication_method_id: str) -> Authentic async def get(self,request_configuration: Optional[MethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[AuthenticationMethodCollectionResponse]: """ - Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Azure AD authentication methods API overview for a list of currently supported methods. + Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Microsoft Entra authentication methods API overview for a list of currently supported methods. We don't recommend using the authentication methods APIs for scenarios where you need to iterate over your entire user population for auditing or security check purposes. For these types of scenarios, we recommend using the authentication method registration and usage reporting APIs (available on the beta endpoint only). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authentication-list-methods?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AuthenticationMethod] = None, request_configu def to_get_request_information(self,request_configuration: Optional[MethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Azure AD authentication methods API overview for a list of currently supported methods. + Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Microsoft Entra authentication methods API overview for a list of currently supported methods. We don't recommend using the authentication methods APIs for scenarios where you need to iterate over your entire user population for auditing or security check purposes. For these types of scenarios, we recommend using the authentication method registration and usage reporting APIs (available on the beta endpoint only). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AuthenticationMethod] = None, request_configuration: Optional[MethodsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AuthenticationMethod] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Azure AD authentication methods API overview for a list of currently supported methods. + Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Microsoft Entra authentication methods API overview for a list of currently supported methods. We don't recommend using the authentication methods APIs for scenarios where you need to iterate over your entire user population for auditing or security check purposes. For these types of scenarios, we recommend using the authentication method registration and usage reporting APIs (available on the beta endpoint only). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/count/count_request_builder.py index b81330152e1..4ed058d231a 100644 --- a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/device/device_request_builder.py b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/device/device_request_builder.py index fb797429349..35ac9a1e237 100644 --- a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/device/device_request_builder.py +++ b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/device/device_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DeviceRequestBuilderGetRequestConfiguration] = None) -> Optional[Device]: """ - The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. + The registered device on which Microsoft Authenticator resides. This property is null if the device isn't registered for passwordless Phone Sign-In. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Device] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[DeviceRequestBuilderGetReques def to_get_request_information(self,request_configuration: Optional[DeviceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. + The registered device on which Microsoft Authenticator resides. This property is null if the device isn't registered for passwordless Phone Sign-In. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeviceRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeviceRequestBuilder: @dataclass class DeviceRequestBuilderGetQueryParameters(): """ - The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. + The registered device on which Microsoft Authenticator resides. This property is null if the device isn't registered for passwordless Phone Sign-In. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/microsoft_authenticator_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/microsoft_authenticator_authentication_method_item_request_builder.py index 943f27a8665..bc7aee3471e 100644 --- a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/microsoft_authenticator_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/microsoft_authenticator_authentication_method_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a microsoftAuthenticatorAuthenticationMethod object. + Deletes a microsoftAuthenticatorAuthenticationMethod object. This API is available in the following national cloud deployments. 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/microsoftauthenticatorauthenticationmethod-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[MicrosoftAuthenticatorAuth async def get(self,request_configuration: Optional[MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MicrosoftAuthenticatorAuthenticationMethod]: """ - Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. + Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MicrosoftAuthenticatorAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/microsoftauthenticatorauthenticationmethod-get?view=graph-rest-1.0 @@ -71,34 +71,34 @@ async def get(self,request_configuration: Optional[MicrosoftAuthenticatorAuthent def to_delete_request_information(self,request_configuration: Optional[MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a microsoftAuthenticatorAuthenticationMethod object. + Deletes a microsoftAuthenticatorAuthenticationMethod object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. + Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder: @@ -133,7 +133,7 @@ class MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderDeleteRequestC @dataclass class MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. + Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods_request_builder.py b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods_request_builder.py index a089b780a31..d8fa7ef0090 100644 --- a/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods_request_builder.py @@ -44,7 +44,7 @@ def by_microsoft_authenticator_authentication_method_id(self,microsoft_authentic async def get(self,request_configuration: Optional[MicrosoftAuthenticatorMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[MicrosoftAuthenticatorAuthenticationMethodCollectionResponse]: """ - Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. + Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MicrosoftAuthenticatorAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/microsoftauthenticatorauthenticationmethod-list?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[MicrosoftAuthenticatorMethods def to_get_request_information(self,request_configuration: Optional[MicrosoftAuthenticatorMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. + Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MicrosoftAuthenticatorMethodsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MicrosoftAuthenticatorMethodsRequestBuilderGetQueryParameters(): """ - Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. + Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/operations/count/count_request_builder.py b/msgraph/generated/users/item/authentication/operations/count/count_request_builder.py index 3f188033d49..48e35160b43 100644 --- a/msgraph/generated/users/item/authentication/operations/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/operations/item/long_running_operation_item_request_builder.py b/msgraph/generated/users/item/authentication/operations/item/long_running_operation_item_request_builder.py index d085885dbeb..3fdc3c86eb9 100644 --- a/msgraph/generated/users/item/authentication/operations/item/long_running_operation_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/operations/item/long_running_operation_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[LongRunningOperationItemRe async def get(self,request_configuration: Optional[LongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LongRunningOperation]: """ - Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. + Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LongRunningOperation] Find more info here: https://learn.microsoft.com/graph/api/longrunningoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[LongRunni Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LongRunningOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. + Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LongRunningOperation] = None, request_configuration: Optional[LongRunningOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[LongRunningOperation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class LongRunningOperationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class LongRunningOperationItemRequestBuilderGetQueryParameters(): """ - Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. + Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/operations/operations_request_builder.py b/msgraph/generated/users/item/authentication/operations/operations_request_builder.py index bf3cb237cb7..951849f45ac 100644 --- a/msgraph/generated/users/item/authentication/operations/operations_request_builder.py +++ b/msgraph/generated/users/item/authentication/operations/operations_request_builder.py @@ -45,7 +45,7 @@ def by_long_running_operation_id(self,long_running_operation_id: str) -> LongRun async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[LongRunningOperationCollectionResponse]: """ - Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. + Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LongRunningOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[LongRunningOperation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. + Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[LongRunningOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. + Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/password_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/password_methods/count/count_request_builder.py index 6f166f9f12f..d681b0419d5 100644 --- a/msgraph/generated/users/item/authentication/password_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/password_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py index f57e1a46a7b..efa9a22bd20 100644 --- a/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[PasswordAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PasswordAuthenticationMethod]: """ - Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. + Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/passwordauthenticationmethod-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[PasswordAuthenticationMethodI def to_get_request_information(self,request_configuration: Optional[PasswordAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. + Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PasswordAuthenticationMethodItemRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> PasswordAuthenticationMethod @dataclass class PasswordAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. + Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py b/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py index 2400d0cf2c8..0aec3c5014b 100644 --- a/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py @@ -45,7 +45,7 @@ def by_password_authentication_method_id(self,password_authentication_method_id: async def get(self,request_configuration: Optional[PasswordMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[PasswordAuthenticationMethodCollectionResponse]: """ - Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This will return exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. + Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This API returns exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authentication-list-passwordmethods?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PasswordAuthenticationMethod] = None, request def to_get_request_information(self,request_configuration: Optional[PasswordMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This will return exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. + Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This API returns exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PasswordAuthenticationMethod] = None, request_configuration: Optional[PasswordMethodsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PasswordAuthenticationMethod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PasswordMethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This will return exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. + Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This API returns exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/phone_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/phone_methods/count/count_request_builder.py index 7d41b9400b3..6be66a67da4 100644 --- a/msgraph/generated/users/item/authentication/phone_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/phone_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in_request_builder.py b/msgraph/generated/users/item/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in_request_builder.py index 073e069363b..2e619df46f1 100644 --- a/msgraph/generated/users/item/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in_request_builder.py +++ b/msgraph/generated/users/item/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DisableSmsSignInRequestBuilderPostRequestConfiguration] = None) -> None: """ - Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in. + Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in. This API is available in the following national cloud deployments. 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/phoneauthenticationmethod-disablesmssignin?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DisableSmsSignInRequestBuild def to_post_request_information(self,request_configuration: Optional[DisableSmsSignInRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in. + Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DisableSmsSignInRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in_request_builder.py b/msgraph/generated/users/item/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in_request_builder.py index 5cca809f7d5..2187b8e78c2 100644 --- a/msgraph/generated/users/item/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in_request_builder.py +++ b/msgraph/generated/users/item/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[EnableSmsSignInRequestBuilderPostRequestConfiguration] = None) -> None: """ - Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled: + Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled: This API is available in the following national cloud deployments. 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/phoneauthenticationmethod-enablesmssignin?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[EnableSmsSignInRequestBuilde def to_post_request_information(self,request_configuration: Optional[EnableSmsSignInRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled: + Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled: This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> EnableSmsSignInRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/phone_methods/item/phone_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/phone_methods/item/phone_authentication_method_item_request_builder.py index bebac9f6b4e..394ae99c6e2 100644 --- a/msgraph/generated/users/item/authentication/phone_methods/item/phone_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/phone_methods/item/phone_authentication_method_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PhoneAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a user's phone authentication method. This removes the phone number from the user and they will no longer be able to use the number for authentication, whether via SMS or voice calls. A user cannot have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it cannot be deleted. Have the user change their default authentication method, and then delete the number. + Delete a user's phone authentication method. This removes the phone number from the user and they'll no longer be able to use the number for authentication, whether via SMS or voice calls. A user can't have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it can't be deleted. Have the user change their default authentication method, and then delete the number. This API is available in the following national cloud deployments. 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/phoneauthenticationmethod-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[PhoneAuthenticationMethodI async def get(self,request_configuration: Optional[PhoneAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[PhoneAuthenticationMethod]: """ - Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Azure AD and B2B users, but not B2C users. + Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PhoneAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/phoneauthenticationmethod-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[PhoneAuthenticationMethodItem async def patch(self,body: Optional[PhoneAuthenticationMethod] = None, request_configuration: Optional[PhoneAuthenticationMethodItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[PhoneAuthenticationMethod]: """ - Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. + Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PhoneAuthenticationMethod] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[PhoneAuthenticationMethod] = None, request_c def to_delete_request_information(self,request_configuration: Optional[PhoneAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a user's phone authentication method. This removes the phone number from the user and they will no longer be able to use the number for authentication, whether via SMS or voice calls. A user cannot have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it cannot be deleted. Have the user change their default authentication method, and then delete the number. + Delete a user's phone authentication method. This removes the phone number from the user and they'll no longer be able to use the number for authentication, whether via SMS or voice calls. A user can't have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it can't be deleted. Have the user change their default authentication method, and then delete the number. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PhoneAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Azure AD and B2B users, but not B2C users. + Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PhoneAuthenticationMethod] = None, request_configuration: Optional[PhoneAuthenticationMethodItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. + Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[PhoneAuthenticationMethod] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class PhoneAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class PhoneAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Azure AD and B2B users, but not B2C users. + Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/phone_methods/phone_methods_request_builder.py b/msgraph/generated/users/item/authentication/phone_methods/phone_methods_request_builder.py index c7a420b2319..6cdd4815d8c 100644 --- a/msgraph/generated/users/item/authentication/phone_methods/phone_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/phone_methods/phone_methods_request_builder.py @@ -45,7 +45,7 @@ def by_phone_authentication_method_id(self,phone_authentication_method_id: str) async def get(self,request_configuration: Optional[PhoneMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[PhoneAuthenticationMethodCollectionResponse]: """ - Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Azure AD and B2B users, but not B2C users. + Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PhoneAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authentication-list-phonemethods?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PhoneMethodsRequestBuilderGet async def post(self,body: Optional[PhoneAuthenticationMethod] = None, request_configuration: Optional[PhoneMethodsRequestBuilderPostRequestConfiguration] = None) -> Optional[PhoneAuthenticationMethod]: """ - Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a preexisting mobile phone will fail. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system will attempt to register the number for use in that system. + Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PhoneAuthenticationMethod] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PhoneAuthenticationMethod] = None, request_co def to_get_request_information(self,request_configuration: Optional[PhoneMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Azure AD and B2B users, but not B2C users. + Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PhoneAuthenticationMethod] = None, request_configuration: Optional[PhoneMethodsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a preexisting mobile phone will fail. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system will attempt to register the number for use in that system. + Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PhoneAuthenticationMethod] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PhoneMethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Azure AD and B2B users, but not B2C users. + Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/software_oath_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/software_oath_methods/count/count_request_builder.py index 0e6cb0b44bf..ddf31864683 100644 --- a/msgraph/generated/users/item/authentication/software_oath_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/software_oath_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py index a8e29593128..5aa7e5036e7 100644 --- a/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SoftwareOathAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a user's Software OATH token authentication method object. + Delete a user's Software OATH token authentication method object. This API is available in the following national cloud deployments. 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/softwareoathauthenticationmethod-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SoftwareOathAuthentication async def get(self,request_configuration: Optional[SoftwareOathAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SoftwareOathAuthenticationMethod]: """ - Retrieve a user's single Software OATH token authentication method object and its properties. + Retrieve a user's single Software OATH token authentication method object and its properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SoftwareOathAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/softwareoathauthenticationmethod-get?view=graph-rest-1.0 @@ -70,34 +70,34 @@ async def get(self,request_configuration: Optional[SoftwareOathAuthenticationMet def to_delete_request_information(self,request_configuration: Optional[SoftwareOathAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a user's Software OATH token authentication method object. + Delete a user's Software OATH token authentication method object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SoftwareOathAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a user's single Software OATH token authentication method object and its properties. + Retrieve a user's single Software OATH token authentication method object and its properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SoftwareOathAuthenticationMethodItemRequestBuilder: @@ -123,7 +123,7 @@ class SoftwareOathAuthenticationMethodItemRequestBuilderDeleteRequestConfigurati @dataclass class SoftwareOathAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve a user's single Software OATH token authentication method object and its properties. + Retrieve a user's single Software OATH token authentication method object and its properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py b/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py index bf71df24c78..bdadc48c234 100644 --- a/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py @@ -44,7 +44,7 @@ def by_software_oath_authentication_method_id(self,software_oath_authentication_ async def get(self,request_configuration: Optional[SoftwareOathMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[SoftwareOathAuthenticationMethodCollectionResponse]: """ - Retrieve a list of a user's software OATH token authentication method objects and their properties. + Retrieve a list of a user's software OATH token authentication method objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SoftwareOathAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authentication-list-softwareoathmethods?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SoftwareOathMethodsRequestBui def to_get_request_information(self,request_configuration: Optional[SoftwareOathMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a user's software OATH token authentication method objects and their properties. + Retrieve a list of a user's software OATH token authentication method objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SoftwareOathMethodsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SoftwareOathMethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of a user's software OATH token authentication method objects and their properties. + Retrieve a list of a user's software OATH token authentication method objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/temporary_access_pass_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/temporary_access_pass_methods/count/count_request_builder.py index 846a5cb2277..29e7f36bdbd 100644 --- a/msgraph/generated/users/item/authentication/temporary_access_pass_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/temporary_access_pass_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/temporary_access_pass_methods/item/temporary_access_pass_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/temporary_access_pass_methods/item/temporary_access_pass_authentication_method_item_request_builder.py index 42b1ae2b9f2..cfe408a661d 100644 --- a/msgraph/generated/users/item/authentication/temporary_access_pass_methods/item/temporary_access_pass_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/temporary_access_pass_methods/item/temporary_access_pass_authentication_method_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TemporaryAccessPassAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a users's temporaryAccessPassAuthenticationMethod object. + Delete a users's temporaryAccessPassAuthenticationMethod object. This API is available in the following national cloud deployments. 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/temporaryaccesspassauthenticationmethod-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TemporaryAccessPassAuthent async def get(self,request_configuration: Optional[TemporaryAccessPassAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TemporaryAccessPassAuthenticationMethod]: """ - Retrieve a user's single temporaryAccessPassAuthenticationMethod object. + Retrieve a user's single temporaryAccessPassAuthenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TemporaryAccessPassAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/temporaryaccesspassauthenticationmethod-get?view=graph-rest-1.0 @@ -70,34 +70,34 @@ async def get(self,request_configuration: Optional[TemporaryAccessPassAuthentica def to_delete_request_information(self,request_configuration: Optional[TemporaryAccessPassAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a users's temporaryAccessPassAuthenticationMethod object. + Delete a users's temporaryAccessPassAuthenticationMethod object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TemporaryAccessPassAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a user's single temporaryAccessPassAuthenticationMethod object. + Retrieve a user's single temporaryAccessPassAuthenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TemporaryAccessPassAuthenticationMethodItemRequestBuilder: @@ -123,7 +123,7 @@ class TemporaryAccessPassAuthenticationMethodItemRequestBuilderDeleteRequestConf @dataclass class TemporaryAccessPassAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Retrieve a user's single temporaryAccessPassAuthenticationMethod object. + Retrieve a user's single temporaryAccessPassAuthenticationMethod object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/temporary_access_pass_methods/temporary_access_pass_methods_request_builder.py b/msgraph/generated/users/item/authentication/temporary_access_pass_methods/temporary_access_pass_methods_request_builder.py index 8dd3b6e2534..67639038f8d 100644 --- a/msgraph/generated/users/item/authentication/temporary_access_pass_methods/temporary_access_pass_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/temporary_access_pass_methods/temporary_access_pass_methods_request_builder.py @@ -45,7 +45,7 @@ def by_temporary_access_pass_authentication_method_id(self,temporary_access_pass async def get(self,request_configuration: Optional[TemporaryAccessPassMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[TemporaryAccessPassAuthenticationMethodCollectionResponse]: """ - Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. + Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TemporaryAccessPassAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/authentication-list-temporaryaccesspassmethods?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TemporaryAccessPassMethodsReq async def post(self,body: Optional[TemporaryAccessPassAuthenticationMethod] = None, request_configuration: Optional[TemporaryAccessPassMethodsRequestBuilderPostRequestConfiguration] = None) -> Optional[TemporaryAccessPassAuthenticationMethod]: """ - Create a new temporaryAccessPassAuthenticationMethod object on a user. A user can only have one Temporary Access Pass that's usable within its specified lifetime. If the user requires a new Temporary Access Pass while the current Temporary Access Pass is valid, the admin can create a new Temporary Access Pass for the user, the previous Temporary Access Pass will be deleted, and a new Temporary Access Pass will be created. + Create a new temporaryAccessPassAuthenticationMethod object on a user. A user can only have one Temporary Access Pass that's usable within its specified lifetime. If the user requires a new Temporary Access Pass while the current Temporary Access Pass is valid, the admin can create a new Temporary Access Pass for the user, the previous Temporary Access Pass will be deleted, and a new Temporary Access Pass will be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TemporaryAccessPassAuthenticationMethod] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TemporaryAccessPassAuthenticationMethod] = No def to_get_request_information(self,request_configuration: Optional[TemporaryAccessPassMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. + Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TemporaryAccessPassAuthenticationMethod] = None, request_configuration: Optional[TemporaryAccessPassMethodsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new temporaryAccessPassAuthenticationMethod object on a user. A user can only have one Temporary Access Pass that's usable within its specified lifetime. If the user requires a new Temporary Access Pass while the current Temporary Access Pass is valid, the admin can create a new Temporary Access Pass for the user, the previous Temporary Access Pass will be deleted, and a new Temporary Access Pass will be created. + Create a new temporaryAccessPassAuthenticationMethod object on a user. A user can only have one Temporary Access Pass that's usable within its specified lifetime. If the user requires a new Temporary Access Pass while the current Temporary Access Pass is valid, the admin can create a new Temporary Access Pass for the user, the previous Temporary Access Pass will be deleted, and a new Temporary Access Pass will be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TemporaryAccessPassAuthentic if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TemporaryAccessPassMethodsRequestBuilderGetQueryParameters(): """ - Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. + Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/count/count_request_builder.py b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/count/count_request_builder.py index 364c7048755..d5a87bec3b9 100644 --- a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/count/count_request_builder.py +++ b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/device/device_request_builder.py b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/device/device_request_builder.py index 527f81f4f8d..3489dba2345 100644 --- a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/device/device_request_builder.py +++ b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/device/device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeviceRequestBuilder: diff --git a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/windows_hello_for_business_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/windows_hello_for_business_authentication_method_item_request_builder.py index a5f8523dae5..4f69edba5f2 100644 --- a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/windows_hello_for_business_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/item/windows_hello_for_business_authentication_method_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a windowsHelloForBusinessAuthenticationMethod object. + Deletes a windowsHelloForBusinessAuthenticationMethod object. This API is available in the following national cloud deployments. 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/windowshelloforbusinessauthenticationmethod-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[WindowsHelloForBusinessAut async def get(self,request_configuration: Optional[WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> Optional[WindowsHelloForBusinessAuthenticationMethod]: """ - Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. + Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WindowsHelloForBusinessAuthenticationMethod] Find more info here: https://learn.microsoft.com/graph/api/windowshelloforbusinessauthenticationmethod-get?view=graph-rest-1.0 @@ -71,34 +71,34 @@ async def get(self,request_configuration: Optional[WindowsHelloForBusinessAuthen def to_delete_request_information(self,request_configuration: Optional[WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a windowsHelloForBusinessAuthenticationMethod object. + Deletes a windowsHelloForBusinessAuthenticationMethod object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. + Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder: @@ -133,7 +133,7 @@ class WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderDeleteRequest @dataclass class WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. + Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods_request_builder.py b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods_request_builder.py index a0cfca2a450..d2fbce0c745 100644 --- a/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods_request_builder.py @@ -44,7 +44,7 @@ def by_windows_hello_for_business_authentication_method_id(self,windows_hello_fo async def get(self,request_configuration: Optional[WindowsHelloForBusinessMethodsRequestBuilderGetRequestConfiguration] = None) -> Optional[WindowsHelloForBusinessAuthenticationMethodCollectionResponse]: """ - Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. + Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WindowsHelloForBusinessAuthenticationMethodCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/windowshelloforbusinessauthenticationmethod-list?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[WindowsHelloForBusinessMethod def to_get_request_information(self,request_configuration: Optional[WindowsHelloForBusinessMethodsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. + Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> WindowsHelloForBusinessMethodsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class WindowsHelloForBusinessMethodsRequestBuilderGetQueryParameters(): """ - Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. + Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py b/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py similarity index 88% rename from msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py rename to msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py index a4f8bf3fb28..3aae46844ac 100644 --- a/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py +++ b/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AllowedCalendarSharingRolesWithUserResponse(BaseCollectionPaginationCountResponse): +class AllowedCalendarSharingRolesWithUserGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[CalendarRoleType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AllowedCalendarSharingRolesWithUserResponse + Returns: AllowedCalendarSharingRolesWithUserGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AllowedCalendarSharingRolesWithUserResponse() + return AllowedCalendarSharingRolesWithUserGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py b/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py index db414036f33..10ba5c67cf1 100644 --- a/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py +++ b/msgraph/generated/users/item/calendar/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse class AllowedCalendarSharingRolesWithUserRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param user: Usage: User='{User}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['user'] = str(user) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendar/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserResponse]: + async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserGetResponse]: """ Invoke function allowedCalendarSharingRoles param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AllowedCalendarSharingRolesWithUserResponse] + Returns: Optional[AllowedCalendarSharingRolesWithUserGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWi } if not self.request_adapter: raise Exception("Http core is null") - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse - return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[AllowedCalen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedCalendarSharingRolesWithUserRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_permissions/calendar_permissions_request_builder.py b/msgraph/generated/users/item/calendar/calendar_permissions/calendar_permissions_request_builder.py index e7b121a753b..86054a98813 100644 --- a/msgraph/generated/users/item/calendar/calendar_permissions/calendar_permissions_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_permissions/calendar_permissions_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_permission_id(self,calendar_permission_id: str) -> CalendarPermi async def get(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermissionCollectionResponse]: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionsRequestBui async def post(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CalendarPermission] = None, request_configura def to_get_request_information(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarPermissionsRequestBuilderGetQueryParameters(): """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_permissions/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_permissions/count/count_request_builder.py index 7641298f69a..d6e1192b4ce 100644 --- a/msgraph/generated/users/item/calendar/calendar_permissions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py index 8e2ad192e64..678f58bcc08 100644 --- a/msgraph/generated/users/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_permissions/item/calendar_permission_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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/calendarpermission-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CalendarPermissionItemRequ async def get(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] Find more info here: https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionItemRequest async def patch(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[CalendarPermission] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class CalendarPermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class CalendarPermissionItemRequestBuilderGetQueryParameters(): """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar/calendar_request_builder.py index 24338fbe82a..6b4fd640799 100644 --- a/msgraph/generated/users/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_request_builder.py @@ -45,7 +45,7 @@ def allowed_calendar_sharing_roles_with_user(self,user: Optional[str] = None) -> async def get(self,request_configuration: Optional[CalendarRequestBuilderGetRequestConfiguration] = None) -> Optional[Calendar]: """ - Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: + Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Calendar] Find more info here: https://learn.microsoft.com/graph/api/calendar-get?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarRequestBuilderGetRequ async def patch(self,body: Optional[Calendar] = None, request_configuration: Optional[CalendarRequestBuilderPatchRequestConfiguration] = None) -> Optional[Calendar]: """ - Update the properties of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Update the properties of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Calendar] @@ -92,24 +92,24 @@ async def patch(self,body: Optional[Calendar] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[CalendarRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: + Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Calendar] = None, request_configuration: Optional[CalendarRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Update the properties of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_patch_request_information(self,body: Optional[Calendar] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ def get_schedule(self) -> GetScheduleRequestBuilder: @dataclass class CalendarRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: + Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/calendar_view_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/calendar_view_request_builder.py index 2d15e82e830..667f4ecd6e2 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/calendar_view_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarViewRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/count/count_request_builder.py index 9af9c5d6abd..407da3ef79b 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar/events/delta/delta_response.py b/msgraph/generated/users/item/calendar/calendar_view/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/calendar/events/delta/delta_response.py rename to msgraph/generated/users/item/calendar/calendar_view/delta/delta_get_response.py index e02d92cfdea..40f1053595b 100644 --- a/msgraph/generated/groups/item/calendar/events/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar/calendar_view/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/delta/delta_request_builder.py index 74ce9e9fce1..4cef7289ca1 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendar/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/accept/accept_request_builder.py index 8f691cdd915..1857c20845c 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/attachments_request_builder.py index 7910b72846e..1082122d009 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/count/count_request_builder.py index 2ec1d3eaea0..6945435f305 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py index e104ebb55d5..a6d832434db 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py index 8a9608b21d9..3f56a747c25 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/calendar/calendar_request_builder.py index 46b9148abbe..1085bd0891b 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/cancel/cancel_request_builder.py index 473a246947c..619e6b3d017 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/decline/decline_request_builder.py index 73d7790c99e..617441947e5 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py index 292a3218c51..e087baef0a9 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/event_item_request_builder.py index ec16747a1fe..bf9471a2f2a 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/event_item_request_builder.py @@ -65,14 +65,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/extensions/count/count_request_builder.py index 2ef6dfe9b57..e2e0a4d01b6 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/extensions/extensions_request_builder.py index 16127021cde..d63e1543828 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py index 76a5a73411d..baf584aa3c7 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/forward/forward_request_builder.py index 3a17c5e82d8..f8d655db4a3 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/count/count_request_builder.py index 5ea1e498b37..6a74e38f602 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_get_response.py index 82d9e2cdabc..2328074de4d 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py index 161ae8a0616..9196c910e8b 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendar/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/instances_request_builder.py index 3114b76e5bc..2ea0c6f5cfa 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py index 15ccc05d7d4..037f487dc6c 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py index 893456aa563..4543968ea0b 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py index 464417e6767..16fa2f14055 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 5b5dc328fad..f99a3ec64b3 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py index dbb366a4934..d25ef91ab55 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py index 364c64c0834..8126856f6ab 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py index 8da03beb734..5bfd270ff4c 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py index 1525a13ebe9..971af4fa358 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index 909128335aa..266fb0ed620 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py index ff145e2ca6e..e23e1d5ae98 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py index a41af96b214..c2e33b0d193 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py index 1c3b2f6872c..27ff58ed54d 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py index 57cf2d7e953..73fe89459ba 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py index fe04e1832f4..7712abf748c 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 56248d2228f..a155574cc2f 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 6c4ba03d266..3ed7b1bdfe6 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py index 0b8633e03c1..de5cc800e09 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py index aadf1c21a5a..643d25a2dcc 100644 --- a/msgraph/generated/users/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/count/count_request_builder.py b/msgraph/generated/users/item/calendar/events/count/count_request_builder.py index 8552cf37a92..30fa15b1f7d 100644 --- a/msgraph/generated/users/item/calendar/events/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/delta/delta_response.py b/msgraph/generated/users/item/calendar/events/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar/events/delta/delta_response.py rename to msgraph/generated/users/item/calendar/events/delta/delta_get_response.py index e02d92cfdea..40f1053595b 100644 --- a/msgraph/generated/users/item/calendar/events/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar/events/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar/events/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar/events/delta/delta_request_builder.py index 3d4d7d80b35..dcce426431c 100644 --- a/msgraph/generated/users/item/calendar/events/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendar/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/events_request_builder.py b/msgraph/generated/users/item/calendar/events/events_request_builder.py index ead3f4a64f7..1f571c4982f 100644 --- a/msgraph/generated/users/item/calendar/events/events_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/events_request_builder.py @@ -46,7 +46,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[EventsRequestBuilderGetReques async def post(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> Optional[Event]: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Event] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Event] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class EventsRequestBuilderGetQueryParameters(): """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar/events/item/accept/accept_request_builder.py index 638c853c07a..71d167c5b4a 100644 --- a/msgraph/generated/users/item/calendar/events/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar/events/item/attachments/attachments_request_builder.py index 0b703ea00d4..6082b996078 100644 --- a/msgraph/generated/users/item/calendar/events/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar/events/item/attachments/count/count_request_builder.py index cd10a13c23f..b1803ae9db2 100644 --- a/msgraph/generated/users/item/calendar/events/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py index ade8bcfe851..4a25492f755 100644 --- a/msgraph/generated/users/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar/events/item/attachments/item/attachment_item_request_builder.py index f94b3f1b84a..846d6b8f3ee 100644 --- a/msgraph/generated/users/item/calendar/events/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar/events/item/calendar/calendar_request_builder.py index 1bb7f363c5b..f773287b9b5 100644 --- a/msgraph/generated/users/item/calendar/events/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar/events/item/cancel/cancel_request_builder.py index acc6bcf1324..25b411aa57f 100644 --- a/msgraph/generated/users/item/calendar/events/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar/events/item/decline/decline_request_builder.py index b9fff061f50..6baff3581ce 100644 --- a/msgraph/generated/users/item/calendar/events/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py index 32ccba88d6e..9d7a53bee19 100644 --- a/msgraph/generated/users/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar/events/item/event_item_request_builder.py index f198c2fb522..0e505e0d2e7 100644 --- a/msgraph/generated/users/item/calendar/events/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/event_item_request_builder.py @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[EventItemRequestBuilderGetReq async def patch(self,body: Optional[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Event]: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[EventItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,19 +124,19 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Event] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar/events/item/extensions/count/count_request_builder.py index 08d571683e7..c00962353bc 100644 --- a/msgraph/generated/users/item/calendar/events/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar/events/item/extensions/extensions_request_builder.py index 2bea869e806..47b12618a7c 100644 --- a/msgraph/generated/users/item/calendar/events/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar/events/item/extensions/item/extension_item_request_builder.py index 19ba2517590..7716496f3b5 100644 --- a/msgraph/generated/users/item/calendar/events/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar/events/item/forward/forward_request_builder.py index 3b65390f918..e71c4762cef 100644 --- a/msgraph/generated/users/item/calendar/events/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/count/count_request_builder.py index 8b1460a620d..a03c1abffca 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar/events/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendar/events/item/instances/delta/delta_get_response.py index 82d9e2cdabc..2328074de4d 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_request_builder.py index 3f9204fd68f..6e402cee0ec 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendar/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/instances_request_builder.py index c10d286055b..7c9fade38fb 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/accept/accept_request_builder.py index d13f2d798e7..e02f33ac505 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py index 6c24046d629..2f0ed706cd2 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py index 99c02d43ecd..de9416bfb3d 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index b42c64ead3f..2e9cfce15ac 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py index 63061b992ea..01381f7596a 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py index e246c04d4d8..89d91e57ffd 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py index 3e34bfd2b39..f38d89d5f33 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/decline/decline_request_builder.py index ac5cbd3885c..401966489ca 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index 8d5849c9e3b..5fd348d1f9e 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/event_item_request_builder.py index 60e0f936e1b..9558d337248 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py index c436e786d4f..b4d314b2f6a 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py index 7cbb243b375..55783a41375 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py index dcdc1676c1c..4004f027a0c 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/forward/forward_request_builder.py index b0e9634de42..f4ced3418a0 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 52deac3a436..b3d8f6e4081 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 8ecb354de8d..3e1e1d55ffe 100644 --- a/msgraph/generated/users/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py index 38ea57da61f..9e3c6870e03 100644 --- a/msgraph/generated/users/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py index e2298a6ac4e..5a7daac2a2d 100644 --- a/msgraph/generated/users/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar/events/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar/get_schedule/get_schedule_response.py b/msgraph/generated/users/item/calendar/get_schedule/get_schedule_post_response.py similarity index 92% rename from msgraph/generated/users/item/calendar/get_schedule/get_schedule_response.py rename to msgraph/generated/users/item/calendar/get_schedule/get_schedule_post_response.py index 89a1497eab9..934e25a0b38 100644 --- a/msgraph/generated/users/item/calendar/get_schedule/get_schedule_response.py +++ b/msgraph/generated/users/item/calendar/get_schedule/get_schedule_post_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetScheduleResponse(BaseCollectionPaginationCountResponse): +class GetSchedulePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ScheduleInformation]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetScheduleResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetSchedulePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetScheduleResponse + Returns: GetSchedulePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetScheduleResponse() + return GetSchedulePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar/get_schedule/get_schedule_request_builder.py b/msgraph/generated/users/item/calendar/get_schedule/get_schedule_request_builder.py index b18e6ad2cb6..cc8de524b80 100644 --- a/msgraph/generated/users/item/calendar/get_schedule/get_schedule_request_builder.py +++ b/msgraph/generated/users/item/calendar/get_schedule/get_schedule_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError from .get_schedule_post_request_body import GetSchedulePostRequestBody - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse class GetScheduleRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendar/getSchedule", path_parameters) - async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetScheduleResponse]: + async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetSchedulePostResponse]: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetScheduleResponse] + Returns: Optional[GetSchedulePostResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse - return await self.request_adapter.send_async(request_info, GetScheduleResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetSchedulePostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/calendar_groups_request_builder.py b/msgraph/generated/users/item/calendar_groups/calendar_groups_request_builder.py index 762bdb08ca6..fb08a9809fe 100644 --- a/msgraph/generated/users/item/calendar_groups/calendar_groups_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/calendar_groups_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_group_id(self,calendar_group_id: str) -> CalendarGroupItemReques async def get(self,request_configuration: Optional[CalendarGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarGroupCollectionResponse]: """ - Get the user's calendar groups. + Get the user's calendar groups. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-calendargroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarGroupsRequestBuilderG async def post(self,body: Optional[CalendarGroup] = None, request_configuration: Optional[CalendarGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CalendarGroup]: """ - Use this API to create a new CalendarGroup. + Use this API to create a new CalendarGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CalendarGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[CalendarGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the user's calendar groups. + Get the user's calendar groups. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarGroup] = None, request_configuration: Optional[CalendarGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new CalendarGroup. + Use this API to create a new CalendarGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CalendarGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarGroupsRequestBuilderGetQueryParameters(): """ - Get the user's calendar groups. + Get the user's calendar groups. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/count/count_request_builder.py index 95f98fec637..7b13da99202 100644 --- a/msgraph/generated/users/item/calendar_groups/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendar_group_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendar_group_item_request_builder.py index af177bd4012..a735744c4b5 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendar_group_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendar_group_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CalendarGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a calendar group other than the default calendar group. + Delete a calendar group other than the default calendar group. This API is available in the following national cloud deployments. 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/calendargroup-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[CalendarGroupItemRequestBu async def get(self,request_configuration: Optional[CalendarGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarGroup]: """ - Retrieve the properties and relationships of a calendar group object. + Retrieve the properties and relationships of a calendar group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarGroup] Find more info here: https://learn.microsoft.com/graph/api/calendargroup-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[CalendarGroupItemRequestBuild async def patch(self,body: Optional[CalendarGroup] = None, request_configuration: Optional[CalendarGroupItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CalendarGroup]: """ - Update the properties of calendargroup object. + Update the properties of calendargroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarGroup] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[CalendarGroup] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[CalendarGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a calendar group other than the default calendar group. + Delete a calendar group other than the default calendar group. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a calendar group object. + Retrieve the properties and relationships of a calendar group object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarGroup] = None, request_configuration: Optional[CalendarGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of calendargroup object. + Update the properties of calendargroup object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[CalendarGroup] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class CalendarGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class CalendarGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a calendar group object. + Retrieve the properties and relationships of a calendar group object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/calendars_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/calendars_request_builder.py index 6878216a1d6..dfdf1176d66 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/calendars_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/calendars_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_id(self,calendar_id: str) -> CalendarItemRequestBuilder: async def get(self,request_configuration: Optional[CalendarsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarCollectionResponse]: """ - Retrieve a list of calendars belonging to a calendar group. + Retrieve a list of calendars belonging to a calendar group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendargroup-list-calendars?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarsRequestBuilderGetReq async def post(self,body: Optional[Calendar] = None, request_configuration: Optional[CalendarsRequestBuilderPostRequestConfiguration] = None) -> Optional[Calendar]: """ - Use this API to create a new calendar in a calendar group for a user. + Use this API to create a new calendar in a calendar group for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Calendar] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Calendar] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[CalendarsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of calendars belonging to a calendar group. + Retrieve a list of calendars belonging to a calendar group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Calendar] = None, request_configuration: Optional[CalendarsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new calendar in a calendar group for a user. + Use this API to create a new calendar in a calendar group for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Calendar] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarsRequestBuilderGetQueryParameters(): """ - Retrieve a list of calendars belonging to a calendar group. + Retrieve a list of calendars belonging to a calendar group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/count/count_request_builder.py index c43d144be0f..0d3b58be7f8 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py similarity index 88% rename from msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py rename to msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py index 431a3259721..eb9cd11f23f 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AllowedCalendarSharingRolesWithUserResponse(BaseCollectionPaginationCountResponse): +class AllowedCalendarSharingRolesWithUserGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[CalendarRoleType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AllowedCalendarSharingRolesWithUserResponse + Returns: AllowedCalendarSharingRolesWithUserGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AllowedCalendarSharingRolesWithUserResponse() + return AllowedCalendarSharingRolesWithUserGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py index 2d65af5cbdc..42f5ee0cbfb 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse class AllowedCalendarSharingRolesWithUserRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param user: Usage: User='{User}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['user'] = str(user) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserResponse]: + async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserGetResponse]: """ Invoke function allowedCalendarSharingRoles param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AllowedCalendarSharingRolesWithUserResponse] + Returns: Optional[AllowedCalendarSharingRolesWithUserGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWi } if not self.request_adapter: raise Exception("Http core is null") - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse - return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[AllowedCalen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedCalendarSharingRolesWithUserRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_item_request_builder.py index 4ca5a067262..7f28c3842c3 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_item_request_builder.py @@ -114,12 +114,12 @@ def to_delete_request_information(self,request_configuration: Optional[CalendarI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -129,14 +129,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Calendar] = None, request_configuration: Optional[CalendarItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -149,13 +149,13 @@ def to_patch_request_information(self,body: Optional[Calendar] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py index ae7439c53fb..d7ce536c018 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_permission_id(self,calendar_permission_id: str) -> CalendarPermi async def get(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermissionCollectionResponse]: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionsRequestBui async def post(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CalendarPermission] = None, request_configura def to_get_request_information(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarPermissionsRequestBuilderGetQueryParameters(): """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/count/count_request_builder.py index fc22f91823b..e292fb870f2 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py index f34c10f72d0..f5199713985 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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/calendarpermission-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CalendarPermissionItemRequ async def get(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] Find more info here: https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionItemRequest async def patch(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[CalendarPermission] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class CalendarPermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class CalendarPermissionItemRequestBuilderGetQueryParameters(): """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/calendar_view_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/calendar_view_request_builder.py index 36a2b2a46d5..0511925ca87 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/calendar_view_request_builder.py @@ -45,7 +45,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[CalendarViewRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. + Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-calendarview?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[CalendarViewRequestBuilderGet def to_get_request_information(self,request_configuration: Optional[CalendarViewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. + Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarViewRequestBuilder: @@ -113,7 +113,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class CalendarViewRequestBuilderGetQueryParameters(): """ - Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. + Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/count/count_request_builder.py index 83cc83ebde1..0b7d3971006 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_response.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_response.py rename to msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_get_response.py index 8132611880f..cff64479e95 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_request_builder.py index 4e71e6ee351..01f43a514df 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/accept/accept_request_builder.py index 31d7c57bb28..f547613d7ba 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py index 8139777b4fc..352315ef198 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py index a2ede1432e5..bf0e98e625e 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py index 664f8f626b2..e61491a1824 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py index fd972e57806..a561cb80d33 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py index 4f2f83411ce..265d9e8d051 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py index 5278f00d62d..7f61c0c8bb6 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/decline/decline_request_builder.py index 9c85157c7fe..d4adf225545 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py index 9b824b78e2d..a276b17ef4c 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/event_item_request_builder.py index 4850454f3d3..7ff8a455dfe 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/event_item_request_builder.py @@ -65,14 +65,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py index 258873ef3f5..7a981aa1fb3 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py index 06c40de154e..fe0674ad326 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py index e148e6ec9c5..5fad8c26536 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/forward/forward_request_builder.py index 908aef0fac3..5d5539a69a5 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py index e36a760b168..9fcfb11e62e 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_get_response.py index 17fd3ef5cd4..5ac313665ad 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py index cf5018eba21..6593d409f6f 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/instances_request_builder.py index 8b264bff50d..5f7eb7c18af 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py index 490db870a5d..de525599bd9 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py index 7bcdf55a751..13c106cd4e8 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py index f269a1b8a57..b745be9ce04 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 87d7d0f48bf..046690f1e42 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py index 5e95010a5b6..ff258ac4f14 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py index d39990f67e0..bd937c8ac79 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py index 093bc8d8be3..524504c9fd3 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py index 76cb569edbb..a88f2c79ba5 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index ac6119962ac..f39795d010b 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py index a3057174976..36a411287f6 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py index 8f563416f91..f5e6c2a0dcb 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py index 5c2f750a979..accea7fba3a 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py index 4f04b2a7cc1..fe915945268 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py index 6ded366e8e2..c3ede6423d4 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 37af6bca370..e54b223b6c9 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 0ece3e9cc12..4cc69e95bdc 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py index c50fd78fdd9..96385175340 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py index 0cd3eb39a4e..37b52a69d76 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/count/count_request_builder.py index f04423f22c0..ad62a69849e 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_response.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_response.py rename to msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_get_response.py index 8132611880f..cff64479e95 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_request_builder.py index fed0ab6de81..d5dde85471e 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/events_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/events_request_builder.py index 603fc62d4de..decb3b0aa12 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/events_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/events_request_builder.py @@ -46,7 +46,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[EventsRequestBuilderGetReques async def post(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> Optional[Event]: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Event] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Event] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class EventsRequestBuilderGetQueryParameters(): """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/accept/accept_request_builder.py index cae815885c4..22a62907f83 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/attachments_request_builder.py index f77e7a2828a..4af03ffbce1 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/count/count_request_builder.py index 85391ff97b8..9bab2fd7a84 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py index e7a20738909..8aa3317cce7 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py index 4294895b623..8e83471f8b2 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/calendar/calendar_request_builder.py index 7af548dcafc..54a690c02fd 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/cancel/cancel_request_builder.py index 9589e318ffb..7ebe1c197c9 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/decline/decline_request_builder.py index b9d63a9e91c..3e0866b0c69 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py index 7a37e9fb319..9755a692d78 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/event_item_request_builder.py index 91e42c78ba4..f384c38a342 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/event_item_request_builder.py @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[EventItemRequestBuilderGetReq async def patch(self,body: Optional[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Event]: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[EventItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,19 +124,19 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Event] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/count/count_request_builder.py index 3f18e0cf9cd..2a8815ffd2a 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/extensions_request_builder.py index 8528be27f61..7b43da3ef03 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py index 7c3d113fecb..5190146c203 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/forward/forward_request_builder.py index 6d189d6d581..198f3a9b951 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/count/count_request_builder.py index 14bea6cd984..4b0af4dbafc 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_get_response.py index 17fd3ef5cd4..5ac313665ad 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_request_builder.py index 481b2dd53d6..fa825efec08 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/instances_request_builder.py index b21e23d41b1..c9381e84d54 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py index 466cc1e482a..7e5bd250ad2 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py index 32984f7551a..dcf331845e7 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py index 7eaa9f8d24b..0a9bc447410 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index f50f3c03bcf..d6aed469ede 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py index 646029cd48f..f3f9fff3d26 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py index a3ef6ce411e..2cd821671d7 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py index fe535807b83..3f2a7ad4396 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py index c746d44e870..2a5481236f9 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index 775b455f442..68a11166aab 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/event_item_request_builder.py index c0858e20951..8e00b3e0604 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py index 2950fa1d6a5..f3e83471064 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py index d2e43142505..79be1a5da9e 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py index c2905fe549c..e417163d67d 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py index f9d5dcf4a82..1b8d3ff2173 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 16d08508630..3787aa0afc7 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index b12aa96a93e..c373d59fafd 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py index 10462f4c6bf..b2ab8cdb926 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py index 326d905ce83..d2337a48425 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_response.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_post_response.py similarity index 92% rename from msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_response.py rename to msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_post_response.py index dd3c38efc45..49851ac1b40 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_response.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_post_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetScheduleResponse(BaseCollectionPaginationCountResponse): +class GetSchedulePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ScheduleInformation]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetScheduleResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetSchedulePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetScheduleResponse + Returns: GetSchedulePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetScheduleResponse() + return GetSchedulePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_request_builder.py b/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_request_builder.py index c3282d99896..46c04bb07ec 100644 --- a/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_request_builder.py +++ b/msgraph/generated/users/item/calendar_groups/item/calendars/item/get_schedule/get_schedule_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError from .get_schedule_post_request_body import GetSchedulePostRequestBody - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse class GetScheduleRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/getSchedule", path_parameters) - async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetScheduleResponse]: + async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetSchedulePostResponse]: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetScheduleResponse] + Returns: Optional[GetSchedulePostResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse - return await self.request_adapter.send_async(request_info, GetScheduleResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetSchedulePostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/calendar_view_request_builder.py b/msgraph/generated/users/item/calendar_view/calendar_view_request_builder.py index 0eb75acd34f..a0c17c942af 100644 --- a/msgraph/generated/users/item/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/calendar_view_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarViewRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/count/count_request_builder.py b/msgraph/generated/users/item/calendar_view/count/count_request_builder.py index e381ceadb75..8a3a8db82b2 100644 --- a/msgraph/generated/users/item/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/delta/delta_response.py b/msgraph/generated/users/item/calendar_view/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendar_view/delta/delta_response.py rename to msgraph/generated/users/item/calendar_view/delta/delta_get_response.py index 1b1ec66ac9e..7b78757d973 100644 --- a/msgraph/generated/users/item/calendar_view/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar_view/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_view/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar_view/delta/delta_request_builder.py index 931129078b4..ef4bbec4767 100644 --- a/msgraph/generated/users/item/calendar_view/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar_view/item/accept/accept_request_builder.py index 8ce43a835ef..be4b8295e8e 100644 --- a/msgraph/generated/users/item/calendar_view/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar_view/item/attachments/attachments_request_builder.py index fe3437ebcf4..1be6acdda46 100644 --- a/msgraph/generated/users/item/calendar_view/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar_view/item/attachments/count/count_request_builder.py index 4d6a37cf5e0..fad2c101dc8 100644 --- a/msgraph/generated/users/item/calendar_view/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py index e9ddb5192a6..325c412eb2a 100644 --- a/msgraph/generated/users/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar_view/item/attachments/item/attachment_item_request_builder.py index 773202f6527..472639dbda1 100644 --- a/msgraph/generated/users/item/calendar_view/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar_view/item/calendar/calendar_request_builder.py index 77df8255baa..012db480841 100644 --- a/msgraph/generated/users/item/calendar_view/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar_view/item/cancel/cancel_request_builder.py index f8b6191655e..4e2b29c8ae4 100644 --- a/msgraph/generated/users/item/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar_view/item/decline/decline_request_builder.py index 9695a404e77..6b00582ab00 100644 --- a/msgraph/generated/users/item/calendar_view/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py index ba45a667b33..a04fb9c4fae 100644 --- a/msgraph/generated/users/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar_view/item/event_item_request_builder.py index 1e3f191e720..42535cf9742 100644 --- a/msgraph/generated/users/item/calendar_view/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/event_item_request_builder.py @@ -65,14 +65,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_view/item/extensions/count/count_request_builder.py index 03419b7e619..068301096a9 100644 --- a/msgraph/generated/users/item/calendar_view/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar_view/item/extensions/extensions_request_builder.py index e033fac5e94..173fb24019e 100644 --- a/msgraph/generated/users/item/calendar_view/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar_view/item/extensions/item/extension_item_request_builder.py index a1692ce8db8..a4c3d32f4c4 100644 --- a/msgraph/generated/users/item/calendar_view/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar_view/item/forward/forward_request_builder.py index 79c1cadcdfa..09ea21541f5 100644 --- a/msgraph/generated/users/item/calendar_view/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/count/count_request_builder.py index 561ae40e882..ead83f50b6c 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendar_view/item/instances/delta/delta_get_response.py index c806fd1d94b..c1a84de4868 100644 --- a/msgraph/generated/groups/item/calendar_view/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_request_builder.py index 548d712fae6..045f09cfa16 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/instances_request_builder.py index 171645b7ca8..05a21a0c82a 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/accept/accept_request_builder.py index 0e414435799..86de4f88e0d 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py index 2468de99fcf..442b6561181 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py index 4637e84db17..da9f302c810 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index cd968ad3d3c..3ceef2234f0 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py index 6adb5b73894..c0eb2876fe4 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py index b95ad42276a..cc7dee1bc57 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py index c00b25e3f86..865df72548c 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/decline/decline_request_builder.py index c364ce1f04f..86f2a346c7e 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index ac7b8800a8a..ed8879f672b 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/event_item_request_builder.py index 7f054e3a715..82f3aea55a7 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py index d83acf2bb27..09d9488b29b 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py index 54568716548..3ecfa7ba754 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py index 9273b2ad0d6..3b2d82f2c51 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/forward/forward_request_builder.py index 415352b9079..335d594a513 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 88cae48c142..f108b067dc4 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 7677199feeb..81801b9b36c 100644 --- a/msgraph/generated/users/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py index b7b7a3c2a6f..b830a98e811 100644 --- a/msgraph/generated/users/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py index 8f4e794d14c..410731ae2aa 100644 --- a/msgraph/generated/users/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/calendars_request_builder.py b/msgraph/generated/users/item/calendars/calendars_request_builder.py index 00bb5d5b3dc..f036cad5bf6 100644 --- a/msgraph/generated/users/item/calendars/calendars_request_builder.py +++ b/msgraph/generated/users/item/calendars/calendars_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_id(self,calendar_id: str) -> CalendarItemRequestBuilder: async def get(self,request_configuration: Optional[CalendarsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarCollectionResponse]: """ - Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. + Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-calendars?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarsRequestBuilderGetReq async def post(self,body: Optional[Calendar] = None, request_configuration: Optional[CalendarsRequestBuilderPostRequestConfiguration] = None) -> Optional[Calendar]: """ - Create a new calendar for a user. + Create a new calendar for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Calendar] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Calendar] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[CalendarsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. + Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Calendar] = None, request_configuration: Optional[CalendarsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new calendar for a user. + Create a new calendar for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Calendar] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarsRequestBuilderGetQueryParameters(): """ - Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. + Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/count/count_request_builder.py b/msgraph/generated/users/item/calendars/count/count_request_builder.py index 0c233735f5e..e51705ffe3c 100644 --- a/msgraph/generated/users/item/calendars/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py b/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py similarity index 88% rename from msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py rename to msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py index ae4ed525759..83e0e451370 100644 --- a/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_response.py +++ b/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AllowedCalendarSharingRolesWithUserResponse(BaseCollectionPaginationCountResponse): +class AllowedCalendarSharingRolesWithUserGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[CalendarRoleType]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AllowedCalendarSharingRolesWithUserGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AllowedCalendarSharingRolesWithUserResponse + Returns: AllowedCalendarSharingRolesWithUserGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AllowedCalendarSharingRolesWithUserResponse() + return AllowedCalendarSharingRolesWithUserGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py b/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py index 9e20fba8c44..928c93a9fd5 100644 --- a/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/allowed_calendar_sharing_roles_with_user/allowed_calendar_sharing_roles_with_user_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse class AllowedCalendarSharingRolesWithUserRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param user: Usage: User='{User}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['user'] = str(user) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserResponse]: + async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> Optional[AllowedCalendarSharingRolesWithUserGetResponse]: """ Invoke function allowedCalendarSharingRoles param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AllowedCalendarSharingRolesWithUserResponse] + Returns: Optional[AllowedCalendarSharingRolesWithUserGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[AllowedCalendarSharingRolesWi } if not self.request_adapter: raise Exception("Http core is null") - from .allowed_calendar_sharing_roles_with_user_response import AllowedCalendarSharingRolesWithUserResponse + from .allowed_calendar_sharing_roles_with_user_get_response import AllowedCalendarSharingRolesWithUserGetResponse - return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AllowedCalendarSharingRolesWithUserGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[AllowedCalendarSharingRolesWithUserRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[AllowedCalen Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedCalendarSharingRolesWithUserRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_item_request_builder.py index 8c60461a96a..e811032b2c0 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_item_request_builder.py @@ -114,12 +114,12 @@ def to_delete_request_information(self,request_configuration: Optional[CalendarI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -129,14 +129,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Calendar] = None, request_configuration: Optional[CalendarItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -149,13 +149,13 @@ def to_patch_request_information(self,body: Optional[Calendar] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py index 5c6ccaa9007..cf45d6937be 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_permissions/calendar_permissions_request_builder.py @@ -45,7 +45,7 @@ def by_calendar_permission_id(self,calendar_permission_id: str) -> CalendarPermi async def get(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermissionCollectionResponse]: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermissionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionsRequestBui async def post(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -92,24 +92,24 @@ async def post(self,body: Optional[CalendarPermission] = None, request_configura def to_get_request_information(self,request_configuration: Optional[CalendarPermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. + Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class CalendarPermissionsRequestBuilderGetQueryParameters(): """ - Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. + Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_permissions/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_permissions/count/count_request_builder.py index bf733421747..060966266a8 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_permissions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_permissions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py index 24b89e121ea..f594cd419e6 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_permissions/item/calendar_permission_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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/calendarpermission-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[CalendarPermissionItemRequ async def get(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] Find more info here: https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[CalendarPermissionItemRequest async def patch(self,body: Optional[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CalendarPermission]: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CalendarPermission] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[CalendarPermission] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete calendarPermission. + Delete calendarPermission. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[CalendarPermissionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[CalendarPermission] = None, request_configuration: Optional[CalendarPermissionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the permissions assigned to an existing sharee or delegate, through the corresponding calendarPermission object for a calendar. + Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[CalendarPermission] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class CalendarPermissionItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class CalendarPermissionItemRequestBuilderGetQueryParameters(): """ - Get the specified permissions object of a user or group calendar that has been shared. + Get the specified permissions object of a user or group calendar that has been shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/calendar_view_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/calendar_view_request_builder.py index d892d670a88..fcecb1b18d9 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/calendar_view_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/calendar_view_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarViewRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/count/count_request_builder.py index 88b8678e566..c20f487926d 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/groups/item/events/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/groups/item/events/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_get_response.py index c806fd1d94b..c1a84de4868 100644 --- a/msgraph/generated/groups/item/events/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_request_builder.py index 55a7e8431af..b24ede6b1ab 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/accept/accept_request_builder.py index 6c8a65faa4e..ffcf396eae5 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py index d19b912b629..f32146868c5 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py index 1e967379279..f6671914493 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py index d48731ae7bd..a51b1137abc 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py index 1757e6dfccf..ecaa0a1dcbc 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py index 91412a4461e..013ed345b79 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py index 0a97fdc688f..23c535e6241 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/decline/decline_request_builder.py index 9dedb8c7bd5..31eeeb9280e 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py index 95eaf6ea9a2..1331cf61832 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/event_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/event_item_request_builder.py index 895b55a107d..862005411d4 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/event_item_request_builder.py @@ -65,14 +65,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py index c3bb2fc11a2..d343a1e9fa6 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py index 6170a77b653..475695552da 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py index 212f110fd95..d8e89961c4b 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/forward/forward_request_builder.py index ecc65d6e655..1617c57a2d6 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py index 488d4c760c4..797332534f1 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_get_response.py index 8132611880f..cff64479e95 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py index 88346a3ea6d..694c339f38b 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/instances_request_builder.py index 462cb39cc38..1264d228144 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py index 8b79e9c5662..797dd6293e6 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py index 34fc4a75b0b..cbc147f97f9 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py index 334e895c256..99ff8cbd888 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index a253b57226d..4cf1c96fa0e 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py index b2e08cb8e17..ccb9bc17d79 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py index 2907e06ecf6..c14f54ac585 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py index 4f95d0b666e..04632c8c7a3 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py index e42116aea26..7e9355943d7 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index ab64b5c1b47..44fd7502c45 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py index 9d673c329e3..1de07791f05 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py index 8468ff4879a..ac414fad1d0 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py index fef75c1eb80..e3b5b529abc 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py index 0a21d74ad62..aec67ea31a7 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py index 77c5bf913df..b9a68b1e5f6 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 2a10338c3c7..1797d0339ed 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 279e381aa7a..efeefc73080 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py index 05ad3ca973f..154e8b5723e 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py index 29395cfe6df..a2a86f65e3f 100644 --- a/msgraph/generated/users/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/calendar_view/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/events/count/count_request_builder.py index b11bc75d0bd..676904df148 100644 --- a/msgraph/generated/users/item/calendars/item/events/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/delta/delta_get_response.py b/msgraph/generated/users/item/calendars/item/events/delta/delta_get_response.py new file mode 100644 index 00000000000..c1a84de4868 --- /dev/null +++ b/msgraph/generated/users/item/calendars/item/events/delta/delta_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.base_delta_function_response import BaseDeltaFunctionResponse + from .......models.event import Event + +from .......models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[Event]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .......models.base_delta_function_response import BaseDeltaFunctionResponse + from .......models.event import Event + + from .......models.base_delta_function_response import BaseDeltaFunctionResponse + from .......models.event import Event + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Event)), + } + 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/users/item/calendars/item/events/delta/delta_request_builder.py b/msgraph/generated/users/item/calendars/item/events/delta/delta_request_builder.py index 5d9e5eb59ee..44400945637 100644 --- a/msgraph/generated/users/item/calendars/item/events/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/delta/delta_response.py b/msgraph/generated/users/item/calendars/item/events/delta/delta_response.py deleted file mode 100644 index c806fd1d94b..00000000000 --- a/msgraph/generated/users/item/calendars/item/events/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.event import Event - -from .......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[Event]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.event import Event - - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.event import Event - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Event)), - } - 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/users/item/calendars/item/events/events_request_builder.py b/msgraph/generated/users/item/calendars/item/events/events_request_builder.py index 2e2675e7b36..f0a1ae64378 100644 --- a/msgraph/generated/users/item/calendars/item/events/events_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/events_request_builder.py @@ -46,7 +46,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[EventsRequestBuilderGetReques async def post(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> Optional[Event]: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Event] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. + Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Event] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class EventsRequestBuilderGetQueryParameters(): """ - Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/accept/accept_request_builder.py index b6d9c555f77..b91a5383c3b 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/attachments/attachments_request_builder.py index 4b1efc21106..96f07059af6 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/attachments/count/count_request_builder.py index 828aae57204..7570326afcf 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py index 6cfa15437f9..517ce781ee0 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py index f53333a5678..02f577f3b72 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/calendar/calendar_request_builder.py index 721ea424e72..80020091e92 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/cancel/cancel_request_builder.py index 4e8387d1223..163dcd56451 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/decline/decline_request_builder.py index 674d7399130..c99e6778ed1 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py index 589e0d291cc..c9fa1906130 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/event_item_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/event_item_request_builder.py index 4b041625c4b..996ed0cdf6d 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/event_item_request_builder.py @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[EventItemRequestBuilderGetReq async def patch(self,body: Optional[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Event]: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[EventItem Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,19 +124,19 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update an event object. + Update an event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Event] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/extensions/count/count_request_builder.py index ae05290fd87..12ff44a2577 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/extensions/extensions_request_builder.py index 501402cfa0b..92bce94fc72 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py index ef3659d76ad..43bca0e4398 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/forward/forward_request_builder.py index 1665a9d250e..6c10284dc42 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/count/count_request_builder.py index 8c516c6322a..61359e9c48d 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_response.py b/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_response.py rename to msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_get_response.py index 8132611880f..cff64479e95 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_response.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_request_builder.py index 73d95114781..78afe56ede0 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/instances_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/instances_request_builder.py index 0827f0f389b..ed47a425c8a 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py index 2a1582a951e..8231d196c8e 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py index ac0f4f272dc..6fa3bf180ec 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py index ee3b9f2c471..56fc5b0dbe0 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 3df1aa354b7..d295ccb0e85 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py index 5413b96e3ee..954784bff8e 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py index 4986d800add..d8488200bd6 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py index b53dbe73c51..116d34c19cc 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py index 8df1345b4d3..0df25b19791 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index 6f2615becff..d305b0ca6df 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/event_item_request_builder.py index 7d76b671f35..4fd797aaf52 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py index 42fbb446d97..e7edeab4aea 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py index f014d91dec9..1a5e6f61f86 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py index ed3e26c3ebc..c4c81780d3c 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py index 35294ef0faa..636c7c2a0c3 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 39f4ef0603c..989e5c7f454 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index 3cc24ce291a..ec8ac3302b0 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py index 055c5397aa3..e466e96d070 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py index fcc0e277ced..c4d734022ff 100644 --- a/msgraph/generated/users/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/events/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_response.py b/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_post_response.py similarity index 92% rename from msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_response.py rename to msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_post_response.py index 802bb77ab93..46ed165826e 100644 --- a/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_response.py +++ b/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_post_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetScheduleResponse(BaseCollectionPaginationCountResponse): +class GetSchedulePostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ScheduleInformation]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetScheduleResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetSchedulePostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetScheduleResponse + Returns: GetSchedulePostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetScheduleResponse() + return GetSchedulePostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_request_builder.py b/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_request_builder.py index 3829a40e050..1c8df5bbd97 100644 --- a/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_request_builder.py +++ b/msgraph/generated/users/item/calendars/item/get_schedule/get_schedule_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from .get_schedule_post_request_body import GetSchedulePostRequestBody - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse class GetScheduleRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/getSchedule", path_parameters) - async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetScheduleResponse]: + async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> Optional[GetSchedulePostResponse]: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetScheduleResponse] + Returns: Optional[GetSchedulePostResponse] Find more info here: https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetSchedulePostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .get_schedule_response import GetScheduleResponse + from .get_schedule_post_response import GetSchedulePostResponse - return await self.request_adapter.send_async(request_info, GetScheduleResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetSchedulePostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] = None, request_configuration: Optional[GetScheduleRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. + Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetSchedulePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/change_password/change_password_request_builder.py b/msgraph/generated/users/item/change_password/change_password_request_builder.py index b990ee9cc80..15558da2364 100644 --- a/msgraph/generated/users/item/change_password/change_password_request_builder.py +++ b/msgraph/generated/users/item/change_password/change_password_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ChangePasswordPostRequestBody] = None, request_configuration: Optional[ChangePasswordRequestBuilderPostRequestConfiguration] = None) -> None: """ - Enable the user to update their password. Any user can update their password without belonging to any administrator role. + Enable the user to update their password. Any user can update their password without belonging to any administrator role. This API is available in the following national cloud deployments. 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[ChangePasswordPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[ChangePasswordPostRequestBody] = None, request_configuration: Optional[ChangePasswordRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Enable the user to update their password. Any user can update their password without belonging to any administrator role. + Enable the user to update their password. Any user can update their password without belonging to any administrator role. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ChangePasswordPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/chats_request_builder.py b/msgraph/generated/users/item/chats/chats_request_builder.py index e1cd0750a38..1ae123b8300 100644 --- a/msgraph/generated/users/item/chats/chats_request_builder.py +++ b/msgraph/generated/users/item/chats/chats_request_builder.py @@ -46,7 +46,7 @@ def by_chat_id(self,chat_id: str) -> ChatItemRequestBuilder: async def get(self,request_configuration: Optional[ChatsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatCollectionResponse]: """ - Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. + Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Chat] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[ChatsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. + Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Chat] = None, request_configuration: Optional[ChatsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Chat] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class ChatsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. + Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/count/count_request_builder.py b/msgraph/generated/users/item/chats/count/count_request_builder.py index 7d9716913a6..d7b67ce3f50 100644 --- a/msgraph/generated/users/item/chats/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_response.py b/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/users/item/chats/get_all_messages/get_all_messages_response.py rename to msgraph/generated/users/item/chats/get_all_messages/get_all_messages_get_response.py index 71931d32819..51a6bd5d308 100644 --- a/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_request_builder.py index 8f9b233bc0e..2a2012a86e1 100644 --- a/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/users/item/chats/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/chat_item_request_builder.py b/msgraph/generated/users/item/chats/item/chat_item_request_builder.py index 384538b2926..c02caff4016 100644 --- a/msgraph/generated/users/item/chats/item/chat_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/chat_item_request_builder.py @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[ChatItemRequestBuilderDele async def get(self,request_configuration: Optional[ChatItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Chat]: """ - Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. + Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Chat] Find more info here: https://learn.microsoft.com/graph/api/chat-get?view=graph-rest-1.0 @@ -110,29 +110,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. + Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Chat] = None, request_configuration: Optional[ChatItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -145,13 +145,13 @@ def to_patch_request_information(self,body: Optional[Chat] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -286,7 +286,7 @@ class ChatItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ChatItemRequestBuilderGetQueryParameters(): """ - Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. + Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/hide_for_user/hide_for_user_request_builder.py b/msgraph/generated/users/item/chats/item/hide_for_user/hide_for_user_request_builder.py index 5b16e5fd7c0..7ce995d97ff 100644 --- a/msgraph/generated/users/item/chats/item/hide_for_user/hide_for_user_request_builder.py +++ b/msgraph/generated/users/item/chats/item/hide_for_user/hide_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[HideForUserPostRequestBody] = None, request_configuration: Optional[HideForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Hide a chat for a user. + Hide a chat for a user. This API is available in the following national cloud deployments. 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[HideForUserPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[HideForUserPostRequestBody] = None, request_configuration: Optional[HideForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Hide a chat for a user. + Hide a chat for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[HideForUserPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/installed_apps/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/installed_apps/count/count_request_builder.py index 8d989503cc6..dc77099edda 100644 --- a/msgraph/generated/users/item/chats/item/installed_apps/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/installed_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/installed_apps/installed_apps_request_builder.py b/msgraph/generated/users/item/chats/item/installed_apps/installed_apps_request_builder.py index 9e19cbf0a35..1bed5032e42 100644 --- a/msgraph/generated/users/item/chats/item/installed_apps/installed_apps_request_builder.py +++ b/msgraph/generated/users/item/chats/item/installed_apps/installed_apps_request_builder.py @@ -45,7 +45,7 @@ def by_teams_app_installation_id(self,teams_app_installation_id: str) -> TeamsAp async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallationCollectionResponse]: """ - List all app installations within a chat. + List all app installations within a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-installedapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGe async def post(self,body: Optional[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Install a teamsApp to the specified chat. + Install a teamsApp to the specified chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsAppInstallation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all app installations within a chat. + List all app installations within a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Install a teamsApp to the specified chat. + Install a teamsApp to the specified chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsAppInstallation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstalledAppsRequestBuilderGetQueryParameters(): """ - List all app installations within a chat. + List all app installations within a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py b/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py index ad213ef000b..39ab91aff25 100644 --- a/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app/teams_app_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py b/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py index fd07b100c1d..1ec63303679 100644 --- a/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py +++ b/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppDefinitionRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py b/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py index b0cc9e39a15..ca821071e06 100644 --- a/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/installed_apps/item/teams_app_installation_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Uninstall an app installed within a chat. + Uninstall an app installed within a chat. This API is available in the following national cloud deployments. 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/chat-delete-installedapps?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRe async def get(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Get an app installed in a chat. + Get an app installed in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] Find more info here: https://learn.microsoft.com/graph/api/chat-get-installedapps?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[TeamsAppInstallation] = None, request_config def to_delete_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Uninstall an app installed within a chat. + Uninstall an app installed within a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an app installed in a chat. + Get an app installed in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[TeamsAppInstallationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppInstallation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class TeamsAppInstallationItemRequestBuilderGetQueryParameters(): """ - Get an app installed in a chat. + Get an app installed in a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py b/msgraph/generated/users/item/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py index 6332b0f09ec..56d1811775f 100644 --- a/msgraph/generated/users/item/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py +++ b/msgraph/generated/users/item/chats/item/installed_apps/item/upgrade/upgrade_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. 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[UpgradePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/last_message_preview/last_message_preview_request_builder.py b/msgraph/generated/users/item/chats/item/last_message_preview/last_message_preview_request_builder.py index 58861fa8c50..9b5ed6bf146 100644 --- a/msgraph/generated/users/item/chats/item/last_message_preview/last_message_preview_request_builder.py +++ b/msgraph/generated/users/item/chats/item/last_message_preview/last_message_preview_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[LastMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LastMessagePreviewRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[LastMessageP Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageInfo] = None, request_configuration: Optional[LastMessagePreviewRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageInfo] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py b/msgraph/generated/users/item/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py index a2fa94a6e29..6b1b8b788a7 100644 --- a/msgraph/generated/users/item/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py +++ b/msgraph/generated/users/item/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MarkChatReadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatReadForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Mark a chat as read for a user. + Mark a chat as read for a user. This API is available in the following national cloud deployments. 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[MarkChatReadForUserPostRequestBody] = None, r def to_post_request_information(self,body: Optional[MarkChatReadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatReadForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mark a chat as read for a user. + Mark a chat as read for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[MarkChatReadForUserPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py b/msgraph/generated/users/item/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py index b9420142fe7..6b8e35ef703 100644 --- a/msgraph/generated/users/item/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py +++ b/msgraph/generated/users/item/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MarkChatUnreadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatUnreadForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Mark a chat as unread for a user. + Mark a chat as unread for a user. This API is available in the following national cloud deployments. 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[MarkChatUnreadForUserPostRequestBody] = None, def to_post_request_information(self,body: Optional[MarkChatUnreadForUserPostRequestBody] = None, request_configuration: Optional[MarkChatUnreadForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Mark a chat as unread for a user. + Mark a chat as unread for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[MarkChatUnreadForUserPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/groups/item/team/primary_channel/members/add/add_response.py b/msgraph/generated/users/item/chats/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/groups/item/team/primary_channel/members/add/add_response.py rename to msgraph/generated/users/item/chats/item/members/add/add_post_response.py index 73509a849f5..77f0fa0e9e4 100644 --- a/msgraph/generated/groups/item/team/primary_channel/members/add/add_response.py +++ b/msgraph/generated/users/item/chats/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/chats/item/members/add/add_request_builder.py b/msgraph/generated/users/item/chats/item/members/add/add_request_builder.py index edd822055ac..80316446405 100644 --- a/msgraph/generated/users/item/chats/item/members/add/add_request_builder.py +++ b/msgraph/generated/users/item/chats/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/members/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/members/count/count_request_builder.py index 2ab4e885ae1..ac54bd70fdc 100644 --- a/msgraph/generated/users/item/chats/item/members/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 23edabe5025..9b9e6522fb0 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 @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a conversationMember from a chat. + Remove a conversationMember from a chat. This API is available in the following national cloud deployments. 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/chat-delete-members?view=graph-rest-1.0 @@ -48,7 +48,7 @@ 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 or channel. + Retrieve a conversationMember from a chat or channel. This API is available in the following national cloud deployments. 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/conversationmember-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a conversationMember from a chat. + Remove a conversationMember from a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a conversationMember from a chat or channel. + Retrieve a conversationMember from a chat or channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Retrieve a conversationMember from a chat or channel. + Retrieve a conversationMember from a chat or channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/members/members_request_builder.py b/msgraph/generated/users/item/chats/item/members/members_request_builder.py index cbe79cfc53d..9c28a5d50d0 100644 --- a/msgraph/generated/users/item/chats/item/members/members_request_builder.py +++ b/msgraph/generated/users/item/chats/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - List all conversation members in a chat or channel. + List all conversation members in a chat or channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmember-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a chat. + Add a conversationMember to a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all conversation members in a chat or channel. + List all conversation members in a chat or channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a chat. + Add a conversationMember to a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - List all conversation members in a chat or channel. + List all conversation members in a chat or channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/messages/count/count_request_builder.py index 669c1dd40e8..f967c75a48e 100644 --- a/msgraph/generated/users/item/chats/item/messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/chats/item/messages/item/replies/delta/delta_response.py b/msgraph/generated/users/item/chats/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/chats/item/messages/item/replies/delta/delta_response.py rename to msgraph/generated/users/item/chats/item/messages/delta/delta_get_response.py index b52bac4c1d4..59ba7b29309 100644 --- a/msgraph/generated/chats/item/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/users/item/chats/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/chats/item/messages/delta/delta_request_builder.py b/msgraph/generated/users/item/chats/item/messages/delta/delta_request_builder.py index d232f0a2fcb..c792f81d43f 100644 --- a/msgraph/generated/users/item/chats/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/chat_message_item_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/chat_message_item_request_builder.py index 1fa805daebc..2cd34fd59f3 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -104,29 +104,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -139,13 +139,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -226,7 +226,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/count/count_request_builder.py index c2dd4e14f8a..e7e3a76cd33 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py index 0fcaaaee80a..65c0c18ccfc 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 60ad5dcdb96..4da21b556c6 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py index 96039a687ed..935dd81de28 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/count/count_request_builder.py index 5a1bce22c62..1c547216bc3 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_response.py b/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_response.py rename to msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_get_response.py index b2b0589aadb..0842f9f0387 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_request_builder.py index bfac5b032c9..9e4a5eef78a 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/chat_message_item_request_builder.py index 8a460f6102b..34fad35edb6 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py index 4023d399f30..37ae5e172fa 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index d2475ac174f..fc9048b987a 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index ed6bbc8b845..d392e02cbd5 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index a23cd3d2d9c..649c6c6fa13 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index 1c59b061100..ad817a163bf 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index d2d2acf591f..d32d3c91b1d 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index 3495a1a4399..5492f9487ed 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index 00eda9b8fa2..e430abaca60 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 2454ede622d..447db23e40b 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/set_reaction/set_reaction_request_builder.py index 2480ba6a13e..f4d8e67d505 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/soft_delete/soft_delete_request_builder.py index d2f7473c2b8..c4618d00cdc 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index 103b99738c5..94de174b411 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py index 5aa08fa6424..dd5d86966e1 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/messages/messages_request_builder.py b/msgraph/generated/users/item/chats/item/messages/messages_request_builder.py index f52f67946f0..6d8c704dab7 100644 --- a/msgraph/generated/users/item/chats/item/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/messages_request_builder.py @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-messages?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 or a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 or a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/permission_grants/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/count/count_request_builder.py index 5a77501e3e2..b172f6185d1 100644 --- a/msgraph/generated/users/item/chats/item/permission_grants/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/permission_grants/delta/delta_response.py b/msgraph/generated/users/item/chats/item/permission_grants/delta/delta_response.py deleted file mode 100644 index 2511b8129fe..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - -from .......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 66a65c3f59b..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 293b643490d..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index f41a575730e..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 4a990d4d637..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py deleted file mode 100644 index a5fc2c2476e..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The groupIds property - group_ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsPostRequestBody() - - 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]] = { - "groupIds": lambda n : setattr(self, 'group_ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("groupIds", self.group_ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py deleted file mode 100644 index a2150931236..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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 .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse - -class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?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 .check_member_groups_response import CheckMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberGroupsRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0b38227280f..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py deleted file mode 100644 index 5f48b8577ec..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py deleted file mode 100644 index fa047618448..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ /dev/null @@ -1,94 +0,0 @@ -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 .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse - -class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) - - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: - """ - Invoke action checkMemberObjects - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] - """ - if not body: - raise TypeError("body cannot be null.") - request_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 .check_member_objects_response import CheckMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Invoke action checkMemberObjects - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberObjectsRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index 49b778d9816..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py deleted file mode 100644 index 1a3308bfb6c..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py deleted file mode 100644 index 3be8c826b26..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse - -class GetMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?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 .get_member_groups_response import GetMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberGroupsRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index a62ef1f1c87..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py deleted file mode 100644 index 7552e02e441..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py deleted file mode 100644 index a1014919d50..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse - -class GetMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?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 .get_member_objects_response import GetMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberObjectsRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 73b29c68c03..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index 8848b99c1ca..c5183bcf217 100644 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -12,11 +12,6 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .......models.resource_specific_permission_grant import ResourceSpecificPermissionGrant - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - from .restore.restore_request_builder import RestoreRequestBuilder class ResourceSpecificPermissionGrantItemRequestBuilder(BaseRequestBuilder): """ @@ -102,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -157,51 +152,6 @@ def with_url(self,raw_url: Optional[str] = None) -> ResourceSpecificPermissionGr raise TypeError("raw_url cannot be null.") return ResourceSpecificPermissionGrantItemRequestBuilder(self.request_adapter, raw_url) - @property - def check_member_groups(self) -> CheckMemberGroupsRequestBuilder: - """ - Provides operations to call the checkMemberGroups method. - """ - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - - return CheckMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def check_member_objects(self) -> CheckMemberObjectsRequestBuilder: - """ - Provides operations to call the checkMemberObjects method. - """ - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - - return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_groups(self) -> GetMemberGroupsRequestBuilder: - """ - Provides operations to call the getMemberGroups method. - """ - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - - return GetMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_objects(self) -> GetMemberObjectsRequestBuilder: - """ - Provides operations to call the getMemberObjects method. - """ - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - - return GetMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def restore(self) -> RestoreRequestBuilder: - """ - Provides operations to call the restore method. - """ - from .restore.restore_request_builder import RestoreRequestBuilder - - return RestoreRequestBuilder(self.request_adapter, self.path_parameters) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/users/item/chats/item/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/item/restore/restore_request_builder.py deleted file mode 100644 index 551484e492c..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/item/restore/restore_request_builder.py +++ /dev/null @@ -1,87 +0,0 @@ -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.directory_object import DirectoryObject - from ........models.o_data_errors.o_data_error import ODataError - -class RestoreRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the restore method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new RestoreRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore", path_parameters) - - async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: - """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 - """ - request_info = self.to_post_request_information( - request_configuration - ) - from ........models.o_data_errors.o_data_error import ODataError - - error_mapping: Dict[str, ParsableFactory] = { - "4XX": ODataError, - "5XX": ODataError, - } - if not self.request_adapter: - raise Exception("Http core is null") - from ........models.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - - def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: RestoreRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return RestoreRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class RestoreRequestBuilderPostRequestConfiguration(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/users/item/chats/item/permission_grants/permission_grants_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/permission_grants_request_builder.py index fcfb192b52c..eb097a721f0 100644 --- a/msgraph/generated/users/item/chats/item/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/users/item/chats/item/permission_grants/permission_grants_request_builder.py @@ -14,11 +14,7 @@ from ......models.resource_specific_permission_grant import ResourceSpecificPermissionGrant from ......models.resource_specific_permission_grant_collection_response import ResourceSpecificPermissionGrantCollectionResponse from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.resource_specific_permission_grant_item_request_builder import ResourceSpecificPermissionGrantItemRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class PermissionGrantsRequestBuilder(BaseRequestBuilder): """ @@ -49,7 +45,7 @@ def by_resource_specific_permission_grant_id(self,resource_specific_permission_g async def get(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ResourceSpecificPermissionGrantCollectionResponse]: """ - List all resource-specific permission grants on the chat. This list specifies the Azure AD apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ResourceSpecificPermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-permissiongrants?view=graph-rest-1.0 @@ -95,19 +91,19 @@ async def post(self,body: Optional[ResourceSpecificPermissionGrant] = None, requ def to_get_request_information(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all resource-specific permission grants on the chat. This list specifies the Azure AD apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +116,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,46 +145,10 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class PermissionGrantsRequestBuilderGetQueryParameters(): """ - List all resource-specific permission grants on the chat. This list specifies the Azure AD apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. + List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index a440a9c9cd3..00000000000 --- a/msgraph/generated/users/item/chats/item/permission_grants/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/users/item/chats/item/pinned_messages/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/pinned_messages/count/count_request_builder.py index d4cf2078c8d..99f410566f1 100644 --- a/msgraph/generated/users/item/chats/item/pinned_messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/pinned_messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/pinned_messages/item/message/message_request_builder.py b/msgraph/generated/users/item/chats/item/pinned_messages/item/message/message_request_builder.py index ec6499710c0..0be31f8da81 100644 --- a/msgraph/generated/users/item/chats/item/pinned_messages/item/message/message_request_builder.py +++ b/msgraph/generated/users/item/chats/item/pinned_messages/item/message/message_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[MessageReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MessageRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py b/msgraph/generated/users/item/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py index 6b51c212874..a06726438ab 100644 --- a/msgraph/generated/users/item/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unpin a message from a chat. + Unpin a message from a chat. This API is available in the following national cloud deployments. 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/chat-delete-pinnedmessages?view=graph-rest-1.0 @@ -94,17 +94,17 @@ async def patch(self,body: Optional[PinnedChatMessageInfo] = None, request_confi def to_delete_request_information(self,request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unpin a message from a chat. + Unpin a message from a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PinnedChatMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PinnedChatMessageInfo] = None, request_configuration: Optional[PinnedChatMessageInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PinnedChatMessageInfo] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/pinned_messages/pinned_messages_request_builder.py b/msgraph/generated/users/item/chats/item/pinned_messages/pinned_messages_request_builder.py index 372ba86cbc2..3321a564d04 100644 --- a/msgraph/generated/users/item/chats/item/pinned_messages/pinned_messages_request_builder.py +++ b/msgraph/generated/users/item/chats/item/pinned_messages/pinned_messages_request_builder.py @@ -45,7 +45,7 @@ def by_pinned_chat_message_info_id(self,pinned_chat_message_info_id: str) -> Pin async def get(self,request_configuration: Optional[PinnedMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[PinnedChatMessageInfoCollectionResponse]: """ - Get a list of pinnedChatMessages in a chat. + Get a list of pinnedChatMessages in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PinnedChatMessageInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-pinnedmessages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PinnedMessagesRequestBuilderG async def post(self,body: Optional[PinnedChatMessageInfo] = None, request_configuration: Optional[PinnedMessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[PinnedChatMessageInfo]: """ - Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. + Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PinnedChatMessageInfo] @@ -92,24 +92,24 @@ async def post(self,body: Optional[PinnedChatMessageInfo] = None, request_config def to_get_request_information(self,request_configuration: Optional[PinnedMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of pinnedChatMessages in a chat. + Get a list of pinnedChatMessages in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PinnedChatMessageInfo] = None, request_configuration: Optional[PinnedMessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. + Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[PinnedChatMessageInfo] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PinnedMessagesRequestBuilderGetQueryParameters(): """ - Get a list of pinnedChatMessages in a chat. + Get a list of pinnedChatMessages in a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/send_activity_notification/send_activity_notification_request_builder.py b/msgraph/generated/users/item/chats/item/send_activity_notification/send_activity_notification_request_builder.py index 67017642587..cdcb004d985 100644 --- a/msgraph/generated/users/item/chats/item/send_activity_notification/send_activity_notification_request_builder.py +++ b/msgraph/generated/users/item/chats/item/send_activity_notification/send_activity_notification_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationPostRequestBody] = No def to_post_request_information(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/chats/item/tabs/count/count_request_builder.py b/msgraph/generated/users/item/chats/item/tabs/count/count_request_builder.py index c080ca579fc..6b6e2336542 100644 --- a/msgraph/generated/users/item/chats/item/tabs/count/count_request_builder.py +++ b/msgraph/generated/users/item/chats/item/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/chats/item/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/users/item/chats/item/tabs/item/teams_app/teams_app_request_builder.py index 1c3b4513cde..b6fe9b3bdaa 100644 --- a/msgraph/generated/users/item/chats/item/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/users/item/chats/item/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/users/item/chats/item/tabs/item/teams_tab_item_request_builder.py index f1fcfca7dc2..83d0e14e183 100644 --- a/msgraph/generated/users/item/chats/item/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove (unpin) a tab from the specified chat. + Remove (unpin) a tab from the specified chat. This API is available in the following national cloud deployments. 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/chat-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a chat. + Retrieve the properties and relationships of the specified tab in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/chat-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. + Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove (unpin) a tab from the specified chat. + Remove (unpin) a tab from the specified chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a chat. + Retrieve the properties and relationships of the specified tab in a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. + Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a chat. + Retrieve the properties and relationships of the specified tab in a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/tabs/tabs_request_builder.py b/msgraph/generated/users/item/chats/item/tabs/tabs_request_builder.py index 1dca9f91f5b..fc561c5a71c 100644 --- a/msgraph/generated/users/item/chats/item/tabs/tabs_request_builder.py +++ b/msgraph/generated/users/item/chats/item/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified chat. + Retrieve the list of tabs in the specified chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chat-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. + Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified chat. + Retrieve the list of tabs in the specified chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. + Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified chat. + Retrieve the list of tabs in the specified chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/unhide_for_user/unhide_for_user_request_builder.py b/msgraph/generated/users/item/chats/item/unhide_for_user/unhide_for_user_request_builder.py index 91882fa9ec7..e8317f7c556 100644 --- a/msgraph/generated/users/item/chats/item/unhide_for_user/unhide_for_user_request_builder.py +++ b/msgraph/generated/users/item/chats/item/unhide_for_user/unhide_for_user_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UnhideForUserPostRequestBody] = None, request_configuration: Optional[UnhideForUserRequestBuilderPostRequestConfiguration] = None) -> None: """ - Unhide a chat for a user. + Unhide a chat for a user. This API is available in the following national cloud deployments. 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[UnhideForUserPostRequestBody] = None, request def to_post_request_information(self,body: Optional[UnhideForUserPostRequestBody] = None, request_configuration: Optional[UnhideForUserRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Unhide a chat for a user. + Unhide a chat for a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UnhideForUserPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/check_member_groups/check_member_groups_post_response.py b/msgraph/generated/users/item/check_member_groups/check_member_groups_post_response.py new file mode 100644 index 00000000000..59e0096fa11 --- /dev/null +++ b/msgraph/generated/users/item/check_member_groups/check_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/users/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/users/item/check_member_groups/check_member_groups_request_builder.py index 74aa48705b2..a1d8c1300b8 100644 --- a/msgraph/generated/users/item/check_member_groups/check_member_groups_request_builder.py +++ b/msgraph/generated/users/item/check_member_groups/check_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/checkMemberGroups", path_parameters) - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: + async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsPostResponse]: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] + Returns: Optional[CheckMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, req } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_groups_response import CheckMemberGroupsResponse + from .check_member_groups_post_response import CheckMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/users/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0db69ab16a2..00000000000 --- a/msgraph/generated/users/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/check_member_objects/check_member_objects_post_response.py b/msgraph/generated/users/item/check_member_objects/check_member_objects_post_response.py new file mode 100644 index 00000000000..f7859b2118e --- /dev/null +++ b/msgraph/generated/users/item/check_member_objects/check_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class CheckMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/users/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/users/item/check_member_objects/check_member_objects_request_builder.py index 38b89e6a5dc..fe5e594da7d 100644 --- a/msgraph/generated/users/item/check_member_objects/check_member_objects_request_builder.py +++ b/msgraph/generated/users/item/check_member_objects/check_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/checkMemberObjects", path_parameters) - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: + async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsPostResponse]: """ Invoke action checkMemberObjects param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] + Returns: Optional[CheckMemberObjectsPostResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,9 +47,9 @@ async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, re } if not self.request_adapter: raise Exception("Http core is null") - from .check_member_objects_response import CheckMemberObjectsResponse + from .check_member_objects_post_response import CheckMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CheckMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -61,13 +61,13 @@ def to_post_request_information(self,body: Optional[CheckMemberObjectsPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/users/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index f3e7e2bcabf..00000000000 --- a/msgraph/generated/users/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/contact_folders/contact_folders_request_builder.py b/msgraph/generated/users/item/contact_folders/contact_folders_request_builder.py index 347e0017d4e..0a1ae602788 100644 --- a/msgraph/generated/users/item/contact_folders/contact_folders_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/contact_folders_request_builder.py @@ -46,7 +46,7 @@ def by_contact_folder_id(self,contact_folder_id: str) -> ContactFolderItemReques async def get(self,request_configuration: Optional[ContactFoldersRequestBuilderGetRequestConfiguration] = None) -> Optional[ContactFolderCollectionResponse]: """ - Get the contact folder collection in the default Contacts folder of the signed-in user. + Get the contact folder collection in the default Contacts folder of the signed-in user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactFolderCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-contactfolders?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ContactFoldersRequestBuilderG async def post(self,body: Optional[ContactFolder] = None, request_configuration: Optional[ContactFoldersRequestBuilderPostRequestConfiguration] = None) -> Optional[ContactFolder]: """ - Create a new contactFolder under the user's default contacts folder. You can also create a new contactfolder as a child of any specified contact folder. + Create a new contactFolder under the user's default contacts folder. You can also create a new contactfolder as a child of any specified contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactFolder] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ContactFolder] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ContactFoldersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the contact folder collection in the default Contacts folder of the signed-in user. + Get the contact folder collection in the default Contacts folder of the signed-in user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContactFolder] = None, request_configuration: Optional[ContactFoldersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new contactFolder under the user's default contacts folder. You can also create a new contactfolder as a child of any specified contact folder. + Create a new contactFolder under the user's default contacts folder. You can also create a new contactfolder as a child of any specified contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ContactFolder] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ContactFoldersRequestBuilderGetQueryParameters(): """ - Get the contact folder collection in the default Contacts folder of the signed-in user. + Get the contact folder collection in the default Contacts folder of the signed-in user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/count/count_request_builder.py b/msgraph/generated/users/item/contact_folders/count/count_request_builder.py index 14b702eec13..d37fd5ca481 100644 --- a/msgraph/generated/users/item/contact_folders/count/count_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contact_folders/delta/delta_response.py b/msgraph/generated/users/item/contact_folders/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/contact_folders/delta/delta_response.py rename to msgraph/generated/users/item/contact_folders/delta/delta_get_response.py index 258b03b87ca..6e724d6c2b1 100644 --- a/msgraph/generated/users/item/contact_folders/delta/delta_response.py +++ b/msgraph/generated/users/item/contact_folders/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ContactFolder]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/contact_folders/delta/delta_request_builder.py b/msgraph/generated/users/item/contact_folders/delta/delta_request_builder.py index be721decdf1..86b1565a7e9 100644 --- a/msgraph/generated/users/item/contact_folders/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/contactFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. + Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/contactfolder-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. + Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. + Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/child_folders_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/child_folders_request_builder.py index f488cb211b3..0fe383247ed 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/child_folders_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/child_folders_request_builder.py @@ -46,7 +46,7 @@ def by_contact_folder_id1(self,contact_folder_id1: str) -> ContactFolderItemRequ async def get(self,request_configuration: Optional[ChildFoldersRequestBuilderGetRequestConfiguration] = None) -> Optional[ContactFolderCollectionResponse]: """ - Get a collection of child folders under the specified contact folder. + Get a collection of child folders under the specified contact folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactFolderCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/contactfolder-list-childfolders?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ChildFoldersRequestBuilderGet async def post(self,body: Optional[ContactFolder] = None, request_configuration: Optional[ChildFoldersRequestBuilderPostRequestConfiguration] = None) -> Optional[ContactFolder]: """ - Create a new contactFolder as a child of a specified folder. You can also create a new contactFolder under the user's default contact folder. + Create a new contactFolder as a child of a specified folder. You can also create a new contactFolder under the user's default contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactFolder] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ContactFolder] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ChildFoldersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a collection of child folders under the specified contact folder. + Get a collection of child folders under the specified contact folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContactFolder] = None, request_configuration: Optional[ChildFoldersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new contactFolder as a child of a specified folder. You can also create a new contactFolder under the user's default contact folder. + Create a new contactFolder as a child of a specified folder. You can also create a new contactFolder under the user's default contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ContactFolder] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ChildFoldersRequestBuilderGetQueryParameters(): """ - Get a collection of child folders under the specified contact folder. + Get a collection of child folders under the specified contact folder. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/count/count_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/count/count_request_builder.py index 20c0a9ecce8..39daf2597e4 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/count/count_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_response.py b/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_response.py rename to msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_get_response.py index ffaed789091..9405aca813e 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_response.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ContactFolder]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_request_builder.py index 9345f3452b7..2346681a470 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/contactFolders/{contactFolder%2Did}/childFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. + Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/contactfolder-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. + Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. + Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contact_folder_item_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contact_folder_item_request_builder.py index 507623ae6da..b0e292971c7 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contact_folder_item_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contact_folder_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContactFo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContactFolderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[ContactFolde Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContactFolder] = None, request_configuration: Optional[ContactFolderItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[ContactFolder] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/contacts_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/contacts_request_builder.py index b0c2e2c773b..26286feeda2 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/contacts_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/contacts_request_builder.py @@ -46,7 +46,7 @@ def by_contact_id(self,contact_id: str) -> ContactItemRequestBuilder: async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> Optional[ContactCollectionResponse]: """ - Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. + Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/contactfolder-list-contacts?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequ async def post(self,body: Optional[Contact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> Optional[Contact]: """ - Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. + Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Contact] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Contact] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. + Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. + Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Contact] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ContactsRequestBuilderGetQueryParameters(): """ - Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. + Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/count/count_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/count/count_request_builder.py index ad34985c7e7..f56cf1692bf 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/count/count_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_response.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_response.py rename to msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_get_response.py index 72a4d4cb3a5..bd14b39ef33 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_response.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Contact]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_request_builder.py index 2780b7a7ec4..6ef70cad81e 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/contact-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/contact_item_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/contact_item_request_builder.py index 0d5eee396ad..72b3a341ebe 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/contact_item_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/contact_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContactIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContactItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ContactItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contact] = None, request_configuration: Optional[ContactItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Contact] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/count/count_request_builder.py index 333bd00fc68..209d32c059a 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/extensions_request_builder.py index 1da0ca52fbf..7c5148c1ff5 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/item/extension_item_request_builder.py index 267515f8ee7..b15730fb114 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/photo_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/photo_request_builder.py index 0754ed603a6..b6ae3ef6f9a 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/photo_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/photo_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[PhotoRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/value/content_request_builder.py b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/value/content_request_builder.py index 72027c9405a..abc7054f75f 100644 --- a/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/value/content_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/child_folders/item/contacts/item/photo/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/contact_folder_item_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contact_folder_item_request_builder.py index 5af70a9c915..6f61757926c 100644 --- a/msgraph/generated/users/item/contact_folders/item/contact_folder_item_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contact_folder_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ContactFolderItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete contactFolder other than the default contactFolder. + Delete contactFolder other than the default contactFolder. This API is available in the following national cloud deployments. 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/contactfolder-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[ContactFolderItemRequestBu async def get(self,request_configuration: Optional[ContactFolderItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ContactFolder]: """ - Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: + Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactFolder] Find more info here: https://learn.microsoft.com/graph/api/contactfolder-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[ContactFolderItemRequestBuild async def patch(self,body: Optional[ContactFolder] = None, request_configuration: Optional[ContactFolderItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ContactFolder]: """ - Update the properties of contactfolder object. + Update the properties of contactfolder object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactFolder] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[ContactFolder] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[ContactFolderItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete contactFolder other than the default contactFolder. + Delete contactFolder other than the default contactFolder. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContactFolderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: + Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ContactFolder] = None, request_configuration: Optional[ContactFolderItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of contactfolder object. + Update the properties of contactfolder object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[ContactFolder] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class ContactFolderItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ContactFolderItemRequestBuilderGetQueryParameters(): """ - Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: + Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/contacts_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/contacts_request_builder.py index 68160324582..03dcb2d2da6 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/contacts_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/contacts_request_builder.py @@ -46,7 +46,7 @@ def by_contact_id(self,contact_id: str) -> ContactItemRequestBuilder: async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> Optional[ContactCollectionResponse]: """ - Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. + Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/contactfolder-list-contacts?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequ async def post(self,body: Optional[Contact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> Optional[Contact]: """ - Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. + Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Contact] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Contact] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. + Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. + Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Contact] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ContactsRequestBuilderGetQueryParameters(): """ - Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. + Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/count/count_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/count/count_request_builder.py index b0a28fa5ced..1c91196d641 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/count/count_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_response.py b/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_response.py rename to msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_get_response.py index 2f4df75db0c..26e59bd6572 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_response.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Contact]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_request_builder.py index 1b73d563d35..7e491282638 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/contactFolders/{contactFolder%2Did}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/contact-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/item/contact_item_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/item/contact_item_request_builder.py index a87227b6c8a..48c209c0238 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/item/contact_item_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/item/contact_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[ContactIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContactItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[ContactItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contact] = None, request_configuration: Optional[ContactItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Contact] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/count/count_request_builder.py index aa57cec3b1d..bd4726f8c58 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/extensions_request_builder.py index 64f762dbd48..2157c86ccbc 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/item/extension_item_request_builder.py index a0dd65ca134..c02bd229f16 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/photo_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/photo_request_builder.py index fff1681cbda..59141389b5b 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/photo_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/photo_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[PhotoRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/value/content_request_builder.py b/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/value/content_request_builder.py index 9821b5c2444..9c1facae532 100644 --- a/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/value/content_request_builder.py +++ b/msgraph/generated/users/item/contact_folders/item/contacts/item/photo/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/contacts/contacts_request_builder.py b/msgraph/generated/users/item/contacts/contacts_request_builder.py index e36089ee931..bad4403436f 100644 --- a/msgraph/generated/users/item/contacts/contacts_request_builder.py +++ b/msgraph/generated/users/item/contacts/contacts_request_builder.py @@ -46,7 +46,7 @@ def by_contact_id(self,contact_id: str) -> ContactItemRequestBuilder: async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> Optional[ContactCollectionResponse]: """ - Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: + Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ContactCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-contacts?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ContactsRequestBuilderGetRequ async def post(self,body: Optional[Contact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> Optional[Contact]: """ - Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. + Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Contact] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Contact] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ContactsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: + Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contact] = None, request_configuration: Optional[ContactsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. + Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Contact] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ContactsRequestBuilderGetQueryParameters(): """ - Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: + Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contacts/count/count_request_builder.py b/msgraph/generated/users/item/contacts/count/count_request_builder.py index e329bd0bf0a..b28a7eb91f9 100644 --- a/msgraph/generated/users/item/contacts/count/count_request_builder.py +++ b/msgraph/generated/users/item/contacts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contacts/delta/delta_response.py b/msgraph/generated/users/item/contacts/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/contacts/delta/delta_response.py rename to msgraph/generated/users/item/contacts/delta/delta_get_response.py index 339aa5c73b1..0c8e0ff98a4 100644 --- a/msgraph/generated/users/item/contacts/delta/delta_response.py +++ b/msgraph/generated/users/item/contacts/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Contact]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/contacts/delta/delta_request_builder.py b/msgraph/generated/users/item/contacts/delta/delta_request_builder.py index 769d59fcced..3f97488f46b 100644 --- a/msgraph/generated/users/item/contacts/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/contacts/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/contact-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. + Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contacts/item/contact_item_request_builder.py b/msgraph/generated/users/item/contacts/item/contact_item_request_builder.py index 24af8ea995e..57d37d5741d 100644 --- a/msgraph/generated/users/item/contacts/item/contact_item_request_builder.py +++ b/msgraph/generated/users/item/contacts/item/contact_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ContactItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a contact. + Delete a contact. This API is available in the following national cloud deployments. 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/contact-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[ContactItemRequestBuilderD async def get(self,request_configuration: Optional[ContactItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Contact]: """ - Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: + Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Contact] Find more info here: https://learn.microsoft.com/graph/api/contact-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[ContactItemRequestBuilderGetR async def patch(self,body: Optional[Contact] = None, request_configuration: Optional[ContactItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Contact]: """ - Update the properties of a contact object. + Update the properties of a contact object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Contact] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[Contact] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[ContactItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a contact. + Delete a contact. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ContactItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: + Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Contact] = None, request_configuration: Optional[ContactItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a contact object. + Update the properties of a contact object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[Contact] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class ContactItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class ContactItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: + Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/contacts/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/contacts/item/extensions/count/count_request_builder.py index 6a61e0cbd56..e43c4573075 100644 --- a/msgraph/generated/users/item/contacts/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/contacts/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/contacts/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/contacts/item/extensions/extensions_request_builder.py index e5b5a59b82e..189355e99fe 100644 --- a/msgraph/generated/users/item/contacts/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/contacts/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contacts/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/contacts/item/extensions/item/extension_item_request_builder.py index bfd0750a61e..b8f457ab98f 100644 --- a/msgraph/generated/users/item/contacts/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/contacts/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contacts/item/photo/photo_request_builder.py b/msgraph/generated/users/item/contacts/item/photo/photo_request_builder.py index 151a5a3aea1..97711da0ca0 100644 --- a/msgraph/generated/users/item/contacts/item/photo/photo_request_builder.py +++ b/msgraph/generated/users/item/contacts/item/photo/photo_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[PhotoRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/contacts/item/photo/value/content_request_builder.py b/msgraph/generated/users/item/contacts/item/photo/value/content_request_builder.py index 84ed555bf66..b47ca252b50 100644 --- a/msgraph/generated/users/item/contacts/item/photo/value/content_request_builder.py +++ b/msgraph/generated/users/item/contacts/item/photo/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/created_objects/count/count_request_builder.py b/msgraph/generated/users/item/created_objects/count/count_request_builder.py index a51d722a113..f86abb1640b 100644 --- a/msgraph/generated/users/item/created_objects/count/count_request_builder.py +++ b/msgraph/generated/users/item/created_objects/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/created_objects/created_objects_request_builder.py b/msgraph/generated/users/item/created_objects/created_objects_request_builder.py index efaffe533e4..139e2e2f612 100644 --- a/msgraph/generated/users/item/created_objects/created_objects_request_builder.py +++ b/msgraph/generated/users/item/created_objects/created_objects_request_builder.py @@ -45,7 +45,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[CreatedObjectsRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. + Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-createdobjects?view=graph-rest-1.0 @@ -67,19 +67,19 @@ async def get(self,request_configuration: Optional[CreatedObjectsRequestBuilderG def to_get_request_information(self,request_configuration: Optional[CreatedObjectsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. + Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CreatedObjectsRequestBuilder: @@ -113,7 +113,7 @@ def graph_service_principal(self) -> GraphServicePrincipalRequestBuilder: @dataclass class CreatedObjectsRequestBuilderGetQueryParameters(): """ - Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. + Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/created_objects/graph_service_principal/count/count_request_builder.py b/msgraph/generated/users/item/created_objects/graph_service_principal/count/count_request_builder.py index 4f4858d0b93..f11cf32faf8 100644 --- a/msgraph/generated/users/item/created_objects/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/users/item/created_objects/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/users/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py index 8564082bcdb..2b2d9c9d856 100644 --- a/msgraph/generated/users/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/users/item/created_objects/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/users/item/created_objects/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/created_objects/item/directory_object_item_request_builder.py index a1f8c83250a..4ae9a5a159f 100644 --- a/msgraph/generated/users/item/created_objects/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/created_objects/item/directory_object_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/users/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/users/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py index c30da539845..8d9d0518253 100644 --- a/msgraph/generated/users/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/users/item/created_objects/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/users/item/device_management_troubleshooting_events/count/count_request_builder.py b/msgraph/generated/users/item/device_management_troubleshooting_events/count/count_request_builder.py index 9cb4486a4fa..c6385287a41 100644 --- a/msgraph/generated/users/item/device_management_troubleshooting_events/count/count_request_builder.py +++ b/msgraph/generated/users/item/device_management_troubleshooting_events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/device_management_troubleshooting_events/device_management_troubleshooting_events_request_builder.py b/msgraph/generated/users/item/device_management_troubleshooting_events/device_management_troubleshooting_events_request_builder.py index af6123951e3..fd45d16623a 100644 --- a/msgraph/generated/users/item/device_management_troubleshooting_events/device_management_troubleshooting_events_request_builder.py +++ b/msgraph/generated/users/item/device_management_troubleshooting_events/device_management_troubleshooting_events_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementTroubleshootingEvent] = None, request_configuration: Optional[DeviceManagementTroubleshootingEventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceManagementTroubleshoot if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/device_management_troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py b/msgraph/generated/users/item/device_management_troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py index e841849db13..5591772f50d 100644 --- a/msgraph/generated/users/item/device_management_troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py +++ b/msgraph/generated/users/item/device_management_troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceMan Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceManagementTroubleshootingEventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceManage Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceManagementTroubleshootingEvent] = None, request_configuration: Optional[DeviceManagementTroubleshootingEventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceManagementTroubleshoo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/direct_reports/count/count_request_builder.py b/msgraph/generated/users/item/direct_reports/count/count_request_builder.py index 6daac0f5888..f345d34c757 100644 --- a/msgraph/generated/users/item/direct_reports/count/count_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/direct_reports_request_builder.py b/msgraph/generated/users/item/direct_reports/direct_reports_request_builder.py index 68ac4d8b620..fc99bb6b43f 100644 --- a/msgraph/generated/users/item/direct_reports/direct_reports_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/direct_reports_request_builder.py @@ -73,14 +73,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectReport Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectReportsRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/graph_org_contact/count/count_request_builder.py b/msgraph/generated/users/item/direct_reports/graph_org_contact/count/count_request_builder.py index b359cb4522c..de677184115 100644 --- a/msgraph/generated/users/item/direct_reports/graph_org_contact/count/count_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/graph_org_contact/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/users/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py index 4641c55f5a8..5c01a2b3348 100644 --- a/msgraph/generated/users/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact_collection_response import OrgContactCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder class GraphOrgContactRequestBuilder(BaseRequestBuilder): @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/graph_user/count/count_request_builder.py b/msgraph/generated/users/item/direct_reports/graph_user/count/count_request_builder.py index f790bc03eaa..ebe8a6e236c 100644 --- a/msgraph/generated/users/item/direct_reports/graph_user/count/count_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/graph_user/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/graph_user/graph_user_request_builder.py b/msgraph/generated/users/item/direct_reports/graph_user/graph_user_request_builder.py index 310f76ca490..bab702ba19c 100644 --- a/msgraph/generated/users/item/direct_reports/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/graph_user/graph_user_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/direct_reports/item/directory_object_item_request_builder.py index a696e1fddf4..a297c7699b7 100644 --- a/msgraph/generated/users/item/direct_reports/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/item/directory_object_item_request_builder.py @@ -56,14 +56,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py b/msgraph/generated/users/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py index 44cd6b74c9f..aecc012a9a6 100644 --- a/msgraph/generated/users/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.py @@ -10,8 +10,8 @@ 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.org_contact import OrgContact + from ......models.o_data_errors.o_data_error import ODataError class GraphOrgContactRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphOrgCont Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphOrgContactRequestBuilder: diff --git a/msgraph/generated/users/item/direct_reports/item/graph_user/graph_user_request_builder.py b/msgraph/generated/users/item/direct_reports/item/graph_user/graph_user_request_builder.py index 174fee5b243..8841883adf0 100644 --- a/msgraph/generated/users/item/direct_reports/item/graph_user/graph_user_request_builder.py +++ b/msgraph/generated/users/item/direct_reports/item/graph_user/graph_user_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphUserReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphUserRequestBuilder: diff --git a/msgraph/generated/users/item/drive/drive_request_builder.py b/msgraph/generated/users/item/drive/drive_request_builder.py index ba7fdb8a1a9..7702351bbb4 100644 --- a/msgraph/generated/users/item/drive/drive_request_builder.py +++ b/msgraph/generated/users/item/drive/drive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: """ - Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. + Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Drive] Find more info here: https://learn.microsoft.com/graph/api/drive-get?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. + Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DriveRequestBuilder: @dataclass class DriveRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. + Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/drives/count/count_request_builder.py b/msgraph/generated/users/item/drives/count/count_request_builder.py index 70abe09c4b3..774e8292ee3 100644 --- a/msgraph/generated/users/item/drives/count/count_request_builder.py +++ b/msgraph/generated/users/item/drives/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/drives/drives_request_builder.py b/msgraph/generated/users/item/drives/drives_request_builder.py index e44ed4e768e..dd260d0f868 100644 --- a/msgraph/generated/users/item/drives/drives_request_builder.py +++ b/msgraph/generated/users/item/drives/drives_request_builder.py @@ -44,7 +44,7 @@ def by_drive_id(self,drive_id: str) -> DriveItemRequestBuilder: async def get(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveCollectionResponse]: """ - Retrieve the list of Drive resources available for a target User, Group, or Site. + Retrieve the list of Drive resources available for a target User, Group, or Site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DriveCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/drive-list?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[DrivesRequestBuilderGetReques def to_get_request_information(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of Drive resources available for a target User, Group, or Site. + Retrieve the list of Drive resources available for a target User, Group, or Site. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DrivesRequestBuilderGetQueryParameters(): """ - Retrieve the list of Drive resources available for a target User, Group, or Site. + Retrieve the list of Drive resources available for a target User, Group, or Site. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/drives/item/drive_item_request_builder.py b/msgraph/generated/users/item/drives/item/drive_item_request_builder.py index 28a5678c316..54d0aec0ee4 100644 --- a/msgraph/generated/users/item/drives/item/drive_item_request_builder.py +++ b/msgraph/generated/users/item/drives/item/drive_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DriveItemRequestBuilder: 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 4ac723ad8c8..0f558fef5b2 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 @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[EmployeeE Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EmployeeExperienceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[EmployeeExpe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[EmployeeExperienceUser] = None, request_configuration: Optional[EmployeeExperienceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[EmployeeExperienceUser] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/employee_experience/learning_course_activities/count/count_request_builder.py b/msgraph/generated/users/item/employee_experience/learning_course_activities/count/count_request_builder.py index be1602a9a89..f89c4510be5 100644 --- a/msgraph/generated/users/item/employee_experience/learning_course_activities/count/count_request_builder.py +++ b/msgraph/generated/users/item/employee_experience/learning_course_activities/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py b/msgraph/generated/users/item/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py index 6642d9a0371..f02f612e760 100644 --- a/msgraph/generated/users/item/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py +++ b/msgraph/generated/users/item/employee_experience/learning_course_activities/item/learning_course_activity_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderGetRequestConfiguration] = 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. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. 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 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[LearningCourseActivityItemReq def to_get_request_information(self,request_configuration: Optional[LearningCourseActivityItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LearningCourseActivityItemRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> LearningCourseActivityItemRe @dataclass class LearningCourseActivityItemRequestBuilderGetQueryParameters(): """ - Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/employee_experience/learning_course_activities/learning_course_activities_request_builder.py b/msgraph/generated/users/item/employee_experience/learning_course_activities/learning_course_activities_request_builder.py index e7a2ea0248b..19690f54b11 100644 --- a/msgraph/generated/users/item/employee_experience/learning_course_activities/learning_course_activities_request_builder.py +++ b/msgraph/generated/users/item/employee_experience/learning_course_activities/learning_course_activities_request_builder.py @@ -44,7 +44,7 @@ def by_learning_course_activity_id(self,learning_course_activity_id: str) -> Lea async def get(self,request_configuration: Optional[LearningCourseActivitiesRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningCourseActivityCollectionResponse]: """ - Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LearningCourseActivityCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/learningcourseactivity-list?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[LearningCourseActivitiesReque def to_get_request_information(self,request_configuration: Optional[LearningCourseActivitiesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LearningCourseActivitiesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LearningCourseActivitiesRequestBuilderGetQueryParameters(): """ - Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/count/count_request_builder.py b/msgraph/generated/users/item/events/count/count_request_builder.py index 2cb60448b53..890292afb44 100644 --- a/msgraph/generated/users/item/events/count/count_request_builder.py +++ b/msgraph/generated/users/item/events/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/events/delta/delta_response.py b/msgraph/generated/users/item/events/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/events/delta/delta_response.py rename to msgraph/generated/users/item/events/delta/delta_get_response.py index 1b1ec66ac9e..7b78757d973 100644 --- a/msgraph/generated/users/item/events/delta/delta_response.py +++ b/msgraph/generated/users/item/events/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Event]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/events/delta/delta_request_builder.py b/msgraph/generated/users/item/events/delta/delta_request_builder.py index 28cd650aea2..073398334ad 100644 --- a/msgraph/generated/users/item/events/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/events/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/events_request_builder.py b/msgraph/generated/users/item/events/events_request_builder.py index 76c415bb374..7c83b65e609 100644 --- a/msgraph/generated/users/item/events/events_request_builder.py +++ b/msgraph/generated/users/item/events/events_request_builder.py @@ -46,7 +46,7 @@ def by_event_id(self,event_id: str) -> EventItemRequestBuilder: async def get(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> Optional[EventCollectionResponse]: """ - Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: + Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EventCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-events?view=graph-rest-1.0 @@ -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 single-value extended properties in a new or existing instance of a resource. The following user resources are supported: As well as 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. + Create an event in the user's default calendar or specified calendar. By default, the allowNewTimeProposals property is set to true when an event is created, which means invitees can propose a different date/time for the event. See Propose new meeting times for more information on how to propose a time, and how to receive and accept a new time proposal. You can specify the time zone for each of the start and end times of the event as part of their values, because the start and end properties are of dateTimeTimeZone type. First find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server. When an event is sent, the server sends invitations to all the attendees. Setting the location in an event An Exchange administrator can set up a mailbox and an email address for a resource such as a meeting room, or equipment like a projector. Users can then invite the resource as an attendee to a meeting. On behalf of the resource, the server accepts or rejects the meeting request based on the free/busy schedule of the resource. If the server accepts a meeting for the resource, it creates an event for the meeting in the resource's calendar. If the meeting is rescheduled, the server automatically updates the event in the resource's calendar. Another advantage of setting up a mailbox for a resource is to control scheduling of the resource, for example, only executivesor their delegates can book a private meeting room. If you're organizing an event that involves a meeting location: Additionally, if the meeting location has been set up as a resource, or if the event involves some equipment that has been set up as a resource: This API is available in the following national cloud deployments. 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/singlevaluelegacyextendedproperty-post-singlevalueextendedproperties?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/user-post-events?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[Event] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[EventsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: + Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create one or more single-value extended properties in a new or existing instance of a resource. The following user resources are supported: As well as 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. + Create an event in the user's default calendar or specified calendar. By default, the allowNewTimeProposals property is set to true when an event is created, which means invitees can propose a different date/time for the event. See Propose new meeting times for more information on how to propose a time, and how to receive and accept a new time proposal. You can specify the time zone for each of the start and end times of the event as part of their values, because the start and end properties are of dateTimeTimeZone type. First find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server. When an event is sent, the server sends invitations to all the attendees. Setting the location in an event An Exchange administrator can set up a mailbox and an email address for a resource such as a meeting room, or equipment like a projector. Users can then invite the resource as an attendee to a meeting. On behalf of the resource, the server accepts or rejects the meeting request based on the free/busy schedule of the resource. If the server accepts a meeting for the resource, it creates an event for the meeting in the resource's calendar. If the meeting is rescheduled, the server automatically updates the event in the resource's calendar. Another advantage of setting up a mailbox for a resource is to control scheduling of the resource, for example, only executivesor their delegates can book a private meeting room. If you're organizing an event that involves a meeting location: Additionally, if the meeting location has been set up as a resource, or if the event involves some equipment that has been set up as a resource: This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Event] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class EventsRequestBuilderGetQueryParameters(): """ - Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: + Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/accept/accept_request_builder.py b/msgraph/generated/users/item/events/item/accept/accept_request_builder.py index 0ab7ab7546d..efa4b234d6d 100644 --- a/msgraph/generated/users/item/events/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/events/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/events/item/attachments/attachments_request_builder.py index 72cdb333a4b..2c1c3676d46 100644 --- a/msgraph/generated/users/item/events/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/events/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/events/item/attachments/count/count_request_builder.py index c847ecc5c78..aa4bd48c2f1 100644 --- a/msgraph/generated/users/item/events/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/events/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py index 8603eff5f49..232def884a8 100644 --- a/msgraph/generated/users/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/events/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/events/item/attachments/item/attachment_item_request_builder.py index aa055d3de14..b7fa917c7ea 100644 --- a/msgraph/generated/users/item/events/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/events/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/events/item/calendar/calendar_request_builder.py index 01499b5f8c3..ba40f9ad1ce 100644 --- a/msgraph/generated/users/item/events/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/events/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/events/item/cancel/cancel_request_builder.py index fa1f19c0a85..5d6a11d2147 100644 --- a/msgraph/generated/users/item/events/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/events/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/decline/decline_request_builder.py b/msgraph/generated/users/item/events/item/decline/decline_request_builder.py index 08f5efedc60..b9d94cd2d8e 100644 --- a/msgraph/generated/users/item/events/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/events/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py index dcc6dff55a9..d0129cb9713 100644 --- a/msgraph/generated/users/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/events/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/event_item_request_builder.py b/msgraph/generated/users/item/events/item/event_item_request_builder.py index 3c38493c3fa..c3e8b010819 100644 --- a/msgraph/generated/users/item/events/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/events/item/event_item_request_builder.py @@ -39,7 +39,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[EventItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. + Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. This API is available in the following national cloud deployments. 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/event-delete?view=graph-rest-1.0 @@ -59,7 +59,7 @@ async def delete(self,request_configuration: Optional[EventItemRequestBuilderDel async def get(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Event]: """ - Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. + Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. This API is available in the following national cloud deployments. 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/event-get?view=graph-rest-1.0 @@ -81,7 +81,7 @@ async def get(self,request_configuration: Optional[EventItemRequestBuilderGetReq async def patch(self,body: Optional[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Event]: """ - Update the properties of the event object. + Update the properties of the event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] @@ -106,39 +106,39 @@ async def patch(self,body: Optional[Event] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[EventItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. + Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[EventItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. + Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Event] = None, request_configuration: Optional[EventItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the event object. + Update the properties of the event object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -146,13 +146,13 @@ def to_patch_request_information(self,body: Optional[Event] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -278,7 +278,7 @@ class EventItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class EventItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. + Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/events/item/extensions/count/count_request_builder.py index bb12ab65fb3..fbbceb316c5 100644 --- a/msgraph/generated/users/item/events/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/events/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/events/item/extensions/extensions_request_builder.py index 0eef1728293..35c9948d6f0 100644 --- a/msgraph/generated/users/item/events/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/events/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/events/item/extensions/item/extension_item_request_builder.py index aa3ef071cd1..8e8474d6099 100644 --- a/msgraph/generated/users/item/events/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/events/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/forward/forward_request_builder.py b/msgraph/generated/users/item/events/item/forward/forward_request_builder.py index b7d1b00d12e..4f14c1f8cbe 100644 --- a/msgraph/generated/users/item/events/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/events/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/count/count_request_builder.py b/msgraph/generated/users/item/events/item/instances/count/count_request_builder.py index 8e705a724c2..b9a994afa76 100644 --- a/msgraph/generated/users/item/events/item/instances/count/count_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/delta/delta_get_response.py b/msgraph/generated/users/item/events/item/instances/delta/delta_get_response.py new file mode 100644 index 00000000000..c1a84de4868 --- /dev/null +++ b/msgraph/generated/users/item/events/item/instances/delta/delta_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.base_delta_function_response import BaseDeltaFunctionResponse + from .......models.event import Event + +from .......models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[Event]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .......models.base_delta_function_response import BaseDeltaFunctionResponse + from .......models.event import Event + + from .......models.base_delta_function_response import BaseDeltaFunctionResponse + from .......models.event import Event + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Event)), + } + 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/users/item/events/item/instances/delta/delta_request_builder.py b/msgraph/generated/users/item/events/item/instances/delta/delta_request_builder.py index 2790351e3cf..4b15019227c 100644 --- a/msgraph/generated/users/item/events/item/instances/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. + Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/instances/delta/delta_response.py b/msgraph/generated/users/item/events/item/instances/delta/delta_response.py deleted file mode 100644 index c806fd1d94b..00000000000 --- a/msgraph/generated/users/item/events/item/instances/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.event import Event - -from .......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[Event]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.event import Event - - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.event import Event - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Event)), - } - 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/users/item/events/item/instances/instances_request_builder.py b/msgraph/generated/users/item/events/item/instances/instances_request_builder.py index ba1bd449d3f..5e2f7f35331 100644 --- a/msgraph/generated/users/item/events/item/instances/instances_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/instances_request_builder.py @@ -72,14 +72,14 @@ def to_get_request_information(self,request_configuration: Optional[InstancesReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> InstancesRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/accept/accept_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/accept/accept_request_builder.py index 4217c61f116..35dfe78552b 100644 --- a/msgraph/generated/users/item/events/item/instances/item/accept/accept_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/accept/accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. 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[AcceptPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = None, request_configuration: Optional[AcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Accept the specified event in a user calendar. + Accept the specified event in a user calendar. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[AcceptPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/attachments/attachments_request_builder.py index 0329c56e203..eb3ce09cbbe 100644 --- a/msgraph/generated/users/item/events/item/instances/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects attached to an event. + Retrieve a list of attachment objects attached to an event. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/instances/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/attachments/count/count_request_builder.py index 25e9a93c045..09486fd6c5d 100644 --- a/msgraph/generated/users/item/events/item/instances/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py index 3565ee9eece..e061fbcfdfc 100644 --- a/msgraph/generated/users/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py index fa0c1b441fd..37adab1fe29 100644 --- a/msgraph/generated/users/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/attachments/item/attachment_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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/attachment-delete?view=graph-rest-1.0 @@ -69,17 +69,17 @@ async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderG def to_delete_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an attachment from a user calendar event, mail message, or group post. + Delete an attachment from a user calendar event, mail message, or group post. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/calendar/calendar_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/calendar/calendar_request_builder.py index 7d8bb4deda8..3aa650a3dd1 100644 --- a/msgraph/generated/users/item/events/item/instances/item/calendar/calendar_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/calendar/calendar_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[CalendarRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> CalendarRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/cancel/cancel_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/cancel/cancel_request_builder.py index c5fcdccd1e0..f54cad54cc8 100644 --- a/msgraph/generated/users/item/events/item/instances/item/cancel/cancel_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/cancel/cancel_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. 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[CancelPostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[CancelPostRequestBody] = None, request_configuration: Optional[CancelRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. + This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CancelPostRequestBody] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/item/decline/decline_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/decline/decline_request_builder.py index a321b5e59e1..2bbc919669c 100644 --- a/msgraph/generated/users/item/events/item/instances/item/decline/decline_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/decline/decline_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> None: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[DeclinePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = None, request_configuration: Optional[DeclineRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeclinePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py index a2efcd671c6..2bbfee6dc8c 100644 --- a/msgraph/generated/users/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/dismiss_reminder/dismiss_reminder_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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/event-dismissreminder?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[DismissReminderRequestBuilde def to_post_request_information(self,request_configuration: Optional[DismissReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Dismiss a reminder that has been triggered for an event in a user calendar. + Dismiss a reminder that has been triggered for an event in a user calendar. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DismissReminderRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/event_item_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/event_item_request_builder.py index d3d6978c0c2..40c7c58140f 100644 --- a/msgraph/generated/users/item/events/item/instances/item/event_item_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/event_item_request_builder.py @@ -64,14 +64,14 @@ def to_get_request_information(self,request_configuration: Optional[EventItemReq Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> EventItemRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/extensions/count/count_request_builder.py index 2136466ea1d..8cbefe4cb68 100644 --- a/msgraph/generated/users/item/events/item/instances/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/events/item/instances/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/extensions/extensions_request_builder.py index be3db090d3d..e27b460df43 100644 --- a/msgraph/generated/users/item/events/item/instances/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/instances/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/extensions/item/extension_item_request_builder.py index 533a88dd14c..59becd6fece 100644 --- a/msgraph/generated/users/item/events/item/instances/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/extensions/item/extension_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/events/item/instances/item/forward/forward_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/forward/forward_request_builder.py index 8b994f96fe8..28866933c76 100644 --- a/msgraph/generated/users/item/events/item/instances/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. + This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py index 2456c5f3fd7..6188d02800b 100644 --- a/msgraph/generated/users/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py index ce7b8b08537..213524bc16a 100644 --- a/msgraph/generated/users/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/events/item/instances/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/snooze_reminder/snooze_reminder_request_builder.py b/msgraph/generated/users/item/events/item/snooze_reminder/snooze_reminder_request_builder.py index 772b89daee1..4713117e918 100644 --- a/msgraph/generated/users/item/events/item/snooze_reminder/snooze_reminder_request_builder.py +++ b/msgraph/generated/users/item/events/item/snooze_reminder/snooze_reminder_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> None: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. 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[SnoozeReminderPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBody] = None, request_configuration: Optional[SnoozeReminderRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Postpone a reminder for an event in a user calendar until a new time. + Postpone a reminder for an event in a user calendar until a new time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SnoozeReminderPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/events/item/tentatively_accept/tentatively_accept_request_builder.py b/msgraph/generated/users/item/events/item/tentatively_accept/tentatively_accept_request_builder.py index fdc5c165361..de83a14fcf6 100644 --- a/msgraph/generated/users/item/events/item/tentatively_accept/tentatively_accept_request_builder.py +++ b/msgraph/generated/users/item/events/item/tentatively_accept/tentatively_accept_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> None: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. 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[TentativelyAcceptPostRequestBody] = None, req def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequestBody] = None, request_configuration: Optional[TentativelyAcceptRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. + Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[TentativelyAcceptPostRequest if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/export_device_and_app_management_data/export_device_and_app_management_data_request_builder.py b/msgraph/generated/users/item/export_device_and_app_management_data/export_device_and_app_management_data_request_builder.py index c5e27293c41..6f79f539ffc 100644 --- a/msgraph/generated/users/item/export_device_and_app_management_data/export_device_and_app_management_data_request_builder.py +++ b/msgraph/generated/users/item/export_device_and_app_management_data/export_device_and_app_management_data_request_builder.py @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[ExportDevice Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ExportDeviceAndAppManagementDataRequestBuilder: diff --git a/msgraph/generated/users/item/export_device_and_app_management_data_with_skip_with_top/export_device_and_app_management_data_with_skip_with_top_request_builder.py b/msgraph/generated/users/item/export_device_and_app_management_data_with_skip_with_top/export_device_and_app_management_data_with_skip_with_top_request_builder.py index cbcf27f39c6..0e659ebcba4 100644 --- a/msgraph/generated/users/item/export_device_and_app_management_data_with_skip_with_top/export_device_and_app_management_data_with_skip_with_top_request_builder.py +++ b/msgraph/generated/users/item/export_device_and_app_management_data_with_skip_with_top/export_device_and_app_management_data_with_skip_with_top_request_builder.py @@ -26,6 +26,9 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param top: Usage: top={top} Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['skip'] = str(skip) + path_parameters['top'] = str(top) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/exportDeviceAndAppManagementData(skip={skip},top={top})", path_parameters) async def get(self,request_configuration: Optional[ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceAndAppManagementData]: @@ -56,13 +59,13 @@ def to_get_request_information(self,request_configuration: Optional[ExportDevice Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder: diff --git a/msgraph/generated/users/item/export_personal_data/export_personal_data_request_builder.py b/msgraph/generated/users/item/export_personal_data/export_personal_data_request_builder.py index 074e03ef942..6ff07a25f5b 100644 --- a/msgraph/generated/users/item/export_personal_data/export_personal_data_request_builder.py +++ b/msgraph/generated/users/item/export_personal_data/export_personal_data_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ExportPersonalDataPostRequestBody] = None, request_configuration: Optional[ExportPersonalDataRequestBuilderPostRequestConfiguration] = None) -> None: """ - Submit a data policy operation request from a company administrator or an application to export an organizational user's data. This data includes the user's data stored in OneDrive and their activity reports. For more guidance about exporting data while complying with regulations, see Data Subject Requests and the GDPR and CCPA. + Submit a data policy operation request from a company administrator or an application to export an organizational user's data. This data includes the user's data stored in OneDrive and their activity reports. For more guidance about exporting data while complying with regulations, see Data Subject Requests and the GDPR and CCPA. This API is available in the following national cloud deployments. 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[ExportPersonalDataPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ExportPersonalDataPostRequestBody] = None, request_configuration: Optional[ExportPersonalDataRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Submit a data policy operation request from a company administrator or an application to export an organizational user's data. This data includes the user's data stored in OneDrive and their activity reports. For more guidance about exporting data while complying with regulations, see Data Subject Requests and the GDPR and CCPA. + Submit a data policy operation request from a company administrator or an application to export an organizational user's data. This data includes the user's data stored in OneDrive and their activity reports. For more guidance about exporting data while complying with regulations, see Data Subject Requests and the GDPR and CCPA. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ExportPersonalDataPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/extensions/count/count_request_builder.py index 22abfbc97a7..74908484c3a 100644 --- a/msgraph/generated/users/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/extensions/extensions_request_builder.py index 83c53a9c824..b0a0c894d01 100644 --- a/msgraph/generated/users/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/extensions/item/extension_item_request_builder.py index 75a9038ef2e..7f6f3c78041 100644 --- a/msgraph/generated/users/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/find_meeting_times/find_meeting_times_request_builder.py b/msgraph/generated/users/item/find_meeting_times/find_meeting_times_request_builder.py index ba7068378be..4178f3ba66f 100644 --- a/msgraph/generated/users/item/find_meeting_times/find_meeting_times_request_builder.py +++ b/msgraph/generated/users/item/find_meeting_times/find_meeting_times_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[FindMeetingTimesPostRequestBody] = None, request_configuration: Optional[FindMeetingTimesRequestBuilderPostRequestConfiguration] = None) -> Optional[MeetingTimeSuggestionsResult]: """ - Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters. If findMeetingTimes cannot return any meeting suggestions, the response would indicate a reason in the emptySuggestionsReason property. Based on this value, you can better adjust the parameters and call findMeetingTimes again. The algorithm used to suggest meeting times and locations undergoes fine-tuning from time to time. In scenarios like test environments where the input parameters and calendar data remain static, expect that the suggested results may differ over time. + Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters. If findMeetingTimes cannot return any meeting suggestions, the response would indicate a reason in the emptySuggestionsReason property. Based on this value, you can better adjust the parameters and call findMeetingTimes again. The algorithm used to suggest meeting times and locations undergoes fine-tuning from time to time. In scenarios like test environments where the input parameters and calendar data remain static, expect that the suggested results may differ over time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MeetingTimeSuggestionsResult] @@ -54,7 +54,7 @@ async def post(self,body: Optional[FindMeetingTimesPostRequestBody] = None, requ def to_post_request_information(self,body: Optional[FindMeetingTimesPostRequestBody] = None, request_configuration: Optional[FindMeetingTimesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters. If findMeetingTimes cannot return any meeting suggestions, the response would indicate a reason in the emptySuggestionsReason property. Based on this value, you can better adjust the parameters and call findMeetingTimes again. The algorithm used to suggest meeting times and locations undergoes fine-tuning from time to time. In scenarios like test environments where the input parameters and calendar data remain static, expect that the suggested results may differ over time. + Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters. If findMeetingTimes cannot return any meeting suggestions, the response would indicate a reason in the emptySuggestionsReason property. Based on this value, you can better adjust the parameters and call findMeetingTimes again. The algorithm used to suggest meeting times and locations undergoes fine-tuning from time to time. In scenarios like test environments where the input parameters and calendar data remain static, expect that the suggested results may differ over time. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[FindMeetingTimesPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/followed_sites/count/count_request_builder.py b/msgraph/generated/users/item/followed_sites/count/count_request_builder.py index b8cef0b9443..d4c00dac9eb 100644 --- a/msgraph/generated/users/item/followed_sites/count/count_request_builder.py +++ b/msgraph/generated/users/item/followed_sites/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/followed_sites/followed_sites_request_builder.py b/msgraph/generated/users/item/followed_sites/followed_sites_request_builder.py index 43cdfba7367..0921e4123f9 100644 --- a/msgraph/generated/users/item/followed_sites/followed_sites_request_builder.py +++ b/msgraph/generated/users/item/followed_sites/followed_sites_request_builder.py @@ -44,7 +44,7 @@ def by_site_id(self,site_id: str) -> SiteItemRequestBuilder: async def get(self,request_configuration: Optional[FollowedSitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: """ - List the sites that have been followed by the signed in user. + List the sites that have been followed by the signed in user. This API is available in the following national cloud deployments. 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/sites-list-followed?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[FollowedSitesRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[FollowedSitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List the sites that have been followed by the signed in user. + List the sites that have been followed by the signed in user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FollowedSitesRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class FollowedSitesRequestBuilderGetQueryParameters(): """ - List the sites that have been followed by the signed in user. + List the sites that have been followed by the signed in user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/followed_sites/item/site_item_request_builder.py b/msgraph/generated/users/item/followed_sites/item/site_item_request_builder.py index 7da22616f19..a6c59b70ee1 100644 --- a/msgraph/generated/users/item/followed_sites/item/site_item_request_builder.py +++ b/msgraph/generated/users/item/followed_sites/item/site_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SiteItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SiteItemRequestBuilder: diff --git a/msgraph/generated/users/item/get_mail_tips/get_mail_tips_response.py b/msgraph/generated/users/item/get_mail_tips/get_mail_tips_post_response.py similarity index 91% rename from msgraph/generated/users/item/get_mail_tips/get_mail_tips_response.py rename to msgraph/generated/users/item/get_mail_tips/get_mail_tips_post_response.py index 130a89a0445..558dda9988f 100644 --- a/msgraph/generated/users/item/get_mail_tips/get_mail_tips_response.py +++ b/msgraph/generated/users/item/get_mail_tips/get_mail_tips_post_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetMailTipsResponse(BaseCollectionPaginationCountResponse): +class GetMailTipsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[MailTips]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMailTipsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMailTipsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMailTipsResponse + Returns: GetMailTipsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetMailTipsResponse() + return GetMailTipsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/get_mail_tips/get_mail_tips_request_builder.py b/msgraph/generated/users/item/get_mail_tips/get_mail_tips_request_builder.py index 98ee0c02e12..dbc3662e568 100644 --- a/msgraph/generated/users/item/get_mail_tips/get_mail_tips_request_builder.py +++ b/msgraph/generated/users/item/get_mail_tips/get_mail_tips_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_mail_tips_post_request_body import GetMailTipsPostRequestBody - from .get_mail_tips_response import GetMailTipsResponse + from .get_mail_tips_post_response import GetMailTipsPostResponse class GetMailTipsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/getMailTips", path_parameters) - async def post(self,body: Optional[GetMailTipsPostRequestBody] = None, request_configuration: Optional[GetMailTipsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMailTipsResponse]: + async def post(self,body: Optional[GetMailTipsPostRequestBody] = None, request_configuration: Optional[GetMailTipsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMailTipsPostResponse]: """ - Get the MailTips of one or more recipients as available to the signed-in user. Note that by making a POST call to the getMailTips action, you can request specific types of MailTips tobe returned for more than one recipient at one time. The requested MailTips are returned in a mailTips collection. + Get the MailTips of one or more recipients as available to the signed-in user. Note that by making a POST call to the getMailTips action, you can request specific types of MailTips tobe returned for more than one recipient at one time. The requested MailTips are returned in a mailTips collection. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMailTipsResponse] + Returns: Optional[GetMailTipsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/user-getmailtips?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMailTipsPostRequestBody] = None, request_c } if not self.request_adapter: raise Exception("Http core is null") - from .get_mail_tips_response import GetMailTipsResponse + from .get_mail_tips_post_response import GetMailTipsPostResponse - return await self.request_adapter.send_async(request_info, GetMailTipsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMailTipsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMailTipsPostRequestBody] = None, request_configuration: Optional[GetMailTipsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Get the MailTips of one or more recipients as available to the signed-in user. Note that by making a POST call to the getMailTips action, you can request specific types of MailTips tobe returned for more than one recipient at one time. The requested MailTips are returned in a mailTips collection. + Get the MailTips of one or more recipients as available to the signed-in user. Note that by making a POST call to the getMailTips action, you can request specific types of MailTips tobe returned for more than one recipient at one time. The requested MailTips are returned in a mailTips collection. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMailTipsPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_response.py b/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_get_response.py similarity index 89% rename from msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_response.py rename to msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_get_response.py index bab078ce813..3ba205e77e8 100644 --- a/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_response.py +++ b/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetManagedAppDiagnosticStatusesResponse(BaseCollectionPaginationCountResponse): +class GetManagedAppDiagnosticStatusesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ManagedAppDiagnosticStatus]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetManagedAppDiagnosticStatusesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetManagedAppDiagnosticStatusesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetManagedAppDiagnosticStatusesResponse + Returns: GetManagedAppDiagnosticStatusesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetManagedAppDiagnosticStatusesResponse() + return GetManagedAppDiagnosticStatusesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_request_builder.py b/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_request_builder.py index fd879e533b5..a1aefdca159 100644 --- a/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_request_builder.py +++ b/msgraph/generated/users/item/get_managed_app_diagnostic_statuses/get_managed_app_diagnostic_statuses_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_managed_app_diagnostic_statuses_response import GetManagedAppDiagnosticStatusesResponse + from .get_managed_app_diagnostic_statuses_get_response import GetManagedAppDiagnosticStatusesGetResponse class GetManagedAppDiagnosticStatusesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/getManagedAppDiagnosticStatuses(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetManagedAppDiagnosticStatusesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetManagedAppDiagnosticStatusesResponse]: + async def get(self,request_configuration: Optional[GetManagedAppDiagnosticStatusesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetManagedAppDiagnosticStatusesGetResponse]: """ Gets diagnostics validation status for a given user. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetManagedAppDiagnosticStatusesResponse] + Returns: Optional[GetManagedAppDiagnosticStatusesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetManagedAppDiagnosticStatus } if not self.request_adapter: raise Exception("Http core is null") - from .get_managed_app_diagnostic_statuses_response import GetManagedAppDiagnosticStatusesResponse + from .get_managed_app_diagnostic_statuses_get_response import GetManagedAppDiagnosticStatusesGetResponse - return await self.request_adapter.send_async(request_info, GetManagedAppDiagnosticStatusesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetManagedAppDiagnosticStatusesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetManagedAppDiagnosticStatusesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetManagedAp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetManagedAppDiagnosticStatusesRequestBuilder: diff --git a/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_response.py b/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_get_response.py similarity index 90% rename from msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_response.py rename to msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_get_response.py index 7c661d7a6fc..87296d953b8 100644 --- a/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_response.py +++ b/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetManagedAppPoliciesResponse(BaseCollectionPaginationCountResponse): +class GetManagedAppPoliciesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ManagedAppPolicy]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetManagedAppPoliciesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetManagedAppPoliciesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetManagedAppPoliciesResponse + Returns: GetManagedAppPoliciesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetManagedAppPoliciesResponse() + return GetManagedAppPoliciesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_request_builder.py b/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_request_builder.py index 958b12f90cf..c39d58895a0 100644 --- a/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_request_builder.py +++ b/msgraph/generated/users/item/get_managed_app_policies/get_managed_app_policies_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_managed_app_policies_response import GetManagedAppPoliciesResponse + from .get_managed_app_policies_get_response import GetManagedAppPoliciesGetResponse class GetManagedAppPoliciesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/getManagedAppPolicies(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetManagedAppPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetManagedAppPoliciesResponse]: + async def get(self,request_configuration: Optional[GetManagedAppPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetManagedAppPoliciesGetResponse]: """ Gets app restrictions for a given user. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetManagedAppPoliciesResponse] + Returns: Optional[GetManagedAppPoliciesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetManagedAppPoliciesRequestB } if not self.request_adapter: raise Exception("Http core is null") - from .get_managed_app_policies_response import GetManagedAppPoliciesResponse + from .get_managed_app_policies_get_response import GetManagedAppPoliciesGetResponse - return await self.request_adapter.send_async(request_info, GetManagedAppPoliciesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetManagedAppPoliciesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetManagedAppPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetManagedAp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetManagedAppPoliciesRequestBuilder: diff --git a/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_get_response.py b/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_get_response.py new file mode 100644 index 00000000000..4e65f643d70 --- /dev/null +++ b/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_get_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetManagedDevicesWithAppFailuresGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetManagedDevicesWithAppFailuresGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetManagedDevicesWithAppFailuresGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetManagedDevicesWithAppFailuresGetResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_request_builder.py b/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_request_builder.py index 646e16a3f26..11e6e4b74a4 100644 --- a/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_request_builder.py +++ b/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .get_managed_devices_with_app_failures_response import GetManagedDevicesWithAppFailuresResponse + from .get_managed_devices_with_app_failures_get_response import GetManagedDevicesWithAppFailuresGetResponse class GetManagedDevicesWithAppFailuresRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/getManagedDevicesWithAppFailures(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetManagedDevicesWithAppFailuresRequestBuilderGetRequestConfiguration] = None) -> Optional[GetManagedDevicesWithAppFailuresResponse]: + async def get(self,request_configuration: Optional[GetManagedDevicesWithAppFailuresRequestBuilderGetRequestConfiguration] = None) -> Optional[GetManagedDevicesWithAppFailuresGetResponse]: """ Retrieves the list of devices with failed apps param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetManagedDevicesWithAppFailuresResponse] + Returns: Optional[GetManagedDevicesWithAppFailuresGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetManagedDevicesWithAppFailu } if not self.request_adapter: raise Exception("Http core is null") - from .get_managed_devices_with_app_failures_response import GetManagedDevicesWithAppFailuresResponse + from .get_managed_devices_with_app_failures_get_response import GetManagedDevicesWithAppFailuresGetResponse - return await self.request_adapter.send_async(request_info, GetManagedDevicesWithAppFailuresResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetManagedDevicesWithAppFailuresGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetManagedDevicesWithAppFailuresRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetManagedDe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetManagedDevicesWithAppFailuresRequestBuilder: diff --git a/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_response.py b/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_response.py deleted file mode 100644 index a485f4dbe22..00000000000 --- a/msgraph/generated/users/item/get_managed_devices_with_app_failures/get_managed_devices_with_app_failures_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetManagedDevicesWithAppFailuresResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetManagedDevicesWithAppFailuresResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetManagedDevicesWithAppFailuresResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetManagedDevicesWithAppFailuresResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/get_member_groups/get_member_groups_post_response.py b/msgraph/generated/users/item/get_member_groups/get_member_groups_post_response.py new file mode 100644 index 00000000000..cfbe18b3b1a --- /dev/null +++ b/msgraph/generated/users/item/get_member_groups/get_member_groups_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberGroupsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberGroupsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberGroupsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/users/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/users/item/get_member_groups/get_member_groups_request_builder.py index 7f52e2030b5..25d1d03b42e 100644 --- a/msgraph/generated/users/item/get_member_groups/get_member_groups_request_builder.py +++ b/msgraph/generated/users/item/get_member_groups/get_member_groups_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse class GetMemberGroupsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/getMemberGroups", path_parameters) - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: + async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsPostResponse]: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] + Returns: Optional[GetMemberGroupsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, reque } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_groups_response import GetMemberGroupsResponse + from .get_member_groups_post_response import GetMemberGroupsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberGroupsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/users/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index 172f7037f68..00000000000 --- a/msgraph/generated/users/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/get_member_objects/get_member_objects_post_response.py b/msgraph/generated/users/item/get_member_objects/get_member_objects_post_response.py new file mode 100644 index 00000000000..4d4d481d1c0 --- /dev/null +++ b/msgraph/generated/users/item/get_member_objects/get_member_objects_post_response.py @@ -0,0 +1,54 @@ +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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetMemberObjectsPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetMemberObjectsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetMemberObjectsPostResponse() + + def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), + } + 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_primitive_values("value", self.value) + + diff --git a/msgraph/generated/users/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/users/item/get_member_objects/get_member_objects_request_builder.py index b281f2a2da2..c241a194816 100644 --- a/msgraph/generated/users/item/get_member_objects/get_member_objects_request_builder.py +++ b/msgraph/generated/users/item/get_member_objects/get_member_objects_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .get_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse class GetMemberObjectsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/getMemberObjects", path_parameters) - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: + async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsPostResponse]: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] + Returns: Optional[GetMemberObjectsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, requ } if not self.request_adapter: raise Exception("Http core is null") - from .get_member_objects_response import GetMemberObjectsResponse + from .get_member_objects_post_response import GetMemberObjectsPostResponse - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetMemberObjectsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/users/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 72f84b89eb4..00000000000 --- a/msgraph/generated/users/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/inference_classification/inference_classification_request_builder.py b/msgraph/generated/users/item/inference_classification/inference_classification_request_builder.py index e21739c4c14..845921be993 100644 --- a/msgraph/generated/users/item/inference_classification/inference_classification_request_builder.py +++ b/msgraph/generated/users/item/inference_classification/inference_classification_request_builder.py @@ -79,14 +79,14 @@ def to_get_request_information(self,request_configuration: Optional[InferenceCla Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InferenceClassification] = None, request_configuration: Optional[InferenceClassificationRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -99,13 +99,13 @@ def to_patch_request_information(self,body: Optional[InferenceClassification] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/inference_classification/overrides/count/count_request_builder.py b/msgraph/generated/users/item/inference_classification/overrides/count/count_request_builder.py index 31f4fb0ddb5..7c2e8a05778 100644 --- a/msgraph/generated/users/item/inference_classification/overrides/count/count_request_builder.py +++ b/msgraph/generated/users/item/inference_classification/overrides/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py b/msgraph/generated/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py index a89491222d1..11ef7089996 100644 --- a/msgraph/generated/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py +++ b/msgraph/generated/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[InferenceClassificationOverrideItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an override specified by its ID. + Delete an override specified by its ID. This API is available in the following national cloud deployments. 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/inferenceclassificationoverride-delete?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[InferenceClassificationOverri async def patch(self,body: Optional[InferenceClassificationOverride] = None, request_configuration: Optional[InferenceClassificationOverrideItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[InferenceClassificationOverride]: """ - Change the classifyAs field of an override as specified. You cannot use PATCH to change any other fields in an inferenceClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use POST to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one withthe new SMTP address is the only way to 'update' the override for this sender. + Change the classifyAs field of an override as specified. You cannot use PATCH to change any other fields in an inferenceClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use POST to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one withthe new SMTP address is the only way to 'update' the override for this sender. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InferenceClassificationOverride] @@ -94,17 +94,17 @@ async def patch(self,body: Optional[InferenceClassificationOverride] = None, req def to_delete_request_information(self,request_configuration: Optional[InferenceClassificationOverrideItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an override specified by its ID. + Delete an override specified by its ID. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[InferenceClassificationOverrideItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,19 +114,19 @@ def to_get_request_information(self,request_configuration: Optional[InferenceCla Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InferenceClassificationOverride] = None, request_configuration: Optional[InferenceClassificationOverrideItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Change the classifyAs field of an override as specified. You cannot use PATCH to change any other fields in an inferenceClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use POST to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one withthe new SMTP address is the only way to 'update' the override for this sender. + Change the classifyAs field of an override as specified. You cannot use PATCH to change any other fields in an inferenceClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use POST to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one withthe new SMTP address is the only way to 'update' the override for this sender. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[InferenceClassificationOver if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/inference_classification/overrides/overrides_request_builder.py b/msgraph/generated/users/item/inference_classification/overrides/overrides_request_builder.py index 278aad42a89..9dbe52bac7f 100644 --- a/msgraph/generated/users/item/inference_classification/overrides/overrides_request_builder.py +++ b/msgraph/generated/users/item/inference_classification/overrides/overrides_request_builder.py @@ -45,7 +45,7 @@ def by_inference_classification_override_id(self,inference_classification_overri async def get(self,request_configuration: Optional[OverridesRequestBuilderGetRequestConfiguration] = None) -> Optional[InferenceClassificationOverrideCollectionResponse]: """ - Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. + Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InferenceClassificationOverrideCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/inferenceclassification-list-overrides?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OverridesRequestBuilderGetReq async def post(self,body: Optional[InferenceClassificationOverride] = None, request_configuration: Optional[OverridesRequestBuilderPostRequestConfiguration] = None) -> Optional[InferenceClassificationOverride]: """ - Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classifiedas specified in the override. Note + Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classifiedas specified in the override. Note This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InferenceClassificationOverride] @@ -92,24 +92,24 @@ async def post(self,body: Optional[InferenceClassificationOverride] = None, requ def to_get_request_information(self,request_configuration: Optional[OverridesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. + Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[InferenceClassificationOverride] = None, request_configuration: Optional[OverridesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classifiedas specified in the override. Note + Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classifiedas specified in the override. Note This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[InferenceClassificationOverr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OverridesRequestBuilderGetQueryParameters(): """ - Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. + Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/insights/insights_request_builder.py b/msgraph/generated/users/item/insights/insights_request_builder.py index 5500026e98d..d45169ff01e 100644 --- a/msgraph/generated/users/item/insights/insights_request_builder.py +++ b/msgraph/generated/users/item/insights/insights_request_builder.py @@ -10,8 +10,8 @@ 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.office_graph_insights import OfficeGraphInsights + from ....models.o_data_errors.o_data_error import ODataError from .shared.shared_request_builder import SharedRequestBuilder from .trending.trending_request_builder import TrendingRequestBuilder from .used.used_request_builder import UsedRequestBuilder @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[InsightsR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[InsightsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[InsightsRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfficeGraphInsights] = None, request_configuration: Optional[InsightsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[OfficeGraphInsights] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/insights/shared/count/count_request_builder.py b/msgraph/generated/users/item/insights/shared/count/count_request_builder.py index 242e9cd702f..c191f94cb40 100644 --- a/msgraph/generated/users/item/insights/shared/count/count_request_builder.py +++ b/msgraph/generated/users/item/insights/shared/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/insights/shared/item/last_shared_method/last_shared_method_request_builder.py b/msgraph/generated/users/item/insights/shared/item/last_shared_method/last_shared_method_request_builder.py index 93629051f30..d980838b89b 100644 --- a/msgraph/generated/users/item/insights/shared/item/last_shared_method/last_shared_method_request_builder.py +++ b/msgraph/generated/users/item/insights/shared/item/last_shared_method/last_shared_method_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[LastSharedMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> LastSharedMethodRequestBuilder: diff --git a/msgraph/generated/users/item/insights/shared/item/resource/resource_request_builder.py b/msgraph/generated/users/item/insights/shared/item/resource/resource_request_builder.py index c398806d097..725b30cfbfb 100644 --- a/msgraph/generated/users/item/insights/shared/item/resource/resource_request_builder.py +++ b/msgraph/generated/users/item/insights/shared/item/resource/resource_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ResourceRequestBuilder: diff --git a/msgraph/generated/users/item/insights/shared/item/shared_insight_item_request_builder.py b/msgraph/generated/users/item/insights/shared/item/shared_insight_item_request_builder.py index 5c7a553381a..5b4b517c57f 100644 --- a/msgraph/generated/users/item/insights/shared/item/shared_insight_item_request_builder.py +++ b/msgraph/generated/users/item/insights/shared/item/shared_insight_item_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[SharedIns Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedInsightItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[SharedInsigh Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedInsight] = None, request_configuration: Optional[SharedInsightItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[SharedInsight] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/insights/shared/shared_request_builder.py b/msgraph/generated/users/item/insights/shared/shared_request_builder.py index 37490872975..570ab57ef9b 100644 --- a/msgraph/generated/users/item/insights/shared/shared_request_builder.py +++ b/msgraph/generated/users/item/insights/shared/shared_request_builder.py @@ -45,7 +45,7 @@ def by_shared_insight_id(self,shared_insight_id: str) -> SharedInsightItemReques async def get(self,request_configuration: Optional[SharedRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedInsightCollectionResponse]: """ - Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. + Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedInsightCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/insights-list-shared?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedInsight] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SharedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. + Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedInsight] = None, request_configuration: Optional[SharedRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedInsight] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedRequestBuilderGetQueryParameters(): """ - Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. + Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/insights/trending/count/count_request_builder.py b/msgraph/generated/users/item/insights/trending/count/count_request_builder.py index cbb44ec815a..11ccde91fd3 100644 --- a/msgraph/generated/users/item/insights/trending/count/count_request_builder.py +++ b/msgraph/generated/users/item/insights/trending/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/insights/trending/item/resource/resource_request_builder.py b/msgraph/generated/users/item/insights/trending/item/resource/resource_request_builder.py index db2e8f15329..e4b712cd0f3 100644 --- a/msgraph/generated/users/item/insights/trending/item/resource/resource_request_builder.py +++ b/msgraph/generated/users/item/insights/trending/item/resource/resource_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ResourceRequestBuilder: diff --git a/msgraph/generated/users/item/insights/trending/item/trending_item_request_builder.py b/msgraph/generated/users/item/insights/trending/item/trending_item_request_builder.py index 02bf556b824..d57b0e1ca63 100644 --- a/msgraph/generated/users/item/insights/trending/item/trending_item_request_builder.py +++ b/msgraph/generated/users/item/insights/trending/item/trending_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TrendingI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TrendingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TrendingItem Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Trending] = None, request_configuration: Optional[TrendingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Trending] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/insights/trending/trending_request_builder.py b/msgraph/generated/users/item/insights/trending/trending_request_builder.py index 87404afcb1c..e464f871bf2 100644 --- a/msgraph/generated/users/item/insights/trending/trending_request_builder.py +++ b/msgraph/generated/users/item/insights/trending/trending_request_builder.py @@ -45,7 +45,7 @@ def by_trending_id(self,trending_id: str) -> TrendingItemRequestBuilder: async def get(self,request_configuration: Optional[TrendingRequestBuilderGetRequestConfiguration] = None) -> Optional[TrendingCollectionResponse]: """ - Calculated insight that includes a list of documents trending around the user. + Calculated insight that includes a list of documents trending around the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TrendingCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/insights-list-trending?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[Trending] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TrendingRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Calculated insight that includes a list of documents trending around the user. + Calculated insight that includes a list of documents trending around the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Trending] = None, request_configuration: Optional[TrendingRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Trending] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TrendingRequestBuilderGetQueryParameters(): """ - Calculated insight that includes a list of documents trending around the user. + Calculated insight that includes a list of documents trending around the user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/insights/used/count/count_request_builder.py b/msgraph/generated/users/item/insights/used/count/count_request_builder.py index 2cbcf06b045..caaea85cab6 100644 --- a/msgraph/generated/users/item/insights/used/count/count_request_builder.py +++ b/msgraph/generated/users/item/insights/used/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/insights/used/item/resource/resource_request_builder.py b/msgraph/generated/users/item/insights/used/item/resource/resource_request_builder.py index ff11631eb7b..7198a18f4d1 100644 --- a/msgraph/generated/users/item/insights/used/item/resource/resource_request_builder.py +++ b/msgraph/generated/users/item/insights/used/item/resource/resource_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ResourceRequestBuilder: diff --git a/msgraph/generated/users/item/insights/used/item/used_insight_item_request_builder.py b/msgraph/generated/users/item/insights/used/item/used_insight_item_request_builder.py index 5642093f458..94c0c6f8a31 100644 --- a/msgraph/generated/users/item/insights/used/item/used_insight_item_request_builder.py +++ b/msgraph/generated/users/item/insights/used/item/used_insight_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[UsedInsig Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UsedInsightItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[UsedInsightI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UsedInsight] = None, request_configuration: Optional[UsedInsightItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[UsedInsight] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/insights/used/used_request_builder.py b/msgraph/generated/users/item/insights/used/used_request_builder.py index df0a077cc54..4d912520ae7 100644 --- a/msgraph/generated/users/item/insights/used/used_request_builder.py +++ b/msgraph/generated/users/item/insights/used/used_request_builder.py @@ -45,7 +45,7 @@ def by_used_insight_id(self,used_insight_id: str) -> UsedInsightItemRequestBuild async def get(self,request_configuration: Optional[UsedRequestBuilderGetRequestConfiguration] = None) -> Optional[UsedInsightCollectionResponse]: """ - Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. + Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UsedInsightCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/insights-list-used?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[UsedInsight] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[UsedRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. + Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UsedInsight] = None, request_configuration: Optional[UsedRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[UsedInsight] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class UsedRequestBuilderGetQueryParameters(): """ - Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. + Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/count/count_request_builder.py index 52158965ad4..ba66688a3bf 100644 --- a/msgraph/generated/users/item/joined_teams/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_response.py b/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_response.py rename to msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_get_response.py index 71931d32819..51a6bd5d308 100644 --- a/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_request_builder.py index 4949f515d36..8bcb4ff3953 100644 --- a/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/all_channels/all_channels_request_builder.py b/msgraph/generated/users/item/joined_teams/item/all_channels/all_channels_request_builder.py index 7fc85cc8f2e..4d8e2f85da6 100644 --- a/msgraph/generated/users/item/joined_teams/item/all_channels/all_channels_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/all_channels/all_channels_request_builder.py @@ -44,7 +44,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[AllChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-allchannels?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllChannelsRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[AllChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllChannelsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllChannelsRequestBuilderGetQueryParameters(): """ - Get the list of channels either in this team or shared with this team (incoming channels). + Get the list of channels either in this team or shared with this team (incoming channels). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/all_channels/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/all_channels/count/count_request_builder.py index db6b91470ed..13b4fcb61bd 100644 --- a/msgraph/generated/users/item/joined_teams/item/all_channels/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/all_channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/all_channels/item/channel_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/all_channels/item/channel_item_request_builder.py index 643fe428b04..6964a798629 100644 --- a/msgraph/generated/users/item/joined_teams/item/all_channels/item/channel_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/all_channels/item/channel_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChannelItemRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/archive/archive_request_builder.py b/msgraph/generated/users/item/joined_teams/item/archive/archive_request_builder.py index 8900573f532..3dd3aec1e97 100644 --- a/msgraph/generated/users/item/joined_teams/item/archive/archive_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/archive/archive_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. + Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. This API is available in the following national cloud deployments. 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[ArchivePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = None, request_configuration: Optional[ArchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. + Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ArchivePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/channels_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/channels_request_builder.py index e488382fff4..6ea1d828fb5 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/channels_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/channels_request_builder.py @@ -46,7 +46,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[ChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ChannelsRequestBuilderGetRequ async def post(self,body: Optional[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> Optional[Channel]: """ - Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. + Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Channel] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[ChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. + Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Channel] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class ChannelsRequestBuilderGetQueryParameters(): """ - Retrieve the list of channels in this team. + Retrieve the list of channels in this team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/count/count_request_builder.py index ccdfe1c45f5..12c72a47c61 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_response.py b/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_get_response.py similarity index 91% rename from msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_response.py rename to msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_get_response.py index dabc8cc5d4a..ff7c5c514af 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_response.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_get_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetAllMessagesResponse(BaseCollectionPaginationCountResponse): +class GetAllMessagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAllMessagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAllMessagesResponse + Returns: GetAllMessagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetAllMessagesResponse() + return GetAllMessagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_request_builder.py index 1e6e4debfce..dca4c79b27a 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/get_all_messages/get_all_messages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse class GetAllMessagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesResponse]: + async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[GetAllMessagesGetResponse]: """ Invoke function getAllMessages param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAllMessagesResponse] + Returns: Optional[GetAllMessagesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetAllMessagesRequestBuilderG } if not self.request_adapter: raise Exception("Http core is null") - from .get_all_messages_response import GetAllMessagesResponse + from .get_all_messages_get_response import GetAllMessagesGetResponse - return await self.request_adapter.send_async(request_info, GetAllMessagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetAllMessagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetAllMessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GetAllMessag Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetAllMessagesRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/channel_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/channel_item_request_builder.py index 5909dd1eda2..7675d2e68e9 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/channel_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/channel_item_request_builder.py @@ -37,7 +37,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ChannelItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the channel. + Delete the channel. This API is available in the following national cloud deployments. 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/channel-delete?view=graph-rest-1.0 @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ChannelItemRequestBuilderD async def get(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Channel]: """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] Find more info here: https://learn.microsoft.com/graph/api/channel-get?view=graph-rest-1.0 @@ -79,7 +79,7 @@ async def get(self,request_configuration: Optional[ChannelItemRequestBuilderGetR async def patch(self,body: Optional[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Channel]: """ - Update the properties of the specified channel. + Update the properties of the specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] @@ -104,39 +104,39 @@ async def patch(self,body: Optional[Channel] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the channel. + Delete the channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[ChannelItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified channel. + Update the properties of the specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -258,7 +258,7 @@ class ChannelItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class ChannelItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. + Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/complete_migration/complete_migration_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/complete_migration/complete_migration_request_builder.py index dde9e1ba3d8..39f5e850f15 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py b/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py new file mode 100644 index 00000000000..349bf1b33ed --- /dev/null +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_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 DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index 4e6b5d56ec6..c237d43522e 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py deleted file mode 100644 index 1aa3df0306e..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/content/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/content/content_request_builder.py index c4d9028f5d0..ff7733f37e9 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/content/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/files_folder_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/files_folder_request_builder.py index f1311d8a4b4..25fa1567f6f 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_response.py b/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_response.py rename to msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_post_response.py index 8db5d0279e2..2f458b8ac9b 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_response.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_request_builder.py index 3eb65c6a0a0..1e8bc344fb0 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/members/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/members/count/count_request_builder.py index 3eb10bc9a4e..d64519d6844 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/members/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 9e837f6ecb4..2b0a93c308d 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/members/members_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/members/members_request_builder.py index 4bd256b0600..9acc03db567 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/members/members_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/count/count_request_builder.py index 4458efdd4df..9ece3260d4a 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_response.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_response.py rename to msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_get_response.py index b2b0589aadb..0842f9f0387 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_response.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_request_builder.py index e812a75c12c..741d9dd9da8 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/chat_message_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/chat_message_item_request_builder.py index 239f342cf7d..9dd00fa84b5 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py index ac0a593b4ab..441ed6051a2 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py index b2f0025bdba..bc3a6db4192 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 4b8b95641a5..9f64601321a 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py index e3a6965dc28..f8f835a3133 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/count/count_request_builder.py index 5b84641f74d..ec249d0dfde 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_response.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_response.py rename to msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_get_response.py index 787310244c0..4a780f55076 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ...........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py index ad5714b1f32..98b01461511 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ...........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py index 79fb325a283..8500eb735ec 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py index 768f9dca5e6..2543a89e04c 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index bf8c96223ec..d407f529e8b 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 7a342b10d53..a46a9ebbca7 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index d195ca8f581..24fc787614d 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index 3759b0954d5..c9e85f9bc73 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index 21279ff6518..96dc1004eeb 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index bdc4240f775..575d2c8131d 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index d2d03fe2b80..e8e9fa48564 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 1ad7f106a85..79df1d526ee 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py index c16f6e8f1c9..45541fb44df 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py index 115ff7487d4..1bdeb220167 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index 38980ab9db2..38e0eb94972 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py index 4a776347d5b..193ffba62a9 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 9f26cefe300..a9b7d14b354 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/provision_email/provision_email_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/provision_email/provision_email_request_builder.py index dec44edebce..8e8e6b69d90 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/remove_email/remove_email_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/remove_email/remove_email_request_builder.py index ece88fe0553..b194d136a0f 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/count/count_request_builder.py index f261fa8bf9e..1ea84f5967d 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index 84adf328f31..f423e18ca7e 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py index 9c177a80a00..d104c7e8bf5 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index e2e931ac164..859fe49e5d3 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index e16a62c73db..1dd5c47752d 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py index 6d0c34d6461..cff62b8bff7 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py index 58d094f55ce..1205f4c9007 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/count/count_request_builder.py index af921a3a210..dab7d9f8554 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py index 0ef332d71b0..f5b8475301a 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py index 7676faef5b2..fc595349fde 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/tabs_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/tabs_request_builder.py index 471ce1f37cd..4a47a135b03 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/tabs_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/clone/clone_request_builder.py b/msgraph/generated/users/item/joined_teams/item/clone/clone_request_builder.py index de2dded9870..890d56d2413 100644 --- a/msgraph/generated/users/item/joined_teams/item/clone/clone_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/clone/clone_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ClonePostRequestBody] = None, request_configuration: Optional[CloneRequestBuilderPostRequestConfiguration] = None) -> None: """ - Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. + Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. This API is available in the following national cloud deployments. 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[ClonePostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ClonePostRequestBody] = None, request_configuration: Optional[CloneRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. + Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ClonePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/complete_migration/complete_migration_request_builder.py b/msgraph/generated/users/item/joined_teams/item/complete_migration/complete_migration_request_builder.py index 16ad7e58d4d..282e57cce4d 100644 --- a/msgraph/generated/users/item/joined_teams/item/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/team-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/group/group_request_builder.py b/msgraph/generated/users/item/joined_teams/item/group/group_request_builder.py index ab6280a0761..c026c8ff718 100644 --- a/msgraph/generated/users/item/joined_teams/item/group/group_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/group/group_request_builder.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ......models.group import Group from ......models.o_data_errors.o_data_error import ODataError + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder class GroupRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GroupRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GroupRequestBuilder: @@ -74,6 +75,15 @@ def with_url(self,raw_url: Optional[str] = None) -> GroupRequestBuilder: raise TypeError("raw_url cannot be null.") return GroupRequestBuilder(self.request_adapter, raw_url) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @dataclass class GroupRequestBuilderGetQueryParameters(): """ diff --git a/msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..4bd93a17386 --- /dev/null +++ b/msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_request_builder.py b/msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py similarity index 65% rename from msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_request_builder.py rename to msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py index 86b8b1e3e93..54096b01640 100644 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/group/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -11,26 +11,27 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder -class DeltaRequestBuilder(BaseRequestBuilder): +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Builds and executes requests for operations under /users/{user-id}/joinedTeams/{team-id}/group/serviceProvisioningErrors """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[ServiceProvisioningErrorCollectionResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +44,50 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .......models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> ServiceProvisioningErrorsRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: ServiceProvisioningErrorsRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): """ - Invoke function delta + Get serviceProvisioningErrors property value """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -89,6 +99,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: 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": @@ -106,6 +118,9 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: # 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 @@ -128,14 +143,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/users/item/joined_teams/item/incoming_channels/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/incoming_channels/count/count_request_builder.py index 307f4dacb71..e926d9e1949 100644 --- a/msgraph/generated/users/item/joined_teams/item/incoming_channels/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/incoming_channels/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/incoming_channels/incoming_channels_request_builder.py b/msgraph/generated/users/item/joined_teams/item/incoming_channels/incoming_channels_request_builder.py index 9e564e1b89d..768a939c229 100644 --- a/msgraph/generated/users/item/joined_teams/item/incoming_channels/incoming_channels_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/incoming_channels/incoming_channels_request_builder.py @@ -44,7 +44,7 @@ def by_channel_id(self,channel_id: str) -> ChannelItemRequestBuilder: async def get(self,request_configuration: Optional[IncomingChannelsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChannelCollectionResponse]: """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChannelCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-incomingchannels?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[IncomingChannelsRequestBuilde def to_get_request_information(self,request_configuration: Optional[IncomingChannelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> IncomingChannelsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class IncomingChannelsRequestBuilderGetQueryParameters(): """ - Get the list of incoming channels (channels shared with a team). + Get the list of incoming channels (channels shared with a team). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/incoming_channels/item/channel_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/incoming_channels/item/channel_item_request_builder.py index 171555724dd..ff5af10fc5f 100644 --- a/msgraph/generated/users/item/joined_teams/item/incoming_channels/item/channel_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/incoming_channels/item/channel_item_request_builder.py @@ -74,12 +74,12 @@ def to_delete_request_information(self,request_configuration: Optional[ChannelIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChannelItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -89,14 +89,14 @@ def to_get_request_information(self,request_configuration: Optional[ChannelItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChannelItemRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/installed_apps/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/installed_apps/count/count_request_builder.py index 0b8ecf168f4..c9057f7d6e2 100644 --- a/msgraph/generated/users/item/joined_teams/item/installed_apps/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/installed_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/installed_apps/installed_apps_request_builder.py b/msgraph/generated/users/item/joined_teams/item/installed_apps/installed_apps_request_builder.py index b06f38437a4..8c2f30f2478 100644 --- a/msgraph/generated/users/item/joined_teams/item/installed_apps/installed_apps_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/installed_apps/installed_apps_request_builder.py @@ -45,7 +45,7 @@ def by_teams_app_installation_id(self,teams_app_installation_id: str) -> TeamsAp async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallationCollectionResponse]: """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-installedapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGe async def post(self,body: Optional[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Install an app to the specified team. + Install an app to the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsAppInstallation] = None, request_configu def to_get_request_information(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Install an app to the specified team. + Install an app to the specified team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsAppInstallation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstalledAppsRequestBuilderGetQueryParameters(): """ - Retrieve a list of apps installed in the specified team. + Retrieve a list of apps installed in the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app/teams_app_request_builder.py b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app/teams_app_request_builder.py index 47b4973b642..58f39a17d6a 100644 --- a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app/teams_app_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py index b1908884ff7..bb0f21aa445 100644 --- a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppDefinitionRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_installation_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_installation_item_request_builder.py index 05df267b8a1..eb7d3269294 100644 --- a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_installation_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/teams_app_installation_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Uninstalls an app from the specified team. + Uninstalls an app from the specified team. This API is available in the following national cloud deployments. 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/team-delete-installedapps?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[TeamsAppInstallationItemRe async def get(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsAppInstallation]: """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsAppInstallation] Find more info here: https://learn.microsoft.com/graph/api/team-get-installedapps?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[TeamsAppInstallation] = None, request_config def to_delete_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Uninstalls an app from the specified team. + Uninstalls an app from the specified team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAppInstallation] = None, request_configuration: Optional[TeamsAppInstallationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TeamsAppInstallation] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class TeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration(BaseReque @dataclass class TeamsAppInstallationItemRequestBuilderGetQueryParameters(): """ - Retrieve the app installed in the specified team. + Retrieve the app installed in the specified team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/upgrade/upgrade_request_builder.py b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/upgrade/upgrade_request_builder.py index 3f343d8d426..015dfb9296a 100644 --- a/msgraph/generated/users/item/joined_teams/item/installed_apps/item/upgrade/upgrade_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/installed_apps/item/upgrade/upgrade_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> None: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. 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[UpgradePostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = None, request_configuration: Optional[UpgradeRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Upgrade an app installation within a chat. + Upgrade an app installation within a chat. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpgradePostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/members/add/add_response.py b/msgraph/generated/users/item/joined_teams/item/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/members/add/add_response.py rename to msgraph/generated/users/item/joined_teams/item/members/add/add_post_response.py index 73509a849f5..77f0fa0e9e4 100644 --- a/msgraph/generated/users/item/joined_teams/item/members/add/add_response.py +++ b/msgraph/generated/users/item/joined_teams/item/members/add/add_post_response.py @@ -10,20 +10,20 @@ from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/members/add/add_request_builder.py b/msgraph/generated/users/item/joined_teams/item/members/add/add_request_builder.py index f48524a06a2..c29ff25d317 100644 --- a/msgraph/generated/users/item/joined_teams/item/members/add/add_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/members/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/members/count/count_request_builder.py index c6ab92e7903..f6779a2ca3e 100644 --- a/msgraph/generated/users/item/joined_teams/item/members/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/members/item/conversation_member_item_request_builder.py index 6e368053c93..663659072dc 100644 --- a/msgraph/generated/users/item/joined_teams/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/members/item/conversation_member_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a conversationMember from a team. + Remove a conversationMember from a team. This API is available in the following national cloud deployments. 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/team-delete-members?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. 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/team-get-members?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a team. + Update the role of a conversationMember in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a conversationMember from a team. + Remove a conversationMember from a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a team. + Update the role of a conversationMember in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a team. + Get a conversationMember from a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/members/members_request_builder.py b/msgraph/generated/users/item/joined_teams/item/members/members_request_builder.py index 2f64f8bf94b..7cea00241a1 100644 --- a/msgraph/generated/users/item/joined_teams/item/members/members_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-members?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a new conversationMember to a team. + Add a new conversationMember to a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a new conversationMember to a team. + Add a new conversationMember to a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Get the conversationMember collection of a team. + Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/operations/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/operations/count/count_request_builder.py index 4eedec8fd1d..8b1f34990ce 100644 --- a/msgraph/generated/users/item/joined_teams/item/operations/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/operations/item/teams_async_operation_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/operations/item/teams_async_operation_item_request_builder.py index 4617bd4ca37..109016fcee7 100644 --- a/msgraph/generated/users/item/joined_teams/item/operations/item/teams_async_operation_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/operations/item/teams_async_operation_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamsAsyn Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsAsyncOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAsyncOp Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAsyncOperation] = None, request_configuration: Optional[TeamsAsyncOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[TeamsAsyncOperation] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/operations/operations_request_builder.py b/msgraph/generated/users/item/joined_teams/item/operations/operations_request_builder.py index c35da2a1d48..eb26f29f23f 100644 --- a/msgraph/generated/users/item/joined_teams/item/operations/operations_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/operations/operations_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[OperationsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsAsyncOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[TeamsAsyncOperation] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/count/count_request_builder.py index 1676ab1cc39..9d49004e8ec 100644 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_response.py deleted file mode 100644 index 2511b8129fe..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/delta/delta_response.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union - -if TYPE_CHECKING: - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - -from .......models.base_delta_function_response import BaseDeltaFunctionResponse - -@dataclass -class DeltaResponse(BaseDeltaFunctionResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DeltaResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - from .......models.base_delta_function_response import BaseDeltaFunctionResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py deleted file mode 100644 index 8e5ec3d645d..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetAvailableExtensionPropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The isSyncedFromOnPremises property - is_synced_from_on_premises: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesPostRequestBody() - - 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]] = { - "isSyncedFromOnPremises": lambda n : setattr(self, 'is_synced_from_on_premises', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("isSyncedFromOnPremises", self.is_synced_from_on_premises) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py deleted file mode 100644 index 2f0976259fa..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_available_extension_properties_post_request_body import GetAvailableExtensionPropertiesPostRequestBody - from .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - -class GetAvailableExtensionPropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/getAvailableExtensionProperties", path_parameters) - - async def post(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> Optional[GetAvailableExtensionPropertiesResponse]: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetAvailableExtensionPropertiesResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?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 .get_available_extension_properties_response import GetAvailableExtensionPropertiesResponse - - return await self.request_adapter.send_async(request_info, GetAvailableExtensionPropertiesResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetAvailableExtensionPropertiesPostRequestBody] = None, request_configuration: Optional[GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetAvailableExtensionPropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py deleted file mode 100644 index 293b643490d..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.extension_property import ExtensionProperty - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetAvailableExtensionPropertiesResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[ExtensionProperty]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetAvailableExtensionPropertiesResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetAvailableExtensionPropertiesResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetAvailableExtensionPropertiesResponse() - - def 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.extension_property import ExtensionProperty - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.extension_property import ExtensionProperty - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExtensionProperty)), - } - 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/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py deleted file mode 100644 index 3347715a8fe..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_post_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetByIdsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - # The types property - types: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - "types": lambda n : setattr(self, 'types', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_collection_of_primitive_values("types", self.types) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py deleted file mode 100644 index a32897bea98..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_by_ids_post_request_body import GetByIdsPostRequestBody - from .get_by_ids_response import GetByIdsResponse - -class GetByIdsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getByIds method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetByIdsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/getByIds", path_parameters) - - async def post(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetByIdsResponse]: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetByIdsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getbyids?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 .get_by_ids_response import GetByIdsResponse - - return await self.request_adapter.send_async(request_info, GetByIdsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetByIdsPostRequestBody] = None, request_configuration: Optional[GetByIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetByIdsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetByIdsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetByIdsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetByIdsRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_response.py deleted file mode 100644 index 4a990d4d637..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/get_by_ids/get_by_ids_response.py +++ /dev/null @@ -1,57 +0,0 @@ -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.directory_object import DirectoryObject - -from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetByIdsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[DirectoryObject]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetByIdsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetByIdsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetByIdsResponse() - - def 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.directory_object import DirectoryObject - - from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - from .......models.directory_object import DirectoryObject - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)), - } - 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/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py deleted file mode 100644 index a5fc2c2476e..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The groupIds property - group_ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsPostRequestBody() - - 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]] = { - "groupIds": lambda n : setattr(self, 'group_ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("groupIds", self.group_ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py deleted file mode 100644 index 27a0c9d12db..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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 .check_member_groups_post_request_body import CheckMemberGroupsPostRequestBody - from .check_member_groups_response import CheckMemberGroupsResponse - -class CheckMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups", path_parameters) - - async def post(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberGroupsResponse]: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?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 .check_member_groups_response import CheckMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberGroupsPostRequestBody] = None, request_configuration: Optional[CheckMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberGroupsRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py deleted file mode 100644 index 0b38227280f..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_groups/check_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py deleted file mode 100644 index 5f48b8577ec..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 CheckMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The ids property - ids: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsPostRequestBody() - - 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]] = { - "ids": lambda n : setattr(self, 'ids', n.get_collection_of_primitive_values(str)), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_collection_of_primitive_values("ids", self.ids) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py deleted file mode 100644 index a8419f41734..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.py +++ /dev/null @@ -1,94 +0,0 @@ -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 .check_member_objects_post_request_body import CheckMemberObjectsPostRequestBody - from .check_member_objects_response import CheckMemberObjectsResponse - -class CheckMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the checkMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects", path_parameters) - - async def post(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[CheckMemberObjectsResponse]: - """ - Invoke action checkMemberObjects - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CheckMemberObjectsResponse] - """ - if not body: - raise TypeError("body cannot be null.") - request_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 .check_member_objects_response import CheckMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, CheckMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[CheckMemberObjectsPostRequestBody] = None, request_configuration: Optional[CheckMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Invoke action checkMemberObjects - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> CheckMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: CheckMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return CheckMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class CheckMemberObjectsRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py deleted file mode 100644 index 49b778d9816..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/check_member_objects/check_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class CheckMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CheckMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CheckMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return CheckMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py deleted file mode 100644 index 1a3308bfb6c..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberGroupsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py deleted file mode 100644 index 28ae40fad26..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_groups_post_request_body import GetMemberGroupsPostRequestBody - from .get_member_groups_response import GetMemberGroupsResponse - -class GetMemberGroupsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberGroups method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups", path_parameters) - - async def post(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberGroupsResponse]: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberGroupsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?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 .get_member_groups_response import GetMemberGroupsResponse - - return await self.request_adapter.send_async(request_info, GetMemberGroupsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberGroupsPostRequestBody] = None, request_configuration: Optional[GetMemberGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberGroupsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberGroupsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberGroupsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberGroupsRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py deleted file mode 100644 index a62ef1f1c87..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_groups/get_member_groups_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberGroupsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberGroupsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberGroupsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberGroupsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py deleted file mode 100644 index 7552e02e441..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetMemberObjectsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The securityEnabledOnly property - security_enabled_only: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsPostRequestBody() - - 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]] = { - "securityEnabledOnly": lambda n : setattr(self, 'security_enabled_only', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("securityEnabledOnly", self.security_enabled_only) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py deleted file mode 100644 index 1cd54d31520..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.py +++ /dev/null @@ -1,95 +0,0 @@ -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_member_objects_post_request_body import GetMemberObjectsPostRequestBody - from .get_member_objects_response import GetMemberObjectsResponse - -class GetMemberObjectsRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the getMemberObjects method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects", path_parameters) - - async def post(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> Optional[GetMemberObjectsResponse]: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetMemberObjectsResponse] - Find more info here: https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?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 .get_member_objects_response import GetMemberObjectsResponse - - return await self.request_adapter.send_async(request_info, GetMemberObjectsResponse, error_mapping) - - def to_post_request_information(self,body: Optional[GetMemberObjectsPostRequestBody] = None, request_configuration: Optional[GetMemberObjectsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> GetMemberObjectsRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: GetMemberObjectsRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return GetMemberObjectsRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class GetMemberObjectsRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py deleted file mode 100644 index 73b29c68c03..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/get_member_objects/get_member_objects_response.py +++ /dev/null @@ -1,54 +0,0 @@ -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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - -@dataclass -class GetMemberObjectsResponse(BaseCollectionPaginationCountResponse): - # The value property - value: Optional[List[str]] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetMemberObjectsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetMemberObjectsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetMemberObjectsResponse() - - def 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.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse - - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), - } - 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_primitive_values("value", self.value) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py index 3327f76afac..29fb4629eb2 100644 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.py @@ -12,11 +12,6 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError from .......models.resource_specific_permission_grant import ResourceSpecificPermissionGrant - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - from .restore.restore_request_builder import RestoreRequestBuilder class ResourceSpecificPermissionGrantItemRequestBuilder(BaseRequestBuilder): """ @@ -102,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ResourceS Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ResourceSpec Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[ResourceSpecificPermissionGrantItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ResourceSpecificPermissionG if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -157,51 +152,6 @@ def with_url(self,raw_url: Optional[str] = None) -> ResourceSpecificPermissionGr raise TypeError("raw_url cannot be null.") return ResourceSpecificPermissionGrantItemRequestBuilder(self.request_adapter, raw_url) - @property - def check_member_groups(self) -> CheckMemberGroupsRequestBuilder: - """ - Provides operations to call the checkMemberGroups method. - """ - from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder - - return CheckMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def check_member_objects(self) -> CheckMemberObjectsRequestBuilder: - """ - Provides operations to call the checkMemberObjects method. - """ - from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - - return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_groups(self) -> GetMemberGroupsRequestBuilder: - """ - Provides operations to call the getMemberGroups method. - """ - from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder - - return GetMemberGroupsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_member_objects(self) -> GetMemberObjectsRequestBuilder: - """ - Provides operations to call the getMemberObjects method. - """ - from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder - - return GetMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def restore(self) -> RestoreRequestBuilder: - """ - Provides operations to call the restore method. - """ - from .restore.restore_request_builder import RestoreRequestBuilder - - return RestoreRequestBuilder(self.request_adapter, self.path_parameters) - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/restore/restore_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/item/restore/restore_request_builder.py deleted file mode 100644 index 6046e24fcea..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/item/restore/restore_request_builder.py +++ /dev/null @@ -1,87 +0,0 @@ -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.directory_object import DirectoryObject - from ........models.o_data_errors.o_data_error import ODataError - -class RestoreRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the restore method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new RestoreRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore", path_parameters) - - async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: - """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DirectoryObject] - Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 - """ - request_info = self.to_post_request_information( - request_configuration - ) - from ........models.o_data_errors.o_data_error import ODataError - - error_mapping: Dict[str, ParsableFactory] = { - "4XX": ODataError, - "5XX": ODataError, - } - if not self.request_adapter: - raise Exception("Http core is null") - from ........models.directory_object import DirectoryObject - - return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping) - - def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: RestoreRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return RestoreRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class RestoreRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/permission_grants/permission_grants_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/permission_grants_request_builder.py index 0edfb79821f..12b2311005b 100644 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/permission_grants_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/permission_grants/permission_grants_request_builder.py @@ -14,11 +14,7 @@ from ......models.resource_specific_permission_grant import ResourceSpecificPermissionGrant from ......models.resource_specific_permission_grant_collection_response import ResourceSpecificPermissionGrantCollectionResponse from .count.count_request_builder import CountRequestBuilder - from .delta.delta_request_builder import DeltaRequestBuilder - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder from .item.resource_specific_permission_grant_item_request_builder import ResourceSpecificPermissionGrantItemRequestBuilder - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder class PermissionGrantsRequestBuilder(BaseRequestBuilder): """ @@ -49,7 +45,7 @@ def by_resource_specific_permission_grant_id(self,resource_specific_permission_g async def get(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[ResourceSpecificPermissionGrantCollectionResponse]: """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ResourceSpecificPermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/team-list-permissiongrants?view=graph-rest-1.0 @@ -95,19 +91,19 @@ async def post(self,body: Optional[ResourceSpecificPermissionGrant] = None, requ def to_get_request_information(self,request_configuration: Optional[PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ResourceSpecificPermissionGrant] = None, request_configuration: Optional[PermissionGrantsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -120,13 +116,13 @@ def to_post_request_information(self,body: Optional[ResourceSpecificPermissionGr if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,46 +145,10 @@ def count(self) -> CountRequestBuilder: return CountRequestBuilder(self.request_adapter, self.path_parameters) - @property - def delta(self) -> DeltaRequestBuilder: - """ - Provides operations to call the delta method. - """ - from .delta.delta_request_builder import DeltaRequestBuilder - - return DeltaRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_available_extension_properties(self) -> GetAvailableExtensionPropertiesRequestBuilder: - """ - Provides operations to call the getAvailableExtensionProperties method. - """ - from .get_available_extension_properties.get_available_extension_properties_request_builder import GetAvailableExtensionPropertiesRequestBuilder - - return GetAvailableExtensionPropertiesRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def get_by_ids(self) -> GetByIdsRequestBuilder: - """ - Provides operations to call the getByIds method. - """ - from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder - - return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters) - - @property - def validate_properties(self) -> ValidatePropertiesRequestBuilder: - """ - Provides operations to call the validateProperties method. - """ - from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder - - return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters) - @dataclass class PermissionGrantsRequestBuilderGetQueryParameters(): """ - List all resource-specific permission grants on the team. This list specifies the Azure AD apps that have access to the team, along with each app's corresponding type of resource-specific access. + List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py deleted file mode 100644 index 6df44acfcae..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_post_request_body.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union -from uuid import UUID - -@dataclass -class ValidatePropertiesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The displayName property - display_name: Optional[str] = None - # The entityType property - entity_type: Optional[str] = None - # The mailNickname property - mail_nickname: Optional[str] = None - # The onBehalfOfUserId property - on_behalf_of_user_id: Optional[UUID] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ValidatePropertiesPostRequestBody: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ValidatePropertiesPostRequestBody - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return ValidatePropertiesPostRequestBody() - - 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]] = { - "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), - "entityType": lambda n : setattr(self, 'entity_type', n.get_str_value()), - "mailNickname": lambda n : setattr(self, 'mail_nickname', n.get_str_value()), - "onBehalfOfUserId": lambda n : setattr(self, 'on_behalf_of_user_id', n.get_uuid_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("displayName", self.display_name) - writer.write_str_value("entityType", self.entity_type) - writer.write_str_value("mailNickname", self.mail_nickname) - writer.write_uuid_value("onBehalfOfUserId", self.on_behalf_of_user_id) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_request_builder.py b/msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_request_builder.py deleted file mode 100644 index c84dc1c45b9..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/permission_grants/validate_properties/validate_properties_request_builder.py +++ /dev/null @@ -1,91 +0,0 @@ -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 .validate_properties_post_request_body import ValidatePropertiesPostRequestBody - -class ValidatePropertiesRequestBuilder(BaseRequestBuilder): - """ - Provides operations to call the validateProperties method. - """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: - """ - Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - param path_parameters: The raw url or the Url template parameters for the request. - param request_adapter: The request adapter to use to execute the requests. - Returns: None - """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/permissionGrants/validateProperties", path_parameters) - - async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - 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/directoryobject-validateproperties?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[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: - """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - param body: The request body - param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: RequestInformation - """ - if not body: - raise TypeError("body cannot be null.") - request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.POST - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - request_info.set_content_from_parsable(self.request_adapter, "application/json", body) - return request_info - - def with_url(self,raw_url: Optional[str] = None) -> ValidatePropertiesRequestBuilder: - """ - Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - param raw_url: The raw URL to use for the request builder. - Returns: ValidatePropertiesRequestBuilder - """ - if not raw_url: - raise TypeError("raw_url cannot be null.") - return ValidatePropertiesRequestBuilder(self.request_adapter, raw_url) - - from kiota_abstractions.base_request_configuration import BaseRequestConfiguration - - @dataclass - class ValidatePropertiesRequestBuilderPostRequestConfiguration(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/users/item/joined_teams/item/photo/photo_request_builder.py b/msgraph/generated/users/item/joined_teams/item/photo/photo_request_builder.py index 0c80e55d248..041b69bcefa 100644 --- a/msgraph/generated/users/item/joined_teams/item/photo/photo_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/photo/photo_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfilePhoto]: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProfilePhoto] Find more info here: https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0 @@ -75,19 +75,19 @@ async def patch(self,body: Optional[ProfilePhoto] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -100,13 +100,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -132,7 +132,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class PhotoRequestBuilderGetQueryParameters(): """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/photo/value/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/photo/value/content_request_builder.py index 7eb9f25cdcc..2ac1911ed83 100644 --- a/msgraph/generated/users/item/joined_teams/item/photo/value/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/photo/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/complete_migration/complete_migration_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/complete_migration/complete_migration_request_builder.py index 02a427a1f95..0f0366c69a3 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/complete_migration/complete_migration_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/complete_migration/complete_migration_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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/channel-completemigration?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[CompleteMigrationRequestBuil def to_post_request_information(self,request_configuration: Optional[CompleteMigrationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you cannot import additional messages into the team. You can add members to the team after the request returns a successful response. + Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> CompleteMigrationRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response.py new file mode 100644 index 00000000000..349bf1b33ed --- /dev/null +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_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 DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py index 74a90fbc11d..3070764d8f9 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}", path_parameters) - async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse]: + async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse]: """ Invoke function doesUserHaveAccess param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse] + Returns: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserI } if not self.request_adapter: raise Exception("Http core is null") - from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse + from .does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_get_response import DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DoesUserHave Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py deleted file mode 100644 index 1aa3df0306e..00000000000 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/content/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/content/content_request_builder.py index 5c045d10cdd..87df6b53a65 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/content/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/content/content_request_builder.py @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/files_folder_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/files_folder_request_builder.py index 00144204ddb..5583b662599 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/files_folder_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/files_folder/files_folder_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveItem]: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. 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/channel-get-filesfolder?view=graph-rest-1.0 @@ -51,19 +51,19 @@ async def get(self,request_configuration: Optional[FilesFolderRequestBuilderGetR def to_get_request_information(self,request_configuration: Optional[FilesFolderRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> FilesFolderRequestBuilder: @@ -88,7 +88,7 @@ def content(self) -> ContentRequestBuilder: @dataclass class FilesFolderRequestBuilderGetQueryParameters(): """ - Get the metadata for the location where the files of a channel are stored. + Get the metadata for the location where the files of a channel are stored. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_response.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_post_response.py similarity index 93% rename from msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_response.py rename to msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_post_response.py index bf7f1aca1fd..0ae8263f494 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/add/add_response.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_post_response.py @@ -10,20 +10,20 @@ from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class AddResponse(BaseCollectionPaginationCountResponse): +class AddPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ActionResultPart]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> AddPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: AddResponse + Returns: AddPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return AddResponse() + return AddPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_request_builder.py index 48c79a76e24..c909860c6ff 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/add/add_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError from .add_post_request_body import AddPostRequestBody - from .add_response import AddResponse + from .add_post_response import AddPostResponse class AddRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/members/add", path_parameters) - async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddResponse]: + async def post(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> Optional[AddPostResponse]: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[AddResponse] + Returns: Optional[AddPostResponse] Find more info here: https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[AddPostRequestBody] = None, request_configura } if not self.request_adapter: raise Exception("Http core is null") - from .add_response import AddResponse + from .add_post_response import AddPostResponse - return await self.request_adapter.send_async(request_info, AddResponse, error_mapping) + return await self.request_adapter.send_async(request_info, AddPostResponse, error_mapping) def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, request_configuration: Optional[AddRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. + Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[AddPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/count/count_request_builder.py index 2fdfc08bc36..a2e65a30e55 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: 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 47aedc5b753..a43b8b5f240 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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/channel-delete-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] Find more info here: https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ConversationMemberItemRequest async def patch(self,body: Optional[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,39 +95,39 @@ 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. This operation is allowed only for channels with a membershipType value of private or shared. + Delete a conversationMember from a channel. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[ConversationMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Get a conversationMember from a channel. + Get a conversationMember from a channel. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/members_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/members_request_builder.py index 1edd0814e0b..746f06018ee 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/members_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/members_request_builder.py @@ -46,7 +46,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0 @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ConversationMember] = None, request_configura def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ConversationMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Add a conversationMember to a channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ConversationMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. + Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/count/count_request_builder.py index 358ce9147e3..1d7b555b4d7 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_response.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_response.py rename to msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_get_response.py index b172edeb11a..fe1e2d1e0db 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_response.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_request_builder.py index 9573bca9698..7e7d2c99638 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/chat_message_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/chat_message_item_request_builder.py index e841e46ff38..56acf325f0b 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/chat_message_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/chat_message_item_request_builder.py @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilder async def patch(self,body: Optional[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -105,34 +105,34 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. + Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py index d8ec3b276c4..927cead73dd 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py index 1a42d3b53ef..4da36d062b8 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 71c1400f809..46534213ff8 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py index 8ffff3caceb..0aee2a6b297 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/count/count_request_builder.py index 4f7e5b2415c..107e6a49032 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_response.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_response.py rename to msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_get_response.py index eb3db87a02e..215b257baaf 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_response.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ..........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[ChatMessage]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py index 6eaa121b4ea..c77dce341f9 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ..........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py index 2376ec7245c..bf3a39c0ee4 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/chat_message_item_request_builder.py @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[ChatMessageItemRequestBuil async def get(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[ChatMessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[ChatMessage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class ChatMessageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class ChatMessageItemRequestBuilderGetQueryParameters(): """ - Retrieve a single message or a message reply in a channel or a chat. + Retrieve a single message or a message reply in a channel or a chat. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py index 9892d9566fb..f3d8d4bab96 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py index 816412f3d1e..c6fc17d70ee 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.py @@ -45,7 +45,7 @@ def by_chat_message_hosted_content_id(self,chat_message_hosted_content_id: str) async def get(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContentCollectionResponse]: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[ChatMessageHostedContent] = None, request_con def to_get_request_information(self,request_configuration: Optional[HostedContentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[HostedContentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HostedContentsRequestBuilderGetQueryParameters(): """ - Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py index 2e095f03ae4..d434c41ddca 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChatMessageHostedContentIt async def get(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageHostedContent]: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageHostedContent] Find more info here: https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ChatMessa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessageHostedContent] = None, request_configuration: Optional[ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ChatMessageHostedContent] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration(BaseR @dataclass class ChatMessageHostedContentItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of chatMessageHostedContent object. + Retrieve the properties and relationships of chatMessageHostedContent object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py index 69aabc9bea0..8f3b88aad0c 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/hosted_contents/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py index d3afd7db6af..55acdd2e556 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py index ab641ab6f82..9dbd77882d8 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py index d71d7f5cc74..1dd4f15fee1 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py index 997d18eb443..79900b5311c 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 f03be339d77..e7ec6b8ca43 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 @@ -46,7 +46,7 @@ def by_chat_message_id1(self,chat_message_id1: str) -> ChatMessageItemRequestBui async def get(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RepliesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class RepliesRequestBuilderGetQueryParameters(): """ - List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py index d0f6a82dc62..7c7332dacbd 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/set_reaction/set_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[SetReactionPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py index ed9ab8bc913..f072988fcc6 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/soft_delete/soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-softdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SoftDeleteRequestBuilderPost def to_post_request_information(self,request_configuration: Optional[SoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Delete a single chatMessage or a chat message reply in a channel or a chat. + Delete a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py index 35ba7168369..d5805d5a286 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/undo_soft_delete/undo_soft_delete_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> None: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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/chatmessage-undosoftdelete?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UndoSoftDeleteRequestBuilder def to_post_request_information(self,request_configuration: Optional[UndoSoftDeleteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UndoSoftDeleteRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py index ca6b24f16b7..5a3ba11654b 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/unset_reaction/unset_reaction_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[UnsetReactionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 5bdf1f3cf71..8f41d092e0a 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 @@ -46,7 +46,7 @@ def by_chat_message_id(self,chat_message_id: str) -> ChatMessageItemRequestBuild async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[ChatMessageCollectionResponse]: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0 @@ -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. This API is available in the following national cloud deployments. 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.") @@ -93,24 +93,24 @@ async def post(self,body: Optional[ChatMessage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[ChatMessage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). + Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/primary_channel_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/primary_channel_request_builder.py index cc867326fbd..6019dbfd31a 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/primary_channel_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/primary_channel_request_builder.py @@ -56,7 +56,7 @@ async def delete(self,request_configuration: Optional[PrimaryChannelRequestBuild async def get(self,request_configuration: Optional[PrimaryChannelRequestBuilderGetRequestConfiguration] = None) -> Optional[Channel]: """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Channel] Find more info here: https://learn.microsoft.com/graph/api/team-get-primarychannel?view=graph-rest-1.0 @@ -107,29 +107,29 @@ def to_delete_request_information(self,request_configuration: Optional[PrimaryCh Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PrimaryChannelRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Channel] = None, request_configuration: Optional[PrimaryChannelRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -142,13 +142,13 @@ def to_patch_request_information(self,body: Optional[Channel] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -256,7 +256,7 @@ class PrimaryChannelRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class PrimaryChannelRequestBuilderGetQueryParameters(): """ - Get the default channel, General, of a team. + Get the default channel, General, of a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/provision_email/provision_email_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/provision_email/provision_email_request_builder.py index e6ec062d7cc..917eec3c53c 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/provision_email/provision_email_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/provision_email/provision_email_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> Optional[ProvisionChannelEmailResult]: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProvisionChannelEmailResult] Find more info here: https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ProvisionEmailRequestBuilder def to_post_request_information(self,request_configuration: Optional[ProvisionEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. + Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ProvisionEmailRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/remove_email/remove_email_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/remove_email/remove_email_request_builder.py index 2a7f1b1fd77..b017081d16f 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/remove_email/remove_email_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/remove_email/remove_email_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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/channel-removeemail?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[RemoveEmailRequestBuilderPos def to_post_request_information(self,request_configuration: Optional[RemoveEmailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. + Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveEmailRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/count/count_request_builder.py index d3778964908..83940001ada 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py index 05a30dc7906..3b107a4c55b 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/allowed_members_request_builder.py @@ -44,7 +44,7 @@ def by_conversation_member_id(self,conversation_member_id: str) -> ConversationM async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMemberCollectionResponse]: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[AllowedMembersRequestBuilderG def to_get_request_information(self,request_configuration: Optional[AllowedMembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AllowedMembersRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AllowedMembersRequestBuilderGetQueryParameters(): """ - Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant + Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py index fdf900927db..f9eb1551c03 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py index 37989264923..494c680a9b0 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/allowed_members/item/conversation_member_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[Conversation Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ConversationMemberItemRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py index 879b86896f0..e8831086bbe 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/shared_with_channel_team_info_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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/sharedwithchannelteaminfo-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[SharedWithChannelTeamInfoI async def get(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfo]: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfo] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0 @@ -96,34 +96,34 @@ async def patch(self,body: Optional[SharedWithChannelTeamInfo] = None, request_c def to_delete_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. + Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithChannelTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SharedWithChannelTeamInfo] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -187,7 +187,7 @@ class SharedWithChannelTeamInfoItemRequestBuilderDeleteRequestConfiguration(Base @dataclass class SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters(): """ - Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py index 345433c8997..d7c7736888c 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py index 772e1e85aa7..2afa5ec9f65 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/shared_with_teams/shared_with_teams_request_builder.py @@ -45,7 +45,7 @@ def by_shared_with_channel_team_info_id(self,shared_with_channel_team_info_id: s async def get(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[SharedWithChannelTeamInfoCollectionResponse]: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SharedWithChannelTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SharedWithChannelTeamInfo] = None, request_co def to_get_request_information(self,request_configuration: Optional[SharedWithTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SharedWithChannelTeamInfo] = None, request_configuration: Optional[SharedWithTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SharedWithChannelTeamInfo] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SharedWithTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. + Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/count/count_request_builder.py index 39aef6ab580..4aa747c4e37 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py index a78bc904d51..9b396827600 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_app/teams_app_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsApp]: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsApp] """ @@ -49,19 +49,19 @@ async def get(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: @@ -77,7 +77,7 @@ def with_url(self,raw_url: Optional[str] = None) -> TeamsAppRequestBuilder: @dataclass class TeamsAppRequestBuilderGetQueryParameters(): """ - The application that is linked to the tab. This cannot be changed after tab creation. + The application that is linked to the tab. This can't be changed after tab creation. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py index 9d731d8519e..c90ac36758d 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/item/teams_tab_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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/channel-delete-tabs?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamsTabItemRequestBuilder async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] Find more info here: https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamsTabItemRequestBuilderGet async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamsTab] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Removes (unpins) a tab from the specified channel within a team. + Removes (unpins) a tab from the specified channel within a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamsTabItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TeamsTabItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified tab.This can be used to configure the content of the tab. + Update the properties of the specified tab.This can be used to configure the content of the tab. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamsTab] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamsTabItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TeamsTabItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of the specified tab in a channel within a team. + Retrieve the properties and relationships of the specified tab in a channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/tabs_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/tabs_request_builder.py index c309511babb..a5903c175c5 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/tabs_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/tabs/tabs_request_builder.py @@ -45,7 +45,7 @@ def by_teams_tab_id(self,teams_tab_id: str) -> TeamsTabItemRequestBuilder: async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamsTabCollectionResponse]: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTabCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TabsRequestBuilderGetRequestC async def post(self,body: Optional[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamsTab]: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamsTab] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamsTab] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TabsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamsTab] = None, request_configuration: Optional[TabsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. + Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamsTab] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TabsRequestBuilderGetQueryParameters(): """ - Retrieve the list of tabs in the specified channel within a team. + Retrieve the list of tabs in the specified channel within a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/count/count_request_builder.py index 259cba7a369..0281495da4c 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py index 946d9337be7..e831784136f 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/item/offer_shift_request_item_request_builder.py @@ -10,8 +10,8 @@ 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.offer_shift_request import OfferShiftRequest + from ........models.o_data_errors.o_data_error import ODataError class OfferShiftRequestItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OfferShiftRequestItemReque async def get(self,request_configuration: Optional[OfferShiftRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OfferShiftRequest]: """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequest] Find more info here: https://learn.microsoft.com/graph/api/offershiftrequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OfferShif Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OfferShiftRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OfferShiftRequest] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OfferShiftRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class OfferShiftRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an offerShiftRequest object. + Retrieve the properties and relationships of an offerShiftRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py index 869c164645f..db920437610 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/offer_shift_requests/offer_shift_requests_request_builder.py @@ -10,9 +10,9 @@ 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.offer_shift_request import OfferShiftRequest from .......models.offer_shift_request_collection_response import OfferShiftRequestCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.offer_shift_request_item_request_builder import OfferShiftRequestItemRequestBuilder @@ -45,7 +45,7 @@ def by_offer_shift_request_id(self,offer_shift_request_id: str) -> OfferShiftReq async def get(self,request_configuration: Optional[OfferShiftRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[OfferShiftRequestCollectionResponse]: """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/offershiftrequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OfferShiftRequestsRequestBuil async def post(self,body: Optional[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[OfferShiftRequest]: """ - Create an instance of an offerShiftRequest. + Create an instance of an offerShiftRequest. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OfferShiftRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OfferShiftRequest] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[OfferShiftRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OfferShiftRequest] = None, request_configuration: Optional[OfferShiftRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of an offerShiftRequest. + Create an instance of an offerShiftRequest. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OfferShiftRequest] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OfferShiftRequestsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of all offerShiftRequest objects in a team. + Retrieve the properties and relationships of all offerShiftRequest objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/count/count_request_builder.py index c16564627a1..fae6750c151 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py index ec505011e8a..06471110ce6 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/item/open_shift_change_request_item_request_builder.py @@ -10,8 +10,8 @@ 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.open_shift_change_request import OpenShiftChangeRequest + from ........models.o_data_errors.o_data_error import ODataError class OpenShiftChangeRequestItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OpenShiftChangeRequestItem async def get(self,request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftChangeRequest]: """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequest] Find more info here: https://learn.microsoft.com/graph/api/openshiftchangerequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OpenShift Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OpenShiftChangeRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OpenShiftChangeRequestItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class OpenShiftChangeRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an openShiftChangeRequest object. + Retrieve the properties and relationships of an openShiftChangeRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py index de4fe15589c..8a261391355 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/open_shift_change_requests/open_shift_change_requests_request_builder.py @@ -10,9 +10,9 @@ 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.open_shift_change_request import OpenShiftChangeRequest from .......models.open_shift_change_request_collection_response import OpenShiftChangeRequestCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.open_shift_change_request_item_request_builder import OpenShiftChangeRequestItemRequestBuilder @@ -45,7 +45,7 @@ def by_open_shift_change_request_id(self,open_shift_change_request_id: str) -> O async def get(self,request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftChangeRequestCollectionResponse]: """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/openshiftchangerequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OpenShiftChangeRequestsReques async def post(self,body: Optional[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[OpenShiftChangeRequest]: """ - Create instance of an openShiftChangeRequest object. + Create instance of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftChangeRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OpenShiftChangeRequest] = None, request_confi def to_get_request_information(self,request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShiftChangeRequest] = None, request_configuration: Optional[OpenShiftChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create instance of an openShiftChangeRequest object. + Create instance of an openShiftChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OpenShiftChangeRequest] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OpenShiftChangeRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of openShiftChangeRequest objects in a team. + Retrieve a list of openShiftChangeRequest objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/count/count_request_builder.py index 754fcb10b5d..8884d156c13 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py index 8d2313afdd1..a74bfd57beb 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/item/open_shift_item_request_builder.py @@ -10,8 +10,8 @@ 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.open_shift import OpenShift + from ........models.o_data_errors.o_data_error import ODataError class OpenShiftItemRequestBuilder(BaseRequestBuilder): """ @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OpenShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an openShift object. + Delete an openShift object. This API is available in the following national cloud deployments. 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/openshift-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OpenShiftItemRequestBuilde async def get(self,request_configuration: Optional[OpenShiftItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShift]: """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShift] Find more info here: https://learn.microsoft.com/graph/api/openshift-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[OpenShift] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[OpenShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an openShift object. + Delete an openShift object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OpenShiftItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShift] = None, request_configuration: Optional[OpenShiftItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[OpenShift] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class OpenShiftItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class OpenShiftItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an openshift object. + Retrieve the properties and relationships of an openshift object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/open_shifts_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/open_shifts_request_builder.py index af20b21f4ff..2165e058de9 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/open_shifts_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/open_shifts/open_shifts_request_builder.py @@ -10,9 +10,9 @@ 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.open_shift import OpenShift from .......models.open_shift_collection_response import OpenShiftCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.open_shift_item_request_builder import OpenShiftItemRequestBuilder @@ -45,7 +45,7 @@ def by_open_shift_id(self,open_shift_id: str) -> OpenShiftItemRequestBuilder: async def get(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRequestConfiguration] = None) -> Optional[OpenShiftCollectionResponse]: """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShiftCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/openshift-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRe async def post(self,body: Optional[OpenShift] = None, request_configuration: Optional[OpenShiftsRequestBuilderPostRequestConfiguration] = None) -> Optional[OpenShift]: """ - Create an instance of an openShift object. + Create an instance of an openShift object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OpenShift] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OpenShift] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[OpenShiftsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OpenShift] = None, request_configuration: Optional[OpenShiftsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of an openShift object. + Create an instance of an openShift object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OpenShift] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OpenShiftsRequestBuilderGetQueryParameters(): """ - List openShift objects in a team. + List openShift objects in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/schedule_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/schedule_request_builder.py index 1856fcad809..209e0a12d75 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/schedule_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/schedule_request_builder.py @@ -13,15 +13,15 @@ from ......models.o_data_errors.o_data_error import ODataError from ......models.schedule import Schedule from .offer_shift_requests.offer_shift_requests_request_builder import OfferShiftRequestsRequestBuilder - from .open_shift_change_requests.open_shift_change_requests_request_builder import OpenShiftChangeRequestsRequestBuilder from .open_shifts.open_shifts_request_builder import OpenShiftsRequestBuilder + from .open_shift_change_requests.open_shift_change_requests_request_builder import OpenShiftChangeRequestsRequestBuilder from .scheduling_groups.scheduling_groups_request_builder import SchedulingGroupsRequestBuilder from .share.share_request_builder import ShareRequestBuilder from .shifts.shifts_request_builder import ShiftsRequestBuilder from .swap_shifts_change_requests.swap_shifts_change_requests_request_builder import SwapShiftsChangeRequestsRequestBuilder + from .times_off.times_off_request_builder import TimesOffRequestBuilder from .time_off_reasons.time_off_reasons_request_builder import TimeOffReasonsRequestBuilder from .time_off_requests.time_off_requests_request_builder import TimeOffRequestsRequestBuilder - from .times_off.times_off_request_builder import TimesOffRequestBuilder class ScheduleRequestBuilder(BaseRequestBuilder): """ @@ -57,7 +57,7 @@ async def delete(self,request_configuration: Optional[ScheduleRequestBuilderDele async def get(self,request_configuration: Optional[ScheduleRequestBuilderGetRequestConfiguration] = None) -> Optional[Schedule]: """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Schedule] Find more info here: https://learn.microsoft.com/graph/api/schedule-get?view=graph-rest-1.0 @@ -108,29 +108,29 @@ def to_delete_request_information(self,request_configuration: Optional[ScheduleR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScheduleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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_put_request_information(self,body: Optional[Schedule] = None, request_configuration: Optional[ScheduleRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -143,13 +143,13 @@ def to_put_request_information(self,body: Optional[Schedule] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -266,7 +266,7 @@ class ScheduleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ScheduleRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. + Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/count/count_request_builder.py index c39dfb52444..862f4371b45 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py index 033af192f88..af81c21534f 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/item/scheduling_group_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. + Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. This API is available in the following national cloud deployments. 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/schedulinggroup-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SchedulingGroupItemRequest async def get(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SchedulingGroup]: """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroup] Find more info here: https://learn.microsoft.com/graph/api/schedulinggroup-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[SchedulingGroup] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. + Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SchedulingGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[SchedulingGroup] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class SchedulingGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class SchedulingGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a schedulingGroup by ID. + Retrieve the properties and relationships of a schedulingGroup by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py index f3e6fbcf3c8..10f30d00086 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/scheduling_groups/scheduling_groups_request_builder.py @@ -45,7 +45,7 @@ def by_scheduling_group_id(self,scheduling_group_id: str) -> SchedulingGroupItem async def get(self,request_configuration: Optional[SchedulingGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SchedulingGroupCollectionResponse]: """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-schedulinggroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SchedulingGroupsRequestBuilde async def post(self,body: Optional[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SchedulingGroup]: """ - Create a new schedulingGroup. + Create a new schedulingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SchedulingGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SchedulingGroup] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[SchedulingGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SchedulingGroup] = None, request_configuration: Optional[SchedulingGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new schedulingGroup. + Create a new schedulingGroup. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SchedulingGroup] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SchedulingGroupsRequestBuilderGetQueryParameters(): """ - Get the list of schedulingGroups in this schedule. + Get the list of schedulingGroups in this schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 710f36ebf42..fcd14c2a829 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.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. This API is available in the following national cloud deployments. 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.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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SharePostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/shifts/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/shifts/count/count_request_builder.py index 40f58057507..f17a2690637 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/shifts/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/shifts/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/shifts/item/shift_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/shifts/item/shift_item_request_builder.py index 04774a30937..a33cf2d0fed 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/shifts/item/shift_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/shifts/item/shift_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a shift from the schedule. + Delete a shift from the schedule. This API is available in the following national cloud deployments. 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/shift-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ShiftItemRequestBuilderDel async def get(self,request_configuration: Optional[ShiftItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Shift]: """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Shift] Find more info here: https://learn.microsoft.com/graph/api/shift-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[Shift] = None, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[ShiftItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a shift from the schedule. + Delete a shift from the schedule. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ShiftItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Shift] = None, request_configuration: Optional[ShiftItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[Shift] = None, request_conf if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ShiftItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration @dataclass class ShiftItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a shift object by ID. + Retrieve the properties and relationships of a shift object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/shifts/shifts_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/shifts/shifts_request_builder.py index 99d5d6a3cc3..7b3924dcf16 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/shifts/shifts_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/shifts/shifts_request_builder.py @@ -45,7 +45,7 @@ def by_shift_id(self,shift_id: str) -> ShiftItemRequestBuilder: async def get(self,request_configuration: Optional[ShiftsRequestBuilderGetRequestConfiguration] = None) -> Optional[ShiftCollectionResponse]: """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ShiftCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-shifts?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ShiftsRequestBuilderGetReques async def post(self,body: Optional[Shift] = None, request_configuration: Optional[ShiftsRequestBuilderPostRequestConfiguration] = None) -> Optional[Shift]: """ - Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. + Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Shift] @@ -92,24 +92,24 @@ async def post(self,body: Optional[Shift] = None, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[ShiftsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Shift] = None, request_configuration: Optional[ShiftsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. + Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Shift] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ShiftsRequestBuilderGetQueryParameters(): """ - Get the list of shift instances in a schedule. + Get the list of shift instances in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py index 6d36ab33790..ae32a4f59b6 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py index 3149d070566..5245b606cfb 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/item/swap_shifts_change_request_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[SwapShiftsChangeRequestIte async def get(self,request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequest]: """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequest] Find more info here: https://learn.microsoft.com/graph/api/swapshiftschangerequest-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[SwapShift Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[SwapShiftsChangeRequest] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class SwapShiftsChangeRequestItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class SwapShiftsChangeRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a swapShiftsChangeRequest object. + Retrieve the properties and relationships of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py index a03dede897a..33443d75db5 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/swap_shifts_change_requests/swap_shifts_change_requests_request_builder.py @@ -45,7 +45,7 @@ def by_swap_shifts_change_request_id(self,swap_shifts_change_request_id: str) -> async def get(self,request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequestCollectionResponse]: """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/swapshiftschangerequest-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SwapShiftsChangeRequestsReque async def post(self,body: Optional[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> Optional[SwapShiftsChangeRequest]: """ - Create an instance of a swapShiftsChangeRequest object. + Create an instance of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SwapShiftsChangeRequest] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SwapShiftsChangeRequest] = None, request_conf def to_get_request_information(self,request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SwapShiftsChangeRequest] = None, request_configuration: Optional[SwapShiftsChangeRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an instance of a swapShiftsChangeRequest object. + Create an instance of a swapShiftsChangeRequest object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SwapShiftsChangeRequest] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SwapShiftsChangeRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of swapShiftsChangeRequest objects in the team. + Retrieve a list of swapShiftsChangeRequest objects in the team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/count/count_request_builder.py index c0551e68ac1..67122cbe148 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py index dfc35d597af..bd935d2ceca 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/item/time_off_reason_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. + Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. This API is available in the following national cloud deployments. 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/timeoffreason-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffReasonItemRequestBu async def get(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffReason]: """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReason] Find more info here: https://learn.microsoft.com/graph/api/timeoffreason-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[TimeOffReason] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. + Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffReasonItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TimeOffReason] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class TimeOffReasonItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class TimeOffReasonItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeOffReason object by ID. + Retrieve the properties and relationships of a timeOffReason object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py index 11578ec1e44..d8b21127019 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_reasons/time_off_reasons_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_reason_id(self,time_off_reason_id: str) -> TimeOffReasonItemRequ async def get(self,request_configuration: Optional[TimeOffReasonsRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffReasonCollectionResponse]: """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReasonCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-timeoffreasons?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TimeOffReasonsRequestBuilderG async def post(self,body: Optional[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonsRequestBuilderPostRequestConfiguration] = None) -> Optional[TimeOffReason]: """ - Create a new timeOffReason. + Create a new timeOffReason. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffReason] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TimeOffReason] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[TimeOffReasonsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffReason] = None, request_configuration: Optional[TimeOffReasonsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new timeOffReason. + Create a new timeOffReason. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TimeOffReason] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimeOffReasonsRequestBuilderGetQueryParameters(): """ - Get the list of timeOffReasons in a schedule. + Get the list of timeOffReasons in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/count/count_request_builder.py index 0952bfa3df0..ce231509ce7 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py index 0c0c82fe990..e8bc53c69c0 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/item/time_off_request_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a timeOffRequest object. + Delete a timeOffRequest object. This API is available in the following national cloud deployments. 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/timeoffrequest-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffRequestItemRequestB async def get(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffRequest]: """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffRequest] Find more info here: https://learn.microsoft.com/graph/api/timeoffrequest-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[TimeOffRequest] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a timeOffRequest object. + Delete a timeOffRequest object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffRequestItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffRequest] = None, request_configuration: Optional[TimeOffRequestItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TimeOffRequest] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class TimeOffRequestItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class TimeOffRequestItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeoffrequest object. + Retrieve the properties and relationships of a timeoffrequest object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/time_off_requests_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/time_off_requests_request_builder.py index 079e7d81def..6f722755f36 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/time_off_requests_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/time_off_requests/time_off_requests_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_request_id(self,time_off_request_id: str) -> TimeOffRequestItemR async def get(self,request_configuration: Optional[TimeOffRequestsRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffRequestCollectionResponse]: """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffRequestCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/timeoffrequest-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[TimeOffRequest] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[TimeOffRequestsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOffRequest] = None, request_configuration: Optional[TimeOffRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[TimeOffRequest] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimeOffRequestsRequestBuilderGetQueryParameters(): """ - Retrieve a list of timeOffRequest objects in the team. + Retrieve a list of timeOffRequest objects in the team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/times_off/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/times_off/count/count_request_builder.py index 10c2f7dded8..07c4c9adc68 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/times_off/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/times_off/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/times_off/item/time_off_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/times_off/item/time_off_item_request_builder.py index efe28b9a5cf..ea09ade2b78 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/times_off/item/time_off_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/times_off/item/time_off_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TimeOffItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a timeOff instance from a schedule. + Delete a timeOff instance from a schedule. This API is available in the following national cloud deployments. 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/timeoff-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TimeOffItemRequestBuilderD async def get(self,request_configuration: Optional[TimeOffItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOff]: """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOff] Find more info here: https://learn.microsoft.com/graph/api/timeoff-get?view=graph-rest-1.0 @@ -95,34 +95,34 @@ async def patch(self,body: Optional[TimeOff] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[TimeOffItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a timeOff instance from a schedule. + Delete a timeOff instance from a schedule. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TimeOffItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOff] = None, request_configuration: Optional[TimeOffItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[TimeOff] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class TimeOffItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurati @dataclass class TimeOffItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a timeOff object by ID. + Retrieve the properties and relationships of a timeOff object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/schedule/times_off/times_off_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/times_off/times_off_request_builder.py index f3dc8aa7f37..bd399603fd6 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/times_off/times_off_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/times_off/times_off_request_builder.py @@ -45,7 +45,7 @@ def by_time_off_id(self,time_off_id: str) -> TimeOffItemRequestBuilder: async def get(self,request_configuration: Optional[TimesOffRequestBuilderGetRequestConfiguration] = None) -> Optional[TimeOffCollectionResponse]: """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOffCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/schedule-list-timesoff?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TimesOffRequestBuilderGetRequ async def post(self,body: Optional[TimeOff] = None, request_configuration: Optional[TimesOffRequestBuilderPostRequestConfiguration] = None) -> Optional[TimeOff]: """ - Create a new timeOff instance in a schedule. + Create a new timeOff instance in a schedule. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TimeOff] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TimeOff] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[TimesOffRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TimeOff] = None, request_configuration: Optional[TimesOffRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new timeOff instance in a schedule. + Create a new timeOff instance in a schedule. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TimeOff] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TimesOffRequestBuilderGetQueryParameters(): """ - Get the list of timeOff instances in a schedule. + Get the list of timeOff instances in a schedule. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/send_activity_notification/send_activity_notification_request_builder.py b/msgraph/generated/users/item/joined_teams/item/send_activity_notification/send_activity_notification_request_builder.py index 678003ca12e..3ddd2e4860a 100644 --- a/msgraph/generated/users/item/joined_teams/item/send_activity_notification/send_activity_notification_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/send_activity_notification/send_activity_notification_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationPostRequestBody] = No def to_post_request_information(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. + Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/tags/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/tags/count/count_request_builder.py index 8be85a67627..73cc7bf9e27 100644 --- a/msgraph/generated/users/item/joined_teams/item/tags/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/tags/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/tags/item/members/count/count_request_builder.py b/msgraph/generated/users/item/joined_teams/item/tags/item/members/count/count_request_builder.py index 4bbc28fab2b..1f9339c13bd 100644 --- a/msgraph/generated/users/item/joined_teams/item/tags/item/members/count/count_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/tags/item/members/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py index da1b182c707..6f484b5c053 100644 --- a/msgraph/generated/users/item/joined_teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/tags/item/members/item/teamwork_tag_member_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a member from a standard tag in a team. + Delete a member from a standard tag in a team. This API is available in the following national cloud deployments. 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/teamworktagmember-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[TeamworkTagMemberItemReque async def get(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagMember]: """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMember] Find more info here: https://learn.microsoft.com/graph/api/teamworktagmember-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[TeamworkTagMember] = None, request_configura def to_delete_request_information(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a member from a standard tag in a team. + Delete a member from a standard tag in a team. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkTagMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTagMember] = None, request_configuration: Optional[TeamworkTagMemberItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[TeamworkTagMember] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class TeamworkTagMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class TeamworkTagMemberItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a member of a standard tag in a team. + Get the properties and relationships of a member of a standard tag in a team. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/tags/item/members/members_request_builder.py b/msgraph/generated/users/item/joined_teams/item/tags/item/members/members_request_builder.py index ad7d1355794..83e72f2e488 100644 --- a/msgraph/generated/users/item/joined_teams/item/tags/item/members/members_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/tags/item/members/members_request_builder.py @@ -45,7 +45,7 @@ def by_teamwork_tag_member_id(self,teamwork_tag_member_id: str) -> TeamworkTagMe async def get(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagMemberCollectionResponse]: """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMemberCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamworktagmember-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[MembersRequestBuilderGetReque async def post(self,body: Optional[TeamworkTagMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamworkTagMember]: """ - Create a new teamworkTagMember object in a team. + Create a new teamworkTagMember object in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagMember] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamworkTagMember] = None, request_configurat def to_get_request_information(self,request_configuration: Optional[MembersRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTagMember] = None, request_configuration: Optional[MembersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new teamworkTagMember object in a team. + Create a new teamworkTagMember object in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamworkTagMember] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MembersRequestBuilderGetQueryParameters(): """ - Get a list of the members of a standard tag in a team and their properties. + Get a list of the members of a standard tag in a team and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/tags/item/teamwork_tag_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/tags/item/teamwork_tag_item_request_builder.py index c5b33ac2108..d378e126af9 100644 --- a/msgraph/generated/users/item/joined_teams/item/tags/item/teamwork_tag_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/tags/item/teamwork_tag_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TeamworkTagItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a tag object permanently. + Delete a tag object permanently. This API is available in the following national cloud deployments. 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/teamworktag-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[TeamworkTagItemRequestBuil async def get(self,request_configuration: Optional[TeamworkTagItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] Find more info here: https://learn.microsoft.com/graph/api/teamworktag-get?view=graph-rest-1.0 @@ -71,7 +71,7 @@ async def get(self,request_configuration: Optional[TeamworkTagItemRequestBuilder async def patch(self,body: Optional[TeamworkTag] = None, request_configuration: Optional[TeamworkTagItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Update the properties of a tag object. + Update the properties of a tag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] @@ -96,39 +96,39 @@ async def patch(self,body: Optional[TeamworkTag] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[TeamworkTagItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a tag object permanently. + Delete a tag object permanently. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkTagItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTag] = None, request_configuration: Optional[TeamworkTagItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a tag object. + Update the properties of a tag object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[TeamworkTag] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -178,7 +178,7 @@ class TeamworkTagItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class TeamworkTagItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a tag object. + Read the properties and relationships of a tag object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/tags/tags_request_builder.py b/msgraph/generated/users/item/joined_teams/item/tags/tags_request_builder.py index 1f9c7380d5f..79e34fe5e03 100644 --- a/msgraph/generated/users/item/joined_teams/item/tags/tags_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/tags/tags_request_builder.py @@ -45,7 +45,7 @@ def by_teamwork_tag_id(self,teamwork_tag_id: str) -> TeamworkTagItemRequestBuild async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamworkTagCollectionResponse]: """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTagCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/teamworktag-list?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[TagsRequestBuilderGetRequestC async def post(self,body: Optional[TeamworkTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> Optional[TeamworkTag]: """ - Create a standard tag for members in a team. + Create a standard tag for members in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamworkTag] @@ -92,24 +92,24 @@ async def post(self,body: Optional[TeamworkTag] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TagsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TeamworkTag] = None, request_configuration: Optional[TagsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a standard tag for members in a team. + Create a standard tag for members in a team. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[TeamworkTag] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TagsRequestBuilderGetQueryParameters(): """ - Get a list of the tag objects and their properties. + Get a list of the tag objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/joined_teams/item/team_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/team_item_request_builder.py index 74ce7e1f390..a80d1e634df 100644 --- a/msgraph/generated/users/item/joined_teams/item/team_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/team_item_request_builder.py @@ -115,12 +115,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamItemR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -130,14 +130,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamItemRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Team] = None, request_configuration: Optional[TeamItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -150,13 +150,13 @@ def to_patch_request_information(self,body: Optional[Team] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/joined_teams/item/template/template_request_builder.py b/msgraph/generated/users/item/joined_teams/item/template/template_request_builder.py index f0821da032a..2b7a60b8622 100644 --- a/msgraph/generated/users/item/joined_teams/item/template/template_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/template/template_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TemplateRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TemplateRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/item/unarchive/unarchive_request_builder.py b/msgraph/generated/users/item/joined_teams/item/unarchive/unarchive_request_builder.py index 7aa3728dd41..72d3e2a4502 100644 --- a/msgraph/generated/users/item/joined_teams/item/unarchive/unarchive_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/unarchive/unarchive_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> None: """ - Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. + Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. This API is available in the following national cloud deployments. 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/team-unarchive?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[UnarchiveRequestBuilderPostR def to_post_request_information(self,request_configuration: Optional[UnarchiveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. + Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> UnarchiveRequestBuilder: diff --git a/msgraph/generated/users/item/joined_teams/joined_teams_request_builder.py b/msgraph/generated/users/item/joined_teams/joined_teams_request_builder.py index cd6df3d5191..8c53925c32e 100644 --- a/msgraph/generated/users/item/joined_teams/joined_teams_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/joined_teams_request_builder.py @@ -46,7 +46,7 @@ def by_team_id(self,team_id: str) -> TeamItemRequestBuilder: async def get(self,request_configuration: Optional[JoinedTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[TeamCollectionResponse]: """ - Get the teams in Microsoft Teams that the user is a direct member of. + Get the teams in Microsoft Teams that the user is a direct member of. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TeamCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-joinedteams?view=graph-rest-1.0 @@ -92,19 +92,19 @@ async def post(self,body: Optional[Team] = None, request_configuration: Optional def to_get_request_information(self,request_configuration: Optional[JoinedTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the teams in Microsoft Teams that the user is a direct member of. + Get the teams in Microsoft Teams that the user is a direct member of. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Team] = None, request_configuration: Optional[JoinedTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[Team] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -158,7 +158,7 @@ def get_all_messages(self) -> GetAllMessagesRequestBuilder: @dataclass class JoinedTeamsRequestBuilderGetQueryParameters(): """ - Get the teams in Microsoft Teams that the user is a direct member of. + Get the teams in Microsoft Teams that the user is a direct member of. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/license_details/count/count_request_builder.py b/msgraph/generated/users/item/license_details/count/count_request_builder.py index 56b6df103a7..1a9b9af6d78 100644 --- a/msgraph/generated/users/item/license_details/count/count_request_builder.py +++ b/msgraph/generated/users/item/license_details/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/license_details/item/license_details_item_request_builder.py b/msgraph/generated/users/item/license_details/item/license_details_item_request_builder.py index 2abc35898ed..10c24f0f662 100644 --- a/msgraph/generated/users/item/license_details/item/license_details_item_request_builder.py +++ b/msgraph/generated/users/item/license_details/item/license_details_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[LicenseDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LicenseDetailsItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[LicenseDetai Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LicenseDetails] = None, request_configuration: Optional[LicenseDetailsItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[LicenseDetails] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/license_details/license_details_request_builder.py b/msgraph/generated/users/item/license_details/license_details_request_builder.py index 63214e0f5c7..e95facd4132 100644 --- a/msgraph/generated/users/item/license_details/license_details_request_builder.py +++ b/msgraph/generated/users/item/license_details/license_details_request_builder.py @@ -45,7 +45,7 @@ def by_license_details_id(self,license_details_id: str) -> LicenseDetailsItemReq async def get(self,request_configuration: Optional[LicenseDetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[LicenseDetailsCollectionResponse]: """ - Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. + Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LicenseDetailsCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-licensedetails?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[LicenseDetails] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[LicenseDetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. + Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LicenseDetails] = None, request_configuration: Optional[LicenseDetailsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[LicenseDetails] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LicenseDetailsRequestBuilderGetQueryParameters(): """ - Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. + Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/count/count_request_builder.py index 682c8022eb9..77a955d1cfe 100644 --- a/msgraph/generated/users/item/mail_folders/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/delta/delta_response.py b/msgraph/generated/users/item/mail_folders/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/mail_folders/delta/delta_response.py rename to msgraph/generated/users/item/mail_folders/delta/delta_get_response.py index fcb99e54bf9..a99d69f2718 100644 --- a/msgraph/generated/users/item/mail_folders/delta/delta_response.py +++ b/msgraph/generated/users/item/mail_folders/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[MailFolder]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/mail_folders/delta/delta_request_builder.py b/msgraph/generated/users/item/mail_folders/delta/delta_request_builder.py index c780be52e63..5bfc4895625 100644 --- a/msgraph/generated/users/item/mail_folders/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/mailFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. + Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/mailfolder-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. + Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. + Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 aeb21e377ff..c777e777cb3 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. This API is available in the following national cloud deployments. 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.") @@ -98,19 +98,19 @@ def to_get_request_information(self,request_configuration: Optional[ChildFolders Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[MailFolder] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/count/count_request_builder.py index 62109405383..796e8dc5548 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_response.py b/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_response.py rename to msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_get_response.py index 58ce2ad05ed..d1a2ec2422a 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_response.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[MailFolder]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_request_builder.py index ce4c95856c7..dc8e75ebf6c 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}/childFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. + Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/mailfolder-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. + Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. + Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/copy/copy_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/copy/copy_request_builder.py index cb44cb4e11b..1ef2e089189 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/copy/copy_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/copy/copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> Optional[MailFolder]: """ - Copy a mailfolder and its contents to another mailfolder. + Copy a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyPostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a mailfolder and its contents to another mailfolder. + Copy a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py index 35181c4c953..2710e936532 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py @@ -13,8 +13,8 @@ from .......models.mail_folder import MailFolder from .......models.o_data_errors.o_data_error import ODataError from .copy.copy_request_builder import CopyRequestBuilder - from .message_rules.message_rules_request_builder import MessageRulesRequestBuilder from .messages.messages_request_builder import MessagesRequestBuilder + from .message_rules.message_rules_request_builder import MessageRulesRequestBuilder from .move.move_request_builder import MoveRequestBuilder class MailFolderItemRequestBuilder(BaseRequestBuilder): @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[MailFolde Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MailFolderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[MailFolderIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailFolder] = None, request_configuration: Optional[MailFolderItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[MailFolder] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py index 9cf6fc8e458..3fa4a258191 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py index 51ef553468d..e9e3f245228 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[MessageRuleItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the specified messageRule object. + Delete the specified messageRule object. This API is available in the following national cloud deployments. 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/messagerule-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MessageRuleItemRequestBuil async def get(self,request_configuration: Optional[MessageRuleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MessageRule]: """ - Get the properties and relationships of a messageRule object. + Get the properties and relationships of a messageRule object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRule] Find more info here: https://learn.microsoft.com/graph/api/messagerule-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[MessageRuleItemRequestBuilder async def patch(self,body: Optional[MessageRule] = None, request_configuration: Optional[MessageRuleItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MessageRule]: """ - Change writable properties on a messageRule object and save the changes. + Change writable properties on a messageRule object and save the changes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRule] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[MessageRule] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[MessageRuleItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the specified messageRule object. + Delete the specified messageRule object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MessageRuleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a messageRule object. + Get the properties and relationships of a messageRule object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MessageRule] = None, request_configuration: Optional[MessageRuleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Change writable properties on a messageRule object and save the changes. + Change writable properties on a messageRule object and save the changes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[MessageRule] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class MessageRuleItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class MessageRuleItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a messageRule object. + Get the properties and relationships of a messageRule object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py index 5ee3fde928e..a284c7ebbe9 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py @@ -45,7 +45,7 @@ def by_message_rule_id(self,message_rule_id: str) -> MessageRuleItemRequestBuild async def get(self,request_configuration: Optional[MessageRulesRequestBuilderGetRequestConfiguration] = None) -> Optional[MessageRuleCollectionResponse]: """ - Get all the messageRule objects defined for the user's inbox. + Get all the messageRule objects defined for the user's inbox. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRuleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/mailfolder-list-messagerules?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[MessageRulesRequestBuilderGet async def post(self,body: Optional[MessageRule] = None, request_configuration: Optional[MessageRulesRequestBuilderPostRequestConfiguration] = None) -> Optional[MessageRule]: """ - Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. + Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRule] @@ -92,24 +92,24 @@ async def post(self,body: Optional[MessageRule] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessageRulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the messageRule objects defined for the user's inbox. + Get all the messageRule objects defined for the user's inbox. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MessageRule] = None, request_configuration: Optional[MessageRulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. + Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MessageRule] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MessageRulesRequestBuilderGetQueryParameters(): """ - Get all the messageRule objects defined for the user's inbox. + Get all the messageRule objects defined for the user's inbox. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py index 43717b4602f..be25afc7e41 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_response.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_response.py rename to msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_get_response.py index 8ebcda0f42b..12333633f0c 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_response.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Message]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_request_builder.py index 9f5a888eb95..0979a347757 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/message-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 76cde2436c0..b278cfb3d5d 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 @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/eventmessage-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py index a6629c4c7e0..db2c477d8f6 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py index 5c1487e99aa..18db0a1402b 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py index 6c012c26bef..df281bd3949 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AttachmentItemRequestBuild async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Attachment]: """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. 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/attachment-get?view=graph-rest-1.0 @@ -74,29 +74,29 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: @@ -122,7 +122,7 @@ class AttachmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class AttachmentItemRequestBuilderGetQueryParameters(): """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/copy/copy_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/copy/copy_request_builder.py index 1b76504e8cd..5d0a8d1be0a 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/copy/copy_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/copy/copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Copy a message to a folder within the user's mailbox. + Copy a message to a folder within the user's mailbox. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyPostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a message to a folder within the user's mailbox. + Copy a message to a folder within the user's mailbox. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_forward/create_forward_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_forward/create_forward_request_builder.py index 81175017fb4..93b2ab25240 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_forward/create_forward_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_forward/create_forward_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateForwardPostRequestBody] = None, request_configuration: Optional[CreateForwardRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. + Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateForwardPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CreateForwardPostRequestBody] = None, request_configuration: Optional[CreateForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. + Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateForwardPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply/create_reply_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply/create_reply_request_builder.py index 3aed53b40aa..b75baabdf4f 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply/create_reply_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply/create_reply_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateReplyPostRequestBody] = None, request_configuration: Optional[CreateReplyRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. + Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateReplyPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[CreateReplyPostRequestBody] = None, request_configuration: Optional[CreateReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. + Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateReplyPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py index 5ebf232e022..cfe43fab4a5 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateReplyAllPostRequestBody] = None, request_configuration: Optional[CreateReplyAllRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. + Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateReplyAllPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CreateReplyAllPostRequestBody] = None, request_configuration: Optional[CreateReplyAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. + Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateReplyAllPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py index 213e3831568..696a342047b 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py index 16ce7e5139b..15558cdc9f3 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py index 498277a30b2..ade9e0442d5 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. + Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. This API is available in the following national cloud deployments. 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-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[Extension] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. + Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/forward/forward_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/forward/forward_request_builder.py index 1a0c7e4ffaa..4c7344574d2 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. + Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. + Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py index 44198fb6fcd..8ce648f1f45 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[MessageIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,14 +124,14 @@ def to_get_request_information(self,request_configuration: Optional[MessageItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Message] = None, request_configuration: Optional[MessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Message] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/move/move_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/move/move_request_builder.py index d03cb0da337..67d1fd7d526 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/move/move_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/move/move_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. + Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MovePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. + Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply/reply_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply/reply_request_builder.py index bf74bbfe7aa..055d4b7402f 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply/reply_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply/reply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. + Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. + Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply_all/reply_all_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply_all/reply_all_request_builder.py index a671d0f3c58..0074e34fd4b 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply_all/reply_all_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/reply_all/reply_all_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyAllPostRequestBody] = None, request_configuration: Optional[ReplyAllRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. + Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. This API is available in the following national cloud deployments. 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[ReplyAllPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[ReplyAllPostRequestBody] = None, request_configuration: Optional[ReplyAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. + Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyAllPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/send/send_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/send/send_request_builder.py index 61e4e69a898..f6dba57a4ed 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/send/send_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/send/send_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SendRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. + Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. This API is available in the following national cloud deployments. 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/message-send?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SendRequestBuilderPostReques def to_post_request_information(self,request_configuration: Optional[SendRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. + Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SendRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py index 94dedd624d0..9d5b6bfadea 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py index 28ce9d929fe..83ab024a884 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py @@ -46,7 +46,7 @@ def by_message_id(self,message_id: str) -> MessageItemRequestBuilder: async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[MessageCollectionResponse]: """ - Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. + Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. This API is available in the following national cloud deployments. 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/mailfolder-list-messages?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[Message] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Use this API to create a new Message in a mailfolder. + Use this API to create a new Message in a mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Message] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. + Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Message] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new Message in a mailfolder. + Use this API to create a new Message in a mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Message] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. + Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/child_folders/item/move/move_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/move/move_request_builder.py index 17ed2cdbe3c..cb409015c16 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/move/move_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/move/move_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> Optional[MailFolder]: """ - Move a mailfolder and its contents to another mailfolder. + Move a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MovePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Move a mailfolder and its contents to another mailfolder. + Move a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/copy/copy_request_builder.py b/msgraph/generated/users/item/mail_folders/item/copy/copy_request_builder.py index 22bca123f33..de5364dab14 100644 --- a/msgraph/generated/users/item/mail_folders/item/copy/copy_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/copy/copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> Optional[MailFolder]: """ - Copy a mailfolder and its contents to another mailfolder. + Copy a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyPostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a mailfolder and its contents to another mailfolder. + Copy a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/mail_folder_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/mail_folder_item_request_builder.py index 8ca77a94251..9d1df2a757a 100644 --- a/msgraph/generated/users/item/mail_folders/item/mail_folder_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/mail_folder_item_request_builder.py @@ -14,8 +14,8 @@ from .....models.o_data_errors.o_data_error import ODataError from .child_folders.child_folders_request_builder import ChildFoldersRequestBuilder from .copy.copy_request_builder import CopyRequestBuilder - from .message_rules.message_rules_request_builder import MessageRulesRequestBuilder from .messages.messages_request_builder import MessagesRequestBuilder + from .message_rules.message_rules_request_builder import MessageRulesRequestBuilder from .move.move_request_builder import MoveRequestBuilder class MailFolderItemRequestBuilder(BaseRequestBuilder): @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[MailFolderItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists. + Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists. This API is available in the following national cloud deployments. 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/mailfolder-delete?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[MailFolderItemRequestBuilderG async def patch(self,body: Optional[MailFolder] = None, request_configuration: Optional[MailFolderItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MailFolder]: """ - Update the properties of mailfolder object. + Update the properties of mailfolder object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] @@ -100,17 +100,17 @@ async def patch(self,body: Optional[MailFolder] = None, request_configuration: O def to_delete_request_information(self,request_configuration: Optional[MailFolderItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists. + Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MailFolderItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -120,19 +120,19 @@ def to_get_request_information(self,request_configuration: Optional[MailFolderIt Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailFolder] = None, request_configuration: Optional[MailFolderItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of mailfolder object. + Update the properties of mailfolder object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[MailFolder] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/message_rules/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/message_rules/count/count_request_builder.py index 37732199de8..da539707663 100644 --- a/msgraph/generated/users/item/mail_folders/item/message_rules/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/message_rules/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py index eecd660c512..44351f0ae85 100644 --- a/msgraph/generated/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[MessageRuleItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the specified messageRule object. + Delete the specified messageRule object. This API is available in the following national cloud deployments. 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/messagerule-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MessageRuleItemRequestBuil async def get(self,request_configuration: Optional[MessageRuleItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MessageRule]: """ - Get the properties and relationships of a messageRule object. + Get the properties and relationships of a messageRule object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRule] Find more info here: https://learn.microsoft.com/graph/api/messagerule-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[MessageRuleItemRequestBuilder async def patch(self,body: Optional[MessageRule] = None, request_configuration: Optional[MessageRuleItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MessageRule]: """ - Change writable properties on a messageRule object and save the changes. + Change writable properties on a messageRule object and save the changes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRule] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[MessageRule] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[MessageRuleItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the specified messageRule object. + Delete the specified messageRule object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MessageRuleItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of a messageRule object. + Get the properties and relationships of a messageRule object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MessageRule] = None, request_configuration: Optional[MessageRuleItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Change writable properties on a messageRule object and save the changes. + Change writable properties on a messageRule object and save the changes. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[MessageRule] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class MessageRuleItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class MessageRuleItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a messageRule object. + Get the properties and relationships of a messageRule object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/message_rules/message_rules_request_builder.py b/msgraph/generated/users/item/mail_folders/item/message_rules/message_rules_request_builder.py index bd16aa633c6..4694e970a65 100644 --- a/msgraph/generated/users/item/mail_folders/item/message_rules/message_rules_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/message_rules/message_rules_request_builder.py @@ -45,7 +45,7 @@ def by_message_rule_id(self,message_rule_id: str) -> MessageRuleItemRequestBuild async def get(self,request_configuration: Optional[MessageRulesRequestBuilderGetRequestConfiguration] = None) -> Optional[MessageRuleCollectionResponse]: """ - Get all the messageRule objects defined for the user's inbox. + Get all the messageRule objects defined for the user's inbox. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRuleCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/mailfolder-list-messagerules?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[MessageRulesRequestBuilderGet async def post(self,body: Optional[MessageRule] = None, request_configuration: Optional[MessageRulesRequestBuilderPostRequestConfiguration] = None) -> Optional[MessageRule]: """ - Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. + Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageRule] @@ -92,24 +92,24 @@ async def post(self,body: Optional[MessageRule] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[MessageRulesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the messageRule objects defined for the user's inbox. + Get all the messageRule objects defined for the user's inbox. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MessageRule] = None, request_configuration: Optional[MessageRulesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. + Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[MessageRule] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MessageRulesRequestBuilderGetQueryParameters(): """ - Get all the messageRule objects defined for the user's inbox. + Get all the messageRule objects defined for the user's inbox. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/messages/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/count/count_request_builder.py index 1563c7ad974..f741f05aac2 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_response.py b/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/mail_folders/item/messages/delta/delta_response.py rename to msgraph/generated/users/item/mail_folders/item/messages/delta/delta_get_response.py index acf6b492119..7c34d19feff 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_response.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Message]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_request_builder.py index a3f80857b5e..155e1a96230 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/message-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 397b99a4c9f..c795db1d7c9 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 @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/eventmessage-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py index 8072f6c479e..b6633e8d6fe 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py index a3421e49535..cb525c05867 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py index 788414e0aa4..d60c3011ae5 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AttachmentItemRequestBuild async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Attachment]: """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. 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/attachment-get?view=graph-rest-1.0 @@ -74,29 +74,29 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: @@ -122,7 +122,7 @@ class AttachmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class AttachmentItemRequestBuilderGetQueryParameters(): """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/copy/copy_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/copy/copy_request_builder.py index 923a0d9b536..c85d823337f 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/copy/copy_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/copy/copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Copy a message to a folder within the user's mailbox. + Copy a message to a folder within the user's mailbox. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyPostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a message to a folder within the user's mailbox. + Copy a message to a folder within the user's mailbox. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/create_forward/create_forward_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/create_forward/create_forward_request_builder.py index 0950767d756..0342eb9dd7a 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/create_forward/create_forward_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/create_forward/create_forward_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateForwardPostRequestBody] = None, request_configuration: Optional[CreateForwardRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. + Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateForwardPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CreateForwardPostRequestBody] = None, request_configuration: Optional[CreateForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. + Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateForwardPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply/create_reply_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply/create_reply_request_builder.py index 02b625a4d41..0c7a9af1595 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply/create_reply_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply/create_reply_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateReplyPostRequestBody] = None, request_configuration: Optional[CreateReplyRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. + Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateReplyPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[CreateReplyPostRequestBody] = None, request_configuration: Optional[CreateReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. + Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateReplyPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py index 569992d287a..ce93b78b998 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/create_reply_all/create_reply_all_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateReplyAllPostRequestBody] = None, request_configuration: Optional[CreateReplyAllRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. + Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateReplyAllPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CreateReplyAllPostRequestBody] = None, request_configuration: Optional[CreateReplyAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. + Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateReplyAllPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py index eec308a77ad..80e0c9e5db4 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py index 1fc181d2380..f9b375e45f4 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py index fd7588711eb..2aa13abed9c 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. + Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. This API is available in the following national cloud deployments. 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-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[Extension] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. + Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/forward/forward_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/forward/forward_request_builder.py index 9165779241d..191fb911aaf 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. + Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. + Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/message_item_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/message_item_request_builder.py index a554851f3c7..1230e37fb68 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/message_item_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/message_item_request_builder.py @@ -109,12 +109,12 @@ def to_delete_request_information(self,request_configuration: Optional[MessageIt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -124,14 +124,14 @@ def to_get_request_information(self,request_configuration: Optional[MessageItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Message] = None, request_configuration: Optional[MessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -144,13 +144,13 @@ def to_patch_request_information(self,body: Optional[Message] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/move/move_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/move/move_request_builder.py index a37493f7229..816d55f4a62 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/move/move_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/move/move_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. + Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MovePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. + Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/reply/reply_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/reply/reply_request_builder.py index 624bba4a4a0..be6562d3810 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/reply/reply_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/reply/reply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. + Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. + Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/reply_all/reply_all_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/reply_all/reply_all_request_builder.py index 81161163b2d..dc5b06a2f3c 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/reply_all/reply_all_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/reply_all/reply_all_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyAllPostRequestBody] = None, request_configuration: Optional[ReplyAllRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. + Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. This API is available in the following national cloud deployments. 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[ReplyAllPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[ReplyAllPostRequestBody] = None, request_configuration: Optional[ReplyAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. + Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyAllPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/send/send_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/send/send_request_builder.py index 911e65aba12..0288fc416b1 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/send/send_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/send/send_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SendRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. + Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. This API is available in the following national cloud deployments. 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/message-send?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SendRequestBuilderPostReques def to_post_request_information(self,request_configuration: Optional[SendRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. + Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SendRequestBuilder: diff --git a/msgraph/generated/users/item/mail_folders/item/messages/item/value/content_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/value/content_request_builder.py index 56d5bda56c1..74674d5ad95 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/item/messages/messages_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/messages_request_builder.py index 81398f9d9c5..556fa1da9b5 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/messages_request_builder.py @@ -46,7 +46,7 @@ def by_message_id(self,message_id: str) -> MessageItemRequestBuilder: async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> Optional[MessageCollectionResponse]: """ - Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. + Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. This API is available in the following national cloud deployments. 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/mailfolder-list-messages?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[Message] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Use this API to create a new Message in a mailfolder. + Use this API to create a new Message in a mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Message] = None, request_configuration: Optio def to_get_request_information(self,request_configuration: Optional[MessagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. + Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Message] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new Message in a mailfolder. + Use this API to create a new Message in a mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Message] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class MessagesRequestBuilderGetQueryParameters(): """ - Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. + Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/mail_folders/item/move/move_request_builder.py b/msgraph/generated/users/item/mail_folders/item/move/move_request_builder.py index 2286f59f893..03973b4d3b8 100644 --- a/msgraph/generated/users/item/mail_folders/item/move/move_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/move/move_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> Optional[MailFolder]: """ - Move a mailfolder and its contents to another mailfolder. + Move a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MovePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Move a mailfolder and its contents to another mailfolder. + Move a mailfolder and its contents to another mailfolder. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mail_folders/mail_folders_request_builder.py b/msgraph/generated/users/item/mail_folders/mail_folders_request_builder.py index 6681620e3a1..78d23ac6bc2 100644 --- a/msgraph/generated/users/item/mail_folders/mail_folders_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/mail_folders_request_builder.py @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[MailFoldersRequestBuilderGetR async def post(self,body: Optional[MailFolder] = None, request_configuration: Optional[MailFoldersRequestBuilderPostRequestConfiguration] = None) -> Optional[MailFolder]: """ - Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. + Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] @@ -98,19 +98,19 @@ def to_get_request_information(self,request_configuration: Optional[MailFoldersR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailFolder] = None, request_configuration: Optional[MailFoldersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. + Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[MailFolder] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/users/item/mailbox_settings/mailbox_settings_request_builder.py index 847c234c94a..26415493c26 100644 --- a/msgraph/generated/users/item/mailbox_settings/mailbox_settings_request_builder.py +++ b/msgraph/generated/users/item/mailbox_settings/mailbox_settings_request_builder.py @@ -78,14 +78,14 @@ def to_get_request_information(self,request_configuration: Optional[MailboxSetti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MailboxSettings] = None, request_configuration: Optional[MailboxSettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -98,13 +98,13 @@ def to_patch_request_information(self,body: Optional[MailboxSettings] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_app_registrations/count/count_request_builder.py b/msgraph/generated/users/item/managed_app_registrations/count/count_request_builder.py index 3039305344e..7316a9a989d 100644 --- a/msgraph/generated/users/item/managed_app_registrations/count/count_request_builder.py +++ b/msgraph/generated/users/item/managed_app_registrations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/managed_app_registrations/item/managed_app_registration_item_request_builder.py b/msgraph/generated/users/item/managed_app_registrations/item/managed_app_registration_item_request_builder.py index 3d63f06367e..a71fa9348a4 100644 --- a/msgraph/generated/users/item/managed_app_registrations/item/managed_app_registration_item_request_builder.py +++ b/msgraph/generated/users/item/managed_app_registrations/item/managed_app_registration_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagedAppRegistrationItemRequestBuilder: diff --git a/msgraph/generated/users/item/managed_app_registrations/managed_app_registrations_request_builder.py b/msgraph/generated/users/item/managed_app_registrations/managed_app_registrations_request_builder.py index b981a5c51eb..e0d61bd646c 100644 --- a/msgraph/generated/users/item/managed_app_registrations/managed_app_registrations_request_builder.py +++ b/msgraph/generated/users/item/managed_app_registrations/managed_app_registrations_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedAppRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagedAppRegistrationsRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/count/count_request_builder.py b/msgraph/generated/users/item/managed_devices/count/count_request_builder.py index d31a72ad5c8..599cf1e1ea1 100644 --- a/msgraph/generated/users/item/managed_devices/count/count_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py b/msgraph/generated/users/item/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py index 86eb320b2cf..63392d12840 100644 --- a/msgraph/generated/users/item/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[BypassActiv Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> BypassActivationLockRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py b/msgraph/generated/users/item/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py index 3fbd1ac513a..0d951f9d056 100644 --- a/msgraph/generated/users/item/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[CleanWindowsDevicePostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py b/msgraph/generated/users/item/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py index 15b9aad16c8..e5884e4cd3f 100644 --- a/msgraph/generated/users/item/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[DeleteUserFromSharedAppleDev if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/device_category/device_category_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_category/device_category_request_builder.py index b44ba6e9784..11aa53cf6d6 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_category/device_category_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_category/device_category_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCat Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCategoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCatego Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCategory] = None, request_configuration: Optional[DeviceCategoryRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[DeviceCategory] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py index d14c7630534..83f520d3582 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py index 0b3197aae44..2429c04704a 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyState] = None, request_configuration: Optional[DeviceCompliancePolicyStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceCompliancePolicyState] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py index 72a084ca01f..57b4e5af53f 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicyStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceCompliancePolicyState] = None, request_configuration: Optional[DeviceCompliancePolicyStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceCompliancePolicyState if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/device_configuration_states/count/count_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_configuration_states/count/count_request_builder.py index b955a7c7b49..85581daac79 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_configuration_states/count/count_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_configuration_states/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py index 2aafeb6654e..fc238c1ea36 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationState] = None, request_configuration: Optional[DeviceConfigurationStatesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceConfigurationState] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py b/msgraph/generated/users/item/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py index 061542345ec..cb8aab74629 100644 --- a/msgraph/generated/users/item/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceConfigurationState] = None, request_configuration: Optional[DeviceConfigurationStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[DeviceConfigurationState] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py b/msgraph/generated/users/item/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py index 98a89429fdc..7aa580fd915 100644 --- a/msgraph/generated/users/item/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[DisableLost Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> DisableLostModeRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/locate_device/locate_device_request_builder.py b/msgraph/generated/users/item/managed_devices/item/locate_device/locate_device_request_builder.py index 0dbfb97dcf3..d19c099944d 100644 --- a/msgraph/generated/users/item/managed_devices/item/locate_device/locate_device_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/locate_device/locate_device_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[LocateDevic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> LocateDeviceRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/count/count_request_builder.py b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/count/count_request_builder.py index f042cc3b039..fa2f8b34d78 100644 --- a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/count/count_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py similarity index 90% rename from msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py rename to msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py index 7d5bf82da6c..4b14fd88984 100644 --- a/msgraph/generated/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.py +++ b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union @dataclass -class CreateDownloadUrlResponse(AdditionalDataHolder, BackedModel, Parsable): +class CreateDownloadUrlPostResponse(AdditionalDataHolder, BackedModel, Parsable): # Stores model information. backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) @@ -15,15 +15,15 @@ class CreateDownloadUrlResponse(AdditionalDataHolder, BackedModel, Parsable): value: Optional[str] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CreateDownloadUrlResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> CreateDownloadUrlPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: CreateDownloadUrlResponse + Returns: CreateDownloadUrlPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return CreateDownloadUrlResponse() + return CreateDownloadUrlPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py index ccdc7ab3c38..f58cf9754f1 100644 --- a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .create_download_url_response import CreateDownloadUrlResponse + from .create_download_url_post_response import CreateDownloadUrlPostResponse class CreateDownloadUrlRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", path_parameters) - async def post(self,request_configuration: Optional[CreateDownloadUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CreateDownloadUrlResponse]: + async def post(self,request_configuration: Optional[CreateDownloadUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CreateDownloadUrlPostResponse]: """ Invoke action createDownloadUrl param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[CreateDownloadUrlResponse] + Returns: Optional[CreateDownloadUrlPostResponse] """ request_info = self.to_post_request_information( request_configuration @@ -43,9 +43,9 @@ async def post(self,request_configuration: Optional[CreateDownloadUrlRequestBuil } if not self.request_adapter: raise Exception("Http core is null") - from .create_download_url_response import CreateDownloadUrlResponse + from .create_download_url_post_response import CreateDownloadUrlPostResponse - return await self.request_adapter.send_async(request_info, CreateDownloadUrlResponse, error_mapping) + return await self.request_adapter.send_async(request_info, CreateDownloadUrlPostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[CreateDownloadUrlRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_post_request_information(self,request_configuration: Optional[CreateDownl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> CreateDownloadUrlRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py index 9862d370275..9948ece7de9 100644 --- a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceLog Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[DeviceLogCol Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceLogCollectionResponse] = None, request_configuration: Optional[DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[DeviceLogCollectionResponse if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py index d680257ad77..dd2da027cb2 100644 --- a/msgraph/generated/users/item/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[LogCollectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[DeviceLogCollectionResponse] = None, request_configuration: Optional[LogCollectionRequestsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[DeviceLogCollectionResponse] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py b/msgraph/generated/users/item/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py index 1ea46a0ecb3..b266d27a379 100644 --- a/msgraph/generated/users/item/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[LogoutShare Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> LogoutSharedAppleDeviceActiveUserRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/managed_device_item_request_builder.py b/msgraph/generated/users/item/managed_devices/item/managed_device_item_request_builder.py index 46f7f92f2ee..610976d4dfd 100644 --- a/msgraph/generated/users/item/managed_devices/item/managed_device_item_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/managed_device_item_request_builder.py @@ -20,8 +20,8 @@ from .device_configuration_states.device_configuration_states_request_builder import DeviceConfigurationStatesRequestBuilder from .disable_lost_mode.disable_lost_mode_request_builder import DisableLostModeRequestBuilder from .locate_device.locate_device_request_builder import LocateDeviceRequestBuilder - from .log_collection_requests.log_collection_requests_request_builder import LogCollectionRequestsRequestBuilder from .logout_shared_apple_device_active_user.logout_shared_apple_device_active_user_request_builder import LogoutSharedAppleDeviceActiveUserRequestBuilder + from .log_collection_requests.log_collection_requests_request_builder import LogCollectionRequestsRequestBuilder from .reboot_now.reboot_now_request_builder import RebootNowRequestBuilder from .recover_passcode.recover_passcode_request_builder import RecoverPasscodeRequestBuilder from .remote_lock.remote_lock_request_builder import RemoteLockRequestBuilder @@ -121,12 +121,12 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagedDeviceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -136,14 +136,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDevice] = None, request_configuration: Optional[ManagedDeviceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -156,13 +156,13 @@ def to_patch_request_information(self,body: Optional[ManagedDevice] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/reboot_now/reboot_now_request_builder.py b/msgraph/generated/users/item/managed_devices/item/reboot_now/reboot_now_request_builder.py index db81fde81e4..841d615f016 100644 --- a/msgraph/generated/users/item/managed_devices/item/reboot_now/reboot_now_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/reboot_now/reboot_now_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RebootNowRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RebootNowRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/recover_passcode/recover_passcode_request_builder.py b/msgraph/generated/users/item/managed_devices/item/recover_passcode/recover_passcode_request_builder.py index 272ff982f87..1a4e6c4ca66 100644 --- a/msgraph/generated/users/item/managed_devices/item/recover_passcode/recover_passcode_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/recover_passcode/recover_passcode_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RecoverPass Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RecoverPasscodeRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/remote_lock/remote_lock_request_builder.py b/msgraph/generated/users/item/managed_devices/item/remote_lock/remote_lock_request_builder.py index e74b16d88e0..a136104bb2e 100644 --- a/msgraph/generated/users/item/managed_devices/item/remote_lock/remote_lock_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/remote_lock/remote_lock_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RemoteLockR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoteLockRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py b/msgraph/generated/users/item/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py index 85f9b3d0a30..fb57919f6e0 100644 --- a/msgraph/generated/users/item/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RequestRemo Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RequestRemoteAssistanceRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/reset_passcode/reset_passcode_request_builder.py b/msgraph/generated/users/item/managed_devices/item/reset_passcode/reset_passcode_request_builder.py index d715a93c530..5f872e91142 100644 --- a/msgraph/generated/users/item/managed_devices/item/reset_passcode/reset_passcode_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/reset_passcode/reset_passcode_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[ResetPassco Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ResetPasscodeRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/retire/retire_request_builder.py b/msgraph/generated/users/item/managed_devices/item/retire/retire_request_builder.py index 1656c907886..64244579554 100644 --- a/msgraph/generated/users/item/managed_devices/item/retire/retire_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/retire/retire_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RetireReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RetireRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/shut_down/shut_down_request_builder.py b/msgraph/generated/users/item/managed_devices/item/shut_down/shut_down_request_builder.py index 00a48c083cd..40a149258fa 100644 --- a/msgraph/generated/users/item/managed_devices/item/shut_down/shut_down_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/shut_down/shut_down_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[ShutDownReq Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ShutDownRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/sync_device/sync_device_request_builder.py b/msgraph/generated/users/item/managed_devices/item/sync_device/sync_device_request_builder.py index bf4444d6265..16ccae06941 100644 --- a/msgraph/generated/users/item/managed_devices/item/sync_device/sync_device_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/sync_device/sync_device_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[SyncDeviceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SyncDeviceRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py b/msgraph/generated/users/item/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py index 4bcc7b512cd..84800dd15db 100644 --- a/msgraph/generated/users/item/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[UpdateWindowsDeviceAccountPo if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/users/users_request_builder.py b/msgraph/generated/users/item/managed_devices/item/users/users_request_builder.py index ab766c9bc93..1e3fadade91 100644 --- a/msgraph/generated/users/item/managed_devices/item/users/users_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/users/users_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[UsersRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> UsersRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py b/msgraph/generated/users/item/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py index 8a59e8320da..49eeae7c0e4 100644 --- a/msgraph/generated/users/item/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[WindowsDefenderScanPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py b/msgraph/generated/users/item/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py index 1cd5c4a5a50..a501d83b5f8 100644 --- a/msgraph/generated/users/item/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[WindowsDefe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> WindowsDefenderUpdateSignaturesRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py index 2141794fea3..f95f7038783 100644 --- a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py index 3179a7a9b8e..00378e31321 100644 --- a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.py @@ -97,14 +97,14 @@ def to_get_request_information(self,request_configuration: Optional[DetectedMalw Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsDeviceMalwareState] = None, request_configuration: Optional[DetectedMalwareStateRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[WindowsDeviceMalwareState] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py index 222c2634225..23cea305b71 100644 --- a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsDeviceMalwareState] = None, request_configuration: Optional[WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WindowsDeviceMalwareState] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py index b82933275f1..1a25c7432e7 100644 --- a/msgraph/generated/users/item/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[WindowsPr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[WindowsProtectionStateRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[WindowsProte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[WindowsProtectionState] = None, request_configuration: Optional[WindowsProtectionStateRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[WindowsProtectionState] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/item/wipe/wipe_request_builder.py b/msgraph/generated/users/item/managed_devices/item/wipe/wipe_request_builder.py index 313ecec68be..6a54139f806 100644 --- a/msgraph/generated/users/item/managed_devices/item/wipe/wipe_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/item/wipe/wipe_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[WipePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/managed_devices/managed_devices_request_builder.py b/msgraph/generated/users/item/managed_devices/managed_devices_request_builder.py index 43edb8de658..8935cc128ad 100644 --- a/msgraph/generated/users/item/managed_devices/managed_devices_request_builder.py +++ b/msgraph/generated/users/item/managed_devices/managed_devices_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ManagedDevic Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ManagedDevice] = None, request_configuration: Optional[ManagedDevicesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ManagedDevice] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/manager/manager_request_builder.py b/msgraph/generated/users/item/manager/manager_request_builder.py index 3791c0758d7..30525aa1907 100644 --- a/msgraph/generated/users/item/manager/manager_request_builder.py +++ b/msgraph/generated/users/item/manager/manager_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ManagerRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a user's manager. + Remove a user's manager. This API is available in the following national cloud deployments. 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-manager?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[ManagerRequestBuilderDelet async def get(self,request_configuration: Optional[ManagerRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0 @@ -71,34 +71,34 @@ async def get(self,request_configuration: Optional[ManagerRequestBuilderGetReque def to_delete_request_information(self,request_configuration: Optional[ManagerRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a user's manager. + Remove a user's manager. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ManagerRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ManagerRequestBuilder: @@ -133,7 +133,7 @@ class ManagerRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class ManagerRequestBuilderGetQueryParameters(): """ - Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/manager/ref/ref_request_builder.py b/msgraph/generated/users/item/manager/ref/ref_request_builder.py index be7d0615c4f..bf5894e8930 100644 --- a/msgraph/generated/users/item/manager/ref/ref_request_builder.py +++ b/msgraph/generated/users/item/manager/ref/ref_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Remove a user's manager. + Remove a user's manager. This API is available in the following national cloud deployments. 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-manager?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RefRequestBuilderDeleteReq async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[str]: """ - Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[str] Find more info here: https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> None: """ - Assign a user's manager. + Assign a user's manager. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -91,38 +91,38 @@ async def put(self,body: Optional[ReferenceUpdate] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[RefRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Remove a user's manager. + Remove a user's manager. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, request_configuration: Optional[RefRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - Assign a user's manager. + Assign a user's manager. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -130,12 +130,12 @@ def to_put_request_information(self,body: Optional[ReferenceUpdate] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/member_of/count/count_request_builder.py b/msgraph/generated/users/item/member_of/count/count_request_builder.py index 68dc83ef74f..6896dfa5708 100644 --- a/msgraph/generated/users/item/member_of/count/count_request_builder.py +++ b/msgraph/generated/users/item/member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/users/item/member_of/graph_administrative_unit/count/count_request_builder.py index a476e4f1bf3..2e01ae555be 100644 --- a/msgraph/generated/users/item/member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/users/item/member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/users/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index 9cebf6ec346..5e166868797 100644 --- a/msgraph/generated/users/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/users/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/graph_directory_role/count/count_request_builder.py b/msgraph/generated/users/item/member_of/graph_directory_role/count/count_request_builder.py index 0f526e59109..091855ce0b2 100644 --- a/msgraph/generated/users/item/member_of/graph_directory_role/count/count_request_builder.py +++ b/msgraph/generated/users/item/member_of/graph_directory_role/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/users/item/member_of/graph_directory_role/graph_directory_role_request_builder.py index 3681e54ab7f..82a0d2b3aaf 100644 --- a/msgraph/generated/users/item/member_of/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/users/item/member_of/graph_directory_role/graph_directory_role_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/graph_group/count/count_request_builder.py b/msgraph/generated/users/item/member_of/graph_group/count/count_request_builder.py index bde4440c525..6a4160466a1 100644 --- a/msgraph/generated/users/item/member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/users/item/member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/users/item/member_of/graph_group/graph_group_request_builder.py index 00392cde57e..b459e21ff2b 100644 --- a/msgraph/generated/users/item/member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/users/item/member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/member_of/item/directory_object_item_request_builder.py index 4af44d796a7..7092aca0ee6 100644 --- a/msgraph/generated/users/item/member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/member_of/item/directory_object_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/users/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index b9f4b713a55..18a5a939284 100644 --- a/msgraph/generated/users/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/users/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/users/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py index d268b7ac56c..e0235169e6b 100644 --- a/msgraph/generated/users/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/users/item/member_of/item/graph_directory_role/graph_directory_role_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/users/item/member_of/item/graph_group/graph_group_request_builder.py index 44aae5f9e74..d95a9ec872b 100644 --- a/msgraph/generated/users/item/member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/users/item/member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/users/item/member_of/member_of_request_builder.py b/msgraph/generated/users/item/member_of/member_of_request_builder.py index ee5b5e388b8..8b18c02d824 100644 --- a/msgraph/generated/users/item/member_of/member_of_request_builder.py +++ b/msgraph/generated/users/item/member_of/member_of_request_builder.py @@ -74,14 +74,14 @@ def to_get_request_information(self,request_configuration: Optional[MemberOfRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> MemberOfRequestBuilder: diff --git a/msgraph/generated/users/item/messages/count/count_request_builder.py b/msgraph/generated/users/item/messages/count/count_request_builder.py index f383bbae3c2..33a05f51df3 100644 --- a/msgraph/generated/users/item/messages/count/count_request_builder.py +++ b/msgraph/generated/users/item/messages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/messages/delta/delta_response.py b/msgraph/generated/users/item/messages/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/messages/delta/delta_response.py rename to msgraph/generated/users/item/messages/delta/delta_get_response.py index 25926eb7012..6bc5f2f1283 100644 --- a/msgraph/generated/users/item/messages/delta/delta_response.py +++ b/msgraph/generated/users/item/messages/delta/delta_get_response.py @@ -10,20 +10,20 @@ from .....models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[Message]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/messages/delta/delta_request_builder.py b/msgraph/generated/users/item/messages/delta/delta_request_builder.py index 158ab6919fc..e50715133cb 100644 --- a/msgraph/generated/users/item/messages/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/messages/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] Find more info here: https://learn.microsoft.com/graph/api/message-delta?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: @dataclass class DeltaRequestBuilderGetQueryParameters(): """ - Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. + Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 1a71bd1edcf..e8fe119f163 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 @@ -46,7 +46,7 @@ def by_attachment_id(self,attachment_id: str) -> AttachmentItemRequestBuilder: async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentCollectionResponse]: """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/eventmessage-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ 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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] @@ -93,24 +93,24 @@ async def post(self,body: Optional[Attachment] = None, request_configuration: Op def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Attachment] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Retrieve a list of attachment objects. + Retrieve a list of attachment objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/messages/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/messages/item/attachments/count/count_request_builder.py index a121a020804..e417e3ad044 100644 --- a/msgraph/generated/users/item/messages/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/messages/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py index 633c560214a..fc99dd576b9 100644 --- a/msgraph/generated/users/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/messages/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. + Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/attachments/item/attachment_item_request_builder.py b/msgraph/generated/users/item/messages/item/attachments/item/attachment_item_request_builder.py index b7101a44d1c..74d4776963a 100644 --- a/msgraph/generated/users/item/messages/item/attachments/item/attachment_item_request_builder.py +++ b/msgraph/generated/users/item/messages/item/attachments/item/attachment_item_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AttachmentItemRequestBuild async def get(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Attachment]: """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. 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/attachment-get?view=graph-rest-1.0 @@ -74,29 +74,29 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentItemRequestBuilder: @@ -122,7 +122,7 @@ class AttachmentItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigur @dataclass class AttachmentItemRequestBuilderGetQueryParameters(): """ - Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. + Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/messages/item/copy/copy_request_builder.py b/msgraph/generated/users/item/messages/item/copy/copy_request_builder.py index c663f616026..c65b8dddb9e 100644 --- a/msgraph/generated/users/item/messages/item/copy/copy_request_builder.py +++ b/msgraph/generated/users/item/messages/item/copy/copy_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Copy a message to a folder within the user's mailbox. + Copy a message to a folder within the user's mailbox. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyPostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, request_configuration: Optional[CopyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a message to a folder within the user's mailbox. + Copy a message to a folder within the user's mailbox. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyPostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/create_forward/create_forward_request_builder.py b/msgraph/generated/users/item/messages/item/create_forward/create_forward_request_builder.py index a2c75093a9f..0d359856e2b 100644 --- a/msgraph/generated/users/item/messages/item/create_forward/create_forward_request_builder.py +++ b/msgraph/generated/users/item/messages/item/create_forward/create_forward_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateForwardPostRequestBody] = None, request_configuration: Optional[CreateForwardRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. + Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateForwardPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CreateForwardPostRequestBody] = None, request_configuration: Optional[CreateForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. + Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- 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. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateForwardPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/create_reply/create_reply_request_builder.py b/msgraph/generated/users/item/messages/item/create_reply/create_reply_request_builder.py index 5c61340b0df..948a00d4f1c 100644 --- a/msgraph/generated/users/item/messages/item/create_reply/create_reply_request_builder.py +++ b/msgraph/generated/users/item/messages/item/create_reply/create_reply_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateReplyPostRequestBody] = None, request_configuration: Optional[CreateReplyRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. + Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateReplyPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[CreateReplyPostRequestBody] = None, request_configuration: Optional[CreateReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. + Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateReplyPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/create_reply_all/create_reply_all_request_builder.py b/msgraph/generated/users/item/messages/item/create_reply_all/create_reply_all_request_builder.py index 8df7382de87..ead16caeed4 100644 --- a/msgraph/generated/users/item/messages/item/create_reply_all/create_reply_all_request_builder.py +++ b/msgraph/generated/users/item/messages/item/create_reply_all/create_reply_all_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateReplyAllPostRequestBody] = None, request_configuration: Optional[CreateReplyAllRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. + Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateReplyAllPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CreateReplyAllPostRequestBody] = None, request_configuration: Optional[CreateReplyAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. + Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply 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. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateReplyAllPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/messages/item/extensions/count/count_request_builder.py index 5e87ef2b6df..a98fea0945f 100644 --- a/msgraph/generated/users/item/messages/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/messages/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/messages/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/messages/item/extensions/extensions_request_builder.py index 478087f528b..23bfabdd865 100644 --- a/msgraph/generated/users/item/messages/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/messages/item/extensions/extensions_request_builder.py @@ -45,7 +45,7 @@ def by_extension_id(self,extension_id: str) -> ExtensionItemRequestBuilder: async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> Optional[ExtensionCollectionResponse]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ExtensionCollectionResponse] """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[ExtensionsRequestBuilderGetRe async def post(self,body: Optional[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Extension]: """ - 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] @@ -91,24 +91,24 @@ async def post(self,body: Optional[Extension] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[ExtensionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = 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. + 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ExtensionsRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/messages/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/messages/item/extensions/item/extension_item_request_builder.py index 91fcab82f84..0820645bb3e 100644 --- a/msgraph/generated/users/item/messages/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/messages/item/extensions/item/extension_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. + Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. This API is available in the following national cloud deployments. 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-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ExtensionItemRequestBuilde async def get(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Extension]: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Extension] Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 @@ -94,34 +94,34 @@ async def patch(self,body: Optional[Extension] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. + Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ExtensionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class ExtensionItemRequestBuilderGetQueryParameters(): """ - Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/messages/item/forward/forward_request_builder.py b/msgraph/generated/users/item/messages/item/forward/forward_request_builder.py index 747c57365b1..18947b0822d 100644 --- a/msgraph/generated/users/item/messages/item/forward/forward_request_builder.py +++ b/msgraph/generated/users/item/messages/item/forward/forward_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> None: """ - Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. + Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. This API is available in the following national cloud deployments. 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[ForwardPostRequestBody] = None, request_confi def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = None, request_configuration: Optional[ForwardRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. + Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ForwardPostRequestBody] = No if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info 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 4800db7032e..3cd892851e0 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 @@ -40,7 +40,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[MessageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete eventMessage. + Delete eventMessage. This API is available in the following national cloud deployments. 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/eventmessage-delete?view=graph-rest-1.0 @@ -82,11 +82,11 @@ async def get(self,request_configuration: Optional[MessageItemRequestBuilderGetR async def patch(self,body: Optional[Message] = None, request_configuration: Optional[MessageItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Message]: """ - Update the properties of an eventMessage object. + Update the properties of a message object. This API is available in the following national cloud deployments. 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/eventmessage-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/message-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -107,17 +107,17 @@ async def patch(self,body: Optional[Message] = None, request_configuration: Opti def to_delete_request_information(self,request_configuration: Optional[MessageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete eventMessage. + Delete eventMessage. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MessageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -127,19 +127,19 @@ def to_get_request_information(self,request_configuration: Optional[MessageItemR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Message] = None, request_configuration: Optional[MessageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of an eventMessage object. + Update the properties of a message object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -147,13 +147,13 @@ def to_patch_request_information(self,body: Optional[Message] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/move/move_request_builder.py b/msgraph/generated/users/item/messages/item/move/move_request_builder.py index bfdd601ceae..a51e3105543 100644 --- a/msgraph/generated/users/item/messages/item/move/move_request_builder.py +++ b/msgraph/generated/users/item/messages/item/move/move_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. + Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -54,7 +54,7 @@ async def post(self,body: Optional[MovePostRequestBody] = None, request_configur def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, request_configuration: Optional[MoveRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. + Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[MovePostRequestBody] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/reply/reply_request_builder.py b/msgraph/generated/users/item/messages/item/reply/reply_request_builder.py index a9013e30d44..ac02ecc112b 100644 --- a/msgraph/generated/users/item/messages/item/reply/reply_request_builder.py +++ b/msgraph/generated/users/item/messages/item/reply/reply_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. + Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. This API is available in the following national cloud deployments. 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[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. + Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/reply_all/reply_all_request_builder.py b/msgraph/generated/users/item/messages/item/reply_all/reply_all_request_builder.py index a6bbab26146..39f07de4376 100644 --- a/msgraph/generated/users/item/messages/item/reply_all/reply_all_request_builder.py +++ b/msgraph/generated/users/item/messages/item/reply_all/reply_all_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyAllPostRequestBody] = None, request_configuration: Optional[ReplyAllRequestBuilderPostRequestConfiguration] = None) -> None: """ - Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. + Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. This API is available in the following national cloud deployments. 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[ReplyAllPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[ReplyAllPostRequestBody] = None, request_configuration: Optional[ReplyAllRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. + Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. 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. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ReplyAllPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/messages/item/send/send_request_builder.py b/msgraph/generated/users/item/messages/item/send/send_request_builder.py index a794c884a51..42b58ce0058 100644 --- a/msgraph/generated/users/item/messages/item/send/send_request_builder.py +++ b/msgraph/generated/users/item/messages/item/send/send_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[SendRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. + Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. This API is available in the following national cloud deployments. 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/message-send?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[SendRequestBuilderPostReques def to_post_request_information(self,request_configuration: Optional[SendRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. + Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> SendRequestBuilder: 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 48d1aff8ef9..5973e6b910d 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 @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/messages/messages_request_builder.py b/msgraph/generated/users/item/messages/messages_request_builder.py index 9a734e08e4e..1d00058f74f 100644 --- a/msgraph/generated/users/item/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/messages/messages_request_builder.py @@ -68,7 +68,7 @@ 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 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] @@ -98,19 +98,19 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[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 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. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[Message] = None, request_con if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/oauth2_permission_grants/count/count_request_builder.py b/msgraph/generated/users/item/oauth2_permission_grants/count/count_request_builder.py index 574701305df..06884a39eac 100644 --- a/msgraph/generated/users/item/oauth2_permission_grants/count/count_request_builder.py +++ b/msgraph/generated/users/item/oauth2_permission_grants/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py b/msgraph/generated/users/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py index f9db064c485..bd707359518 100644 --- a/msgraph/generated/users/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py +++ b/msgraph/generated/users/item/oauth2_permission_grants/item/o_auth2_permission_grant_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[OAuth2Permis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OAuth2PermissionGrantItemRequestBuilder: diff --git a/msgraph/generated/users/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py b/msgraph/generated/users/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py index 550fe4e1150..06512187090 100644 --- a/msgraph/generated/users/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py +++ b/msgraph/generated/users/item/oauth2_permission_grants/oauth2_permission_grants_request_builder.py @@ -44,7 +44,7 @@ def by_o_auth2_permission_grant_id(self,o_auth2_permission_grant_id: str) -> OAu async def get(self,request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> Optional[OAuth2PermissionGrantCollectionResponse]: """ - Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. + Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OAuth2PermissionGrantCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-oauth2permissiongrants?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[Oauth2PermissionGrantsRequest def to_get_request_information(self,request_configuration: Optional[Oauth2PermissionGrantsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. + Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> Oauth2PermissionGrantsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class Oauth2PermissionGrantsRequestBuilderGetQueryParameters(): """ - Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. + Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/count/count_request_builder.py index 35be297ca1b..20b567e714f 100644 --- a/msgraph/generated/users/item/onenote/notebooks/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py index 4e68f0722c4..d6c6e033539 100644 --- a/msgraph/generated/users/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/get_notebook_from_web_url/get_notebook_from_web_url_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> Optional[CopyNotebookModel]: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CopyNotebookModel] @@ -54,7 +54,7 @@ async def post(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostRequestBody] = None, request_configuration: Optional[GetNotebookFromWebUrlRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. + Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[GetNotebookFromWebUrlPostReq if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py b/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py similarity index 89% rename from msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py rename to msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py index ffb2677ba0e..127f0785384 100644 --- a/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_response.py +++ b/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_get_response.py @@ -10,20 +10,20 @@ from ......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class GetRecentNotebooksWithIncludePersonalNotebooksResponse(BaseCollectionPaginationCountResponse): +class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[RecentNotebook]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetRecentNotebooksWithIncludePersonalNotebooksGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetRecentNotebooksWithIncludePersonalNotebooksResponse + Returns: GetRecentNotebooksWithIncludePersonalNotebooksGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return GetRecentNotebooksWithIncludePersonalNotebooksResponse() + return GetRecentNotebooksWithIncludePersonalNotebooksGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py index 07317fd4bee..ceb11d99cba 100644 --- a/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/get_recent_notebooks_with_include_personal_notebooks/get_recent_notebooks_with_include_personal_notebooks_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse class GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param request_adapter: The request adapter to use to execute the requests. Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['include_personal_notebooks'] = str(include_personal_notebooks) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks}){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse]: + async def get(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse]: """ Invoke function getRecentNotebooks param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksResponse] + Returns: Optional[GetRecentNotebooksWithIncludePersonalNotebooksGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[GetRecentNotebooksWithInclude } if not self.request_adapter: raise Exception("Http core is null") - from .get_recent_notebooks_with_include_personal_notebooks_response import GetRecentNotebooksWithIncludePersonalNotebooksResponse + from .get_recent_notebooks_with_include_personal_notebooks_get_response import GetRecentNotebooksWithIncludePersonalNotebooksGetResponse - return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetRecentNotebooksWithIncludePersonalNotebooksGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[GetRecentNot Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py index 66b8f73db87..6f085d3faa9 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/copy_notebook/copy_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_notebook_post_request_body import CopyNotebookPostRequestBody class CopyNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyNotebookPostRequestBody] = None, request_ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] = None, request_configuration: Optional[CopyNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyNotebookPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/notebook_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/notebook_item_request_builder.py index f56b327482a..33287f62752 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/notebook_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/notebook_item_request_builder.py @@ -13,8 +13,8 @@ from ......models.notebook import Notebook from ......models.o_data_errors.o_data_error import ODataError from .copy_notebook.copy_notebook_request_builder import CopyNotebookRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class NotebookItemRequestBuilder(BaseRequestBuilder): """ @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[NotebookItemRequestBuilder async def get(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Notebook]: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] Find more info here: https://learn.microsoft.com/graph/api/notebook-get?view=graph-rest-1.0 @@ -101,29 +101,29 @@ def to_delete_request_information(self,request_configuration: Optional[NotebookI Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[NotebookItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebookItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[Notebook] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -196,7 +196,7 @@ class NotebookItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class NotebookItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a notebook object. + Retrieve the properties and relationships of a notebook object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/count/count_request_builder.py index b1a439c6baa..9d4240c61ce 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py index 26e5888811a..28642152268 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py index 437adf56d55..17f5996b418 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py index 40f15a9d7aa..5a30839537e 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ........models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py index 74051299398..ca01bc679a9 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py index 93c6f64ada0..4afc1d458ad 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py index d6635686ce9..f2c655f72e2 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py index 17691a549b5..0a1dbaae879 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 72f301c8c7e..5cb7da7b4b8 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 186bbd17c38..46be5740975 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py index 40b92296108..e5b1afbeb69 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ..........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py index c676670fe13..c21f787c138 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py index b9898664415..948e14101c8 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .............models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index adb783de2b1..8740f274e16 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .............models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index 97d5963ba7e..1fa7e60ba3a 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ............models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index be5d74ae5ce..6e6ada7deb1 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 38ff29c70ee..d5fc8638ae3 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index bdfb6e60915..6bdf57fe3ef 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .............models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index 166a688499a..b5969c590cd 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .............models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py index 1240c9a1cf4..c8dbecb5af9 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from ...........models.onenote_page_collection_response import OnenotePageCollectionResponse + from ...........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 926550ae0d7..77ff92b8a04 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 1016c00cb2d..78d1f5cdd97 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py index 2e001f343fe..d558fe5ef22 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .........models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py index 146ab493a96..80468175e0d 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sectiongroups?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe async def post(self,body: Optional[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] @@ -92,24 +92,24 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new section group in the specified notebook. + Create a new section group in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified notebook. + Retrieve a list of section groups from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/count/count_request_builder.py index edde9b97008..3a89a9e5912 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 46c934e8c0b..8ddc9c6a909 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 7314677eb5c..c5b15ff0c1b 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py index 2ddd9eb417b..35a0b08f5c7 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py index c6edf44cf1b..334bef63e40 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py index 5d483b106f3..69cf47d522a 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 046ef0a7855..6fa7a9b16b2 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py index ed0ec65eaf9..d9144aa9d0b 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index ebb80dc5016..e7115e9a248 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index 04af57ab1e5..14fdba8c78e 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 2ae65b30c2e..7fa9756bc64 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py index 8e228e8eb5d..30ee4451c78 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py index 81ac71afd99..797f2a3fc95 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 7b984dead1d..5381b802925 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py index 57ea617b6e5..b1ae812b14a 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/notebooks/item/sections/sections_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/item/sections/sections_request_builder.py index 019d2fd5937..c56bc7a94e2 100644 --- a/msgraph/generated/users/item/onenote/notebooks/item/sections/sections_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/notebook-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified notebook. + Create a new onenoteSection in the specified notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified notebook. + Retrieve a list of onenoteSection objects from the specified notebook. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/notebooks/notebooks_request_builder.py b/msgraph/generated/users/item/onenote/notebooks/notebooks_request_builder.py index 5d19d25d1f0..3b574b05721 100644 --- a/msgraph/generated/users/item/onenote/notebooks/notebooks_request_builder.py +++ b/msgraph/generated/users/item/onenote/notebooks/notebooks_request_builder.py @@ -47,7 +47,7 @@ def by_notebook_id(self,notebook_id: str) -> NotebookItemRequestBuilder: async def get(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> Optional[NotebookCollectionResponse]: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NotebookCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-notebooks?view=graph-rest-1.0 @@ -81,7 +81,7 @@ def get_recent_notebooks_with_include_personal_notebooks(self,include_personal_n async def post(self,body: Optional[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> Optional[Notebook]: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Notebook] @@ -106,24 +106,24 @@ async def post(self,body: Optional[Notebook] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[NotebooksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Notebook] = None, request_configuration: Optional[NotebooksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote notebook. + Create a new OneNote notebook. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -131,13 +131,13 @@ def to_post_request_information(self,body: Optional[Notebook] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -172,7 +172,7 @@ def get_notebook_from_web_url(self) -> GetNotebookFromWebUrlRequestBuilder: @dataclass class NotebooksRequestBuilderGetQueryParameters(): """ - Retrieve a list of notebook objects. + Retrieve a list of notebook objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/onenote_request_builder.py b/msgraph/generated/users/item/onenote/onenote_request_builder.py index 7d775f01657..aeef04eb5ed 100644 --- a/msgraph/generated/users/item/onenote/onenote_request_builder.py +++ b/msgraph/generated/users/item/onenote/onenote_request_builder.py @@ -10,14 +10,14 @@ 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.onenote import Onenote + from ....models.o_data_errors.o_data_error import ODataError from .notebooks.notebooks_request_builder import NotebooksRequestBuilder from .operations.operations_request_builder import OperationsRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder from .resources.resources_request_builder import ResourcesRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class OnenoteRequestBuilder(BaseRequestBuilder): """ @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Onenote] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/operations/count/count_request_builder.py b/msgraph/generated/users/item/onenote/operations/count/count_request_builder.py index 0d26def4859..45dbb344b2c 100644 --- a/msgraph/generated/users/item/onenote/operations/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/operations/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/operations/item/onenote_operation_item_request_builder.py b/msgraph/generated/users/item/onenote/operations/item/onenote_operation_item_request_builder.py index 745a3aec090..98cfb0652e2 100644 --- a/msgraph/generated/users/item/onenote/operations/item/onenote_operation_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/operations/item/onenote_operation_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ......models.o_data_errors.o_data_error import ODataError class OnenoteOperationItemRequestBuilder(BaseRequestBuilder): """ @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[OnenoteOperationItemReques async def get(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] Find more info here: https://learn.microsoft.com/graph/api/onenoteoperation-get?view=graph-rest-1.0 @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteOp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteOperationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OnenoteOperationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteOperation] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -166,7 +166,7 @@ class OnenoteOperationItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class OnenoteOperationItemRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/operations/operations_request_builder.py b/msgraph/generated/users/item/onenote/operations/operations_request_builder.py index a9a0f262076..88622afa91e 100644 --- a/msgraph/generated/users/item/onenote/operations/operations_request_builder.py +++ b/msgraph/generated/users/item/onenote/operations/operations_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_operation import OnenoteOperation from .....models.onenote_operation_collection_response import OnenoteOperationCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_operation_item_request_builder import OnenoteOperationItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_operation_id(self,onenote_operation_id: str) -> OnenoteOperationI async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteOperationCollectionResponse]: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperationCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteOperation] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteOperation] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class OperationsRequestBuilderGetQueryParameters(): """ - Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. + Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/pages/count/count_request_builder.py b/msgraph/generated/users/item/onenote/pages/count/count_request_builder.py index 978f97ba948..99a2b8ac00e 100644 --- a/msgraph/generated/users/item/onenote/pages/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/pages/item/content/content_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/content/content_request_builder.py index e0b8e4b4291..b4169c56d2c 100644 --- a/msgraph/generated/users/item/onenote/pages/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .......models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py index 9978d59a28d..3beacf71f0e 100644 --- a/msgraph/generated/users/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/onenote_page_item_request_builder.py index 6f769536dd0..99d9b4823c2 100644 --- a/msgraph/generated/users/item/onenote/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ......models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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/page-delete?view=graph-rest-1.0 @@ -54,7 +54,7 @@ async def delete(self,request_configuration: Optional[OnenotePageItemRequestBuil async def get(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] Find more info here: https://learn.microsoft.com/graph/api/page-get?view=graph-rest-1.0 @@ -100,34 +100,34 @@ async def patch(self,body: Optional[OnenotePage] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a OneNote page. + Delete a OneNote page. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -227,7 +227,7 @@ class OnenotePageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigu @dataclass class OnenotePageItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. + Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index e319bd64206..019f4bb21cd 100644 --- a/msgraph/generated/users/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py index 4ca9dabb0ad..d142c1bdc80 100644 --- a/msgraph/generated/users/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/parent_section/parent_section_request_builder.py index f8e845664fa..a91e1d3eab9 100644 --- a/msgraph/generated/users/item/onenote/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .......models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/pages/item/preview/preview_request_builder.py b/msgraph/generated/users/item/onenote/pages/item/preview/preview_request_builder.py index 04a4d622790..03d0f6c02ca 100644 --- a/msgraph/generated/users/item/onenote/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .......models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/pages/pages_request_builder.py b/msgraph/generated/users/item/onenote/pages/pages_request_builder.py index 7499e291df7..a39db42ab54 100644 --- a/msgraph/generated/users/item/onenote/pages/pages_request_builder.py +++ b/msgraph/generated/users/item/onenote/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .....models.onenote_page_collection_response import OnenotePageCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects. + Retrieve a list of page objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/resources/count/count_request_builder.py b/msgraph/generated/users/item/onenote/resources/count/count_request_builder.py index 0a061e135fd..ff67f279482 100644 --- a/msgraph/generated/users/item/onenote/resources/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/resources/item/content/content_request_builder.py b/msgraph/generated/users/item/onenote/resources/item/content/content_request_builder.py index 2ce1b343787..5e00915e6dc 100644 --- a/msgraph/generated/users/item/onenote/resources/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/onenote/resources/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from .......models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/onenote/resources/item/onenote_resource_item_request_builder.py b/msgraph/generated/users/item/onenote/resources/item/onenote_resource_item_request_builder.py index f08d674d0f2..45e4b857439 100644 --- a/msgraph/generated/users/item/onenote/resources/item/onenote_resource_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/resources/item/onenote_resource_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_resource import OnenoteResource + from ......models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder class OnenoteResourceItemRequestBuilder(BaseRequestBuilder): @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OnenoteResourceItemRequest async def get(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResource]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResource] """ @@ -98,29 +98,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[OnenoteResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[OnenoteResource] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -175,7 +175,7 @@ class OnenoteResourceItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class OnenoteResourceItemRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/resources/resources_request_builder.py b/msgraph/generated/users/item/onenote/resources/resources_request_builder.py index 511cf6fff40..d74e1a2534b 100644 --- a/msgraph/generated/users/item/onenote/resources/resources_request_builder.py +++ b/msgraph/generated/users/item/onenote/resources/resources_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_resource import OnenoteResource from .....models.onenote_resource_collection_response import OnenoteResourceCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_resource_item_request_builder import OnenoteResourceItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_resource_id(self,onenote_resource_id: str) -> OnenoteResourceItem async def get(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteResourceCollectionResponse]: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteResourceCollectionResponse] """ @@ -90,19 +90,19 @@ async def post(self,body: Optional[OnenoteResource] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[ResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteResource] = None, request_configuration: Optional[ResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[OnenoteResource] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -147,7 +147,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ResourcesRequestBuilderGetQueryParameters(): """ - The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/section_groups/count/count_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/count/count_request_builder.py index 95d61574a04..4261e5bda6d 100644 --- a/msgraph/generated/users/item/onenote/section_groups/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py index abd17492997..2123ff17bfc 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py index e7196d2070c..32bcf30f71b 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/section_group_item_request_builder.py index 88a1fa4d1b9..756f753fe18 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/section_group_item_request_builder.py @@ -14,8 +14,8 @@ from ......models.section_group import SectionGroup from .parent_notebook.parent_notebook_request_builder import ParentNotebookRequestBuilder from .parent_section_group.parent_section_group_request_builder import ParentSectionGroupRequestBuilder - from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder from .sections.sections_request_builder import SectionsRequestBuilder + from .section_groups.section_groups_request_builder import SectionGroupsRequestBuilder class SectionGroupItemRequestBuilder(BaseRequestBuilder): """ @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[SectionGroupItemRequestBui async def get(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroup]: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroup] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-get?view=graph-rest-1.0 @@ -102,29 +102,29 @@ def to_delete_request_information(self,request_configuration: Optional[SectionGr Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SectionGroupItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[SectionGroup] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -206,7 +206,7 @@ class SectionGroupItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class SectionGroupItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a sectionGroup object. + Retrieve the properties and relationships of a sectionGroup object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/section_groups/item/section_groups/count/count_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/section_groups/count/count_request_builder.py index def7105af54..a98da1ed0e0 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/section_groups/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/section_groups/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py index e19502b33b3..f27c6e4cd77 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/section_groups/item/section_group_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SectionGroup Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupItemRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py index dab2ba6a615..45519e76f09 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/section_groups/section_groups_request_builder.py @@ -44,7 +44,7 @@ def by_section_group_id1(self,section_group_id1: str) -> SectionGroupItemRequest async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGe def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SectionGroupsRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of section groups from the specified section group. + Retrieve a list of section groups from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/count/count_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/count/count_request_builder.py index e7331983b8b..da55817df11 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 3d4be8f5eea..3a39d207b46 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index 6e026f01b69..6a92352edee 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py index 3b54a9dc58a..e8918d6a8ab 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ........models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -102,12 +102,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -117,14 +117,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenoteSecti Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py index bb6f7428fb8..906d5315a84 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py index 2e07b45b78b..d11a04a8607 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ...........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 0f6b5707d55..4ed050d6510 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from ...........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py index db5e4969165..c56bc345649 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ..........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 842ff5f344e..8dfbdce0243 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index b0761a346ba..5549a4bb57c 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py index 4c4e75a246b..39b862f02e9 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ...........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py index 74d4d4cf103..87498a23e95 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from ...........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py index 0ea4bd28eec..9b3963e954c 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .........models.onenote_page_collection_response import OnenotePageCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py index 2fe2a71f8c3..353eb4b4f37 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py index b801b863532..aaa9794dc9a 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/section_groups/item/sections/sections_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/item/sections/sections_request_builder.py index 4320445de96..88db2cbfbfe 100644 --- a/msgraph/generated/users/item/onenote/section_groups/item/sections/sections_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/item/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .......models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequ async def post(self,body: Optional[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new onenoteSection in the specified section group. + Create a new onenoteSection in the specified section group. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects from the specified section group. + Retrieve a list of onenoteSection objects from the specified section group. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/section_groups/section_groups_request_builder.py b/msgraph/generated/users/item/onenote/section_groups/section_groups_request_builder.py index bbedbed6843..a0940caaab3 100644 --- a/msgraph/generated/users/item/onenote/section_groups/section_groups_request_builder.py +++ b/msgraph/generated/users/item/onenote/section_groups/section_groups_request_builder.py @@ -45,7 +45,7 @@ def by_section_group_id(self,section_group_id: str) -> SectionGroupItemRequestBu async def get(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> Optional[SectionGroupCollectionResponse]: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SectionGroupCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sectiongroups?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[SectionGroup] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[SectionGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[SectionGroup] = None, request_configuration: Optional[SectionGroupsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[SectionGroup] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionGroupsRequestBuilderGetQueryParameters(): """ - Retrieve a list of sectionGroup objects. + Retrieve a list of sectionGroup objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/sections/count/count_request_builder.py b/msgraph/generated/users/item/onenote/sections/count/count_request_builder.py index c149e080d63..32ba130939b 100644 --- a/msgraph/generated/users/item/onenote/sections/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py index 7f16a204fd7..e9f38e36788 100644 --- a/msgraph/generated/users/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/copy_to_notebook/copy_to_notebook_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_notebook_post_request_body import CopyToNotebookPostRequestBody class CopyToNotebookRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToNotebookPostRequestBody] = None, reques def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBody] = None, request_configuration: Optional[CopyToNotebookRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToNotebookPostRequestBod if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py index ec7ea8e2e43..d74811f90aa 100644 --- a/msgraph/generated/users/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/copy_to_section_group/copy_to_section_group_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .......models.o_data_errors.o_data_error import ODataError from .copy_to_section_group_post_request_body import CopyToSectionGroupPostRequestBody class CopyToSectionGroupRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, re def to_post_request_information(self,body: Optional[CopyToSectionGroupPostRequestBody] = None, request_configuration: Optional[CopyToSectionGroupRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionGroupPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/sections/item/onenote_section_item_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/onenote_section_item_request_builder.py index f77778bc473..542b27770ac 100644 --- a/msgraph/generated/users/item/onenote/sections/item/onenote_section_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/onenote_section_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from ......models.o_data_errors.o_data_error import ODataError from .copy_to_notebook.copy_to_notebook_request_builder import CopyToNotebookRequestBuilder from .copy_to_section_group.copy_to_section_group_request_builder import CopyToSectionGroupRequestBuilder from .pages.pages_request_builder import PagesRequestBuilder @@ -52,7 +52,7 @@ async def delete(self,request_configuration: Optional[OnenoteSectionItemRequestB async def get(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSection]: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSection] Find more info here: https://learn.microsoft.com/graph/api/section-get?view=graph-rest-1.0 @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[OnenoteSe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenoteSectionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[OnenoteSectionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenoteSection] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class OnenoteSectionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class OnenoteSectionItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a onenoteSection object. + Retrieve the properties and relationships of a onenoteSection object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/count/count_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/count/count_request_builder.py index 55069d49c38..a5fefa39cfd 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/count/count_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/content/content_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/content/content_request_builder.py index 578ef096ed3..f066682d5c4 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/content/content_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from .........models.o_data_errors.o_data_error import ODataError class ContentRequestBuilder(BaseRequestBuilder): """ @@ -77,12 +77,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -95,13 +95,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py index 5e6f97080cc..00e63c07f37 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/copy_to_section/copy_to_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_operation import OnenoteOperation + from .........models.o_data_errors.o_data_error import ODataError from .copy_to_section_post_request_body import CopyToSectionPostRequestBody class CopyToSectionRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenoteOperation]: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteOperation] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CopyToSectionPostRequestBody] = None, request def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody] = None, request_configuration: Optional[CopyToSectionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. + Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CopyToSectionPostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py index c95a04293b6..fe020f7e784 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_page_item_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page import OnenotePage + from ........models.o_data_errors.o_data_error import ODataError from .content.content_request_builder import ContentRequestBuilder from .copy_to_section.copy_to_section_request_builder import CopyToSectionRequestBuilder from .onenote_patch_content.onenote_patch_content_request_builder import OnenotePatchContentRequestBuilder @@ -103,12 +103,12 @@ def to_delete_request_information(self,request_configuration: Optional[OnenotePa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnenotePageItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -118,14 +118,14 @@ def to_get_request_information(self,request_configuration: Optional[OnenotePageI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[OnenotePageItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[OnenotePage] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py index 1ba391276aa..ba1f62eb76e 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/onenote_patch_content/onenote_patch_content_request_builder.py @@ -58,12 +58,12 @@ def to_post_request_information(self,body: Optional[OnenotePatchContentPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py index bf1962a1cd9..f83a1d77caa 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py index f92cb1facdf..491adbeeba3 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/parent_section/parent_section_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_section import OnenoteSection + from .........models.o_data_errors.o_data_error import ODataError class ParentSectionRequestBuilder(BaseRequestBuilder): """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/item/preview/preview_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/item/preview/preview_request_builder.py index 0500afe3794..43bd33f2819 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/item/preview/preview_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/item/preview/preview_request_builder.py @@ -10,8 +10,8 @@ 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.onenote_page_preview import OnenotePagePreview + from .........models.o_data_errors.o_data_error import ODataError class PreviewRequestBuilder(BaseRequestBuilder): """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[PreviewReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> PreviewRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/item/pages/pages_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/pages/pages_request_builder.py index 1002e9afe1f..2f4662029d9 100644 --- a/msgraph/generated/users/item/onenote/sections/item/pages/pages_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/pages/pages_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_page import OnenotePage from .......models.onenote_page_collection_response import OnenotePageCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_page_item_request_builder import OnenotePageItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_page_id(self,onenote_page_id: str) -> OnenotePageItemRequestBuild async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenotePageCollectionResponse]: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePageCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[PagesRequestBuilderGetRequest async def post(self,body: Optional[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> Optional[OnenotePage]: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenotePage] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OnenotePage] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenotePage] = None, request_configuration: Optional[PagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new page in the specified section. + Create a new page in the specified section. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OnenotePage] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PagesRequestBuilderGetQueryParameters(): """ - Retrieve a list of page objects from the specified section. + Retrieve a list of page objects from the specified section. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py index 2864685fcce..62a86fa4320 100644 --- a/msgraph/generated/users/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/parent_notebook/parent_notebook_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentNotebo Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentNotebookRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py b/msgraph/generated/users/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py index 172fa063807..a969bdb05dd 100644 --- a/msgraph/generated/users/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/item/parent_section_group/parent_section_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[ParentSectio Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ParentSectionGroupRequestBuilder: diff --git a/msgraph/generated/users/item/onenote/sections/sections_request_builder.py b/msgraph/generated/users/item/onenote/sections/sections_request_builder.py index e1bf0372a75..97f4e791a30 100644 --- a/msgraph/generated/users/item/onenote/sections/sections_request_builder.py +++ b/msgraph/generated/users/item/onenote/sections/sections_request_builder.py @@ -10,9 +10,9 @@ 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.onenote_section import OnenoteSection from .....models.onenote_section_collection_response import OnenoteSectionCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.onenote_section_item_request_builder import OnenoteSectionItemRequestBuilder @@ -45,7 +45,7 @@ def by_onenote_section_id(self,onenote_section_id: str) -> OnenoteSectionItemReq async def get(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnenoteSectionCollectionResponse]: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnenoteSectionCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onenote-list-sections?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[OnenoteSection] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[SectionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnenoteSection] = None, request_configuration: Optional[SectionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[OnenoteSection] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SectionsRequestBuilderGetQueryParameters(): """ - Retrieve a list of onenoteSection objects. + Retrieve a list of onenoteSection objects. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/online_meetings/count/count_request_builder.py b/msgraph/generated/users/item/online_meetings/count/count_request_builder.py index 6580bc070ce..a4f9b9ad209 100644 --- a/msgraph/generated/users/item/online_meetings/count/count_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/online_meetings/create_or_get/create_or_get_request_builder.py b/msgraph/generated/users/item/online_meetings/create_or_get/create_or_get_request_builder.py index dbbc391a798..735e0bedb7a 100644 --- a/msgraph/generated/users/item/online_meetings/create_or_get/create_or_get_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/create_or_get/create_or_get_request_builder.py @@ -10,8 +10,8 @@ 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.online_meeting import OnlineMeeting + from .....models.o_data_errors.o_data_error import ODataError from .create_or_get_post_request_body import CreateOrGetPostRequestBody class CreateOrGetRequestBuilder(BaseRequestBuilder): @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateOrGetPostRequestBody] = None, request_configuration: Optional[CreateOrGetRequestBuilderPostRequestConfiguration] = None) -> Optional[OnlineMeeting]: """ - Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. + Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeeting] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateOrGetPostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[CreateOrGetPostRequestBody] = None, request_configuration: Optional[CreateOrGetRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. + Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateOrGetPostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/online_meetings/item/attendance_reports/attendance_reports_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendance_reports/attendance_reports_request_builder.py index 7fac85b01f1..1ff86770928 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendance_reports/attendance_reports_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendance_reports/attendance_reports_request_builder.py @@ -45,7 +45,7 @@ def by_meeting_attendance_report_id(self,meeting_attendance_report_id: str) -> M async def get(self,request_configuration: Optional[AttendanceReportsRequestBuilderGetRequestConfiguration] = None) -> Optional[MeetingAttendanceReportCollectionResponse]: """ - Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MeetingAttendanceReportCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/meetingattendancereport-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[MeetingAttendanceReport] = None, request_conf def to_get_request_information(self,request_configuration: Optional[AttendanceReportsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MeetingAttendanceReport] = None, request_configuration: Optional[AttendanceReportsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[MeetingAttendanceReport] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AttendanceReportsRequestBuilderGetQueryParameters(): """ - Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/online_meetings/item/attendance_reports/count/count_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendance_reports/count/count_request_builder.py index c224918773a..91a4d7562d6 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendance_reports/count/count_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendance_reports/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py index 10947b31cb3..e0b6f7c30e3 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.py @@ -45,7 +45,7 @@ def by_attendance_record_id(self,attendance_record_id: str) -> AttendanceRecordI async def get(self,request_configuration: Optional[AttendanceRecordsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttendanceRecordCollectionResponse]: """ - Get a list of attendanceRecord objects and their properties. + Get a list of attendanceRecord objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttendanceRecordCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/attendancerecord-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AttendanceRecord] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[AttendanceRecordsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of attendanceRecord objects and their properties. + Get a list of attendanceRecord objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttendanceRecord] = None, request_configuration: Optional[AttendanceRecordsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AttendanceRecord] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AttendanceRecordsRequestBuilderGetQueryParameters(): """ - Get a list of attendanceRecord objects and their properties. + Get a list of attendanceRecord objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py index a3fb2ca6512..29684da8a74 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py index 724e9815936..0a29400ffa2 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attendanc Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttendanceRecordItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[AttendanceRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttendanceRecord] = None, request_configuration: Optional[AttendanceRecordItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[AttendanceRecord] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py index f8dcc1b7a37..1620ade6fc0 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[MeetingAttendanceReportIte async def get(self,request_configuration: Optional[MeetingAttendanceReportItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MeetingAttendanceReport]: """ - Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MeetingAttendanceReport] Find more info here: https://learn.microsoft.com/graph/api/meetingattendancereport-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[MeetingAt Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[MeetingAttendanceReportItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[MeetingAttendanceReport] = None, request_configuration: Optional[MeetingAttendanceReportItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[MeetingAttendanceReport] = if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class MeetingAttendanceReportItemRequestBuilderDeleteRequestConfiguration(BaseRe @dataclass class MeetingAttendanceReportItemRequestBuilderGetQueryParameters(): """ - Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/online_meetings/item/attendee_report/attendee_report_request_builder.py b/msgraph/generated/users/item/online_meetings/item/attendee_report/attendee_report_request_builder.py index 6efb6e97802..f87164bb203 100644 --- a/msgraph/generated/users/item/online_meetings/item/attendee_report/attendee_report_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/attendee_report/attendee_report_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[AttendeeReportRequestBuilderGetRequestConfiguration] = None) -> bytes: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Get attendeeReport for the navigation property onlineMeetings 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/onlinemeeting-get?view=graph-rest-1.0 @@ -47,7 +47,7 @@ async def get(self,request_configuration: Optional[AttendeeReportRequestBuilderG async def put(self,body: bytes, request_configuration: Optional[AttendeeReportRequestBuilderPutRequestConfiguration] = None) -> bytes: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Update attendeeReport for the navigation property onlineMeetings in users param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes @@ -69,22 +69,22 @@ async def put(self,body: bytes, request_configuration: Optional[AttendeeReportRe def to_get_request_information(self,request_configuration: Optional[AttendeeReportRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Get attendeeReport for the navigation property onlineMeetings from users 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[AttendeeReportRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ - The content stream of the attendee report of a Microsoft Teams live event. Read-only. + Update attendeeReport for the navigation property onlineMeetings in users param body: Binary request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.py b/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.py new file mode 100644 index 00000000000..41f3bc0a40b --- /dev/null +++ b/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_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 GetVirtualAppointmentJoinWebUrlGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described 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) -> GetVirtualAppointmentJoinWebUrlGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetVirtualAppointmentJoinWebUrlGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetVirtualAppointmentJoinWebUrlGetResponse() + + 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/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py b/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py index 78bcdccc422..075f4492389 100644 --- a/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .get_virtual_appointment_join_web_url_response import GetVirtualAppointmentJoinWebUrlResponse + from .get_virtual_appointment_join_web_url_get_response import GetVirtualAppointmentJoinWebUrlGetResponse class GetVirtualAppointmentJoinWebUrlRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onlineMeetings/{onlineMeeting%2Did}/getVirtualAppointmentJoinWebUrl()", path_parameters) - async def get(self,request_configuration: Optional[GetVirtualAppointmentJoinWebUrlRequestBuilderGetRequestConfiguration] = None) -> Optional[GetVirtualAppointmentJoinWebUrlResponse]: + async def get(self,request_configuration: Optional[GetVirtualAppointmentJoinWebUrlRequestBuilderGetRequestConfiguration] = None) -> Optional[GetVirtualAppointmentJoinWebUrlGetResponse]: """ Invoke function getVirtualAppointmentJoinWebUrl param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[GetVirtualAppointmentJoinWebUrlResponse] + Returns: Optional[GetVirtualAppointmentJoinWebUrlGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[GetVirtualAppointmentJoinWebU } if not self.request_adapter: raise Exception("Http core is null") - from .get_virtual_appointment_join_web_url_response import GetVirtualAppointmentJoinWebUrlResponse + from .get_virtual_appointment_join_web_url_get_response import GetVirtualAppointmentJoinWebUrlGetResponse - return await self.request_adapter.send_async(request_info, GetVirtualAppointmentJoinWebUrlResponse, error_mapping) + return await self.request_adapter.send_async(request_info, GetVirtualAppointmentJoinWebUrlGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[GetVirtualAppointmentJoinWebUrlRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,13 +54,13 @@ def to_get_request_information(self,request_configuration: Optional[GetVirtualAp Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> GetVirtualAppointmentJoinWebUrlRequestBuilder: diff --git a/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py b/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py deleted file mode 100644 index 4e443c1cc72..00000000000 --- a/msgraph/generated/users/item/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 GetVirtualAppointmentJoinWebUrlResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described 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) -> GetVirtualAppointmentJoinWebUrlResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: GetVirtualAppointmentJoinWebUrlResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return GetVirtualAppointmentJoinWebUrlResponse() - - 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/users/item/online_meetings/item/online_meeting_item_request_builder.py b/msgraph/generated/users/item/online_meetings/item/online_meeting_item_request_builder.py index 9bfd54021f8..d0e5079c408 100644 --- a/msgraph/generated/users/item/online_meetings/item/online_meeting_item_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/online_meeting_item_request_builder.py @@ -10,11 +10,12 @@ 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.online_meeting import OnlineMeeting + from .....models.o_data_errors.o_data_error import ODataError from .attendance_reports.attendance_reports_request_builder import AttendanceReportsRequestBuilder from .attendee_report.attendee_report_request_builder import AttendeeReportRequestBuilder from .get_virtual_appointment_join_web_url.get_virtual_appointment_join_web_url_request_builder import GetVirtualAppointmentJoinWebUrlRequestBuilder + from .transcripts.transcripts_request_builder import TranscriptsRequestBuilder class OnlineMeetingItemRequestBuilder(BaseRequestBuilder): """ @@ -31,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OnlineMeetingItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete an onlineMeeting object. + Delete an onlineMeeting object. This API is available in the following national cloud deployments. 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/onlinemeeting-delete?view=graph-rest-1.0 @@ -51,7 +52,7 @@ async def delete(self,request_configuration: Optional[OnlineMeetingItemRequestBu async def get(self,request_configuration: Optional[OnlineMeetingItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OnlineMeeting]: """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeeting] Find more info here: https://learn.microsoft.com/graph/api/onlinemeeting-get?view=graph-rest-1.0 @@ -73,7 +74,7 @@ async def get(self,request_configuration: Optional[OnlineMeetingItemRequestBuild async def patch(self,body: Optional[OnlineMeeting] = None, request_configuration: Optional[OnlineMeetingItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[OnlineMeeting]: """ - Update the properties of the specified onlineMeeting object. Please see Request body section for the list of properties that support updating. + Update the properties of the specified onlineMeeting object. Please see Request body section for the list of properties that support updating. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeeting] @@ -98,39 +99,39 @@ async def patch(self,body: Optional[OnlineMeeting] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[OnlineMeetingItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete an onlineMeeting object. + Delete an onlineMeeting object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OnlineMeetingItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnlineMeeting] = None, request_configuration: Optional[OnlineMeetingItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the specified onlineMeeting object. Please see Request body section for the list of properties that support updating. + Update the properties of the specified onlineMeeting object. Please see Request body section for the list of properties that support updating. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -138,13 +139,13 @@ def to_patch_request_information(self,body: Optional[OnlineMeeting] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -185,6 +186,15 @@ def get_virtual_appointment_join_web_url(self) -> GetVirtualAppointmentJoinWebUr return GetVirtualAppointmentJoinWebUrlRequestBuilder(self.request_adapter, self.path_parameters) + @property + def transcripts(self) -> TranscriptsRequestBuilder: + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + """ + from .transcripts.transcripts_request_builder import TranscriptsRequestBuilder + + return TranscriptsRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass @@ -198,7 +208,7 @@ class OnlineMeetingItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class OnlineMeetingItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/permission_grants/delta/delta_request_builder.py b/msgraph/generated/users/item/online_meetings/item/transcripts/count/count_request_builder.py similarity index 65% rename from msgraph/generated/users/item/chats/item/permission_grants/delta/delta_request_builder.py rename to msgraph/generated/users/item/online_meetings/item/transcripts/count/count_request_builder.py index 7070da3a829..9d43e1b0e72 100644 --- a/msgraph/generated/users/item/chats/item/permission_grants/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/item/transcripts/count/count_request_builder.py @@ -11,26 +11,25 @@ if TYPE_CHECKING: from .......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse -class DeltaRequestBuilder(BaseRequestBuilder): +class CountRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Provides operations to count the resources in the collection. """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onlineMeetings/{onlineMeeting%2Did}/transcripts/$count{?%24search,%24filter}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: """ - Invoke function delta + Get the number of the resource param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[int] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +42,39 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse - - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Get the number of the resource param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info - def with_url(self,raw_url: Optional[str] = None) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: CountRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return CountRequestBuilder(self.request_adapter, raw_url) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class CountRequestBuilderGetQueryParameters(): """ - Invoke function delta + Get the number of the resource """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -87,55 +84,30 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class CountRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/users/item/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py b/msgraph/generated/users/item/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py new file mode 100644 index 00000000000..6b6f164e80f --- /dev/null +++ b/msgraph/generated/users/item/online_meetings/item/transcripts/item/call_transcript_item_request_builder.py @@ -0,0 +1,235 @@ +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.call_transcript import CallTranscript + from .......models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + from .metadata_content.metadata_content_request_builder import MetadataContentRequestBuilder + +class CallTranscriptItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CallTranscriptItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[CallTranscriptItemRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property transcripts for users + 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[CallTranscriptItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + Find more info here: https://learn.microsoft.com/graph/api/calltranscript-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.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + async def patch(self,body: Optional[CallTranscript] = None, request_configuration: Optional[CallTranscriptItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + Update the navigation property transcripts in users + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + """ + 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.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[CallTranscriptItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property transcripts for users + 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(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 + return request_info + + def to_get_request_information(self,request_configuration: Optional[CallTranscriptItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. This API is available in the following national cloud deployments. + 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(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[CallTranscript] = None, request_configuration: Optional[CallTranscriptItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property transcripts in users + param body: The request body + param request_configuration: Configuration for 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(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) -> CallTranscriptItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CallTranscriptItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CallTranscriptItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the user entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def metadata_content(self) -> MetadataContentRequestBuilder: + """ + Provides operations to manage the media for the user entity. + """ + from .metadata_content.metadata_content_request_builder import MetadataContentRequestBuilder + + return MetadataContentRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CallTranscriptItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class CallTranscriptItemRequestBuilderGetQueryParameters(): + """ + Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. This API is available in the following national cloud deployments. + """ + 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 CallTranscriptItemRequestBuilderGetRequestConfiguration(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[CallTranscriptItemRequestBuilder.CallTranscriptItemRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CallTranscriptItemRequestBuilderPatchRequestConfiguration(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/users/item/online_meetings/item/transcripts/item/content/content_request_builder.py b/msgraph/generated/users/item/online_meetings/item/transcripts/item/content/content_request_builder.py new file mode 100644 index 00000000000..87c1f99bea4 --- /dev/null +++ b/msgraph/generated/users/item/online_meetings/item/transcripts/item/content/content_request_builder.py @@ -0,0 +1,138 @@ +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.call_transcript import CallTranscript + from ........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the user entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/content", path_parameters) + + async def get(self,request_configuration: Optional[ContentRequestBuilderGetRequestConfiguration] = None) -> bytes: + """ + The content of the transcript. Read-only. + 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/onlinemeeting-list-transcripts?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") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + The content of the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ContentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The content of the transcript. 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(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 + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: + """ + The content of the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(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/users/item/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py b/msgraph/generated/users/item/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py new file mode 100644 index 00000000000..4b4029bad8c --- /dev/null +++ b/msgraph/generated/users/item/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.py @@ -0,0 +1,134 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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 MetadataContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the user entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new MetadataContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/metadataContent", path_parameters) + + async def get(self,request_configuration: Optional[MetadataContentRequestBuilderGetRequestConfiguration] = None) -> bytes: + """ + The time-aligned metadata of the utterances in the transcript. Read-only. + 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/onlinemeeting-list-transcripts?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") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[MetadataContentRequestBuilderPutRequestConfiguration] = None) -> bytes: + """ + The time-aligned metadata of the utterances in the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[MetadataContentRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The time-aligned metadata of the utterances in the transcript. 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(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 + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[MetadataContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: + """ + The time-aligned metadata of the utterances in the transcript. Read-only. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT + request_info.set_stream_content(body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> MetadataContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MetadataContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MetadataContentRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MetadataContentRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class MetadataContentRequestBuilderPutRequestConfiguration(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/users/item/online_meetings/item/transcripts/transcripts_request_builder.py b/msgraph/generated/users/item/online_meetings/item/transcripts/transcripts_request_builder.py new file mode 100644 index 00000000000..588343f5352 --- /dev/null +++ b/msgraph/generated/users/item/online_meetings/item/transcripts/transcripts_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from 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.call_transcript import CallTranscript + from ......models.call_transcript_collection_response import CallTranscriptCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.call_transcript_item_request_builder import CallTranscriptItemRequestBuilder + +class TranscriptsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TranscriptsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/onlineMeetings/{onlineMeeting%2Did}/transcripts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + def by_call_transcript_id(self,call_transcript_id: str) -> CallTranscriptItemRequestBuilder: + """ + Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + param call_transcript_id: The unique identifier of callTranscript + Returns: CallTranscriptItemRequestBuilder + """ + if not call_transcript_id: + raise TypeError("call_transcript_id cannot be null.") + from .item.call_transcript_item_request_builder import CallTranscriptItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["callTranscript%2Did"] = call_transcript_id + return CallTranscriptItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[TranscriptsRequestBuilderGetRequestConfiguration] = None) -> Optional[CallTranscriptCollectionResponse]: + """ + Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. This API is available in the following national cloud deployments. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscriptCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/onlinemeeting-list-transcripts?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.call_transcript_collection_response import CallTranscriptCollectionResponse + + return await self.request_adapter.send_async(request_info, CallTranscriptCollectionResponse, error_mapping) + + async def post(self,body: Optional[CallTranscript] = None, request_configuration: Optional[TranscriptsRequestBuilderPostRequestConfiguration] = None) -> Optional[CallTranscript]: + """ + Create new navigation property to transcripts for users + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CallTranscript] + """ + if not body: + raise TypeError("body cannot be null.") + request_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.call_transcript import CallTranscript + + return await self.request_adapter.send_async(request_info, CallTranscript, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TranscriptsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. This API is available in the following national cloud deployments. + 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(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[CallTranscript] = None, request_configuration: Optional[TranscriptsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to transcripts for users + param body: The request body + param request_configuration: Configuration for 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(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) -> TranscriptsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TranscriptsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TranscriptsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TranscriptsRequestBuilderGetQueryParameters(): + """ + Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. This API is available in the following national cloud deployments. + """ + 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 TranscriptsRequestBuilderGetRequestConfiguration(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[TranscriptsRequestBuilder.TranscriptsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TranscriptsRequestBuilderPostRequestConfiguration(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/users/item/online_meetings/online_meetings_request_builder.py b/msgraph/generated/users/item/online_meetings/online_meetings_request_builder.py index 052121ddf6e..6bfd259d52c 100644 --- a/msgraph/generated/users/item/online_meetings/online_meetings_request_builder.py +++ b/msgraph/generated/users/item/online_meetings/online_meetings_request_builder.py @@ -10,9 +10,9 @@ 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.online_meeting import OnlineMeeting from ....models.online_meeting_collection_response import OnlineMeetingCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .create_or_get.create_or_get_request_builder import CreateOrGetRequestBuilder from .item.online_meeting_item_request_builder import OnlineMeetingItemRequestBuilder @@ -46,7 +46,7 @@ def by_online_meeting_id(self,online_meeting_id: str) -> OnlineMeetingItemReques async def get(self,request_configuration: Optional[OnlineMeetingsRequestBuilderGetRequestConfiguration] = None) -> Optional[OnlineMeetingCollectionResponse]: """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeetingCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/onlinemeeting-get?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[OnlineMeetingsRequestBuilderG async def post(self,body: Optional[OnlineMeeting] = None, request_configuration: Optional[OnlineMeetingsRequestBuilderPostRequestConfiguration] = None) -> Optional[OnlineMeeting]: """ - Create an online meeting on behalf of a user. + Create an online meeting on behalf of a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OnlineMeeting] @@ -93,24 +93,24 @@ async def post(self,body: Optional[OnlineMeeting] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[OnlineMeetingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OnlineMeeting] = None, request_configuration: Optional[OnlineMeetingsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an online meeting on behalf of a user. + Create an online meeting on behalf of a user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[OnlineMeeting] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_or_get(self) -> CreateOrGetRequestBuilder: @dataclass class OnlineMeetingsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/outlook/master_categories/count/count_request_builder.py b/msgraph/generated/users/item/outlook/master_categories/count/count_request_builder.py index 55dc7484150..023a7f807b3 100644 --- a/msgraph/generated/users/item/outlook/master_categories/count/count_request_builder.py +++ b/msgraph/generated/users/item/outlook/master_categories/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/outlook/master_categories/item/outlook_category_item_request_builder.py b/msgraph/generated/users/item/outlook/master_categories/item/outlook_category_item_request_builder.py index 17e43a2c50d..d12f975f230 100644 --- a/msgraph/generated/users/item/outlook/master_categories/item/outlook_category_item_request_builder.py +++ b/msgraph/generated/users/item/outlook/master_categories/item/outlook_category_item_request_builder.py @@ -10,8 +10,8 @@ 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.outlook_category import OutlookCategory + from ......models.o_data_errors.o_data_error import ODataError class OutlookCategoryItemRequestBuilder(BaseRequestBuilder): """ @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[OutlookCategoryItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete the specified outlookCategory object. + Delete the specified outlookCategory object. This API is available in the following national cloud deployments. 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/outlookcategory-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[OutlookCategoryItemRequest async def get(self,request_configuration: Optional[OutlookCategoryItemRequestBuilderGetRequestConfiguration] = None) -> Optional[OutlookCategory]: """ - Get the properties and relationships of the specified outlookCategory object. + Get the properties and relationships of the specified outlookCategory object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OutlookCategory] Find more info here: https://learn.microsoft.com/graph/api/outlookcategory-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[OutlookCategoryItemRequestBui async def patch(self,body: Optional[OutlookCategory] = None, request_configuration: Optional[OutlookCategoryItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[OutlookCategory]: """ - Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. + Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OutlookCategory] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[OutlookCategory] = None, request_configurati def to_delete_request_information(self,request_configuration: Optional[OutlookCategoryItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete the specified outlookCategory object. + Delete the specified outlookCategory object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[OutlookCategoryItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the properties and relationships of the specified outlookCategory object. + Get the properties and relationships of the specified outlookCategory object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OutlookCategory] = None, request_configuration: Optional[OutlookCategoryItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. + Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[OutlookCategory] = None, re if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class OutlookCategoryItemRequestBuilderDeleteRequestConfiguration(BaseRequestCon @dataclass class OutlookCategoryItemRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of the specified outlookCategory object. + Get the properties and relationships of the specified outlookCategory object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/outlook/master_categories/master_categories_request_builder.py b/msgraph/generated/users/item/outlook/master_categories/master_categories_request_builder.py index d1d369d6627..a153efb87db 100644 --- a/msgraph/generated/users/item/outlook/master_categories/master_categories_request_builder.py +++ b/msgraph/generated/users/item/outlook/master_categories/master_categories_request_builder.py @@ -10,9 +10,9 @@ 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.outlook_category import OutlookCategory from .....models.outlook_category_collection_response import OutlookCategoryCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError from .count.count_request_builder import CountRequestBuilder from .item.outlook_category_item_request_builder import OutlookCategoryItemRequestBuilder @@ -45,7 +45,7 @@ def by_outlook_category_id(self,outlook_category_id: str) -> OutlookCategoryItem async def get(self,request_configuration: Optional[MasterCategoriesRequestBuilderGetRequestConfiguration] = None) -> Optional[OutlookCategoryCollectionResponse]: """ - Get all the categories that have been defined for the user. + Get all the categories that have been defined for the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OutlookCategoryCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/outlookuser-list-mastercategories?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[MasterCategoriesRequestBuilde async def post(self,body: Optional[OutlookCategory] = None, request_configuration: Optional[MasterCategoriesRequestBuilderPostRequestConfiguration] = None) -> Optional[OutlookCategory]: """ - Create an outlookCategory object in the user's master list of categories. + Create an outlookCategory object in the user's master list of categories. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OutlookCategory] @@ -92,24 +92,24 @@ async def post(self,body: Optional[OutlookCategory] = None, request_configuratio def to_get_request_information(self,request_configuration: Optional[MasterCategoriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get all the categories that have been defined for the user. + Get all the categories that have been defined for the user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[OutlookCategory] = None, request_configuration: Optional[MasterCategoriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an outlookCategory object in the user's master list of categories. + Create an outlookCategory object in the user's master list of categories. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[OutlookCategory] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MasterCategoriesRequestBuilderGetQueryParameters(): """ - Get all the categories that have been defined for the user. + Get all the categories that have been defined for the user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/outlook/outlook_request_builder.py b/msgraph/generated/users/item/outlook/outlook_request_builder.py index c68a9d570ea..8b7e01c7a8a 100644 --- a/msgraph/generated/users/item/outlook/outlook_request_builder.py +++ b/msgraph/generated/users/item/outlook/outlook_request_builder.py @@ -10,8 +10,8 @@ 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.outlook_user import OutlookUser + from ....models.o_data_errors.o_data_error import ODataError from .master_categories.master_categories_request_builder import MasterCategoriesRequestBuilder from .supported_languages.supported_languages_request_builder import SupportedLanguagesRequestBuilder from .supported_time_zones.supported_time_zones_request_builder import SupportedTimeZonesRequestBuilder @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[OutlookReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OutlookRequestBuilder: diff --git a/msgraph/generated/users/item/outlook/supported_languages/supported_languages_response.py b/msgraph/generated/users/item/outlook/supported_languages/supported_languages_get_response.py similarity index 91% rename from msgraph/generated/users/item/outlook/supported_languages/supported_languages_response.py rename to msgraph/generated/users/item/outlook/supported_languages/supported_languages_get_response.py index 2e57ef10250..bbe7449665d 100644 --- a/msgraph/generated/users/item/outlook/supported_languages/supported_languages_response.py +++ b/msgraph/generated/users/item/outlook/supported_languages/supported_languages_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SupportedLanguagesResponse(BaseCollectionPaginationCountResponse): +class SupportedLanguagesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[LocaleInfo]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SupportedLanguagesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SupportedLanguagesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SupportedLanguagesResponse + Returns: SupportedLanguagesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SupportedLanguagesResponse() + return SupportedLanguagesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/outlook/supported_languages/supported_languages_request_builder.py b/msgraph/generated/users/item/outlook/supported_languages/supported_languages_request_builder.py index 33976683f9f..cdb09c7b391 100644 --- a/msgraph/generated/users/item/outlook/supported_languages/supported_languages_request_builder.py +++ b/msgraph/generated/users/item/outlook/supported_languages/supported_languages_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .supported_languages_response import SupportedLanguagesResponse + from .supported_languages_get_response import SupportedLanguagesGetResponse class SupportedLanguagesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/outlook/supportedLanguages(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[SupportedLanguagesRequestBuilderGetRequestConfiguration] = None) -> Optional[SupportedLanguagesResponse]: + async def get(self,request_configuration: Optional[SupportedLanguagesRequestBuilderGetRequestConfiguration] = None) -> Optional[SupportedLanguagesGetResponse]: """ - Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. + Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SupportedLanguagesResponse] + Returns: Optional[SupportedLanguagesGetResponse] Find more info here: https://learn.microsoft.com/graph/api/outlookuser-supportedlanguages?view=graph-rest-1.0 """ request_info = self.to_get_request_information( @@ -44,25 +44,25 @@ async def get(self,request_configuration: Optional[SupportedLanguagesRequestBuil } if not self.request_adapter: raise Exception("Http core is null") - from .supported_languages_response import SupportedLanguagesResponse + from .supported_languages_get_response import SupportedLanguagesGetResponse - return await self.request_adapter.send_async(request_info, SupportedLanguagesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SupportedLanguagesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SupportedLanguagesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. + Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SupportedLanguagesRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> SupportedLanguagesRequestBui @dataclass class SupportedLanguagesRequestBuilderGetQueryParameters(): """ - Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. + Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_response.py b/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_get_response.py similarity index 91% rename from msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_response.py rename to msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_get_response.py index e542f37011d..ead4fff67c6 100644 --- a/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_response.py +++ b/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SupportedTimeZonesResponse(BaseCollectionPaginationCountResponse): +class SupportedTimeZonesGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[TimeZoneInformation]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SupportedTimeZonesResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SupportedTimeZonesGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SupportedTimeZonesResponse + Returns: SupportedTimeZonesGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SupportedTimeZonesResponse() + return SupportedTimeZonesGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_request_builder.py b/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_request_builder.py index 2f5a060dc7f..259ec31df17 100644 --- a/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_request_builder.py +++ b/msgraph/generated/users/item/outlook/supported_time_zones/supported_time_zones_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .supported_time_zones_response import SupportedTimeZonesResponse + from .supported_time_zones_get_response import SupportedTimeZonesGetResponse class SupportedTimeZonesRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/outlook/supportedTimeZones(){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[SupportedTimeZonesRequestBuilderGetRequestConfiguration] = None) -> Optional[SupportedTimeZonesResponse]: + async def get(self,request_configuration: Optional[SupportedTimeZonesRequestBuilderGetRequestConfiguration] = None) -> Optional[SupportedTimeZonesGetResponse]: """ Invoke function supportedTimeZones param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SupportedTimeZonesResponse] + Returns: Optional[SupportedTimeZonesGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[SupportedTimeZonesRequestBuil } if not self.request_adapter: raise Exception("Http core is null") - from .supported_time_zones_response import SupportedTimeZonesResponse + from .supported_time_zones_get_response import SupportedTimeZonesGetResponse - return await self.request_adapter.send_async(request_info, SupportedTimeZonesResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SupportedTimeZonesGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SupportedTimeZonesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[SupportedTim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SupportedTimeZonesRequestBuilder: diff --git a/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_response.py b/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_get_response.py similarity index 88% rename from msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_response.py rename to msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_get_response.py index 06120f15f83..18e83cafb69 100644 --- a/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_response.py +++ b/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_get_response.py @@ -10,20 +10,20 @@ from .....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class SupportedTimeZonesWithTimeZoneStandardResponse(BaseCollectionPaginationCountResponse): +class SupportedTimeZonesWithTimeZoneStandardGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[TimeZoneInformation]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SupportedTimeZonesWithTimeZoneStandardResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SupportedTimeZonesWithTimeZoneStandardGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: SupportedTimeZonesWithTimeZoneStandardResponse + Returns: SupportedTimeZonesWithTimeZoneStandardGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return SupportedTimeZonesWithTimeZoneStandardResponse() + return SupportedTimeZonesWithTimeZoneStandardGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_request_builder.py b/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_request_builder.py index 107e8bf4f64..cb136f732e1 100644 --- a/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_request_builder.py +++ b/msgraph/generated/users/item/outlook/supported_time_zones_with_time_zone_standard/supported_time_zones_with_time_zone_standard_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .supported_time_zones_with_time_zone_standard_response import SupportedTimeZonesWithTimeZoneStandardResponse + from .supported_time_zones_with_time_zone_standard_get_response import SupportedTimeZonesWithTimeZoneStandardGetResponse class SupportedTimeZonesWithTimeZoneStandardRequestBuilder(BaseRequestBuilder): """ @@ -25,13 +25,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param time_zone_standard: Usage: TimeZoneStandard='{TimeZoneStandard}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['time_zone_standard'] = str(time_zone_standard) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/outlook/supportedTimeZones(TimeZoneStandard='{TimeZoneStandard}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[SupportedTimeZonesWithTimeZoneStandardRequestBuilderGetRequestConfiguration] = None) -> Optional[SupportedTimeZonesWithTimeZoneStandardResponse]: + async def get(self,request_configuration: Optional[SupportedTimeZonesWithTimeZoneStandardRequestBuilderGetRequestConfiguration] = None) -> Optional[SupportedTimeZonesWithTimeZoneStandardGetResponse]: """ Invoke function supportedTimeZones param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[SupportedTimeZonesWithTimeZoneStandardResponse] + Returns: Optional[SupportedTimeZonesWithTimeZoneStandardGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -44,9 +46,9 @@ async def get(self,request_configuration: Optional[SupportedTimeZonesWithTimeZon } if not self.request_adapter: raise Exception("Http core is null") - from .supported_time_zones_with_time_zone_standard_response import SupportedTimeZonesWithTimeZoneStandardResponse + from .supported_time_zones_with_time_zone_standard_get_response import SupportedTimeZonesWithTimeZoneStandardGetResponse - return await self.request_adapter.send_async(request_info, SupportedTimeZonesWithTimeZoneStandardResponse, error_mapping) + return await self.request_adapter.send_async(request_info, SupportedTimeZonesWithTimeZoneStandardGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[SupportedTimeZonesWithTimeZoneStandardRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -55,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[SupportedTim Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> SupportedTimeZonesWithTimeZoneStandardRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/count/count_request_builder.py b/msgraph/generated/users/item/owned_devices/count/count_request_builder.py index ae662ca8618..c0c7cec0cb1 100644 --- a/msgraph/generated/users/item/owned_devices/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/count/count_request_builder.py index 846c6090f28..c90e836ec5b 100644 --- a/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index b444daafe18..d4e94c8b617 100644 --- a/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/graph_device/count/count_request_builder.py b/msgraph/generated/users/item/owned_devices/graph_device/count/count_request_builder.py index 213825d79b0..96ea72e5482 100644 --- a/msgraph/generated/users/item/owned_devices/graph_device/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/graph_device/graph_device_request_builder.py b/msgraph/generated/users/item/owned_devices/graph_device/graph_device_request_builder.py index dc8fd572eb3..530c1aeb0eb 100644 --- a/msgraph/generated/users/item/owned_devices/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/graph_endpoint/count/count_request_builder.py b/msgraph/generated/users/item/owned_devices/graph_endpoint/count/count_request_builder.py index 32975ea814c..f06900f8a1b 100644 --- a/msgraph/generated/users/item/owned_devices/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/users/item/owned_devices/graph_endpoint/graph_endpoint_request_builder.py index f601e6b0c54..cfb9d94da29 100644 --- a/msgraph/generated/users/item/owned_devices/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/owned_devices/item/directory_object_item_request_builder.py index 7d1794377c5..2695dc25669 100644 --- a/msgraph/generated/users/item/owned_devices/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/item/directory_object_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/users/item/owned_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 6f3caa1f53b..820afe1fd54 100644 --- a/msgraph/generated/users/item/owned_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/item/graph_device/graph_device_request_builder.py b/msgraph/generated/users/item/owned_devices/item/graph_device/graph_device_request_builder.py index 4cfdc7cb4be..25417ccb89d 100644 --- a/msgraph/generated/users/item/owned_devices/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/users/item/owned_devices/item/graph_endpoint/graph_endpoint_request_builder.py index ea874a10d6a..3498e2d0dc3 100644 --- a/msgraph/generated/users/item/owned_devices/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/users/item/owned_devices/owned_devices_request_builder.py b/msgraph/generated/users/item/owned_devices/owned_devices_request_builder.py index e9c8af27218..83b2c9b8c83 100644 --- a/msgraph/generated/users/item/owned_devices/owned_devices_request_builder.py +++ b/msgraph/generated/users/item/owned_devices/owned_devices_request_builder.py @@ -74,14 +74,14 @@ def to_get_request_information(self,request_configuration: Optional[OwnedDevices Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OwnedDevicesRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/count/count_request_builder.py b/msgraph/generated/users/item/owned_objects/count/count_request_builder.py index 3880e80c15c..cc90fb47e90 100644 --- a/msgraph/generated/users/item/owned_objects/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/graph_application/count/count_request_builder.py b/msgraph/generated/users/item/owned_objects/graph_application/count/count_request_builder.py index 5c20d2bf53b..301e801a1a6 100644 --- a/msgraph/generated/users/item/owned_objects/graph_application/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/graph_application/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/graph_application/graph_application_request_builder.py b/msgraph/generated/users/item/owned_objects/graph_application/graph_application_request_builder.py index e8b2b5675b9..0ce12189298 100644 --- a/msgraph/generated/users/item/owned_objects/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/graph_application/graph_application_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/graph_group/count/count_request_builder.py b/msgraph/generated/users/item/owned_objects/graph_group/count/count_request_builder.py index cf07d9b89e9..0abb3d39d07 100644 --- a/msgraph/generated/users/item/owned_objects/graph_group/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/graph_group/graph_group_request_builder.py b/msgraph/generated/users/item/owned_objects/graph_group/graph_group_request_builder.py index 44f973e3cf9..b0ad43a82ac 100644 --- a/msgraph/generated/users/item/owned_objects/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/graph_service_principal/count/count_request_builder.py b/msgraph/generated/users/item/owned_objects/graph_service_principal/count/count_request_builder.py index d6dbbaf697a..3be83c8939f 100644 --- a/msgraph/generated/users/item/owned_objects/graph_service_principal/count/count_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/graph_service_principal/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/users/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py index 725693ba877..6df5d542505 100644 --- a/msgraph/generated/users/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/graph_service_principal/graph_service_principal_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/owned_objects/item/directory_object_item_request_builder.py index ce21248d031..c0e30570d3f 100644 --- a/msgraph/generated/users/item/owned_objects/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/item/directory_object_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/item/graph_application/graph_application_request_builder.py b/msgraph/generated/users/item/owned_objects/item/graph_application/graph_application_request_builder.py index cfd702b258a..512832afc03 100644 --- a/msgraph/generated/users/item/owned_objects/item/graph_application/graph_application_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/item/graph_application/graph_application_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphApplica Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphApplicationRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/item/graph_group/graph_group_request_builder.py b/msgraph/generated/users/item/owned_objects/item/graph_group/graph_group_request_builder.py index dbbcc0466c0..0504d4bd0b8 100644 --- a/msgraph/generated/users/item/owned_objects/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py b/msgraph/generated/users/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py index ffc7da8a25e..bc0404cc5e5 100644 --- a/msgraph/generated/users/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/item/graph_service_principal/graph_service_principal_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphService Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphServicePrincipalRequestBuilder: diff --git a/msgraph/generated/users/item/owned_objects/owned_objects_request_builder.py b/msgraph/generated/users/item/owned_objects/owned_objects_request_builder.py index 6a67ead3af9..f3b85c06c7d 100644 --- a/msgraph/generated/users/item/owned_objects/owned_objects_request_builder.py +++ b/msgraph/generated/users/item/owned_objects/owned_objects_request_builder.py @@ -74,14 +74,14 @@ def to_get_request_information(self,request_configuration: Optional[OwnedObjects Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> OwnedObjectsRequestBuilder: diff --git a/msgraph/generated/users/item/people/count/count_request_builder.py b/msgraph/generated/users/item/people/count/count_request_builder.py index 39338945b12..c815f7b4a40 100644 --- a/msgraph/generated/users/item/people/count/count_request_builder.py +++ b/msgraph/generated/users/item/people/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/people/item/person_item_request_builder.py b/msgraph/generated/users/item/people/item/person_item_request_builder.py index 73568dc5e7a..d3aff31fb56 100644 --- a/msgraph/generated/users/item/people/item/person_item_request_builder.py +++ b/msgraph/generated/users/item/people/item/person_item_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[PersonItemRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PersonItemRequestBuilder: diff --git a/msgraph/generated/users/item/people/people_request_builder.py b/msgraph/generated/users/item/people/people_request_builder.py index 140a2fcb097..153cc0d69eb 100644 --- a/msgraph/generated/users/item/people/people_request_builder.py +++ b/msgraph/generated/users/item/people/people_request_builder.py @@ -44,7 +44,7 @@ def by_person_id(self,person_id: str) -> PersonItemRequestBuilder: async def get(self,request_configuration: Optional[PeopleRequestBuilderGetRequestConfiguration] = None) -> Optional[PersonCollectionResponse]: """ - Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. + Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PersonCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-people?view=graph-rest-1.0 @@ -66,19 +66,19 @@ async def get(self,request_configuration: Optional[PeopleRequestBuilderGetReques def to_get_request_information(self,request_configuration: Optional[PeopleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. + Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PeopleRequestBuilder: @@ -103,7 +103,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PeopleRequestBuilderGetQueryParameters(): """ - Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. + Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/photo/photo_request_builder.py b/msgraph/generated/users/item/photo/photo_request_builder.py index 76228ccca98..913dd9a9325 100644 --- a/msgraph/generated/users/item/photo/photo_request_builder.py +++ b/msgraph/generated/users/item/photo/photo_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[PhotoRequestBuilderDeleteR async def get(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> Optional[ProfilePhoto]: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ProfilePhoto] Find more info here: https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[PhotoRequ Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PhotoRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ProfilePhoto] = None, request_configuration: Optional[PhotoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ProfilePhoto] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -176,7 +176,7 @@ class PhotoRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class PhotoRequestBuilderGetQueryParameters(): """ - Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Microsoft Entra ID. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/photo/value/content_request_builder.py b/msgraph/generated/users/item/photo/value/content_request_builder.py index 542dcda3e67..db0df37af25 100644 --- a/msgraph/generated/users/item/photo/value/content_request_builder.py +++ b/msgraph/generated/users/item/photo/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/photos/count/count_request_builder.py b/msgraph/generated/users/item/photos/count/count_request_builder.py index 2cd186a15fb..28890da9017 100644 --- a/msgraph/generated/users/item/photos/count/count_request_builder.py +++ b/msgraph/generated/users/item/photos/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/photos/item/profile_photo_item_request_builder.py b/msgraph/generated/users/item/photos/item/profile_photo_item_request_builder.py index 754cec6c503..844b5de49fb 100644 --- a/msgraph/generated/users/item/photos/item/profile_photo_item_request_builder.py +++ b/msgraph/generated/users/item/photos/item/profile_photo_item_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[ProfilePhoto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ProfilePhotoItemRequestBuilder: diff --git a/msgraph/generated/users/item/photos/item/value/content_request_builder.py b/msgraph/generated/users/item/photos/item/value/content_request_builder.py index 8e75a5698d4..3ac042a1eb3 100644 --- a/msgraph/generated/users/item/photos/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/photos/item/value/content_request_builder.py @@ -73,12 +73,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -91,12 +91,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/photos/photos_request_builder.py b/msgraph/generated/users/item/photos/photos_request_builder.py index c756ce7f523..20cf837f028 100644 --- a/msgraph/generated/users/item/photos/photos_request_builder.py +++ b/msgraph/generated/users/item/photos/photos_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[PhotosReques Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> PhotosRequestBuilder: diff --git a/msgraph/generated/users/item/planner/planner_request_builder.py b/msgraph/generated/users/item/planner/planner_request_builder.py index 48c7410bb36..046c2748c31 100644 --- a/msgraph/generated/users/item/planner/planner_request_builder.py +++ b/msgraph/generated/users/item/planner/planner_request_builder.py @@ -99,12 +99,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -114,14 +114,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerReque Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerUser] = None, request_configuration: Optional[PlannerRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerUser] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/planner/plans/count/count_request_builder.py b/msgraph/generated/users/item/planner/plans/count/count_request_builder.py index 6a166d0bbb0..86156d15669 100644 --- a/msgraph/generated/users/item/planner/plans/count/count_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/buckets_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/buckets_request_builder.py index f46fec0d84f..0efe1316281 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/buckets_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/buckets_request_builder.py @@ -45,7 +45,7 @@ def by_planner_bucket_id(self,planner_bucket_id: str) -> PlannerBucketItemReques async def get(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketCollectionResponse]: """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-list-buckets?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerBucket] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[BucketsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[BucketsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerBucket] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class BucketsRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerBucket objects contained by a plannerPlan object. + Retrieve a list of plannerBucket objects contained by a plannerPlan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/count/count_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/count/count_request_builder.py index 4eb24044264..9df43d0be6d 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/count/count_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py index 7158a2fbd8c..2d0185bb8fa 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/planner_bucket_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerBu Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerBucketItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerBucke Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucket] = None, request_configuration: Optional[PlannerBucketItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucket] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py index 3acf18b47ea..33b667d34a4 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index 91d3d4a0b58..4824881e5e9 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index 598ed783d8e..0b93ab42b9d 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py index 8dcad047321..b2fdc7c098e 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py index 066018295be..bfbd5661451 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 28e8c70c601..9404ac7b9a6 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py index 6e5a5aacd2a..41bb5431bc3 100644 --- a/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/buckets/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerbucket-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated to a plannerBucket object. + Retrieve a list of plannerTask objects associated to a plannerBucket object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/details/details_request_builder.py b/msgraph/generated/users/item/planner/plans/item/details/details_request_builder.py index 2d4d6d8d503..3678d237fb0 100644 --- a/msgraph/generated/users/item/planner/plans/item/details/details_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlanDetails]: """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlanDetails] Find more info here: https://learn.microsoft.com/graph/api/plannerplandetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlanDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerPlanDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerPlanDetails object. + Retrieve the properties and relationships of a plannerPlanDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/planner_plan_item_request_builder.py b/msgraph/generated/users/item/planner/plans/item/planner_plan_item_request_builder.py index d09a9409515..050b36f84ae 100644 --- a/msgraph/generated/users/item/planner/plans/item/planner_plan_item_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/planner_plan_item_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerPl Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerPlanItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerPlanI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlan] = None, request_configuration: Optional[PlannerPlanItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[PlannerPlan] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/count/count_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/count/count_request_builder.py index 4969225a967..55b1d092ea6 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index aaa0fe2a6c6..5169c77094e 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index 63875898a3f..24422ab6844 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/item/details/details_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/item/details/details_request_builder.py index 2f4758f09d2..4303d0f123b 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py index 45de1b1a7a4..50755d5d6ae 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 79dfa17e7c7..69c512ee660 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/item/tasks/tasks_request_builder.py b/msgraph/generated/users/item/planner/plans/item/tasks/tasks_request_builder.py index 1ebfd113219..b4cbbcfd7d7 100644 --- a/msgraph/generated/users/item/planner/plans/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/item/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/plannerplan-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerTask objects associated with a plannerPlan object. + Retrieve a list of plannerTask objects associated with a plannerPlan object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/plans/plans_request_builder.py b/msgraph/generated/users/item/planner/plans/plans_request_builder.py index a34cbc2594b..c8b95defd88 100644 --- a/msgraph/generated/users/item/planner/plans/plans_request_builder.py +++ b/msgraph/generated/users/item/planner/plans/plans_request_builder.py @@ -45,7 +45,7 @@ def by_planner_plan_id(self,planner_plan_id: str) -> PlannerPlanItemRequestBuild async def get(self,request_configuration: Optional[PlansRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerPlanCollectionResponse]: """ - Retrieve a list of plannerplan objects shared with a user object. + Retrieve a list of plannerplan objects shared with a user object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerPlanCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/planneruser-list-plans?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerPlan] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[PlansRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannerplan objects shared with a user object. + Retrieve a list of plannerplan objects shared with a user object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerPlan] = None, request_configuration: Optional[PlansRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerPlan] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PlansRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannerplan objects shared with a user object. + Retrieve a list of plannerplan objects shared with a user object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/tasks/count/count_request_builder.py b/msgraph/generated/users/item/planner/tasks/count/count_request_builder.py index f41d3934c49..ab80bd17210 100644 --- a/msgraph/generated/users/item/planner/tasks/count/count_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py index 44ee8da58d9..939f12f8ac1 100644 --- a/msgraph/generated/users/item/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/item/assigned_to_task_board_format/assigned_to_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[AssignedToTaskBoardFormatR async def get(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerAssignedToTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerAssignedToTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[AssignedT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerAssignedToTaskBoardTaskFormat] = None, request_configuration: Optional[AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerAssignedToTaskBoardT if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class AssignedToTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequ @dataclass class AssignedToTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. + Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py index ed0cc38a5fd..6a29e2e766f 100644 --- a/msgraph/generated/users/item/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/item/bucket_task_board_format/bucket_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[BucketTaskBoardFormatReque async def get(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerBucketTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerBucketTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[BucketTas Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[BucketTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerBucketTaskBoardTaskFormat] = None, request_configuration: Optional[BucketTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerBucketTaskBoardTaskF if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class BucketTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseRequestC @dataclass class BucketTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/tasks/item/details/details_request_builder.py b/msgraph/generated/users/item/planner/tasks/item/details/details_request_builder.py index 371641b92f7..6f4b9060e98 100644 --- a/msgraph/generated/users/item/planner/tasks/item/details/details_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/item/details/details_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[DetailsRequestBuilderDelet async def get(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskDetails]: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskDetails] Find more info here: https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[DetailsRe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[DetailsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTaskDetails] = None, request_configuration: Optional[DetailsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerTaskDetails] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class DetailsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): @dataclass class DetailsRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a plannerTaskDetails object. + Retrieve the properties and relationships of a plannerTaskDetails object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/tasks/item/planner_task_item_request_builder.py b/msgraph/generated/users/item/planner/tasks/item/planner_task_item_request_builder.py index 5ebf337759f..9544f1852d3 100644 --- a/msgraph/generated/users/item/planner/tasks/item/planner_task_item_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/item/planner_task_item_request_builder.py @@ -101,12 +101,12 @@ def to_delete_request_information(self,request_configuration: Optional[PlannerTa Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PlannerTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -116,14 +116,14 @@ def to_get_request_information(self,request_configuration: Optional[PlannerTaskI Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[PlannerTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -136,13 +136,13 @@ def to_patch_request_information(self,body: Optional[PlannerTask] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py b/msgraph/generated/users/item/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py index 5b09cddf8f4..7b411eb3f12 100644 --- a/msgraph/generated/users/item/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/item/progress_task_board_format/progress_task_board_format_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ProgressTaskBoardFormatReq async def get(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerProgressTaskBoardTaskFormat]: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerProgressTaskBoardTaskFormat] Find more info here: https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0 @@ -99,29 +99,29 @@ def to_delete_request_information(self,request_configuration: Optional[ProgressT Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerProgressTaskBoardTaskFormat] = None, request_configuration: Optional[ProgressTaskBoardFormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[PlannerProgressTaskBoardTas if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ProgressTaskBoardFormatRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class ProgressTaskBoardFormatRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. + Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/planner/tasks/tasks_request_builder.py b/msgraph/generated/users/item/planner/tasks/tasks_request_builder.py index a7554f7ded9..098e2d6e78c 100644 --- a/msgraph/generated/users/item/planner/tasks/tasks_request_builder.py +++ b/msgraph/generated/users/item/planner/tasks/tasks_request_builder.py @@ -45,7 +45,7 @@ def by_planner_task_id(self,planner_task_id: str) -> PlannerTaskItemRequestBuild async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[PlannerTaskCollectionResponse]: """ - Retrieve a list of plannertask objects assigned to a User. + Retrieve a list of plannertask objects assigned to a User. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PlannerTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/planneruser-list-tasks?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[PlannerTask] = None, request_configuration: O def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of plannertask objects assigned to a User. + Retrieve a list of plannertask objects assigned to a User. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[PlannerTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[PlannerTask] = None, request if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Retrieve a list of plannertask objects assigned to a User. + Retrieve a list of plannertask objects assigned to a User. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/presence/clear_presence/clear_presence_request_builder.py b/msgraph/generated/users/item/presence/clear_presence/clear_presence_request_builder.py index 47971757a8a..d041c4b3c38 100644 --- a/msgraph/generated/users/item/presence/clear_presence/clear_presence_request_builder.py +++ b/msgraph/generated/users/item/presence/clear_presence/clear_presence_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ClearPresencePostRequestBody] = None, request_configuration: Optional[ClearPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. + Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. This API is available in the following national cloud deployments. 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[ClearPresencePostRequestBody] = None, request def to_post_request_information(self,body: Optional[ClearPresencePostRequestBody] = None, request_configuration: Optional[ClearPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. + Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ClearPresencePostRequestBody if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/presence/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py b/msgraph/generated/users/item/presence/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py index 1ab2095786c..8986c057f28 100644 --- a/msgraph/generated/users/item/presence/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py +++ b/msgraph/generated/users/item/presence/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.py @@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ClearUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Clear the preferred availability and activity status for a user. + Clear the preferred availability and activity status for a user. This API is available in the following national cloud deployments. 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/presence-clearuserpreferredpresence?view=graph-rest-1.0 @@ -47,17 +47,17 @@ async def post(self,request_configuration: Optional[ClearUserPreferredPresenceRe def to_post_request_information(self,request_configuration: Optional[ClearUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Clear the preferred availability and activity status for a user. + Clear the preferred availability and activity status for a user. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> ClearUserPreferredPresenceRequestBuilder: diff --git a/msgraph/generated/users/item/presence/presence_request_builder.py b/msgraph/generated/users/item/presence/presence_request_builder.py index 4e1f15177b2..2d9ee11e14e 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]: """ - Get a user's presence information. + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. 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-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/presence-setstatusmessage?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -103,29 +103,29 @@ def to_delete_request_information(self,request_configuration: Optional[PresenceR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[PresenceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a user's presence information. + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Presence] = None, request_configuration: Optional[PresenceRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -138,13 +138,13 @@ def to_patch_request_information(self,body: Optional[Presence] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -216,7 +216,7 @@ class PresenceRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class PresenceRequestBuilderGetQueryParameters(): """ - Get a user's presence information. + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/presence/set_presence/set_presence_request_builder.py b/msgraph/generated/users/item/presence/set_presence/set_presence_request_builder.py index 34aad9c6b1f..756c7aa8e7b 100644 --- a/msgraph/generated/users/item/presence/set_presence/set_presence_request_builder.py +++ b/msgraph/generated/users/item/presence/set_presence/set_presence_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetPresencePostRequestBody] = None, request_configuration: Optional[SetPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Set the state of a user's presence session as an application. + Set the state of a user's presence session as an application. This API is available in the following national cloud deployments. 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[SetPresencePostRequestBody] = None, request_c def to_post_request_information(self,body: Optional[SetPresencePostRequestBody] = None, request_configuration: Optional[SetPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set the state of a user's presence session as an application. + Set the state of a user's presence session as an application. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetPresencePostRequestBody] if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/presence/set_status_message/set_status_message_request_builder.py b/msgraph/generated/users/item/presence/set_status_message/set_status_message_request_builder.py index 42c9dd16484..035d6efa8e0 100644 --- a/msgraph/generated/users/item/presence/set_status_message/set_status_message_request_builder.py +++ b/msgraph/generated/users/item/presence/set_status_message/set_status_message_request_builder.py @@ -28,10 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetStatusMessagePostRequestBody] = None, request_configuration: Optional[SetStatusMessageRequestBuilderPostRequestConfiguration] = None) -> None: """ - Invoke action setStatusMessage + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. 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/presence-setstatusmessage?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -50,7 +51,7 @@ async def post(self,body: Optional[SetStatusMessagePostRequestBody] = None, requ def to_post_request_information(self,body: Optional[SetStatusMessagePostRequestBody] = None, request_configuration: Optional[SetStatusMessageRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invoke action setStatusMessage + Set a presence status message for a user. An optional expiration date and time can be supplied. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -58,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetStatusMessagePostRequestB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/presence/set_user_preferred_presence/set_user_preferred_presence_request_builder.py b/msgraph/generated/users/item/presence/set_user_preferred_presence/set_user_preferred_presence_request_builder.py index 2a33a2bf8c3..99b4bd6cdc1 100644 --- a/msgraph/generated/users/item/presence/set_user_preferred_presence/set_user_preferred_presence_request_builder.py +++ b/msgraph/generated/users/item/presence/set_user_preferred_presence/set_user_preferred_presence_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SetUserPreferredPresencePostRequestBody] = None, request_configuration: Optional[SetUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> None: """ - Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. + Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. This API is available in the following national cloud deployments. 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[SetUserPreferredPresencePostRequestBody] = No def to_post_request_information(self,body: Optional[SetUserPreferredPresencePostRequestBody] = None, request_configuration: Optional[SetUserPreferredPresenceRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. + Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SetUserPreferredPresencePost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/registered_devices/count/count_request_builder.py b/msgraph/generated/users/item/registered_devices/count/count_request_builder.py index 09503a79e12..b844f8a7617 100644 --- a/msgraph/generated/users/item/registered_devices/count/count_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/count/count_request_builder.py b/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/count/count_request_builder.py index 03470b397f7..ce4ca59b6ff 100644 --- a/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/count/count_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 241bacc817d..54b5460472a 100644 --- a/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/graph_device/count/count_request_builder.py b/msgraph/generated/users/item/registered_devices/graph_device/count/count_request_builder.py index 3d5bb9092fe..ea44231b9a3 100644 --- a/msgraph/generated/users/item/registered_devices/graph_device/count/count_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/graph_device/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/graph_device/graph_device_request_builder.py b/msgraph/generated/users/item/registered_devices/graph_device/graph_device_request_builder.py index 00c2f1e9bcb..56bea1182ca 100644 --- a/msgraph/generated/users/item/registered_devices/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/graph_device/graph_device_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/graph_endpoint/count/count_request_builder.py b/msgraph/generated/users/item/registered_devices/graph_endpoint/count/count_request_builder.py index db8f5a225a4..2a6aedd4b0d 100644 --- a/msgraph/generated/users/item/registered_devices/graph_endpoint/count/count_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/graph_endpoint/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/users/item/registered_devices/graph_endpoint/graph_endpoint_request_builder.py index af235f62bfd..3fe4c8bb2e0 100644 --- a/msgraph/generated/users/item/registered_devices/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/graph_endpoint/graph_endpoint_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/registered_devices/item/directory_object_item_request_builder.py index 32d7c3ab5b8..4df094b0d41 100644 --- a/msgraph/generated/users/item/registered_devices/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/item/directory_object_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Devices that are registered for the user. Read-only. Nullable. Supports $expand. + Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] """ @@ -52,19 +52,19 @@ async def get(self,request_configuration: Optional[DirectoryObjectItemRequestBui def to_get_request_information(self,request_configuration: Optional[DirectoryObjectItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Devices that are registered for the user. Read-only. Nullable. Supports $expand. + Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: @@ -107,7 +107,7 @@ def graph_endpoint(self) -> GraphEndpointRequestBuilder: @dataclass class DirectoryObjectItemRequestBuilderGetQueryParameters(): """ - Devices that are registered for the user. Read-only. Nullable. Supports $expand. + Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/registered_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py b/msgraph/generated/users/item/registered_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py index 17440d31f4c..98634c2905c 100644 --- a/msgraph/generated/users/item/registered_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAppRole Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAppRoleAssignmentRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/item/graph_device/graph_device_request_builder.py b/msgraph/generated/users/item/registered_devices/item/graph_device/graph_device_request_builder.py index 4baf4dc5413..dc48660c8bd 100644 --- a/msgraph/generated/users/item/registered_devices/item/graph_device/graph_device_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/item/graph_device/graph_device_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDeviceR Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDeviceRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/item/graph_endpoint/graph_endpoint_request_builder.py b/msgraph/generated/users/item/registered_devices/item/graph_endpoint/graph_endpoint_request_builder.py index 16cd0d4aaee..906201c199a 100644 --- a/msgraph/generated/users/item/registered_devices/item/graph_endpoint/graph_endpoint_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/item/graph_endpoint/graph_endpoint_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphEndpoin Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphEndpointRequestBuilder: diff --git a/msgraph/generated/users/item/registered_devices/registered_devices_request_builder.py b/msgraph/generated/users/item/registered_devices/registered_devices_request_builder.py index 92702ea5beb..ae3d1c953c4 100644 --- a/msgraph/generated/users/item/registered_devices/registered_devices_request_builder.py +++ b/msgraph/generated/users/item/registered_devices/registered_devices_request_builder.py @@ -47,7 +47,7 @@ def by_directory_object_id(self,directory_object_id: str) -> DirectoryObjectItem async def get(self,request_configuration: Optional[RegisteredDevicesRequestBuilderGetRequestConfiguration] = None) -> Optional[DirectoryObjectCollectionResponse]: """ - Devices that are registered for the user. Read-only. Nullable. Supports $expand. + Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObjectCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/user-list-registereddevices?view=graph-rest-1.0 @@ -69,19 +69,19 @@ async def get(self,request_configuration: Optional[RegisteredDevicesRequestBuild def to_get_request_information(self,request_configuration: Optional[RegisteredDevicesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Devices that are registered for the user. Read-only. Nullable. Supports $expand. + Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> RegisteredDevicesRequestBuilder: @@ -133,7 +133,7 @@ def graph_endpoint(self) -> GraphEndpointRequestBuilder: @dataclass class RegisteredDevicesRequestBuilderGetQueryParameters(): """ - Devices that are registered for the user. Read-only. Nullable. Supports $expand. + Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_response.py b/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_get_response.py similarity index 87% rename from msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_response.py rename to msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_get_response.py index 6d4ed05ca16..952a53fb075 100644 --- a/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_response.py +++ b/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_get_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class ReminderViewWithStartDateTimeWithEndDateTimeResponse(BaseCollectionPaginationCountResponse): +class ReminderViewWithStartDateTimeWithEndDateTimeGetResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[Reminder]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ReminderViewWithStartDateTimeWithEndDateTimeResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> ReminderViewWithStartDateTimeWithEndDateTimeGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: ReminderViewWithStartDateTimeWithEndDateTimeResponse + Returns: ReminderViewWithStartDateTimeWithEndDateTimeGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return ReminderViewWithStartDateTimeWithEndDateTimeResponse() + return ReminderViewWithStartDateTimeWithEndDateTimeGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_request_builder.py b/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_request_builder.py index 6a91e49bb9e..4745416dc7b 100644 --- a/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_request_builder.py +++ b/msgraph/generated/users/item/reminder_view_with_start_date_time_with_end_date_time/reminder_view_with_start_date_time_with_end_date_time_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .reminder_view_with_start_date_time_with_end_date_time_response import ReminderViewWithStartDateTimeWithEndDateTimeResponse + from .reminder_view_with_start_date_time_with_end_date_time_get_response import ReminderViewWithStartDateTimeWithEndDateTimeGetResponse class ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(BaseRequestBuilder): """ @@ -26,13 +26,16 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni param start_date_time: Usage: StartDateTime='{StartDateTime}' Returns: None """ + if isinstance(path_parameters, dict): + path_parameters['end_date_time'] = str(end_date_time) + path_parameters['start_date_time'] = str(start_date_time) super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/reminderView(StartDateTime='{StartDateTime}',EndDateTime='{EndDateTime}'){?%24top,%24skip,%24search,%24filter,%24count}", path_parameters) - async def get(self,request_configuration: Optional[ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[ReminderViewWithStartDateTimeWithEndDateTimeResponse]: + async def get(self,request_configuration: Optional[ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> Optional[ReminderViewWithStartDateTimeWithEndDateTimeGetResponse]: """ Invoke function reminderView param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[ReminderViewWithStartDateTimeWithEndDateTimeResponse] + Returns: Optional[ReminderViewWithStartDateTimeWithEndDateTimeGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -45,9 +48,9 @@ async def get(self,request_configuration: Optional[ReminderViewWithStartDateTime } if not self.request_adapter: raise Exception("Http core is null") - from .reminder_view_with_start_date_time_with_end_date_time_response import ReminderViewWithStartDateTimeWithEndDateTimeResponse + from .reminder_view_with_start_date_time_with_end_date_time_get_response import ReminderViewWithStartDateTimeWithEndDateTimeGetResponse - return await self.request_adapter.send_async(request_info, ReminderViewWithStartDateTimeWithEndDateTimeResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ReminderViewWithStartDateTimeWithEndDateTimeGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -56,14 +59,14 @@ def to_get_request_information(self,request_configuration: Optional[ReminderView Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder: diff --git a/msgraph/generated/users/item/remove_all_devices_from_management/remove_all_devices_from_management_request_builder.py b/msgraph/generated/users/item/remove_all_devices_from_management/remove_all_devices_from_management_request_builder.py index 4d370264692..457d4101391 100644 --- a/msgraph/generated/users/item/remove_all_devices_from_management/remove_all_devices_from_management_request_builder.py +++ b/msgraph/generated/users/item/remove_all_devices_from_management/remove_all_devices_from_management_request_builder.py @@ -52,12 +52,12 @@ def to_post_request_information(self,request_configuration: Optional[RemoveAllDe Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RemoveAllDevicesFromManagementRequestBuilder: diff --git a/msgraph/generated/users/item/reprocess_license_assignment/reprocess_license_assignment_request_builder.py b/msgraph/generated/users/item/reprocess_license_assignment/reprocess_license_assignment_request_builder.py index bf59861fa54..908ac62c182 100644 --- a/msgraph/generated/users/item/reprocess_license_assignment/reprocess_license_assignment_request_builder.py +++ b/msgraph/generated/users/item/reprocess_license_assignment/reprocess_license_assignment_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[ReprocessLicenseAssignmentRequestBuilderPostRequestConfiguration] = None) -> Optional[User]: """ - Reprocess all group-based license assignments for the user. To learn more about group-based licensing, see What is group-based licensing in Azure Active Directory. Also see Identify and resolve license assignment problems for a group in Azure Active Directory for more details. + Reprocess all group-based license assignments for the user. To learn more about group-based licensing, see What is group-based licensing in Microsoft Entra ID. Also see Identify and resolve license assignment problems for a group in Microsoft Entra ID for more details. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] Find more info here: https://learn.microsoft.com/graph/api/user-reprocesslicenseassignment?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[ReprocessLicenseAssignmentRe def to_post_request_information(self,request_configuration: Optional[ReprocessLicenseAssignmentRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Reprocess all group-based license assignments for the user. To learn more about group-based licensing, see What is group-based licensing in Azure Active Directory. Also see Identify and resolve license assignment problems for a group in Azure Active Directory for more details. + Reprocess all group-based license assignments for the user. To learn more about group-based licensing, see What is group-based licensing in Microsoft Entra ID. Also see Identify and resolve license assignment problems for a group in Microsoft Entra ID for more details. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> ReprocessLicenseAssignmentRequestBuilder: diff --git a/msgraph/generated/users/item/restore/restore_request_builder.py b/msgraph/generated/users/item/restore/restore_request_builder.py index 680ea06b404..ad9057170ec 100644 --- a/msgraph/generated/users/item/restore/restore_request_builder.py +++ b/msgraph/generated/users/item/restore/restore_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> Optional[DirectoryObject]: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DirectoryObject] Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 @@ -50,18 +50,18 @@ async def post(self,request_configuration: Optional[RestoreRequestBuilderPostReq def to_post_request_information(self,request_configuration: Optional[RestoreRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RestoreRequestBuilder: diff --git a/msgraph/generated/users/item/retry_service_provisioning/retry_service_provisioning_request_builder.py b/msgraph/generated/users/item/retry_service_provisioning/retry_service_provisioning_request_builder.py index e425743db5e..e30089d5647 100644 --- a/msgraph/generated/users/item/retry_service_provisioning/retry_service_provisioning_request_builder.py +++ b/msgraph/generated/users/item/retry_service_provisioning/retry_service_provisioning_request_builder.py @@ -51,12 +51,12 @@ def to_post_request_information(self,request_configuration: Optional[RetryServic Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def with_url(self,raw_url: Optional[str] = None) -> RetryServiceProvisioningRequestBuilder: diff --git a/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_post_response.py b/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_post_response.py new file mode 100644 index 00000000000..fa9e4c66564 --- /dev/null +++ b/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_post_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 RevokeSignInSessionsPostResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RevokeSignInSessionsPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RevokeSignInSessionsPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RevokeSignInSessionsPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_request_builder.py b/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_request_builder.py index c71d2f0b04b..dff8b0bc6d2 100644 --- a/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_request_builder.py +++ b/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .revoke_sign_in_sessions_response import RevokeSignInSessionsResponse + from .revoke_sign_in_sessions_post_response import RevokeSignInSessionsPostResponse class RevokeSignInSessionsRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/revokeSignInSessions", path_parameters) - async def post(self,request_configuration: Optional[RevokeSignInSessionsRequestBuilderPostRequestConfiguration] = None) -> Optional[RevokeSignInSessionsResponse]: + async def post(self,request_configuration: Optional[RevokeSignInSessionsRequestBuilderPostRequestConfiguration] = None) -> Optional[RevokeSignInSessionsPostResponse]: """ - Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. + Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[RevokeSignInSessionsResponse] + Returns: Optional[RevokeSignInSessionsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/user-revokesigninsessions?view=graph-rest-1.0 """ request_info = self.to_post_request_information( @@ -44,24 +44,24 @@ async def post(self,request_configuration: Optional[RevokeSignInSessionsRequestB } if not self.request_adapter: raise Exception("Http core is null") - from .revoke_sign_in_sessions_response import RevokeSignInSessionsResponse + from .revoke_sign_in_sessions_post_response import RevokeSignInSessionsPostResponse - return await self.request_adapter.send_async(request_info, RevokeSignInSessionsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, RevokeSignInSessionsPostResponse, error_mapping) def to_post_request_information(self,request_configuration: Optional[RevokeSignInSessionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. + Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. This API is available in the following national cloud deployments. 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(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") return request_info def with_url(self,raw_url: Optional[str] = None) -> RevokeSignInSessionsRequestBuilder: diff --git a/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_response.py b/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_response.py deleted file mode 100644 index b5896a09208..00000000000 --- a/msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_response.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass, field -from kiota_abstractions.serialization 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 RevokeSignInSessionsResponse(AdditionalDataHolder, BackedModel, Parsable): - # Stores model information. - backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) - - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) - # The value property - value: Optional[bool] = None - - @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> RevokeSignInSessionsResponse: - """ - Creates a new instance of the appropriate class based on discriminator value - param parse_node: The parse node to use to read the discriminator value and create the object - Returns: RevokeSignInSessionsResponse - """ - if not parse_node: - raise TypeError("parse_node cannot be null.") - return RevokeSignInSessionsResponse() - - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: - """ - The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] - """ - fields: Dict[str, Callable[[Any], None]] = { - "value": lambda n : setattr(self, 'value', n.get_bool_value()), - } - return fields - - def serialize(self,writer: SerializationWriter) -> None: - """ - Serializes information the current object - param writer: Serialization writer to use to serialize this model - Returns: None - """ - if not writer: - raise TypeError("writer cannot be null.") - writer.write_bool_value("value", self.value) - writer.write_additional_data_value(self.additional_data) - - diff --git a/msgraph/generated/users/item/scoped_role_member_of/count/count_request_builder.py b/msgraph/generated/users/item/scoped_role_member_of/count/count_request_builder.py index 1cd9d06dd3b..c0d181a7a77 100644 --- a/msgraph/generated/users/item/scoped_role_member_of/count/count_request_builder.py +++ b/msgraph/generated/users/item/scoped_role_member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/scoped_role_member_of/item/scoped_role_membership_item_request_builder.py b/msgraph/generated/users/item/scoped_role_member_of/item/scoped_role_membership_item_request_builder.py index 78ad6f77cdf..9440abe30a4 100644 --- a/msgraph/generated/users/item/scoped_role_member_of/item/scoped_role_membership_item_request_builder.py +++ b/msgraph/generated/users/item/scoped_role_member_of/item/scoped_role_membership_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[ScopedRol Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopedRoleMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMembershipItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[ScopedRoleMembership] = Non if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/scoped_role_member_of/scoped_role_member_of_request_builder.py b/msgraph/generated/users/item/scoped_role_member_of/scoped_role_member_of_request_builder.py index 482c02b978b..91181a1235c 100644 --- a/msgraph/generated/users/item/scoped_role_member_of/scoped_role_member_of_request_builder.py +++ b/msgraph/generated/users/item/scoped_role_member_of/scoped_role_member_of_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ScopedRoleMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ScopedRoleMembership] = None, request_configuration: Optional[ScopedRoleMemberOfRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[ScopedRoleMembership] = None if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/send_mail/send_mail_request_builder.py b/msgraph/generated/users/item/send_mail/send_mail_request_builder.py index 2bbbbb84a08..a187281945c 100644 --- a/msgraph/generated/users/item/send_mail/send_mail_request_builder.py +++ b/msgraph/generated/users/item/send_mail/send_mail_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendMailPostRequestBody] = None, request_configuration: Optional[SendMailRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here. + Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here. This API is available in the following national cloud deployments. 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[SendMailPostRequestBody] = None, request_conf def to_post_request_information(self,body: Optional[SendMailPostRequestBody] = None, request_configuration: Optional[SendMailRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here. + Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendMailPostRequestBody] = N if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/users/item/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..43f1fe5c7d9 --- /dev/null +++ b/msgraph/generated/users/item/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,113 @@ +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 CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", path_parameters) + + async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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", "text/plain") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: 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 == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CountRequestBuilderGetRequestConfiguration(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[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/directory/deleted_items/delta/delta_request_builder.py b/msgraph/generated/users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py similarity index 65% rename from msgraph/generated/directory/deleted_items/delta/delta_request_builder.py rename to msgraph/generated/users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py index ad78c0796d0..4249d232ea5 100644 --- a/msgraph/generated/directory/deleted_items/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -11,26 +11,27 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from ....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder -class DeltaRequestBuilder(BaseRequestBuilder): +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): """ - Provides operations to call the delta method. + Builds and executes requests for operations under /users/{user-id}/serviceProvisioningErrors """ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: """ - Instantiates a new DeltaRequestBuilder and sets the default values. + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. param path_parameters: The raw url or the Url template parameters for the request. param request_adapter: The request adapter to use to execute the requests. Returns: None """ - super().__init__(request_adapter, "{+baseurl}/directory/deletedItems/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[ServiceProvisioningErrorCollectionResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,41 +44,50 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from ....models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) - def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + def to_get_request_information(self,request_configuration: Optional[ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Invoke function delta + Get serviceProvisioningErrors property value param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: + def with_url(self,raw_url: Optional[str] = None) -> ServiceProvisioningErrorsRequestBuilder: """ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. param raw_url: The raw URL to use for the request builder. - Returns: DeltaRequestBuilder + Returns: ServiceProvisioningErrorsRequestBuilder """ if not raw_url: raise TypeError("raw_url cannot be null.") - return DeltaRequestBuilder(self.request_adapter, raw_url) + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) @dataclass - class DeltaRequestBuilderGetQueryParameters(): + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): """ - Invoke function delta + Get serviceProvisioningErrors property value """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ @@ -89,6 +99,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: 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": @@ -106,6 +118,9 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: # 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 @@ -128,14 +143,14 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str: from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass - class DeltaRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(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[DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters] = None + query_parameters: Optional[ServiceProvisioningErrorsRequestBuilder.ServiceProvisioningErrorsRequestBuilderGetQueryParameters] = None diff --git a/msgraph/generated/users/item/settings/settings_request_builder.py b/msgraph/generated/users/item/settings/settings_request_builder.py index 53f6a871846..69cf0fedc4e 100644 --- a/msgraph/generated/users/item/settings/settings_request_builder.py +++ b/msgraph/generated/users/item/settings/settings_request_builder.py @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[SettingsRequestBuilderDele async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserSettings]: """ - Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. + Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserSettings] Find more info here: https://learn.microsoft.com/graph/api/usersettings-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[SettingsRequestBuilderGetRequ async def patch(self,body: Optional[UserSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> Optional[UserSettings]: """ - Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. + Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserSettings] @@ -100,34 +100,34 @@ def to_delete_request_information(self,request_configuration: Optional[SettingsR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[SettingsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. + Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserSettings] = None, request_configuration: Optional[SettingsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. + Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[UserSettings] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -177,7 +177,7 @@ class SettingsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class SettingsRequestBuilderGetQueryParameters(): """ - Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. + Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/settings/shift_preferences/shift_preferences_request_builder.py b/msgraph/generated/users/item/settings/shift_preferences/shift_preferences_request_builder.py index 92fca0eef91..278cdf5f22f 100644 --- a/msgraph/generated/users/item/settings/shift_preferences/shift_preferences_request_builder.py +++ b/msgraph/generated/users/item/settings/shift_preferences/shift_preferences_request_builder.py @@ -47,7 +47,7 @@ async def delete(self,request_configuration: Optional[ShiftPreferencesRequestBui async def get(self,request_configuration: Optional[ShiftPreferencesRequestBuilderGetRequestConfiguration] = None) -> Optional[ShiftPreferences]: """ - Retrieve the properties and relationships of a shiftPreferences object by ID. + Retrieve the properties and relationships of a shiftPreferences object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ShiftPreferences] Find more info here: https://learn.microsoft.com/graph/api/shiftpreferences-get?view=graph-rest-1.0 @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[ShiftPreferencesRequestBuilde async def patch(self,body: Optional[ShiftPreferences] = None, request_configuration: Optional[ShiftPreferencesRequestBuilderPatchRequestConfiguration] = None) -> Optional[ShiftPreferences]: """ - Update the properties and relationships of a shiftPreferences object. + Update the properties and relationships of a shiftPreferences object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ShiftPreferences] @@ -99,34 +99,34 @@ def to_delete_request_information(self,request_configuration: Optional[ShiftPref Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ShiftPreferencesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a shiftPreferences object by ID. + Retrieve the properties and relationships of a shiftPreferences object by ID. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ShiftPreferences] = None, request_configuration: Optional[ShiftPreferencesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties and relationships of a shiftPreferences object. + Update the properties and relationships of a shiftPreferences object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -134,13 +134,13 @@ def to_patch_request_information(self,body: Optional[ShiftPreferences] = None, r if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -167,7 +167,7 @@ class ShiftPreferencesRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class ShiftPreferencesRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a shiftPreferences object by ID. + Retrieve the properties and relationships of a shiftPreferences object by ID. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/teamwork/associated_teams/associated_teams_request_builder.py b/msgraph/generated/users/item/teamwork/associated_teams/associated_teams_request_builder.py index 39fa6ac74a2..4c539ac4a4e 100644 --- a/msgraph/generated/users/item/teamwork/associated_teams/associated_teams_request_builder.py +++ b/msgraph/generated/users/item/teamwork/associated_teams/associated_teams_request_builder.py @@ -45,7 +45,7 @@ def by_associated_team_info_id(self,associated_team_info_id: str) -> AssociatedT async def get(self,request_configuration: Optional[AssociatedTeamsRequestBuilderGetRequestConfiguration] = None) -> Optional[AssociatedTeamInfoCollectionResponse]: """ - Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways:* A user can be a direct member of a team.* A user can be a member of a shared channel that is hosted inside a team. + Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AssociatedTeamInfoCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/associatedteaminfo-list?view=graph-rest-1.0 @@ -91,19 +91,19 @@ async def post(self,body: Optional[AssociatedTeamInfo] = None, request_configura def to_get_request_information(self,request_configuration: Optional[AssociatedTeamsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways:* A user can be a direct member of a team.* A user can be a member of a shared channel that is hosted inside a team. + Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways: This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AssociatedTeamInfo] = None, request_configuration: Optional[AssociatedTeamsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -116,13 +116,13 @@ def to_post_request_information(self,body: Optional[AssociatedTeamInfo] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AssociatedTeamsRequestBuilderGetQueryParameters(): """ - Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways:* A user can be a direct member of a team.* A user can be a member of a shared channel that is hosted inside a team. + Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways: This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/teamwork/associated_teams/count/count_request_builder.py b/msgraph/generated/users/item/teamwork/associated_teams/count/count_request_builder.py index cade8ebdec4..85e5f33c646 100644 --- a/msgraph/generated/users/item/teamwork/associated_teams/count/count_request_builder.py +++ b/msgraph/generated/users/item/teamwork/associated_teams/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/teamwork/associated_teams/item/associated_team_info_item_request_builder.py b/msgraph/generated/users/item/teamwork/associated_teams/item/associated_team_info_item_request_builder.py index e555bd4ebbe..ff00a97a8a0 100644 --- a/msgraph/generated/users/item/teamwork/associated_teams/item/associated_team_info_item_request_builder.py +++ b/msgraph/generated/users/item/teamwork/associated_teams/item/associated_team_info_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Associate Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AssociatedTeamInfoItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AssociatedTe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AssociatedTeamInfo] = None, request_configuration: Optional[AssociatedTeamInfoItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AssociatedTeamInfo] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/teamwork/associated_teams/item/team/team_request_builder.py b/msgraph/generated/users/item/teamwork/associated_teams/item/team/team_request_builder.py index 0e08120abf7..e8abb57acab 100644 --- a/msgraph/generated/users/item/teamwork/associated_teams/item/team/team_request_builder.py +++ b/msgraph/generated/users/item/teamwork/associated_teams/item/team/team_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamRequestBuilder: diff --git a/msgraph/generated/users/item/teamwork/installed_apps/count/count_request_builder.py b/msgraph/generated/users/item/teamwork/installed_apps/count/count_request_builder.py index e77c1a7f9c2..011d71bc023 100644 --- a/msgraph/generated/users/item/teamwork/installed_apps/count/count_request_builder.py +++ b/msgraph/generated/users/item/teamwork/installed_apps/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/teamwork/installed_apps/installed_apps_request_builder.py b/msgraph/generated/users/item/teamwork/installed_apps/installed_apps_request_builder.py index 438647270e0..c94d476018b 100644 --- a/msgraph/generated/users/item/teamwork/installed_apps/installed_apps_request_builder.py +++ b/msgraph/generated/users/item/teamwork/installed_apps/installed_apps_request_builder.py @@ -45,7 +45,7 @@ def by_user_scope_teams_app_installation_id(self,user_scope_teams_app_installati async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[UserScopeTeamsAppInstallationCollectionResponse]: """ - Retrieve the list of apps installed in the personal scope of the specified user. + Retrieve the list of apps installed in the personal scope of the specified user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserScopeTeamsAppInstallationCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/userteamwork-list-installedapps?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[InstalledAppsRequestBuilderGe async def post(self,body: Optional[UserScopeTeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[UserScopeTeamsAppInstallation]: """ - Install an app in the personal scope of the specified user. + Install an app in the personal scope of the specified user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserScopeTeamsAppInstallation] @@ -92,24 +92,24 @@ async def post(self,body: Optional[UserScopeTeamsAppInstallation] = None, reques def to_get_request_information(self,request_configuration: Optional[InstalledAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the list of apps installed in the personal scope of the specified user. + Retrieve the list of apps installed in the personal scope of the specified user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserScopeTeamsAppInstallation] = None, request_configuration: Optional[InstalledAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Install an app in the personal scope of the specified user. + Install an app in the personal scope of the specified user. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[UserScopeTeamsAppInstallatio if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class InstalledAppsRequestBuilderGetQueryParameters(): """ - Retrieve the list of apps installed in the personal scope of the specified user. + Retrieve the list of apps installed in the personal scope of the specified user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/teamwork/installed_apps/item/chat/chat_request_builder.py b/msgraph/generated/users/item/teamwork/installed_apps/item/chat/chat_request_builder.py index defedf8e53d..2b27a5cff34 100644 --- a/msgraph/generated/users/item/teamwork/installed_apps/item/chat/chat_request_builder.py +++ b/msgraph/generated/users/item/teamwork/installed_apps/item/chat/chat_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[ChatRequestBuilderGetRequestConfiguration] = None) -> Optional[Chat]: """ - Retrieve the chat of the specified user and Teams app. + Retrieve the chat of the specified user and Teams app. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Chat] Find more info here: https://learn.microsoft.com/graph/api/userscopeteamsappinstallation-get-chat?view=graph-rest-1.0 @@ -50,19 +50,19 @@ async def get(self,request_configuration: Optional[ChatRequestBuilderGetRequestC def to_get_request_information(self,request_configuration: Optional[ChatRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the chat of the specified user and Teams app. + Retrieve the chat of the specified user and Teams app. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> ChatRequestBuilder: @@ -78,7 +78,7 @@ def with_url(self,raw_url: Optional[str] = None) -> ChatRequestBuilder: @dataclass class ChatRequestBuilderGetQueryParameters(): """ - Retrieve the chat of the specified user and Teams app. + Retrieve the chat of the specified user and Teams app. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app/teams_app_request_builder.py b/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app/teams_app_request_builder.py index 1727307413a..32905f46677 100644 --- a/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app/teams_app_request_builder.py +++ b/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app/teams_app_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppRequestBuilder: diff --git a/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py b/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py index 3c48ef61044..68e54b37169 100644 --- a/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py +++ b/msgraph/generated/users/item/teamwork/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamsAppDefi Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TeamsAppDefinitionRequestBuilder: diff --git a/msgraph/generated/users/item/teamwork/installed_apps/item/user_scope_teams_app_installation_item_request_builder.py b/msgraph/generated/users/item/teamwork/installed_apps/item/user_scope_teams_app_installation_item_request_builder.py index 646d9671b9e..0e3594c93ed 100644 --- a/msgraph/generated/users/item/teamwork/installed_apps/item/user_scope_teams_app_installation_item_request_builder.py +++ b/msgraph/generated/users/item/teamwork/installed_apps/item/user_scope_teams_app_installation_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UserScopeTeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Uninstall an app from the personal scope of the specified user. + Uninstall an app from the personal scope of the specified user. This API is available in the following national cloud deployments. 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/userteamwork-delete-installedapps?view=graph-rest-1.0 @@ -51,7 +51,7 @@ async def delete(self,request_configuration: Optional[UserScopeTeamsAppInstallat async def get(self,request_configuration: Optional[UserScopeTeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[UserScopeTeamsAppInstallation]: """ - Retrieve the app installed in the personal scope of the specified user. + Retrieve the app installed in the personal scope of the specified user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserScopeTeamsAppInstallation] Find more info here: https://learn.microsoft.com/graph/api/userteamwork-get-installedapps?view=graph-rest-1.0 @@ -97,34 +97,34 @@ async def patch(self,body: Optional[UserScopeTeamsAppInstallation] = None, reque def to_delete_request_information(self,request_configuration: Optional[UserScopeTeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Uninstall an app from the personal scope of the specified user. + Uninstall an app from the personal scope of the specified user. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserScopeTeamsAppInstallationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the app installed in the personal scope of the specified user. + Retrieve the app installed in the personal scope of the specified user. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserScopeTeamsAppInstallation] = None, request_configuration: Optional[UserScopeTeamsAppInstallationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[UserScopeTeamsAppInstallati if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -197,7 +197,7 @@ class UserScopeTeamsAppInstallationItemRequestBuilderDeleteRequestConfiguration( @dataclass class UserScopeTeamsAppInstallationItemRequestBuilderGetQueryParameters(): """ - Retrieve the app installed in the personal scope of the specified user. + Retrieve the app installed in the personal scope of the specified user. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/teamwork/send_activity_notification/send_activity_notification_request_builder.py b/msgraph/generated/users/item/teamwork/send_activity_notification/send_activity_notification_request_builder.py index 52572325057..ba8818d8a51 100644 --- a/msgraph/generated/users/item/teamwork/send_activity_notification/send_activity_notification_request_builder.py +++ b/msgraph/generated/users/item/teamwork/send_activity_notification/send_activity_notification_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> None: """ - Send an activity feed notification to a user. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + Send an activity feed notification to a user. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. This API is available in the following national cloud deployments. 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[SendActivityNotificationPostRequestBody] = No def to_post_request_information(self,body: Optional[SendActivityNotificationPostRequestBody] = None, request_configuration: Optional[SendActivityNotificationRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send an activity feed notification to a user. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + Send an activity feed notification to a user. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[SendActivityNotificationPost if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/teamwork/teamwork_request_builder.py b/msgraph/generated/users/item/teamwork/teamwork_request_builder.py index ec35c0957a0..55eb1dcb0fa 100644 --- a/msgraph/generated/users/item/teamwork/teamwork_request_builder.py +++ b/msgraph/generated/users/item/teamwork/teamwork_request_builder.py @@ -100,12 +100,12 @@ def to_delete_request_information(self,request_configuration: Optional[TeamworkR Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TeamworkRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -115,14 +115,14 @@ def to_get_request_information(self,request_configuration: Optional[TeamworkRequ Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[UserTeamwork] = None, request_configuration: Optional[TeamworkRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[UserTeamwork] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/count/count_request_builder.py index b32c4354bb7..1684378aa55 100644 --- a/msgraph/generated/users/item/todo/lists/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/delta/delta_response.py b/msgraph/generated/users/item/todo/lists/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/todo/lists/delta/delta_response.py rename to msgraph/generated/users/item/todo/lists/delta/delta_get_response.py index 8fc2be31114..08d31517166 100644 --- a/msgraph/generated/users/item/todo/lists/delta/delta_response.py +++ b/msgraph/generated/users/item/todo/lists/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ......models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[TodoTaskList]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/todo/lists/delta/delta_request_builder.py b/msgraph/generated/users/item/todo/lists/delta/delta_request_builder.py index f6fefc286dd..e4e8451d9e0 100644 --- a/msgraph/generated/users/item/todo/lists/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/todo/lists/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/extensions/count/count_request_builder.py index e3588051a42..3630c8076f7 100644 --- a/msgraph/generated/users/item/todo/lists/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/todo/lists/item/extensions/extensions_request_builder.py index d260b1e03aa..3e218b59e80 100644 --- a/msgraph/generated/users/item/todo/lists/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/extensions/item/extension_item_request_builder.py index 350f3135d24..36f2a98c09f 100644 --- a/msgraph/generated/users/item/todo/lists/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/count/count_request_builder.py index 2a594e6d9d4..c1642ffa3d1 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_response.py b/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_get_response.py similarity index 93% rename from msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_response.py rename to msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_get_response.py index 960b0b5f955..85741c3a671 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_response.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_get_response.py @@ -10,20 +10,20 @@ from ........models.base_delta_function_response import BaseDeltaFunctionResponse @dataclass -class DeltaResponse(BaseDeltaFunctionResponse): +class DeltaGetResponse(BaseDeltaFunctionResponse): # The value property value: Optional[List[TodoTask]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> DeltaGetResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: DeltaResponse + Returns: DeltaGetResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return DeltaResponse() + return DeltaGetResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_request_builder.py index 96ab8853111..ca61785087b 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/delta/delta_request_builder.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: from ........models.o_data_errors.o_data_error import ODataError - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse class DeltaRequestBuilder(BaseRequestBuilder): """ @@ -26,11 +26,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) - async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaResponse]: + async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> Optional[DeltaGetResponse]: """ Invoke function delta param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[DeltaResponse] + Returns: Optional[DeltaGetResponse] """ request_info = self.to_get_request_information( request_configuration @@ -43,9 +43,9 @@ async def get(self,request_configuration: Optional[DeltaRequestBuilderGetRequest } if not self.request_adapter: raise Exception("Http core is null") - from .delta_response import DeltaResponse + from .delta_get_response import DeltaGetResponse - return await self.request_adapter.send_async(request_info, DeltaResponse, error_mapping) + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) def to_get_request_information(self,request_configuration: Optional[DeltaRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[DeltaRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DeltaRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/attachment_sessions_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/attachment_sessions_request_builder.py index dbb154a6aa7..e9791f48299 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/attachment_sessions_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/attachment_sessions_request_builder.py @@ -70,14 +70,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentSe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentSessionsRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/count/count_request_builder.py index f71057d3cb3..95374f1f7c3 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/attachment_session_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/attachment_session_item_request_builder.py index cbfebe52b14..1bd2a279105 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/attachment_session_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/attachment_session_item_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[Attachmen Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentSessionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentSe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttachmentSession] = None, request_configuration: Optional[AttachmentSessionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[AttachmentSession] = None, if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/content/content_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/content/content_request_builder.py index 681a4a10f36..cee4a6b25d5 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/content/content_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachment_sessions/item/content/content_request_builder.py @@ -76,12 +76,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -94,13 +94,13 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - request_info.headers["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/attachments_request_builder.py index b4c90d5ffbf..896594f3eb3 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/attachments_request_builder.py @@ -46,7 +46,7 @@ def by_attachment_base_id(self,attachment_base_id: str) -> AttachmentBaseItemReq async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentBaseCollectionResponse]: """ - Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. + Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentBaseCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/todotask-list-attachments?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetR async def post(self,body: Optional[AttachmentBase] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[AttachmentBase]: """ - Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. + Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentBase] @@ -93,24 +93,24 @@ async def post(self,body: Optional[AttachmentBase] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[AttachmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. + Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[AttachmentBase] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. + Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[AttachmentBase] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def create_upload_session(self) -> CreateUploadSessionRequestBuilder: @dataclass class AttachmentsRequestBuilderGetQueryParameters(): """ - Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. + Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/count/count_request_builder.py index 17627f3ac97..fd50cedd2f7 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/create_upload_session/create_upload_session_request_builder.py index 4f105271bd9..cec211fdde7 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/create_upload_session/create_upload_session_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/create_upload_session/create_upload_session_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> Optional[UploadSession]: """ - Create an upload session to iteratively upload ranges of a file as an attachment to a todoTask. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. The request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows the transfer to be resumed, in case the network connection is dropped during the upload. The following are the steps to attach a file to a Microsoft To Do task using an upload session: For an example that describes the end-to-end attachment process, see attach files to a To Do task. + Create an upload session to iteratively upload ranges of a file as an attachment to a todoTask. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. The request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows the transfer to be resumed, in case the network connection is dropped during the upload. The following are the steps to attach a file to a Microsoft To Do task using an upload session: For an example that describes the end-to-end attachment process, see attach files to a To Do task. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UploadSession] @@ -54,7 +54,7 @@ async def post(self,body: Optional[CreateUploadSessionPostRequestBody] = None, r def to_post_request_information(self,body: Optional[CreateUploadSessionPostRequestBody] = None, request_configuration: Optional[CreateUploadSessionRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create an upload session to iteratively upload ranges of a file as an attachment to a todoTask. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. The request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows the transfer to be resumed, in case the network connection is dropped during the upload. The following are the steps to attach a file to a Microsoft To Do task using an upload session: For an example that describes the end-to-end attachment process, see attach files to a To Do task. + Create an upload session to iteratively upload ranges of a file as an attachment to a todoTask. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. The request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows the transfer to be resumed, in case the network connection is dropped during the upload. The following are the steps to attach a file to a Microsoft To Do task using an upload session: For an example that describes the end-to-end attachment process, see attach files to a To Do task. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[CreateUploadSessionPostReque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/attachment_base_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/attachment_base_item_request_builder.py index bd447b775d7..2c99599a5fd 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/attachment_base_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/attachment_base_item_request_builder.py @@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[AttachmentBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a taskFileAttachment object from a todoTask resource. + Delete a taskFileAttachment object from a todoTask resource. This API is available in the following national cloud deployments. 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/taskfileattachment-delete?view=graph-rest-1.0 @@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[AttachmentBaseItemRequestB async def get(self,request_configuration: Optional[AttachmentBaseItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AttachmentBase]: """ - Read the properties and relationships of a taskFileAttachment object. + Read the properties and relationships of a taskFileAttachment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AttachmentBase] Find more info here: https://learn.microsoft.com/graph/api/taskfileattachment-get?view=graph-rest-1.0 @@ -71,34 +71,34 @@ async def get(self,request_configuration: Optional[AttachmentBaseItemRequestBuil def to_delete_request_information(self,request_configuration: Optional[AttachmentBaseItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a taskFileAttachment object from a todoTask resource. + Delete a taskFileAttachment object from a todoTask resource. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[AttachmentBaseItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a taskFileAttachment object. + Read the properties and relationships of a taskFileAttachment object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> AttachmentBaseItemRequestBuilder: @@ -133,7 +133,7 @@ class AttachmentBaseItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class AttachmentBaseItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a taskFileAttachment object. + Read the properties and relationships of a taskFileAttachment object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/value/content_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/value/content_request_builder.py index aaee5c9fc5c..b445257e46a 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/attachments/item/value/content_request_builder.py @@ -74,12 +74,12 @@ def to_get_request_information(self,request_configuration: Optional[ContentReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_put_request_information(self,body: bytes, request_configuration: Optional[ContentRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: @@ -92,12 +92,12 @@ def to_put_request_information(self,body: bytes, request_configuration: Optional if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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.PUT - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_stream_content(body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/checklist_items_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/checklist_items_request_builder.py index 3a55ab12951..0b7a5f63619 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/checklist_items_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/checklist_items_request_builder.py @@ -45,7 +45,7 @@ def by_checklist_item_id(self,checklist_item_id: str) -> ChecklistItemItemReques async def get(self,request_configuration: Optional[ChecklistItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[ChecklistItemCollectionResponse]: """ - Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. + Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChecklistItemCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/todotask-list-checklistitems?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[ChecklistItemsRequestBuilderG async def post(self,body: Optional[ChecklistItem] = None, request_configuration: Optional[ChecklistItemsRequestBuilderPostRequestConfiguration] = None) -> Optional[ChecklistItem]: """ - Create a new checklistItem object. + Create a new checklistItem object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChecklistItem] @@ -92,24 +92,24 @@ async def post(self,body: Optional[ChecklistItem] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ChecklistItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. + Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChecklistItem] = None, request_configuration: Optional[ChecklistItemsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new checklistItem object. + Create a new checklistItem object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[ChecklistItem] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ChecklistItemsRequestBuilderGetQueryParameters(): """ - Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. + Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/count/count_request_builder.py index 2543b631912..74c6f9e1ad8 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/item/checklist_item_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/item/checklist_item_item_request_builder.py index cd0463e5054..26c8ba40b7d 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/item/checklist_item_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/checklist_items/item/checklist_item_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ChecklistItemItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete a checklistItem object. + Delete a checklistItem object. This API is available in the following national cloud deployments. 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/checklistitem-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[ChecklistItemItemRequestBu async def get(self,request_configuration: Optional[ChecklistItemItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ChecklistItem]: """ - Read the properties and relationships of a checklistItem object. + Read the properties and relationships of a checklistItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChecklistItem] Find more info here: https://learn.microsoft.com/graph/api/checklistitem-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[ChecklistItemItemRequestBuild async def patch(self,body: Optional[ChecklistItem] = None, request_configuration: Optional[ChecklistItemItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ChecklistItem]: """ - Update the properties of a checklistItem object. + Update the properties of a checklistItem object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChecklistItem] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[ChecklistItem] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[ChecklistItemItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete a checklistItem object. + Delete a checklistItem object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ChecklistItemItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a checklistItem object. + Read the properties and relationships of a checklistItem object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[ChecklistItem] = None, request_configuration: Optional[ChecklistItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a checklistItem object. + Update the properties of a checklistItem object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[ChecklistItem] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class ChecklistItemItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @dataclass class ChecklistItemItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a checklistItem object. + Read the properties and relationships of a checklistItem object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/count/count_request_builder.py index 72a3a72e46d..29390c9b483 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/extensions_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/extensions_request_builder.py index 62aafa4e33b..008524726fe 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/extensions_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/extensions_request_builder.py @@ -95,14 +95,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionsRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -115,13 +115,13 @@ def to_post_request_information(self,body: Optional[Extension] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/item/extension_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/item/extension_item_request_builder.py index 9a78563b2b6..cfc03927bb5 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/item/extension_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/extensions/item/extension_item_request_builder.py @@ -97,12 +97,12 @@ def to_delete_request_information(self,request_configuration: Optional[Extension Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[ExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -112,14 +112,14 @@ def to_get_request_information(self,request_configuration: Optional[ExtensionIte Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Extension] = None, request_configuration: Optional[ExtensionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -132,13 +132,13 @@ def to_patch_request_information(self,body: Optional[Extension] = None, request_ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/count/count_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/count/count_request_builder.py index 24e87cfc2d4..8ee580c5730 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/count/count_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/item/linked_resource_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/item/linked_resource_item_request_builder.py index c2bcabf2a88..e7619be5d21 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/item/linked_resource_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/item/linked_resource_item_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[LinkedResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a linkedResource object. + Deletes a linkedResource object. This API is available in the following national cloud deployments. 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/linkedresource-delete?view=graph-rest-1.0 @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[LinkedResourceItemRequestB async def get(self,request_configuration: Optional[LinkedResourceItemRequestBuilderGetRequestConfiguration] = None) -> Optional[LinkedResource]: """ - Read the properties and relationships of a linkedResource object. + Read the properties and relationships of a linkedResource object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LinkedResource] Find more info here: https://learn.microsoft.com/graph/api/linkedresource-get?view=graph-rest-1.0 @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[LinkedResourceItemRequestBuil async def patch(self,body: Optional[LinkedResource] = None, request_configuration: Optional[LinkedResourceItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LinkedResource]: """ - Update the properties of a linkedResource object. + Update the properties of a linkedResource object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LinkedResource] @@ -95,39 +95,39 @@ async def patch(self,body: Optional[LinkedResource] = None, request_configuratio def to_delete_request_information(self,request_configuration: Optional[LinkedResourceItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a linkedResource object. + Deletes a linkedResource object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[LinkedResourceItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a linkedResource object. + Read the properties and relationships of a linkedResource object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LinkedResource] = None, request_configuration: Optional[LinkedResourceItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a linkedResource object. + Update the properties of a linkedResource object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -135,13 +135,13 @@ def to_patch_request_information(self,body: Optional[LinkedResource] = None, req if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -168,7 +168,7 @@ class LinkedResourceItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @dataclass class LinkedResourceItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a linkedResource object. + Read the properties and relationships of a linkedResource object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/linked_resources_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/linked_resources_request_builder.py index 9d09797c6e1..423db460ad4 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/linked_resources_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/linked_resources/linked_resources_request_builder.py @@ -45,7 +45,7 @@ def by_linked_resource_id(self,linked_resource_id: str) -> LinkedResourceItemReq async def get(self,request_configuration: Optional[LinkedResourcesRequestBuilderGetRequestConfiguration] = None) -> Optional[LinkedResourceCollectionResponse]: """ - Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. + Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LinkedResourceCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/todotask-list-linkedresources?view=graph-rest-1.0 @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[LinkedResourcesRequestBuilder async def post(self,body: Optional[LinkedResource] = None, request_configuration: Optional[LinkedResourcesRequestBuilderPostRequestConfiguration] = None) -> Optional[LinkedResource]: """ - Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. + Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[LinkedResource] @@ -92,24 +92,24 @@ async def post(self,body: Optional[LinkedResource] = None, request_configuration def to_get_request_information(self,request_configuration: Optional[LinkedResourcesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. + Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[LinkedResource] = None, request_configuration: Optional[LinkedResourcesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. + Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -117,13 +117,13 @@ def to_post_request_information(self,body: Optional[LinkedResource] = None, requ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class LinkedResourcesRequestBuilderGetQueryParameters(): """ - Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. + Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/item/todo_task_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/item/todo_task_item_request_builder.py index 5fd9a801726..2b9f95d0094 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/item/todo_task_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/item/todo_task_item_request_builder.py @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TodoTaskItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a todoTask object. + Deletes a todoTask object. This API is available in the following national cloud deployments. 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/todotask-delete?view=graph-rest-1.0 @@ -53,7 +53,7 @@ async def delete(self,request_configuration: Optional[TodoTaskItemRequestBuilder async def get(self,request_configuration: Optional[TodoTaskItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TodoTask]: """ - Read the properties and relationships of a todoTask object. + Read the properties and relationships of a todoTask object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTask] Find more info here: https://learn.microsoft.com/graph/api/todotask-get?view=graph-rest-1.0 @@ -75,7 +75,7 @@ async def get(self,request_configuration: Optional[TodoTaskItemRequestBuilderGet async def patch(self,body: Optional[TodoTask] = None, request_configuration: Optional[TodoTaskItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TodoTask]: """ - Update the properties of a todoTask object. + Update the properties of a todoTask object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTask] @@ -100,39 +100,39 @@ async def patch(self,body: Optional[TodoTask] = None, request_configuration: Opt def to_delete_request_information(self,request_configuration: Optional[TodoTaskItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a todoTask object. + Deletes a todoTask object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TodoTaskItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a todoTask object. + Read the properties and relationships of a todoTask object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TodoTask] = None, request_configuration: Optional[TodoTaskItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a todoTask object. + Update the properties of a todoTask object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -140,13 +140,13 @@ def to_patch_request_information(self,body: Optional[TodoTask] = None, request_c if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -161,22 +161,22 @@ def with_url(self,raw_url: Optional[str] = None) -> TodoTaskItemRequestBuilder: return TodoTaskItemRequestBuilder(self.request_adapter, raw_url) @property - def attachments(self) -> AttachmentsRequestBuilder: + def attachment_sessions(self) -> AttachmentSessionsRequestBuilder: """ - Provides operations to manage the attachments property of the microsoft.graph.todoTask entity. + Provides operations to manage the attachmentSessions property of the microsoft.graph.todoTask entity. """ - from .attachments.attachments_request_builder import AttachmentsRequestBuilder + from .attachment_sessions.attachment_sessions_request_builder import AttachmentSessionsRequestBuilder - return AttachmentsRequestBuilder(self.request_adapter, self.path_parameters) + return AttachmentSessionsRequestBuilder(self.request_adapter, self.path_parameters) @property - def attachment_sessions(self) -> AttachmentSessionsRequestBuilder: + def attachments(self) -> AttachmentsRequestBuilder: """ - Provides operations to manage the attachmentSessions property of the microsoft.graph.todoTask entity. + Provides operations to manage the attachments property of the microsoft.graph.todoTask entity. """ - from .attachment_sessions.attachment_sessions_request_builder import AttachmentSessionsRequestBuilder + from .attachments.attachments_request_builder import AttachmentsRequestBuilder - return AttachmentSessionsRequestBuilder(self.request_adapter, self.path_parameters) + return AttachmentsRequestBuilder(self.request_adapter, self.path_parameters) @property def checklist_items(self) -> ChecklistItemsRequestBuilder: @@ -218,7 +218,7 @@ class TodoTaskItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigurat @dataclass class TodoTaskItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a todoTask object. + Read the properties and relationships of a todoTask object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/tasks/tasks_request_builder.py b/msgraph/generated/users/item/todo/lists/item/tasks/tasks_request_builder.py index 538dd466271..80fc2f7b83c 100644 --- a/msgraph/generated/users/item/todo/lists/item/tasks/tasks_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/tasks/tasks_request_builder.py @@ -46,7 +46,7 @@ def by_todo_task_id(self,todo_task_id: str) -> TodoTaskItemRequestBuilder: async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> Optional[TodoTaskCollectionResponse]: """ - Get the todoTask resources from the tasks navigation property of a specified todoTaskList. + Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTaskCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/todotasklist-list-tasks?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[TasksRequestBuilderGetRequest async def post(self,body: Optional[TodoTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> Optional[TodoTask]: """ - Create a new task object in a specified todoTaskList. + Create a new task object in a specified todoTaskList. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTask] @@ -93,24 +93,24 @@ async def post(self,body: Optional[TodoTask] = None, request_configuration: Opti def to_get_request_information(self,request_configuration: Optional[TasksRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get the todoTask resources from the tasks navigation property of a specified todoTaskList. + Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TodoTask] = None, request_configuration: Optional[TasksRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new task object in a specified todoTaskList. + Create a new task object in a specified todoTaskList. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[TodoTask] = None, request_co if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class TasksRequestBuilderGetQueryParameters(): """ - Get the todoTask resources from the tasks navigation property of a specified todoTaskList. + Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/item/todo_task_list_item_request_builder.py b/msgraph/generated/users/item/todo/lists/item/todo_task_list_item_request_builder.py index f8df647e8b8..37dd4ed4d0a 100644 --- a/msgraph/generated/users/item/todo/lists/item/todo_task_list_item_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/item/todo_task_list_item_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[TodoTaskListItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a todoTaskList object. + Deletes a todoTaskList object. This API is available in the following national cloud deployments. 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/todotasklist-delete?view=graph-rest-1.0 @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[TodoTaskListItemRequestBui async def get(self,request_configuration: Optional[TodoTaskListItemRequestBuilderGetRequestConfiguration] = None) -> Optional[TodoTaskList]: """ - Read the properties and relationships of a todoTaskList object. + Read the properties and relationships of a todoTaskList object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTaskList] Find more info here: https://learn.microsoft.com/graph/api/todotasklist-get?view=graph-rest-1.0 @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[TodoTaskListItemRequestBuilde async def patch(self,body: Optional[TodoTaskList] = None, request_configuration: Optional[TodoTaskListItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[TodoTaskList]: """ - Update the properties of a todoTaskList object. + Update the properties of a todoTaskList object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTaskList] @@ -97,39 +97,39 @@ async def patch(self,body: Optional[TodoTaskList] = None, request_configuration: def to_delete_request_information(self,request_configuration: Optional[TodoTaskListItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a todoTaskList object. + Deletes a todoTaskList object. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TodoTaskListItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a todoTaskList object. + Read the properties and relationships of a todoTaskList object. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TodoTaskList] = None, request_configuration: Optional[TodoTaskListItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a todoTaskList object. + Update the properties of a todoTaskList object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -137,13 +137,13 @@ def to_patch_request_information(self,body: Optional[TodoTaskList] = None, reque if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -188,7 +188,7 @@ class TodoTaskListItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfig @dataclass class TodoTaskListItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a todoTaskList object. + Read the properties and relationships of a todoTaskList object. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/lists/lists_request_builder.py b/msgraph/generated/users/item/todo/lists/lists_request_builder.py index ba82449959b..245b37ac587 100644 --- a/msgraph/generated/users/item/todo/lists/lists_request_builder.py +++ b/msgraph/generated/users/item/todo/lists/lists_request_builder.py @@ -46,7 +46,7 @@ def by_todo_task_list_id(self,todo_task_list_id: str) -> TodoTaskListItemRequest async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> Optional[TodoTaskListCollectionResponse]: """ - Get a list of the todoTaskList objects and their properties. + Get a list of the todoTaskList objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTaskListCollectionResponse] Find more info here: https://learn.microsoft.com/graph/api/todo-list-lists?view=graph-rest-1.0 @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequest async def post(self,body: Optional[TodoTaskList] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[TodoTaskList]: """ - Create a new lists object. + Create a new lists object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[TodoTaskList] @@ -93,24 +93,24 @@ async def post(self,body: Optional[TodoTaskList] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of the todoTaskList objects and their properties. + Get a list of the todoTaskList objects and their properties. This API is available in the following national cloud deployments. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[TodoTaskList] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new lists object. + Create a new lists object. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -118,13 +118,13 @@ def to_post_request_information(self,body: Optional[TodoTaskList] = None, reques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -159,7 +159,7 @@ def delta(self) -> DeltaRequestBuilder: @dataclass class ListsRequestBuilderGetQueryParameters(): """ - Get a list of the todoTaskList objects and their properties. + Get a list of the todoTaskList objects and their properties. This API is available in the following national cloud deployments. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/todo/todo_request_builder.py b/msgraph/generated/users/item/todo/todo_request_builder.py index e4b709b7302..4ebbf84cf00 100644 --- a/msgraph/generated/users/item/todo/todo_request_builder.py +++ b/msgraph/generated/users/item/todo/todo_request_builder.py @@ -98,12 +98,12 @@ def to_delete_request_information(self,request_configuration: Optional[TodoReque Returns: RequestInformation """ request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[TodoRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: @@ -113,14 +113,14 @@ def to_get_request_information(self,request_configuration: Optional[TodoRequestB Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[Todo] = None, request_configuration: Optional[TodoRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -133,13 +133,13 @@ def to_patch_request_information(self,body: Optional[Todo] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/transitive_member_of/count/count_request_builder.py b/msgraph/generated/users/item/transitive_member_of/count/count_request_builder.py index 399858f7a9d..ffaf83c4cea 100644 --- a/msgraph/generated/users/item/transitive_member_of/count/count_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py b/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py index bf948e65d67..2c2e071da18 100644 --- a/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py index 5fd4abc9914..deed2c56e11 100644 --- a/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/graph_directory_role/count/count_request_builder.py b/msgraph/generated/users/item/transitive_member_of/graph_directory_role/count/count_request_builder.py index a02472b98d9..4c714c412d7 100644 --- a/msgraph/generated/users/item/transitive_member_of/graph_directory_role/count/count_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/graph_directory_role/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/users/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py index d105b616747..8733c62a59b 100644 --- a/msgraph/generated/users/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/graph_directory_role/graph_directory_role_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/graph_group/count/count_request_builder.py b/msgraph/generated/users/item/transitive_member_of/graph_group/count/count_request_builder.py index 3d2c9320bdc..6e865e3c6d3 100644 --- a/msgraph/generated/users/item/transitive_member_of/graph_group/count/count_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/graph_group/count/count_request_builder.py @@ -51,14 +51,14 @@ def to_get_request_information(self,request_configuration: Optional[CountRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["text/plain"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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", "text/plain") return request_info def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/graph_group/graph_group_request_builder.py b/msgraph/generated/users/item/transitive_member_of/graph_group/graph_group_request_builder.py index 54f4229f6b5..32295c405ac 100644 --- a/msgraph/generated/users/item/transitive_member_of/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/graph_group/graph_group_request_builder.py @@ -55,14 +55,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/item/directory_object_item_request_builder.py b/msgraph/generated/users/item/transitive_member_of/item/directory_object_item_request_builder.py index e9338a2aa65..4b295cd5785 100644 --- a/msgraph/generated/users/item/transitive_member_of/item/directory_object_item_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/item/directory_object_item_request_builder.py @@ -57,14 +57,14 @@ def to_get_request_information(self,request_configuration: Optional[DirectoryObj Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> DirectoryObjectItemRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py b/msgraph/generated/users/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py index 20bef070408..b17dc624f8b 100644 --- a/msgraph/generated/users/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphAdminis Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphAdministrativeUnitRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py b/msgraph/generated/users/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py index 3dda1674c9c..8363b4f034a 100644 --- a/msgraph/generated/users/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/item/graph_directory_role/graph_directory_role_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphDirecto Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphDirectoryRoleRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/item/graph_group/graph_group_request_builder.py b/msgraph/generated/users/item/transitive_member_of/item/graph_group/graph_group_request_builder.py index 94bfb3d0012..2e5451cce40 100644 --- a/msgraph/generated/users/item/transitive_member_of/item/graph_group/graph_group_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/item/graph_group/graph_group_request_builder.py @@ -54,14 +54,14 @@ def to_get_request_information(self,request_configuration: Optional[GraphGroupRe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> GraphGroupRequestBuilder: diff --git a/msgraph/generated/users/item/transitive_member_of/transitive_member_of_request_builder.py b/msgraph/generated/users/item/transitive_member_of/transitive_member_of_request_builder.py index 6742c89356e..5b439504595 100644 --- a/msgraph/generated/users/item/transitive_member_of/transitive_member_of_request_builder.py +++ b/msgraph/generated/users/item/transitive_member_of/transitive_member_of_request_builder.py @@ -74,14 +74,14 @@ def to_get_request_information(self,request_configuration: Optional[TransitiveMe Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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) -> TransitiveMemberOfRequestBuilder: diff --git a/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_response.py b/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_post_response.py similarity index 90% rename from msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_response.py rename to msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_post_response.py index 899881a1374..e8eaf961bf7 100644 --- a/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_response.py +++ b/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_post_response.py @@ -10,20 +10,20 @@ from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse @dataclass -class TranslateExchangeIdsResponse(BaseCollectionPaginationCountResponse): +class TranslateExchangeIdsPostResponse(BaseCollectionPaginationCountResponse): # The value property value: Optional[List[ConvertIdResult]] = None @staticmethod - def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TranslateExchangeIdsResponse: + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> TranslateExchangeIdsPostResponse: """ Creates a new instance of the appropriate class based on discriminator value param parse_node: The parse node to use to read the discriminator value and create the object - Returns: TranslateExchangeIdsResponse + Returns: TranslateExchangeIdsPostResponse """ if not parse_node: raise TypeError("parse_node cannot be null.") - return TranslateExchangeIdsResponse() + return TranslateExchangeIdsPostResponse() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ diff --git a/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_request_builder.py b/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_request_builder.py index 6373925ea66..058a068e621 100644 --- a/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_request_builder.py +++ b/msgraph/generated/users/item/translate_exchange_ids/translate_exchange_ids_request_builder.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from .translate_exchange_ids_post_request_body import TranslateExchangeIdsPostRequestBody - from .translate_exchange_ids_response import TranslateExchangeIdsResponse + from .translate_exchange_ids_post_response import TranslateExchangeIdsPostResponse class TranslateExchangeIdsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +27,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/translateExchangeIds", path_parameters) - async def post(self,body: Optional[TranslateExchangeIdsPostRequestBody] = None, request_configuration: Optional[TranslateExchangeIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[TranslateExchangeIdsResponse]: + async def post(self,body: Optional[TranslateExchangeIdsPostRequestBody] = None, request_configuration: Optional[TranslateExchangeIdsRequestBuilderPostRequestConfiguration] = None) -> Optional[TranslateExchangeIdsPostResponse]: """ - Translate identifiers of Outlook-related resources between formats. + Translate identifiers of Outlook-related resources between formats. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[TranslateExchangeIdsResponse] + Returns: Optional[TranslateExchangeIdsPostResponse] Find more info here: https://learn.microsoft.com/graph/api/user-translateexchangeids?view=graph-rest-1.0 """ if not body: @@ -48,13 +48,13 @@ async def post(self,body: Optional[TranslateExchangeIdsPostRequestBody] = None, } if not self.request_adapter: raise Exception("Http core is null") - from .translate_exchange_ids_response import TranslateExchangeIdsResponse + from .translate_exchange_ids_post_response import TranslateExchangeIdsPostResponse - return await self.request_adapter.send_async(request_info, TranslateExchangeIdsResponse, error_mapping) + return await self.request_adapter.send_async(request_info, TranslateExchangeIdsPostResponse, error_mapping) def to_post_request_information(self,body: Optional[TranslateExchangeIdsPostRequestBody] = None, request_configuration: Optional[TranslateExchangeIdsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Translate identifiers of Outlook-related resources between formats. + Translate identifiers of Outlook-related resources between formats. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -62,13 +62,13 @@ def to_post_request_information(self,body: Optional[TranslateExchangeIdsPostRequ if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/item/user_item_request_builder.py b/msgraph/generated/users/item/user_item_request_builder.py index 661d2f1e3f1..772138785f2 100644 --- a/msgraph/generated/users/item/user_item_request_builder.py +++ b/msgraph/generated/users/item/user_item_request_builder.py @@ -18,15 +18,15 @@ from .assign_license.assign_license_request_builder import AssignLicenseRequestBuilder from .authentication.authentication_request_builder import AuthenticationRequestBuilder from .calendar.calendar_request_builder import CalendarRequestBuilder - from .calendar_groups.calendar_groups_request_builder import CalendarGroupsRequestBuilder from .calendars.calendars_request_builder import CalendarsRequestBuilder + from .calendar_groups.calendar_groups_request_builder import CalendarGroupsRequestBuilder from .calendar_view.calendar_view_request_builder import CalendarViewRequestBuilder from .change_password.change_password_request_builder import ChangePasswordRequestBuilder from .chats.chats_request_builder import ChatsRequestBuilder from .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder - from .contact_folders.contact_folders_request_builder import ContactFoldersRequestBuilder from .contacts.contacts_request_builder import ContactsRequestBuilder + from .contact_folders.contact_folders_request_builder import ContactFoldersRequestBuilder from .created_objects.created_objects_request_builder import CreatedObjectsRequestBuilder from .device_management_troubleshooting_events.device_management_troubleshooting_events_request_builder import DeviceManagementTroubleshootingEventsRequestBuilder from .direct_reports.direct_reports_request_builder import DirectReportsRequestBuilder @@ -77,6 +77,7 @@ from .revoke_sign_in_sessions.revoke_sign_in_sessions_request_builder import RevokeSignInSessionsRequestBuilder from .scoped_role_member_of.scoped_role_member_of_request_builder import ScopedRoleMemberOfRequestBuilder from .send_mail.send_mail_request_builder import SendMailRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder from .settings.settings_request_builder import SettingsRequestBuilder from .teamwork.teamwork_request_builder import TeamworkRequestBuilder from .todo.todo_request_builder import TodoRequestBuilder @@ -99,10 +100,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UserItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a user. + 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. This API is available in the following national cloud deployments. 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-user-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/user-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -134,10 +135,10 @@ def export_device_and_app_management_data_with_skip_with_top(self,skip: Optional async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> Optional[User]: """ - Retrieve the properties and relationships of user object. + Read properties and relationships of the user object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] - Find more info here: https://learn.microsoft.com/graph/api/user-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -160,7 +161,7 @@ async def patch(self,body: Optional[User] = None, request_configuration: Optiona 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-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -196,34 +197,34 @@ 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: """ - Deletes a user. + 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. This API is available in the following national cloud deployments. 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(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) return request_info def to_get_request_information(self,request_configuration: Optional[UserItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve the properties and relationships of user object. + Read properties and relationships of the user object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[User] = None, request_configuration: Optional[UserItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: @@ -236,13 +237,13 @@ def to_patch_request_information(self,body: Optional[User] = None, request_confi if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info @@ -320,22 +321,22 @@ def calendar_groups(self) -> CalendarGroupsRequestBuilder: return CalendarGroupsRequestBuilder(self.request_adapter, self.path_parameters) @property - def calendars(self) -> CalendarsRequestBuilder: + def calendar_view(self) -> CalendarViewRequestBuilder: """ - Provides operations to manage the calendars property of the microsoft.graph.user entity. + Provides operations to manage the calendarView property of the microsoft.graph.user entity. """ - from .calendars.calendars_request_builder import CalendarsRequestBuilder + from .calendar_view.calendar_view_request_builder import CalendarViewRequestBuilder - return CalendarsRequestBuilder(self.request_adapter, self.path_parameters) + return CalendarViewRequestBuilder(self.request_adapter, self.path_parameters) @property - def calendar_view(self) -> CalendarViewRequestBuilder: + def calendars(self) -> CalendarsRequestBuilder: """ - Provides operations to manage the calendarView property of the microsoft.graph.user entity. + Provides operations to manage the calendars property of the microsoft.graph.user entity. """ - from .calendar_view.calendar_view_request_builder import CalendarViewRequestBuilder + from .calendars.calendars_request_builder import CalendarsRequestBuilder - return CalendarViewRequestBuilder(self.request_adapter, self.path_parameters) + return CalendarsRequestBuilder(self.request_adapter, self.path_parameters) @property def change_password(self) -> ChangePasswordRequestBuilder: @@ -590,22 +591,22 @@ def license_details(self) -> LicenseDetailsRequestBuilder: return LicenseDetailsRequestBuilder(self.request_adapter, self.path_parameters) @property - def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + def mail_folders(self) -> MailFoldersRequestBuilder: """ - The mailboxSettings property + Provides operations to manage the mailFolders property of the microsoft.graph.user entity. """ - from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .mail_folders.mail_folders_request_builder import MailFoldersRequestBuilder - return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + return MailFoldersRequestBuilder(self.request_adapter, self.path_parameters) @property - def mail_folders(self) -> MailFoldersRequestBuilder: + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: """ - Provides operations to manage the mailFolders property of the microsoft.graph.user entity. + The mailboxSettings property """ - from .mail_folders.mail_folders_request_builder import MailFoldersRequestBuilder + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder - return MailFoldersRequestBuilder(self.request_adapter, self.path_parameters) + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) @property def managed_app_registrations(self) -> ManagedAppRegistrationsRequestBuilder: @@ -823,6 +824,15 @@ def send_mail(self) -> SendMailRequestBuilder: return SendMailRequestBuilder(self.request_adapter, self.path_parameters) + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + @property def settings(self) -> SettingsRequestBuilder: """ @@ -890,7 +900,7 @@ class UserItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class UserItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of user object. + Read properties and relationships of the user object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/wipe_managed_app_registrations_by_device_tag/wipe_managed_app_registrations_by_device_tag_request_builder.py b/msgraph/generated/users/item/wipe_managed_app_registrations_by_device_tag/wipe_managed_app_registrations_by_device_tag_request_builder.py index 826870a6a4b..9cfd8208436 100644 --- a/msgraph/generated/users/item/wipe_managed_app_registrations_by_device_tag/wipe_managed_app_registrations_by_device_tag_request_builder.py +++ b/msgraph/generated/users/item/wipe_managed_app_registrations_by_device_tag/wipe_managed_app_registrations_by_device_tag_request_builder.py @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[WipeManagedAppRegistrationsB if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/users_request_builder.py b/msgraph/generated/users/users_request_builder.py index 83830a0f108..953cea32467 100644 --- a/msgraph/generated/users/users_request_builder.py +++ b/msgraph/generated/users/users_request_builder.py @@ -101,14 +101,14 @@ def to_get_request_information(self,request_configuration: Optional[UsersRequest Returns: RequestInformation """ request_info = RequestInformation() - request_info.url_template = self.url_template - request_info.path_parameters = self.path_parameters - request_info.http_method = Method.GET - request_info.headers["Accept"] = ["application/json"] if request_configuration: - request_info.add_request_headers(request_configuration.headers) + request_info.headers.add(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[User] = None, request_configuration: Optional[UsersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: @@ -121,13 +121,13 @@ def to_post_request_information(self,body: Optional[User] = None, request_config if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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["Accept"] = ["application/json"] - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) + request_info.headers.try_add("Accept", "application/json") request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info diff --git a/msgraph/generated/users/validate_properties/validate_properties_request_builder.py b/msgraph/generated/users/validate_properties/validate_properties_request_builder.py index 85c55b4123b..80d4df514a0 100644 --- a/msgraph/generated/users/validate_properties/validate_properties_request_builder.py +++ b/msgraph/generated/users/validate_properties/validate_properties_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> None: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. 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[ValidatePropertiesPostRequestBody] = None, re def to_post_request_information(self,body: Optional[ValidatePropertiesPostRequestBody] = None, request_configuration: Optional[ValidatePropertiesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. This API is available in the following national cloud deployments. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -59,12 +59,12 @@ def to_post_request_information(self,body: Optional[ValidatePropertiesPostReques if not body: raise TypeError("body cannot be null.") request_info = RequestInformation() + if request_configuration: + request_info.headers.add(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 - if request_configuration: - request_info.add_request_headers(request_configuration.headers) - request_info.add_request_options(request_configuration.options) request_info.set_content_from_parsable(self.request_adapter, "application/json", body) return request_info